Sunil Mohan Adapa 80dff7bf9c
tests: functional: Re-organize step definitions and helper methods
- Move non-reusable app specific step definitions and helper methods into
<app>/tests/test_functional.py.

- Merge reusable helper methods into plinth.tests.functional

- Merge reusable step definitions into plinth.tests.functional.step_definitions

- avahi, datetime, ikiwiki: Reuse common methods to avoid repetition. Avoid
mapping from app nicknames to actual app names.

- deluge, transmission: Make a copy of sample.torrent for each app to avoid
clogging common place.

- Implement functional.visit() to simplify a lot of browser.visit() calls.

- Ensure that name of the mark on functional tests for an app is same as name of
the app. This will help with predicting the mark when running tests for a
particular app.

Tests performed:

- Run all functional tests.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
2020-05-22 22:52:40 +05:30

54 lines
1.4 KiB
Gherkin
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# SPDX-License-Identifier: AGPL-3.0-or-later
# TODO Scenario: Add user to wiki group
# TODO Scenario: Remove user from wiki group
# TODO Scenario: Set user SSH key
# TODO Scenario: Clear user SSH key
# TODO Scenario: Make user inactive
# TODO Scenario: Make user active
# TODO Scenario: Change user password
@system @essential @users
Feature: Users and Groups
Manage users and groups.
Background:
Given I'm a logged in user
Scenario: Create user
Given the user alice doesn't exist
When I create a user named alice with password secret123secret123
Then alice should be listed as a user
Scenario: Rename user
Given the user alice exists
Given the user bob doesn't exist
When I rename the user alice to bob
Then alice should not be listed as a user
Then bob should be listed as a user
Scenario: Delete user
Given the user alice exists
When I delete the user alice
Then alice should not be listed as a user
Scenario Outline: Change language
When I change the language to <language>
Then Plinth language should be <language>
Examples:
| language |
| dansk |
| Deutsch |
| español |
| français |
| norsk (bokmål) |
| Nederlands |
| polski |
| Português |
| Русский |
| svenska |
| |
| Türkçe |
| |