Skip to content

Commit

Permalink
Merge branch 'main' into N21-2239-media-board-delete-ux
Browse files Browse the repository at this point in the history
  • Loading branch information
MBergCap authored Dec 12, 2024
2 parents 537c6c6 + 046782e commit 5ad86a0
Show file tree
Hide file tree
Showing 26 changed files with 609 additions and 141 deletions.
3 changes: 1 addition & 2 deletions cypress.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,7 @@ module.exports = defineConfig({
specPattern: "cypress/e2e/**/*.feature",
supportFile: "cypress/support/e2e.js",
setupNodeEvents,
// testIsolation is set to false because when testIsolation is set to true or in v12 its anyway by default enabled, then it clears the page again that might be redundant.
// we are using cy.session() in login custom command, which is inheriting the testIsolation properties by default as true and clearing the page (cookies, local storage..etc.) in the test.
testIsolation: false,
testIsolation: true,
},
});
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ Feature: Group - To show groups and classes in one table with respective functio
When I click the confirmation button on the cancel modal
Then I see the new class administration page
When I click the create successor button
And I confirm creating the successor
And I confirm managing the class
When I confirm creating the successor
When I confirm managing the class
Then I see the new class administration page
Then I can see the disabled create successor button of the original class

Expand Down
4 changes: 2 additions & 2 deletions cypress/e2e/course/addSubstituteTeacherToCourse.feature
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ Feature: Course - Add substitute teacher to course
When I go to course '<course_name>'
When I open page Edit course
Then I see page Edit course
And I clear substitute teacher field
And I add substitute teacher '<substitute_teacher>'
When I clear substitute teacher field
When I add substitute teacher '<substitute_teacher>'
When I click on button Save changes in page Edit course
Given I am logged in as a '<teacher2>' at '<namespace>'
When I go to courses overview
Expand Down
42 changes: 21 additions & 21 deletions cypress/e2e/dashboard/dashboard.feature
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,13 @@ Feature: Dashboard - To check contents on the dashboard

# pre-condition: teacher creates school news
When I go to news overview
And I click on add news button
When I click on add news button
Then I see news creation page
And I enter news title 'CypressAut Dashboard - school news'
And I enter news description 'test school news description'
And I see date input field
And I see time input field
And I click on save button
When I enter news title 'CypressAut Dashboard - school news'
When I enter news description 'test school news description'
Then I see date input field
Then I see time input field
When I click on save button
Then I see news is created successfully with title 'CypressAut Dashboard - school news' and with description 'test school news description'

# pre-condition: teacher creates a team
Expand All @@ -79,24 +79,24 @@ Feature: Dashboard - To check contents on the dashboard
When I go to teams overview
When I go to a team 'CypressAut - News Team'
When I click on news tab on the team detail page
And I click on create news button
When I click on create news button
Then I see news creation page
And I enter news title 'CypressAut Dashboard - team news'
And I enter news description 'test team news description'
And I see date input field
And I see time input field
And I click on save button
When I enter news title 'CypressAut Dashboard - team news'
When I enter news description 'test team news description'
Then I see date input field
Then I see time input field
When I click on save button
Then I see news is created successfully with title 'CypressAut Dashboard - team news' and with description 'test team news description'

# pre-condition: teacher adds student as team member
When I go to teams overview
When I go to a team 'CypressAut - News Team'
When I click on three dot menu on the team title
And I click on manage team members option
When I click on manage team members option
Then I see team participants overview page
And I click on add internal attendees button
And new dialog opens to select student '<listname_student>' from the drop down list
And I click on add user button
When I click on add internal attendees button
Then new dialog opens to select student '<listname_student>' from the drop down list
When I click on add user button
Then I see the student named '<listname_student>' on the team members table

# student arrives on dashboard
Expand All @@ -118,16 +118,16 @@ Feature: Dashboard - To check contents on the dashboard

# teacher deletes the school news
When I arrive on the dashboard
And I click on the news teaser 'CypressAut Dashboard - school news'
When I click on the news teaser 'CypressAut Dashboard - school news'
When I click on delete button
And I confirm the deletion on confirmation dialog box
When I confirm the deletion on confirmation dialog box
Then I do not see the news 'CypressAut Dashboard - school news'

# teacher deletes the team news
When I arrive on the dashboard
And I click on the news teaser 'CypressAut Dashboard - team news'
When I click on the news teaser 'CypressAut Dashboard - team news'
When I click on delete button
And I confirm the deletion on confirmation dialog box
When I confirm the deletion on confirmation dialog box
Then I do not see the news 'CypressAut Dashboard - team news'

