Skip to content
This repository has been archived by the owner on Feb 1, 2023. It is now read-only.

Commit

Permalink
#7 - change unnecessary outline scenarios
Browse files Browse the repository at this point in the history
  • Loading branch information
Anna-Sokolowska committed Apr 22, 2022
1 parent 92c1d6c commit 09f0a48
Show file tree
Hide file tree
Showing 14 changed files with 48 additions and 111 deletions.
29 changes: 10 additions & 19 deletions features/admin_panel/adding_user_to_admin_panel.feature
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,12 @@ Feature: Adding a user to admin panel
Given the administrator is logged in
And the administrator is on the page with invitation form

Scenario Outline: Successfully send invitation to unregistered user
Scenario Successfully send invitation to unregistered user
Given the invited user doesn't have an account
When the administrator fills in "email" with "<email>"
When the administrator fills in "email" with "[email protected]"
And the administrator sends the form
Then the administrator should see "Successfully send invitation"
And the invited user should get an invitation link on "<email>"
Examples:
| email |
| firstuser@example.com |
And the invited user should get an invitation link on "[email protected]"

Scenario: An administrator fills in invited user email field with invalid email
When the administrator fills in "email" with "wrongemail@"
Expand All @@ -23,22 +20,16 @@ Feature: Adding a user to admin panel
When the administrator sends the form
Then the administrator should see "Email field is required"

Scenario Outline: The invited user is already an administrator
Given the user with "<email>" email address is already an administrator
When the administrator fills in "email" with "<email>"
Scenario: The invited user is already an administrator
Given the user with "[email protected]" email address is already an administrator
When the administrator fills in "email" with "[email protected]"
And the administrator sends the form
Then the administrator should see the message "This user is already an administrator"
Examples:
| email |
| existingadmin@example.com |

Scenario Outline: Successfully send invitation to already registered user
Given There is a user with "<email>" email address
Scenario: Successfully send invitation to already registered user
Given There is a user with "[email protected]" email address
And the invited user is not an administrator yet
When the administrator fills in "email" with "<email>"
When the administrator fills in "email" with "[email protected]"
And the administrator sends the form
Then the administrator should see "Successfully send invitation"
And invited user should get an invitation link on "<email>"
Examples:
| email |
| firstuser@example.com |
And invited user should get an invitation link on "[email protected]"
11 changes: 4 additions & 7 deletions features/admin_panel/creating_new_admin.feature
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,13 @@ Feature: Creating a admin user

Scenario: The invited user already have account
Given the invited user is on the authentication route by invitation link
When the invited user logs in as "<email>"
When the invited user logs in as "[email protected] "
Then the invited user becomes admin user

Scenario Outline: Successfully created an account
Scenario: Successfully created an account
Given the invited user is on the authentication route by invitation link
When the invited user registers with "<email>" email address
Then new administrator with email "<email>" should be created
Examples:
| email |
| user@example.com |
When the invited user registers with "[email protected] " email address
Then new administrator with email "[email protected] " should be created

Scenario: The invitation has expired
Given the invitation was send more than 7 days ago
Expand Down
7 changes: 2 additions & 5 deletions features/admin_panel/meetup/delete.feature
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@ Feature: Deleting a meetup
| 1 | example meetup | 2023-01-01 10:10:10 | example place | pl |
And the administrator is logged in

Scenario Outline: Successfully deleting a meetup
Given the administrator is on the deleting meetup page with meetup id equals "<id>"
Scenario: Successfully deleting a meetup
Given the administrator is on the deleting meetup page with meetup id equals "1"
When the administrator clicks on the delete meetup button
Then the administrator should see the message "Meetup successfully deleted"
Examples:
| id |
| 1 |
7 changes: 2 additions & 5 deletions features/admin_panel/meetup/show.feature
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ Feature: Showing a meetup
| id | title | date | place | language |
| 1 | example meetup | 2023-01-01 10:10:10 | example place | pl |

Scenario Outline: Attempt to show a meetup which does not exist
When the administrator get to the show meetup page with id equals "<id>"
Scenario: Attempt to show a meetup which does not exist
When the administrator get to the show meetup page with id equals "999"
Then the administrator should see the message "Page not found"
Examples:
| id |
| 999 |
14 changes: 4 additions & 10 deletions features/admin_panel/meetup/update.feature
Original file line number Diff line number Diff line change
Expand Up @@ -46,20 +46,14 @@ Feature: Updating a meetup
| id | language |
| 1 | en |

Scenario Outline: Attempt to update a meetup without credentials
Given the administrator is on the update meetup page with id equals "<id>"
Scenario: Attempt to update a meetup without credentials
Given the administrator is on the update meetup page with id equals "1"
When the administrator sends the form
Then the administrator should see the message "Title field is required"
And the administrator should see the message "Date field are required"
And the administrator should see the message "Place field are required"
And the administrator should see the message "Language field are required"
Examples:
| id |
| 1 |

Scenario Outline: Attempt to update a meetup which does not exist
When the administrator get to the update meetup page with id equals "<id>"
Scenario: Attempt to update a meetup which does not exist
When the administrator get to the update meetup page with id equals "999"
Then the administrator should see the message "Page not found"
Examples:
| id |
| 999 |
7 changes: 2 additions & 5 deletions features/admin_panel/organization/delete.feature
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@ Feature: Deleting an organization
| 1 | example organization | existing organization |
And the administrator is logged in

