From a5125541ba6f75c00d62faf91127a0e0042957c9 Mon Sep 17 00:00:00 2001
From: Christian Spohr <christian.spohr@dataport.de>
Date: Wed, 11 Dec 2024 17:59:17 +0100
Subject: [PATCH] BC-3505 requested changes

---
 .../showGroupsAndClassesInTable.feature       |  4 +-
 .../addSubstituteTeacherToCourse.feature      |  4 +-
 cypress/e2e/dashboard/dashboard.feature       | 42 +++++++++----------
 cypress/e2e/news/createReadDeleteNews.feature | 32 +++++++-------
 ...eateReadDeleteSchoolNewsInAdvance.feature} | 14 +++----
 ...teReadDeleteSchoolNewsTimeOptions.feature} | 14 +++----
 ...reateReadDeleteTeamNewsTimeOptions.feature | 14 +++----
 cypress/e2e/topics/accessH5PEditor.feature    |  4 +-
 .../e2e/topics/createEditDeleteTopic.feature  |  4 +-
 9 files changed, 66 insertions(+), 66 deletions(-)
 rename cypress/e2e/news/{createReadDeleteNewsInAdvance.feature => createReadDeleteSchoolNewsInAdvance.feature} (87%)
 rename cypress/e2e/news/{createReadDeleteNewsTimeOptions.feature => createReadDeleteSchoolNewsTimeOptions.feature} (90%)

diff --git a/cypress/e2e/class_management/showGroupsAndClassesInTable.feature b/cypress/e2e/class_management/showGroupsAndClassesInTable.feature
index c6023e5f..633e2e09 100644
--- a/cypress/e2e/class_management/showGroupsAndClassesInTable.feature
+++ b/cypress/e2e/class_management/showGroupsAndClassesInTable.feature
@@ -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
 
diff --git a/cypress/e2e/course/addSubstituteTeacherToCourse.feature b/cypress/e2e/course/addSubstituteTeacherToCourse.feature
index 055a041f..6fd57658 100644
--- a/cypress/e2e/course/addSubstituteTeacherToCourse.feature
+++ b/cypress/e2e/course/addSubstituteTeacherToCourse.feature
@@ -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
diff --git a/cypress/e2e/dashboard/dashboard.feature b/cypress/e2e/dashboard/dashboard.feature
index b7e05ef9..c543b5df 100644
--- a/cypress/e2e/dashboard/dashboard.feature
+++ b/cypress/e2e/dashboard/dashboard.feature
@@ -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
@@ -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
@@ -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
@@ -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
diff --git a/cypress/e2e/news/createReadDeleteNews.feature b/cypress/e2e/news/createReadDeleteNews.feature
index a05d2003..ea40ab6f 100644
--- a/cypress/e2e/news/createReadDeleteNews.feature
+++ b/cypress/e2e/news/createReadDeleteNews.feature
@@ -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
@@ -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
@@ -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
diff --git a/cypress/e2e/news/createReadDeleteNewsInAdvance.feature b/cypress/e2e/news/createReadDeleteSchoolNewsInAdvance.feature
similarity index 87%
rename from cypress/e2e/news/createReadDeleteNewsInAdvance.feature
rename to cypress/e2e/news/createReadDeleteSchoolNewsInAdvance.feature
index 172e96d7..29cb51a1 100644
--- a/cypress/e2e/news/createReadDeleteNewsInAdvance.feature
+++ b/cypress/e2e/news/createReadDeleteSchoolNewsInAdvance.feature
@@ -11,13 +11,13 @@ Feature:  News - To read a news on the respective dashboards
 
         # first user creates school news with different time options
         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>'
+        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>'
-        And I see time input field
-        And I click on save button
+        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
@@ -37,9 +37,9 @@ Feature:  News - To read a news on the respective dashboards
         When I arrive on the dashboard
         When I go to news overview
         Then I can read the news '<news_title>' with description '<news_description>'
-        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>'
 
         @school_api_test
diff --git a/cypress/e2e/news/createReadDeleteNewsTimeOptions.feature b/cypress/e2e/news/createReadDeleteSchoolNewsTimeOptions.feature
similarity index 90%
rename from cypress/e2e/news/createReadDeleteNewsTimeOptions.feature
rename to cypress/e2e/news/createReadDeleteSchoolNewsTimeOptions.feature
index dbe6b054..dc4e4549 100644
--- a/cypress/e2e/news/createReadDeleteNewsTimeOptions.feature
+++ b/cypress/e2e/news/createReadDeleteSchoolNewsTimeOptions.feature
@@ -11,13 +11,13 @@ Feature:  News - To read a news on the respective dashboards
 
         # first user creates school news with different time options
         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>'
+        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>'
-        And I see time input field
-        And I click on save button
+        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
@@ -40,9 +40,9 @@ Feature:  News - To read a news on the respective dashboards
         # first user deletes the school news
         Given I am logged in as a '<news_author>' 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>'
 
         @school_api_test
diff --git a/cypress/e2e/news/createReadDeleteTeamNewsTimeOptions.feature b/cypress/e2e/news/createReadDeleteTeamNewsTimeOptions.feature
index ac18ca2d..b9a80d11 100644
--- a/cypress/e2e/news/createReadDeleteTeamNewsTimeOptions.feature
+++ b/cypress/e2e/news/createReadDeleteTeamNewsTimeOptions.feature
@@ -20,13 +20,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>'
+        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>'
-        And I see time input field
-        And I click on save button
+        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
@@ -41,9 +41,9 @@ Feature:  News - To read a news on the respective dashboards
 
         # first user 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>'
 
         # first user deletes the team
diff --git a/cypress/e2e/topics/accessH5PEditor.feature b/cypress/e2e/topics/accessH5PEditor.feature
index e6f1ba01..e3955bb0 100644
--- a/cypress/e2e/topics/accessH5PEditor.feature
+++ b/cypress/e2e/topics/accessH5PEditor.feature
@@ -36,8 +36,8 @@ Feature: Topics - To access the H5P editor as a teacher.
         Given I am logged in as a '<teacher>' at '<namespace>'
         When I go to courses overview
         When I go to course '<course_name>'
-        And I click on FAB to create new content
-        And I click on New Topic FAB
+        When I click on FAB to create new content
+        When I click on New Topic FAB
         Then I can see edit topic page '-'
         When I enter topic title '<topic_title>'
         When I click on button Add Text to topic
diff --git a/cypress/e2e/topics/createEditDeleteTopic.feature b/cypress/e2e/topics/createEditDeleteTopic.feature
index 560b1367..0cca242d 100644
--- a/cypress/e2e/topics/createEditDeleteTopic.feature
+++ b/cypress/e2e/topics/createEditDeleteTopic.feature
@@ -39,8 +39,8 @@ Feature: Topics - To create, edit and delete topics by the teacher.
         Given I am logged in as a '<teacher>' at '<namespace>'
         When I go to courses overview
         When I go to course '<course_name>'
-        And I click on FAB to create new content
-        And I click on New Topic FAB
+        When I click on FAB to create new content
+        When I click on New Topic FAB
         Then I can see edit topic page '-'
         When I enter topic title 'CypressAut Topic Creating and Deleting Test'
         When I click on button Add Text to topic