# student does not see news anymore on dashboard
Expand All @@ -141,7 +141,7 @@ Feature: Dashboard - To check contents on the dashboard
When I go to teams overview
When I go to a team 'CypressAut - News Team'
When I click on three dot menu on the team title
And I click on manage team members option
When I click on manage team members option
Then I see team participants overview page
When I select the student '<fullname_student>' and click on delete icon
Then I see '<fullname_student>' is not visible on the table
Expand Down
32 changes: 16 additions & 16 deletions cypress/e2e/news/createReadDeleteNews.feature
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ Feature: News - To read a news on the respective dashboards
# teacher creates school news
Given I am logged in as a '<teacher>' at '<namespace>'
When I go to news overview
And I click on add news button
When I click on add news button
Then I see news creation page
And I enter news title '<news_title>'
And I enter news description '<news_description>'
And I see date input field
And I see time input field
And I click on save button
When I enter news title '<news_title>'
When I enter news description '<news_description>'
Then I see date input field
Then I see time input field
When I click on save button
Then I see news is created successfully with title '<news_title>' and with description '<news_description>'

# teacher creates a team
Expand All @@ -33,13 +33,13 @@ Feature: News - To read a news on the respective dashboards
When I go to teams overview
When I go to a team '<team_name>'
When I click on news tab on the team detail page
And I click on create news button
When I click on create news button
Then I see news creation page
And I enter news title '<team_news_title>'
And I enter news description '<team_news_description>'
And I see date input field
And I see time input field
And I click on save button
When I enter news title '<team_news_title>'
When I enter news description '<team_news_description>'
Then I see date input field
Then I see time input field
When I click on save button
Then I see news is created successfully with title '<team_news_title>' and with description '<team_news_description>'

# teacher reads a school news on news overview page
Expand All @@ -60,16 +60,16 @@ Feature: News - To read a news on the respective dashboards
# teacher deletes the school news
Given I am logged in as a '<teacher>' at '<namespace>'
When I arrive on the dashboard
And I click on the news teaser '<news_title>'
When I click on the news teaser '<news_title>'
When I click on delete button
And I confirm the deletion on confirmation dialog box
When I confirm the deletion on confirmation dialog box
Then I do not see the news '<news_title>'

# teacher deletes the team news
When I arrive on the dashboard
And I click on the news teaser '<team_news_title>'
When I click on the news teaser '<team_news_title>'
When I click on delete button
And I confirm the deletion on confirmation dialog box
When I confirm the deletion on confirmation dialog box
Then I do not see the news '<team_news_title>'

# teacher deletes the team
Expand Down
49 changes: 49 additions & 0 deletions cypress/e2e/news/createReadDeleteSchoolNewsInAdvance.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
@stable_test
@regression_test
Feature: News - To read a news on the respective dashboards

As a teacher I want to read the news shown on the dashboard so that I'm informed about the latest news

Scenario: User creates news with time options, reads them and deletes them
# as a pre-condition create users for author and reader
Given I am logged in as a '<news_reader>' at '<namespace>'
Given I am logged in as a '<news_author>' at '<namespace>'

# first user creates school news with different time options
When I go to news overview
When I click on add news button
Then I see news creation page
When I enter news title '<news_title>'
When I enter news description '<news_description>'
When I set news-visibility-start-date to '<news_day_from_today>' days at '<news_time>'
Then I see time input field
When I click on save button
When I go to news overview
Then I do not see the unpublished news '<news_title>'
When I click on tab for unpublished news
Then I see the unpublished news '<news_title>'

# second user reads a school news on news overview page, then second user opens news and reads news detail page
Given I am logged in as a '<news_reader>' at '<namespace>'
When I go to news overview
Then I do not see the news '<news_title>'
When I wait '<news_waiting_time>' seconds and reload
Then I can read the news '<news_title>' with description '<news_description>'
When I click on the news teaser '<news_title>'
Then I can read the news '<news_title>' with description '<news_description>' on news detail page

# first user deletes the school news
Given I am logged in as a '<news_author>' at '<namespace>'
When I arrive on the dashboard
When I go to news overview
Then I can read the news '<news_title>' with description '<news_description>'
When I click on the news teaser '<news_title>'
When I click on delete button
When I confirm the deletion on confirmation dialog box
Then I do not see the news '<news_title>'

@school_api_test
@staging_test
Examples:
| news_author | news_reader | namespace | news_title | news_description | news_day_from_today | news_time | news_waiting_time |
| teacher1_brb | student1_brb | brb | CypressAut - school news in advance | Remember Examination date | 0 | +2minutes | 120 |
54 changes: 54 additions & 0 deletions cypress/e2e/news/createReadDeleteSchoolNewsTimeOptions.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
@stable_test
@regression_test
Feature: News - To read a news on the respective dashboards

As a teacher I want to read the news shown on the dashboard so that I'm informed about the latest news

Scenario: User creates news with time options, reads them and deletes them
# as a pre-condition create users for author and reader
Given I am logged in as a '<news_reader>' at '<namespace>'
Given I am logged in as a '<news_author>' at '<namespace>'