Scenario Outline: Successfully deleting an organization
Given the administrator is on the deleting organization page with organization id "<id>"
Scenario: Successfully deleting an organization
Given the administrator is on the deleting organization page with organization id "1"
When the administrator clicks on the delete organization button
Then the administrator should see the message "Organization successfully deleted"
Examples:
| id |
| 1 |
7 changes: 2 additions & 5 deletions features/admin_panel/organization/show.feature
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ Feature: Showing an organization
| id | name | description |
| 1 | example organization | existing organization |

Scenario Outline: Attempt to show an organization which does not exist
When the administrator get to the show organization page with id equals "<id>"
Scenario: Attempt to show an organization which does not exist
When the administrator get to the show organization page with id equals "999"
Then the administrator should see the message "Page not found"
Examples:
| id |
| 999 |
14 changes: 4 additions & 10 deletions features/admin_panel/organization/update.feature
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,11 @@ Feature: Updating an organization
| id | name |
| 1 | updated organization |

Scenario Outline: Attempt to update an organization without credentials
Given the administrator is on the update organization page with id equals "<id>"
Scenario: Attempt to update an organization without credentials
Given the administrator is on the update organization page with id equals "1"
When the administrator sends the form
Then the administrator should see the message "Name field is required"
Examples:
| id |
| 1 |

Scenario Outline: Attempt to update an organization which does not exist
When the administrator get to the update organization page with id equals "<id>"
Scenario: Attempt to update an organization which does not exist
When the administrator get to the update organization page with id equals "999"
Then the administrator should see the message "Page not found"
Examples:
| id |
| 999 |
7 changes: 2 additions & 5 deletions features/admin_panel/speakers/delete.feature
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@ Feature: Deleting a speaker
| 1 | example speaker | existing speaker |
And the administrator is logged in

Scenario Outline: Successfully deleting a speaker
Given the administrator is on the deleting speaker page with meetup id equals "<id>"
Scenario: Successfully deleting a speaker
Given the administrator is on the deleting speaker page with meetup id equals "1"
When the administrator clicks on the delete speaker button
Then the administrator should see the message "Speaker successfully deleted"
Examples:
| id |
| 1 |
7 changes: 2 additions & 5 deletions features/admin_panel/speakers/show.feature
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ Feature: Showing a speaker
| id | name | description |
| 1 | example speaker | existing speaker |

Scenario Outline: Attempt to show a speaker which does not exist
When the administrator get to the show speaker page with id equals "<id>"
Scenario: Attempt to show a speaker which does not exist
When the administrator get to the show speaker page with id equals "999"
Then the administrator should see the message "Page not found"
Examples:
| id |
| 999 |
14 changes: 4 additions & 10 deletions features/admin_panel/speakers/update.feature
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,11 @@ Feature: Updating a speaker
| id | name |
| 1 | updated speaker |

Scenario Outline: Attempt to update a speaker without credentials
Given the administrator is on the update speaker page with id equals "<id>"
Scenario: Attempt to update a speaker without credentials
Given the administrator is on the update speaker page with id equals "1"
When the administrator sends the form
Then the administrator should see the message "Name field is required"
Examples:
| id |
| 1 |

Scenario Outline: Attempt to update a speaker which does not exist
When the administrator get to the update speaker page with id equals "<id>"
Scenario: Attempt to update a speaker which does not exist
When the administrator get to the update speaker page with id equals "999"
Then the administrator should see the message "Page not found"
Examples:
| id |
| 999 |
14 changes: 4 additions & 10 deletions features/meetup/delete.feature
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,11 @@ Feature: Deleting a meetup
And the user with id equals "1" is logged in
And the user is not an administrator

Scenario Outline: Deleting a meetup as an organizer
Given the user is on the meetup page with organizer id equals "<id>"
Scenario: Deleting a meetup as an organizer
Given the user is on the meetup page with organizer id equals "1"
When the user clicks on the delete meetup button
Then the user should see message "Meetup successfully deleted"
Examples:
| id |
| 1 |

Scenario Outline: Attempt to delete a meetup not as an organizer
Given the user is on the meetup page with organizer id equals "<id>"
Scenario: Attempt to delete a meetup not as an organizer
Given the user is on the meetup page with organizer id equals "2"
Then the user should see the message "You are not allowed to access this page"
Examples:
| id |
| 2 |
7 changes: 2 additions & 5 deletions features/meetup/show.feature
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ Feature: Showing a meetup
| 1 | 1 | my meetup | 2023-01-01 10:10:10 | place | pl |
| 2 | 2 | foreign meetup | 2023-01-01 10:10:10 | place | pl |

Scenario Outline: Attempt to show a meetup which does not exist
When the user in on the show meetup page with id equals "<id>"
Scenario: Attempt to show a meetup which does not exist
When the user in on the show meetup page with id equals "999"
Then the user should see the message "Page not found"
Examples:
| id |
| 999 |
14 changes: 4 additions & 10 deletions features/meetup/update.feature
Original file line number Diff line number Diff line change
Expand Up @@ -48,20 +48,14 @@ Feature: Updating a meetup
| id | language |
| 1 | en |

Scenario Outline: Attempt to update a meetup without credentials
Given the user is on the update meetup page with id equals "<id>"
Scenario: Attempt to update a meetup without credentials
Given the user is on the update meetup page with id equals "1"
When the user sends the form
Then the user should see the message "Title field is required"
And the user should see the message "Date field are required"
And the user should see the message "Place field are required"
And the user should see the message "Language field are required"
Examples:
| id |
| 1 |

Scenario Outline: Updating meetup as not an organizer
When The user is on the update meetup page with organizer id equals "<id>"
Scenario: Updating meetup as not an organizer
When The user is on the update meetup page with organizer id equals "2"
Then The user should see "You are not allowed to do this"
Examples:
| id |
| 2 |

0 comments on commit 09f0a48

Please sign in to comment.