-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(userAccounts): scenarios for acceptance tests
- Loading branch information
Showing
3 changed files
with
52 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
Feature: User Accounts | ||
The admin can manually create user accounts | ||
|
||
Background: | ||
Given I am logged in as the admin | ||
|
||
@implementing | ||
Scenario: Create a new user with a valid username and password | ||
Given I am on the user list page | ||
|
||
When I create a new user with the username "testuser" and password "password12345678" | ||
|
||
Then I should see a user created success message | ||
And I should see the user in the list | ||
|
||
@pending | ||
Scenario: Newly created user can log in | ||
Given I have created a new user "testuser" with the password "password12345678" | ||
|
||
When I log out and enter the username "testuser" and password "password123" in the login form | ||
|
||
Then I should successfully log in | ||
|
||
@pending | ||
Scenario: Admin cannot create a user with a duplicate username | ||
Given I am on the user list page | ||
And a user with the name "testuser" already exists | ||
|
||
When I create a new user with the username "testuser" and password "password12345678" | ||
|
||
Then I should see a duplicate username failure message | ||
|
||
@pending | ||
Scenario Outline: Admin cannot create a user with an invalid password | ||
Given I am on the user list page | ||
|
||
When I create a new user with the username "testuser" and password <password> | ||
|
||
Then I should see an invalid password failure message | ||
|
||
Examples: | ||
| password | | ||
| "" | | ||
| "password1234567" | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import {Given} from "@badeball/cypress-cucumber-preprocessor"; | ||
import {login} from "./shared/login"; | ||
|
||
Given("I am logged in as the admin", () => { | ||
login("{admin}", "{admin}"); | ||
}); |