# first user creates school news with different time options
When I go to news overview
When I click on add news button
Then I see news creation page
When I enter news title '<news_title>'
When I enter news description '<news_description>'
When I set news-visibility-start-date to '<news_day_from_today>' days at '<news_time>'
Then I see time input field
When I click on save button
Then I see news is created successfully with title '<news_title>' and with description '<news_description>'

# first user reads a school news on news overview page, then teacher opens news and reads news detail page
When I go to news overview
Then I can read the news '<news_title>' with description '<news_description>'
Then I can see the publishing time info '<news_time_info_overviewpage>' on overview page
When I click on the news teaser '<news_title>'
Then I can read the news '<news_title>' with description '<news_description>' on news detail page
Then I can see the publishing time info '<news_time_info_detailpage>' on news detail page

# second user reads a school news on news overview page, then second user opens news and reads news detail page
Given I am logged in as a '<news_reader>' at '<namespace>'
When I go to news overview
Then I can read the news '<news_title>' with description '<news_description>'
Then I can see the publishing time info '<news_time_info_overviewpage>' on overview page
When I click on the news teaser '<news_title>'
Then I can read the news '<news_title>' with description '<news_description>' on news detail page
Then I can see the publishing time info '<news_time_info_detailpage>' on news detail page

# first user deletes the school news
Given I am logged in as a '<news_author>' at '<namespace>'
When I arrive on the dashboard
When I click on the news teaser '<news_title>'
When I click on delete button
When I confirm the deletion on confirmation dialog box
Then I do not see the news '<news_title>'

@school_api_test
@staging_test
Examples:
| news_author | news_reader | namespace | news_title | news_description | news_day_from_today | news_time | news_time_info_overviewpage | news_time_info_detailpage |
| teacher1_brb | student1_brb | brb | CypressAut - school news at current time | Remember Examination date | 0 | currentTime | vor ein | vor ein |
| admin1_brb | student1_brb | brb | CypressAut - school news without time | New member of the teaching staff | notselected | none | vor ein | vor ein |
| admin1_brb | teacher1_brb | brb | CypressAut - school news 7 days ago | New member of the teaching staff | -7 | currentTime | vor 7 Tage | -7 |
63 changes: 63 additions & 0 deletions cypress/e2e/news/createReadDeleteTeamNewsTimeOptions.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
@stable_test
@regression_test
Feature: News - To read a news on the respective dashboards

As a teacher I want to read the news shown on the dashboard so that I'm informed about the latest news

Scenario: User creates news with time options, reads them and deletes them
# as a pre-condition create users for author and reader
Given I am logged in as a '<news_reader>' at '<namespace>'
Given I am logged in as a '<news_author>' at '<namespace>'

# first user creates a team
When I go to teams overview
When I click on button Add Team on the teams overview page
Then I see new team creation page
When I enter in the title '<team_name>'
When I click on button Create Team on the team creation page

# first user creates a team news
When I go to teams overview
When I go to a team '<team_name>'
When I click on news tab on the team detail page
When I click on create news button
Then I see news creation page
When I enter news title '<team_news_title>'
When I enter news description '<team_news_description>'
When I set news-visibility-start-date to '<news_day_from_today>' days at '<news_time>'
Then I see time input field
When I click on save button
Then I see news is created successfully with title '<team_news_title>' and with description '<team_news_description>'

# first user reads a team news on teams news overview page
When I go to teams overview
When I go to a team '<team_name>'
When I click on news tab on the team detail page
Then I can read the news '<team_news_title>' with description '<team_news_description>'
Then I can see the publishing time info '<news_time_info_overviewpage>' on overview page
When I click on the news teaser '<team_news_title>'
Then I can read the news '<team_news_title>' with description '<team_news_description>' on news detail page
Then I can see the publishing time info '<news_time_info_detailpage>' on news detail page

# first user deletes the team news
When I arrive on the dashboard
When I click on the news teaser '<team_news_title>'
When I click on delete button
When I confirm the deletion on confirmation dialog box
Then I do not see the news '<team_news_title>'

# first user deletes the team
When I go to teams overview
When I go to a team '<team_name>'
When I click on team settings
When I click on delete option
Then I see dialog box and click on delete button to confirm the deletion
Then I do not see the team '<team_name>'

@school_api_test
@staging_test
Examples:
| news_author | news_reader | namespace | news_day_from_today | news_time | news_time_info_overviewpage | news_time_info_detailpage | team_name | team_news_title | team_news_description |
| teacher1_brb | student1_brb | nbc | 0 | currentTime | vor ein | vor ein | CypressAut - News Team | CypressAut - this is a team news | test team news description |
#| admin1_brb | student1_brb | nbc | notselected | none | vor ein | vor ein | CypressAut - News Team | CypressAut - this is a team news | test team news description |
#| admin1_brb | teacher1_brb | nbc | -7 | currentTime | vor 7 Tage | -7 | CypressAut - News Team | CypressAut - this is a team news | test team news description |
Loading

0 comments on commit 5ad86a0

Please sign in to comment.