diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5601ef3f..72e8667c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -93,30 +93,6 @@ jobs: command: npm run ${{ steps.setting_url.outputs.tag }} browser: chrome env: - CYPRESS_BRB: ${{ env.CYPRESS_BRB }} - CYPRESS_NBC: ${{ env.CYPRESS_NBC }} - CYPRESS_DEFAULT: ${{ env.CYPRESS_DEFAULT }} - CYPRESS_TEACHER_1_EMAIL: ${{ env.CYPRESS_TEACHER_1_EMAIL }} - CYPRESS_TEACHER_1_PASSWORD: ${{ env.CYPRESS_TEACHER_1_PASSWORD }} - CYPRESS_TEACHER_2_EMAIL: ${{ env.CYPRESS_TEACHER_2_EMAIL }} - CYPRESS_TEACHER_2_PASSWORD: ${{ env.CYPRESS_TEACHER_2_PASSWORD }} - CYPRESS_STUDENT_1_EMAIL: ${{ env.CYPRESS_STUDENT_1_EMAIL }} - CYPRESS_STUDENT_1_PASSWORD: ${{ env.CYPRESS_STUDENT_1_PASSWORD }} - CYPRESS_STUDENT_2_EMAIL: ${{ env.CYPRESS_STUDENT_2_EMAIL }} - CYPRESS_STUDENT_2_PASSWORD: ${{ env.CYPRESS_STUDENT_2_PASSWORD }} - CYPRESS_ADMIN_1_EMAIL: ${{ env.CYPRESS_ADMIN_1_EMAIL }} - CYPRESS_ADMIN_1_PASSWORD: ${{ env.CYPRESS_ADMIN_1_PASSWORD }} - CYPRESS_EXPERT_1_EMAIL: ${{ env.CYPRESS_EXPERT_1_EMAIL }} - CYPRESS_EXPERT_1_PASSWORD: ${{ env.CYPRESS_EXPERT_1_PASSWORD }} - CYPRESS_STUDENT_EXTERN: ${{ env.CYPRESS_STUDENT_EXTERN }} - CYPRESS_STUDENT_EXTERN_PASSWORD: ${{ env.CYPRESS_STUDENT_EXTERN_PASSWORD }} - CYPRESS_STUDENT_PASSWORD_CHANGE_EMAIL: ${{ env.CYPRESS_STUDENT_PASSWORD_CHANGE_EMAIL }} - CYPRESS_STUDENT_PASSWORD_CHANGE_OLD_PWD: ${{ env.CYPRESS_STUDENT_PASSWORD_CHANGE_OLD_PWD }} - CYPRESS_STUDENT_PASSWORD_CHANGE_NEW_PWD: ${{ env.CYPRESS_STUDENT_PASSWORD_CHANGE_NEW_PWD }} - CYPRESS_TEACHER_1_FIRST_NAME: ${{ env.CYPRESS_TEACHER_1_FIRST_NAME }} - CYPRESS_TEACHER_1_LAST_NAME: ${{ env.CYPRESS_TEACHER_1_LAST_NAME }} - CYPRESS_TEACHER_2_FIRST_NAME: ${{ env.CYPRESS_TEACHER_2_FIRST_NAME }} - CYPRESS_TEACHER_2_LAST_NAME: ${{ env.CYPRESS_TEACHER_2_LAST_NAME }} DEBUG: "@cypress/github-action" - name: Generate Report diff --git a/cypress/e2e/account/changeLanguage.feature b/cypress/e2e/account/changeLanguage.feature index 5fab4820..fcbadda3 100644 --- a/cypress/e2e/account/changeLanguage.feature +++ b/cypress/e2e/account/changeLanguage.feature @@ -5,7 +5,7 @@ Feature: Account - Change language of the user from user setting @stable_test Scenario Outline: Teacher can change language to '' - Given I am logged in as a 'teacher' at 'brb' + Given I am logged in as a 'teacher1_brb' at 'brb' When I arrive on the dashboard Then I can see initials of my name When I click on initials of my name @@ -21,7 +21,7 @@ Feature: Account - Change language of the user from user setting @stable_test Scenario Outline: Student can change language to '' - Given I am logged in as a 'student' at 'brb' + Given I am logged in as a 'student1_brb' at 'brb' When I arrive on the dashboard Then I can see initials of my name When I click on initials of my name @@ -37,7 +37,7 @@ Feature: Account - Change language of the user from user setting @stable_test Scenario Outline: Admin can change language to '' - Given I am logged in as a 'admin' at 'brb' + Given I am logged in as a 'admin1_brb' at 'brb' When I arrive on the dashboard Then I can see initials of my name When I click on initials of my name diff --git a/cypress/e2e/account/goToSettings.feature b/cypress/e2e/account/goToSettings.feature index f89fb22a..9e80301d 100644 --- a/cypress/e2e/account/goToSettings.feature +++ b/cypress/e2e/account/goToSettings.feature @@ -5,12 +5,12 @@ Feature: Account - To go to account settings page on default @stable_test Scenario: I see my e-mail is editable as an internal student user - Given I am logged in as a 'student' at 'default' + Given I am logged in as a 'student1_dbc' at 'default' When I go to my account settings Then I see my email is editable @unstable_test Scenario: I see my e-mail is not editable as an external student user - Given I am logged in as a 'student_extern' at 'default' + Given I am logged in as a 'student_extern_dbc' at 'default' When I go to my account settings Then I see my email is not editable \ No newline at end of file diff --git a/cypress/e2e/addons/goToAddons.feature b/cypress/e2e/addons/goToAddons.feature index 8a7a04c0..9f9cc820 100644 --- a/cypress/e2e/addons/goToAddons.feature +++ b/cypress/e2e/addons/goToAddons.feature @@ -5,6 +5,6 @@ Feature: Addons - To go to addons page on NBC @stable_test Scenario: to access Add-ons page as an Admin - Given I am logged in as a 'admin' at 'nbc' + Given I am logged in as a 'admin1_nbc' at 'nbc' When I go to Add-Ons overview Then I see the Add-Ons page with the title on the top \ No newline at end of file diff --git a/cypress/e2e/admin/administrateExternalTools.feature b/cypress/e2e/admin/administrateExternalTools.feature index 554f6164..d534d5b3 100644 --- a/cypress/e2e/admin/administrateExternalTools.feature +++ b/cypress/e2e/admin/administrateExternalTools.feature @@ -7,14 +7,14 @@ Feature: Admin External Tools - To administrate school settings by the admin. @unstable_test Scenario: Deactivate Chat - Given I am logged in as a 'admin' at 'brb' + Given I am logged in as a 'admin1_brb' at 'brb' When I go to administration page And I go to school administration And I go to new school administration page And I click on toggle switch to deactivate the chat And I click save general settings button Then I log out - Given I am logged in as a 'teacher' at 'brb' + Given I am logged in as a 'teacher1_brb' at 'brb' And I go to teams overview And I go to a team Then I can not see the chat in team @@ -24,14 +24,14 @@ Feature: Admin External Tools - To administrate school settings by the admin. @unstable_test Scenario: Activate Chat - Given I am logged in as a 'admin' at 'brb' + Given I am logged in as a 'admin1_brb' at 'brb' When I go to administration page And I go to school administration And I go to new school administration page And I click on toggle switch to activate the chat And I click save general settings button Then I log out - Given I am logged in as a 'teacher' at 'brb' + Given I am logged in as a 'teacher1_brb' at 'brb' When I go to teams overview And I go to a team And I open team settings @@ -43,14 +43,14 @@ Feature: Admin External Tools - To administrate school settings by the admin. @unstable_test Scenario: Deactivate BigBlueButton - Given I am logged in as a 'admin' at 'brb' + Given I am logged in as a 'admin1_brb' at 'brb' When I go to administration page And I go to school administration And I go to new school administration page And I click on toggle switch to deactivate video conferencing And I click save general settings button And I log out - Given I am logged in as a 'teacher' at 'brb' + Given I am logged in as a 'teacher1_brb' at 'brb' And I go to rooms overview And I go to room And I go to tools tab @@ -59,14 +59,14 @@ Feature: Admin External Tools - To administrate school settings by the admin. @unstable_test Scenario: Activate BigBlueButton - Given I am logged in as a 'admin' at 'brb' + Given I am logged in as a 'admin1_brb' at 'brb' When I go to administration page And I go to school administration And I go to new school administration page And I click on toggle switch to activate video conferencing And I click save general settings button And I log out - Given I am logged in as a 'teacher' at 'brb' + Given I am logged in as a 'teacher1_brb' at 'brb' And I go to rooms overview And I go to room And I go to tools tab diff --git a/cypress/e2e/admin/administrateMigration.feature b/cypress/e2e/admin/administrateMigration.feature index 4fd768a2..87aa2fdd 100644 --- a/cypress/e2e/admin/administrateMigration.feature +++ b/cypress/e2e/admin/administrateMigration.feature @@ -4,7 +4,7 @@ Feature: Admin Users - To administrate the Migration process. As an Admin I want to start, finish and make the migration mandatory. Background: - Given I am logged in as a 'admin' at 'nbc' + Given I am logged in as a 'admin1_nbc' at 'nbc' When I go to administration page When I go to school administration diff --git a/cypress/e2e/admin/administrateUsers.feature b/cypress/e2e/admin/administrateUsers.feature index 5f6c8518..2ad11d71 100644 --- a/cypress/e2e/admin/administrateUsers.feature +++ b/cypress/e2e/admin/administrateUsers.feature @@ -5,7 +5,7 @@ Feature: Admin Users - To add, edit and delete new users by the admin. @stable_test Scenario: Adding a new student - Given I am logged in as a 'admin' at 'brb' + Given I am logged in as a 'admin1_brb' at 'brb' When I go to administration page And I go to student administration When I click on FAB @@ -16,7 +16,7 @@ Feature: Admin Users - To add, edit and delete new users by the admin. @stable_test Scenario: Editing a new student - Given I am logged in as a 'admin' at 'brb' + Given I am logged in as a 'admin1_brb' at 'brb' When I go to administration page And I go to student administration And I enter 'student' email 'adam.riese@example.com' in search input field @@ -29,7 +29,7 @@ Feature: Admin Users - To add, edit and delete new users by the admin. @stable_test Scenario: Deleting a student - Given I am logged in as a 'admin' at 'brb' + Given I am logged in as a 'admin1_brb' at 'brb' When I go to administration page And I go to student administration And I enter 'student' email 'alex.abramovic@example.com' in search input field @@ -40,7 +40,7 @@ Feature: Admin Users - To add, edit and delete new users by the admin. @stable_test Scenario: Adding a new teacher - Given I am logged in as a 'admin' at 'brb' + Given I am logged in as a 'admin1_brb' at 'brb' When I go to administration page And I go to teacher administration When I click on FAB @@ -51,7 +51,7 @@ Feature: Admin Users - To add, edit and delete new users by the admin. @stable_test Scenario: Editing a new teacher - Given I am logged in as a 'admin' at 'brb' + Given I am logged in as a 'admin1_brb' at 'brb' When I go to administration page And I go to teacher administration And I enter 'teacher' email 'karl.mueller@example.com' in search input field @@ -64,7 +64,7 @@ Feature: Admin Users - To add, edit and delete new users by the admin. @stable_test Scenario: Deleting a teacher - Given I am logged in as a 'admin' at 'brb' + Given I am logged in as a 'admin1_brb' at 'brb' When I go to administration page And I go to teacher administration And I enter 'teacher' email 't.mueschmidt@example.com' in search input field diff --git a/cypress/e2e/course/addSubstituteTeacherToCourse.feature b/cypress/e2e/course/addSubstituteTeacherToCourse.feature index 67f05ce1..5e5f48fc 100644 --- a/cypress/e2e/course/addSubstituteTeacherToCourse.feature +++ b/cypress/e2e/course/addSubstituteTeacherToCourse.feature @@ -5,7 +5,7 @@ Feature: Course - Add substitute teacher to course @stable_test Scenario: Adding substitute teacher to course - Given I am logged in as a 'teacher1' at 'brb' + Given I am logged in as a 'teacher1_brb' at 'brb' When I go to rooms overview When I go to room 'Biologie' When I open course edit page @@ -14,6 +14,6 @@ Feature: Course - Add substitute teacher to course And I add substitute teacher 'teacher2' And I click on save changes after editing the course details Then I log out - Given I am logged in as a 'teacher2' at 'brb' + Given I am logged in as a 'teacher2_brb' at 'brb' When I go to rooms overview When I go to room 'Biologie' diff --git a/cypress/e2e/course/createEditAndDeleteCourse.feature b/cypress/e2e/course/createEditAndDeleteCourse.feature index 9893ed1a..9aa8a746 100644 --- a/cypress/e2e/course/createEditAndDeleteCourse.feature +++ b/cypress/e2e/course/createEditAndDeleteCourse.feature @@ -5,7 +5,7 @@ Feature: Course - To add and delete a course by the teacher @stable_test Scenario: as a pre-condition teacher deletes undeleted tests - Given I am logged in as a 'teacher' at 'default' + Given I am logged in as a 'teacher1_dbc' at 'default' When I go to rooms overview When I delete all courses named 'Cypress Test Creation and Deletion' Then I do not see the course 'Cypress Test Creation and Deletion' on the room overview page @@ -14,7 +14,7 @@ Feature: Course - To add and delete a course by the teacher @stable_test Scenario: Create, edit and delete a course - Given I am logged in as a 'teacher' at 'default' + Given I am logged in as a 'teacher1_dbc' at 'default' When I go to rooms overview Then I see room search box on the room overview page When I click on FAB to create a new room diff --git a/cypress/e2e/course/searchRoom.feature b/cypress/e2e/course/searchRoom.feature index e34807fe..7946755f 100644 --- a/cypress/e2e/course/searchRoom.feature +++ b/cypress/e2e/course/searchRoom.feature @@ -5,28 +5,28 @@ Feature: Course - To search for a course via search input box on the course over @stable_test Scenario: teacher is able to search for a course and find it - Given I am logged in as a 'teacher' at 'brb' + Given I am logged in as a 'teacher1_brb' at 'brb' When I go to rooms overview When I enter the course name 'Biologie' into the search field Then I see the course 'Biologie' on the room overview page @stable_test Scenario: teacher is able to search for a course and DO NOT find it - Given I am logged in as a 'teacher' at 'brb' + Given I am logged in as a 'teacher1_brb' at 'brb' When I go to rooms overview When I enter the course name 'Cy::NotExistingMathematikCourse' into the search field Then I do not see the course 'Cy::NotExistingMathematikCourse' on the room overview page @stable_test Scenario: student is able to search for a course and find it - Given I am logged in as a 'student' at 'brb' + Given I am logged in as a 'student1_brb' at 'brb' When I go to rooms overview When I enter the course name 'Course with subject' into the search field Then I see the course 'Course with subject and tasks' on the room overview page @stable_test Scenario: student is able to search for a course and DO NOT find it - Given I am logged in as a 'student' at 'brb' + Given I am logged in as a 'student1_brb' at 'brb' When I go to rooms overview When I enter the course name 'Cy::NotExistingMathematikCourse' into the search field Then I do not see the course 'Cy::NotExistingMathematikCourse' on the room overview page \ No newline at end of file diff --git a/cypress/e2e/dashboard/dashboard.feature b/cypress/e2e/dashboard/dashboard.feature index 6d221347..58cc830b 100644 --- a/cypress/e2e/dashboard/dashboard.feature +++ b/cypress/e2e/dashboard/dashboard.feature @@ -5,7 +5,7 @@ Feature: Dashboard - To check contents on the dashboard @stable_test Scenario: as a pre-condition teacher creates school news - Given I am logged in as a 'teacher' at 'brb' + Given I am logged in as a 'teacher1_brb' at 'brb' When I go to news overview And I click on add news button Then I see news creation page @@ -18,7 +18,7 @@ Feature: Dashboard - To check contents on the dashboard @stable_test Scenario: as a pre-condition teacher creates a team news - Given I am logged in as a 'teacher' at 'brb' + Given I am logged in as a 'teacher1_brb' at 'brb' When I go to teams overview When I go to a team 'Musik' When I click on news tab on the team detail page @@ -33,7 +33,7 @@ Feature: Dashboard - To check contents on the dashboard @stable_test Scenario: as a pre-condition teacher adds student as team member - Given I am logged in as a 'teacher' at 'brb' + Given I am logged in as a 'teacher1_brb' at 'brb' When I go to teams overview When I go to a team 'Musik' When I click on three dot menu on the team title @@ -46,7 +46,7 @@ Feature: Dashboard - To check contents on the dashboard @stable_test Scenario: student arrives on dashboard - Given I am logged in as a 'student' at 'brb' + Given I am logged in as a 'student1_brb' at 'brb' When I arrive on the dashboard Then I see the welcome message 'Hallo Herbert Kraft!' Then I see school news with title 'Dashboard - this is a school news' and description 'test school news description' @@ -55,7 +55,7 @@ Feature: Dashboard - To check contents on the dashboard @stable_test Scenario: teacher arrives on dashboard - Given I am logged in as a 'teacher' at 'brb' + Given I am logged in as a 'teacher1_brb' at 'brb' When I arrive on the dashboard Then I see the welcome message 'Hallo Karl Herzog!' Then I see school news with title 'Dashboard - this is a school news' and description 'test school news description' @@ -65,7 +65,7 @@ Feature: Dashboard - To check contents on the dashboard @stable_test Scenario: as a post-condition teacher deletes the school news - Given I am logged in as a 'teacher' at 'brb' + Given I am logged in as a 'teacher1_brb' at 'brb' When I arrive on the dashboard And I click on the news teaser 'Dashboard - this is a school news' When I click on delete button @@ -74,7 +74,7 @@ Feature: Dashboard - To check contents on the dashboard @stable_test Scenario: as a post-condition teacher deletes the team news - Given I am logged in as a 'teacher' at 'brb' + Given I am logged in as a 'teacher1_brb' at 'brb' When I arrive on the dashboard And I click on the news teaser 'Dashboard - this is a team news' When I click on delete button @@ -83,14 +83,14 @@ Feature: Dashboard - To check contents on the dashboard @stable_test Scenario: student does not see news anymore on dashboard - Given I am logged in as a 'student' at 'brb' + Given I am logged in as a 'student1_brb' at 'brb' When I arrive on the dashboard Then I do not see school news with title 'Dashboard - this is a school news' Then I do not see teams news with title 'Dashboard - this is a team news' @stable_test Scenario: as a post-condition teacher deletes the student as a team member - Given I am logged in as a 'teacher' at 'brb' + Given I am logged in as a 'teacher1_brb' at 'brb' When I go to teams overview When I go to a team 'Musik' When I click on three dot menu on the team title diff --git a/cypress/e2e/files/myFiles.feature b/cypress/e2e/files/myFiles.feature index 7dd91226..efef4d61 100644 --- a/cypress/e2e/files/myFiles.feature +++ b/cypress/e2e/files/myFiles.feature @@ -5,7 +5,7 @@ Feature: Files Overview - To use LibreOffice for text, calc and presentation doc @stable_test Scenario: Create a LibreOffice text document - Given I am logged in as a 'student' at 'brb' + Given I am logged in as a 'student1_brb' at 'brb' When I go to files overview Then I go to personal files overview When I click create a new file button @@ -18,7 +18,7 @@ Feature: Files Overview - To use LibreOffice for text, calc and presentation doc @stable_test Scenario: Edit name of LibreOffice text document - Given I am logged in as a 'student' at 'brb' + Given I am logged in as a 'student1_brb' at 'brb' When I go to files overview Then I go to personal files overview Then I can see file with name 'Cy: LibraOffice Open.docx' @@ -30,7 +30,7 @@ Feature: Files Overview - To use LibreOffice for text, calc and presentation doc @stable_test Scenario: Delete a LibreOffice text document - Given I am logged in as a 'student' at 'brb' + Given I am logged in as a 'student1_brb' at 'brb' When I go to files overview Then I go to personal files overview Then I can see file with name 'Cy: LibraOffice Edit.docx' diff --git a/cypress/e2e/help-section/helpAreas.feature b/cypress/e2e/help-section/helpAreas.feature index 479b7d95..5cfb2099 100644 --- a/cypress/e2e/help-section/helpAreas.feature +++ b/cypress/e2e/help-section/helpAreas.feature @@ -5,7 +5,7 @@ Feature: Help Section - To use the help areas in dBildungscloud @stable_test Scenario: Use the help area in the header - Given I am logged in as a 'teacher' at 'brb' + Given I am logged in as a 'teacher1_brb' at 'brb' When I click on the question icon in header And I click on help section in header Then I can see the help articles page @@ -18,7 +18,7 @@ Feature: Help Section - To use the help areas in dBildungscloud @stable_test Scenario: Use the help area in the sidebar - Given I am logged in as a 'teacher' at 'brb' + Given I am logged in as a 'teacher1_brb' at 'brb' When I go to help section in sidebar Then I can see the help articles page When I go to help articles in sidebar @@ -30,7 +30,7 @@ Feature: Help Section - To use the help areas in dBildungscloud @stable_test Scenario: Use the article search inside the help articles area - Given I am logged in as a 'teacher' at 'brb' + Given I am logged in as a 'teacher1_brb' at 'brb' When I go to help section in sidebar Then I can see the help articles page When I enter keyword in search bar @@ -38,7 +38,7 @@ Feature: Help Section - To use the help areas in dBildungscloud @stable_test Scenario: Submit an issue via contact form inside help area - Given I am logged in as a 'teacher' at 'brb' + Given I am logged in as a 'teacher1_brb' at 'brb' When I go to help section in sidebar When I go to contact in sidebar Then I can see the help contact page diff --git a/cypress/e2e/news/readNews.feature b/cypress/e2e/news/readNews.feature index 7ad01c41..23e25793 100644 --- a/cypress/e2e/news/readNews.feature +++ b/cypress/e2e/news/readNews.feature @@ -5,7 +5,7 @@ Feature: News - To read a news on the respective dashboards @stable_test Scenario: as a pre-condition teacher creates school news - Given I am logged in as a 'teacher' at 'brb' + Given I am logged in as a 'teacher1_brb' at 'brb' When I go to news overview And I click on add news button Then I see news creation page @@ -18,7 +18,7 @@ Feature: News - To read a news on the respective dashboards @stable_test Scenario: as a pre-condition teacher creates a team news - Given I am logged in as a 'teacher' at 'brb' + Given I am logged in as a 'teacher1_brb' at 'brb' When I go to teams overview When I go to a team 'Musik' When I click on news tab on the team detail page @@ -33,13 +33,13 @@ Feature: News - To read a news on the respective dashboards @stable_test Scenario: Reading a school news on news overview page - Given I am logged in as a 'teacher' at 'brb' + Given I am logged in as a 'teacher1_brb' at 'brb' When I go to news overview Then I can read the news 'News - this is a school news' with description 'test school news description' @stable_test Scenario: Reading a team news on teams news overview page - Given I am logged in as a 'teacher' at 'brb' + Given I am logged in as a 'teacher1_brb' at 'brb' When I go to teams overview When I go to a team 'Musik' When I click on news tab on the team detail page @@ -47,7 +47,7 @@ Feature: News - To read a news on the respective dashboards @stable_test Scenario: as a post-condition teacher deletes the school news - Given I am logged in as a 'teacher' at 'brb' + Given I am logged in as a 'teacher1_brb' at 'brb' When I arrive on the dashboard And I click on the news teaser 'News - this is a school news' When I click on delete button @@ -56,7 +56,7 @@ Feature: News - To read a news on the respective dashboards @stable_test Scenario: as a post-condition teacher deletes the team news - Given I am logged in as a 'teacher' at 'brb' + Given I am logged in as a 'teacher1_brb' at 'brb' When I arrive on the dashboard And I click on the news teaser 'News - this is a team news' When I click on delete button diff --git a/cypress/e2e/task/createDeleteTaskFromTaskPage.feature b/cypress/e2e/task/createDeleteTaskFromTaskPage.feature index 76f1e31f..c58335d2 100644 --- a/cypress/e2e/task/createDeleteTaskFromTaskPage.feature +++ b/cypress/e2e/task/createDeleteTaskFromTaskPage.feature @@ -5,7 +5,7 @@ Feature: Task - To create and delete tasks starting from task overview page by t @stable_test Scenario: Teacher creates simple tasks without course - Given I am logged in as a 'teacher1' at 'brb' + Given I am logged in as a 'teacher1_brb' at 'brb' When I go to tasks overview When I click on button Add Task Then I can see create task page @@ -28,7 +28,7 @@ Feature: Task - To create and delete tasks starting from task overview page by t @stable_test Scenario: Teacher deletes a simple task without course using the dot menu - Given I am logged in as a 'teacher1' at 'brb' + Given I am logged in as a 'teacher1_brb' at 'brb' When I go to tasks overview When I click on draft tasks tab When I click on three dot menu of task 'Cy Task Creating from Task Overview Test' @@ -45,7 +45,7 @@ Feature: Task - To create and delete tasks starting from task overview page by t @stable_test Scenario: Teacher deletes a simple task without course using the delete button on the task edit page - Given I am logged in as a 'teacher1' at 'brb' + Given I am logged in as a 'teacher1_brb' at 'brb' When I go to tasks overview When I click on draft tasks tab When I click on task 'Cy Task to be delete on task page' in tasks overview diff --git a/cypress/e2e/task/createEditDeleteSubGradFinishRestoreTask.feature b/cypress/e2e/task/createEditDeleteSubGradFinishRestoreTask.feature index 99326525..39f34f68 100644 --- a/cypress/e2e/task/createEditDeleteSubGradFinishRestoreTask.feature +++ b/cypress/e2e/task/createEditDeleteSubGradFinishRestoreTask.feature @@ -6,7 +6,7 @@ Feature: Task - To create, edit and delete tasks by the teacher. @stable_test Scenario: Teacher creates task as draft from room - Given I am logged in as a 'teacher1' at 'brb' + Given I am logged in as a 'teacher1_brb' at 'brb' When I go to rooms overview When I go to room 'Course with subject and tasks' When I click on FAB to create new content @@ -27,7 +27,7 @@ Feature: Task - To create, edit and delete tasks by the teacher. @stable_test Scenario: Teacher edits and publishes task from room via form - Given I am logged in as a 'teacher1' at 'brb' + Given I am logged in as a 'teacher1_brb' at 'brb' When I go to rooms overview When I go to room 'Course with subject and tasks' When I click on three dot menu of content 'Cy Task Creating and Deleting Test' @@ -63,7 +63,7 @@ Feature: Task - To create, edit and delete tasks by the teacher. @stable_test Scenario: Teacher edits file - Given I am logged in as a 'teacher1' at 'brb' + Given I am logged in as a 'teacher1_brb' at 'brb' When I go to rooms overview When I go to room 'Course with subject and tasks' When I click on three dot menu of content 'Cy Task Creating, Editing, Deleting Test' @@ -97,7 +97,7 @@ Feature: Task - To create, edit and delete tasks by the teacher. @stable_test Scenario: Student submits task - Given I am logged in as a 'student1' at 'brb' + Given I am logged in as a 'student1_brb' at 'brb' When I go to rooms overview When I go to room 'Course with subject and tasks' And I click on task 'Cy Task Creating, Editing, Deleting Test' @@ -116,7 +116,7 @@ Feature: Task - To create, edit and delete tasks by the teacher. @stable_test Scenario: Teacher grades task from room - Given I am logged in as a 'teacher1' at 'brb' + Given I am logged in as a 'teacher1_brb' at 'brb' When I go to rooms overview When I go to room 'Course with subject and tasks' Then I see task card info submitted contains '1/2' for task 'Cy Task Creating, Editing, Deleting Test' @@ -142,7 +142,7 @@ Feature: Task - To create, edit and delete tasks by the teacher. @stable_test Scenario: Student sees grading - Given I am logged in as a 'student1' at 'brb' + Given I am logged in as a 'student1_brb' at 'brb' When I go to tasks overview And I click completed task tab Then I see task 'Cy Task Creating, Editing, Deleting Test' in the list as student @@ -156,7 +156,7 @@ Feature: Task - To create, edit and delete tasks by the teacher. @stable_test Scenario: Teacher finishes task from room - Given I am logged in as a 'teacher1' at 'brb' + Given I am logged in as a 'teacher1_brb' at 'brb' When I go to rooms overview When I go to room 'Course with subject and tasks' And I click on link finish for task 'Cy Task Creating, Editing, Deleting Test' @@ -164,7 +164,7 @@ Feature: Task - To create, edit and delete tasks by the teacher. @stable_test Scenario: Teacher restores the finished task from room - Given I am logged in as a 'teacher1' at 'brb' + Given I am logged in as a 'teacher1_brb' at 'brb' When I go to tasks overview # And I open task list with due date // Icon to open this is only available if there are other tasks with due date (not guaranteed in environment) Then I do not see task 'Cy Task Creating, Editing, Deleting Test' in the list as teacher @@ -183,7 +183,7 @@ Feature: Task - To create, edit and delete tasks by the teacher. @stable_test Scenario: Teacher deletes task from room - Given I am logged in as a 'teacher1' at 'brb' + Given I am logged in as a 'teacher1_brb' at 'brb' When I go to rooms overview When I go to room 'Course with subject and tasks' When I click on three dot menu of content 'Cy Task Creating, Editing, Deleting Test' diff --git a/cypress/e2e/teams/studentCreateEditDeleteTeam.feature b/cypress/e2e/teams/studentCreateEditDeleteTeam.feature index 08a2c050..352ac8eb 100644 --- a/cypress/e2e/teams/studentCreateEditDeleteTeam.feature +++ b/cypress/e2e/teams/studentCreateEditDeleteTeam.feature @@ -5,7 +5,7 @@ Feature: Team - Student managed teams (on BRB) @stable_test Scenario: As a pre-condition admin allows student to create a team on BRB - Given I am logged in as a 'admin' at 'brb' + Given I am logged in as a 'admin1_brb' at 'brb' When I go to administration page When I go to team administration When I click the checkbox to allow students to create a team @@ -14,7 +14,7 @@ Feature: Team - Student managed teams (on BRB) @stable_test Scenario: Student can create, edit and delete team on BRB - Given I am logged in as a 'student' at 'brb' + Given I am logged in as a 'student1_brb' at 'brb' 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 diff --git a/cypress/e2e/teams/teacherAddsEditsDeleteTeamEventWithVideoConference.feature b/cypress/e2e/teams/teacherAddsEditsDeleteTeamEventWithVideoConference.feature index 40ee407a..6a7db4b5 100644 --- a/cypress/e2e/teams/teacherAddsEditsDeleteTeamEventWithVideoConference.feature +++ b/cypress/e2e/teams/teacherAddsEditsDeleteTeamEventWithVideoConference.feature @@ -5,7 +5,7 @@ Feature: Team - Teacher adds edits and deletes team event with video conference @stable_test Scenario: as a pre condition Admin enables the video conference option for a team event - Given I am logged in as a 'admin' at 'default' + Given I am logged in as a 'admin1_dbc' at 'default' When I go to administration page When I click on manage school card Then I enable the video conference on the old school setting page @@ -13,7 +13,7 @@ Feature: Team - Teacher adds edits and deletes team event with video conference @stable_test Scenario: as a pre condition Teacher enables the video conference option in team edit - Given I am logged in as a 'teacher' at 'default' + Given I am logged in as a 'teacher1_dbc' at 'default' When I go to teams overview When I go to a team 'Musik' When I click on team settings @@ -24,7 +24,7 @@ Feature: Team - Teacher adds edits and deletes team event with video conference @stable_test Scenario: as a pre-condition teacher adds student as an internal team member - Given I am logged in as a 'teacher' at 'default' + Given I am logged in as a 'teacher1_dbc' at 'default' When I go to teams overview When I go to a team 'Musik' When I click on three dot menu on the team title @@ -36,7 +36,7 @@ Feature: Team - Teacher adds edits and deletes team event with video conference @stable_test Scenario: Teacher adds event with video conference - Given I am logged in as a 'teacher' at 'default' + Given I am logged in as a 'teacher1_dbc' at 'default' When I go to teams overview When I go to a team 'Musik' When I go to calendar tab @@ -59,7 +59,7 @@ Feature: Team - Teacher adds edits and deletes team event with video conference @stable_test Scenario: Student can see and participate in video conference - Given I am logged in as a 'student' at 'default' + Given I am logged in as a 'student1_dbc' at 'default' When I go to teams overview When I go to a team 'Musik' When I go to calendar tab @@ -68,7 +68,7 @@ Feature: Team - Teacher adds edits and deletes team event with video conference @stable_test Scenario: as a post-condition teacher deletes the student as a team member - Given I am logged in as a 'teacher' at 'default' + Given I am logged in as a 'teacher1_dbc' at 'default' When I go to teams overview When I go to a team 'Musik' When I click on three dot menu on the team title @@ -78,7 +78,7 @@ Feature: Team - Teacher adds edits and deletes team event with video conference @stable_test Scenario: as a post condition Teacher edits and deletes the event - Given I am logged in as a 'teacher' at 'default' + Given I am logged in as a 'teacher1_dbc' at 'default' When I go to teams overview When I go to a team 'Musik' When I go to calendar tab @@ -97,7 +97,7 @@ Feature: Team - Teacher adds edits and deletes team event with video conference @stable_test Scenario: as a post condition Admin disable the video conference for the team - Given I am logged in as a 'admin' at 'default' + Given I am logged in as a 'admin1_dbc' at 'default' When I go to administration page When I click on manage school card Then I disable the video conference on the old school setting page @@ -105,7 +105,7 @@ Feature: Team - Teacher adds edits and deletes team event with video conference @stable_test Scenario: as a post condition Teacher sees deactivated video conference check box - Given I am logged in as a 'teacher' at 'default' + Given I am logged in as a 'teacher1_dbc' at 'default' When I go to teams overview When I go to a team 'Musik' When I click on team settings diff --git a/cypress/e2e/teams/teacherCreateEditDeleteTeam.feature b/cypress/e2e/teams/teacherCreateEditDeleteTeam.feature index 4e06de73..c6c29bab 100644 --- a/cypress/e2e/teams/teacherCreateEditDeleteTeam.feature +++ b/cypress/e2e/teams/teacherCreateEditDeleteTeam.feature @@ -5,7 +5,7 @@ Feature: Team - Create, delete and edit operations on Teams @stable_test Scenario: Creating a new team by Teacher - Given I am logged in as a 'teacher' at 'brb' + Given I am logged in as a 'teacher1_brb' at 'brb' 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 @@ -19,7 +19,7 @@ Feature: Team - Create, delete and edit operations on Teams @stable_test Scenario: Editing the newly created team by Teacher - Given I am logged in as a 'teacher' at 'brb' + Given I am logged in as a 'teacher1_brb' at 'brb' When I go to teams overview When I go to a team 'cy test team to test create edit delete team' When I click on team settings @@ -34,7 +34,7 @@ Feature: Team - Create, delete and edit operations on Teams @stable_test Scenario: Deleting the newly created team by Teacher - Given I am logged in as a 'teacher' at 'brb' + Given I am logged in as a 'teacher1_brb' at 'brb' When I go to teams overview When I go to a team 'edited cy test team to test create edit delete team' When I click on team settings diff --git a/cypress/e2e/topics/createEditDeleteTopic.feature b/cypress/e2e/topics/createEditDeleteTopic.feature index 3636f603..0d8a248f 100644 --- a/cypress/e2e/topics/createEditDeleteTopic.feature +++ b/cypress/e2e/topics/createEditDeleteTopic.feature @@ -5,7 +5,7 @@ Feature: Topics - To create, edit and delete topics by the teacher. @stable_test Scenario: Teacher creates topic from room - Given I am logged in as a 'teacher1' at 'brb' + Given I am logged in as a 'teacher1_brb' at 'brb' When I go to rooms overview When I go to room 'Course with subject and tasks' And I click on FAB to create new content @@ -38,7 +38,7 @@ Feature: Topics - To create, edit and delete topics by the teacher. @stable_test Scenario: Teacher edits topic from room - Given I am logged in as a 'teacher1' at 'brb' + Given I am logged in as a 'teacher1_brb' at 'brb' When I go to rooms overview When I go to room 'Course with subject and tasks' When I click on three dot menu of topic 'Cy Topic Creating and Deleting Test' @@ -82,7 +82,7 @@ Feature: Topics - To create, edit and delete topics by the teacher. @stable_test Scenario: Teacher deletes topic from room - Given I am logged in as a 'teacher1' at 'brb' + Given I am logged in as a 'teacher1_brb' at 'brb' When I go to rooms overview When I go to room 'Course with subject and tasks' When I click on three dot menu of topic 'Cy Topic Creating and Deleting Test - Edited topic' diff --git a/cypress/support/custom_commands/login.js b/cypress/support/custom_commands/login.js index 8e67cbea..217aaab7 100644 --- a/cypress/support/custom_commands/login.js +++ b/cypress/support/custom_commands/login.js @@ -13,7 +13,6 @@ const oauth_url = 'https://idm-default-main.cd.dbildungscloud.dev/realms/default/protocol/openid-connect/auth?client_id=dbildungscloud-server&redirect_uri=https://default-main.cd.dbildungscloud.dev/api/v3/sso/oauth/62c7f233f35a554ba3ed42f1&response_type=code&scope=openid%20profile%20email&kc_idp_hint=oidcmock' const titleOnDashboardPage = '[id="page-title"]' - Cypress.Commands.add('login', (username, environment) => { cy.session([username, environment], () => { const env = Cypress.env() @@ -34,41 +33,41 @@ Cypress.Commands.add('login', (username, environment) => { let doExternalLogin = false switch (username) { - case 'teacher': - userEmail = 'TEACHER_1_EMAIL' - userPassword = 'TEACHER_1_PASSWORD' + case 'teacher1_brb': + userEmail = 'TEACHER_1_BRB_EMAIL' + userPassword = 'TEACHER_1_BRB_PASSWORD' break - case 'teacher1': - userEmail = 'TEACHER_1_EMAIL' - userPassword = 'TEACHER_1_PASSWORD' + case 'teacher2_brb': + userEmail = 'TEACHER_2_BRB_EMAIL' + userPassword = 'TEACHER_2_BRB_PASSWORD' break - case 'teacher2': - userEmail = 'TEACHER_2_EMAIL' - userPassword = 'TEACHER_2_PASSWORD' + case 'teacher1_dbc': + userEmail = 'TEACHER_1_DBC_EMAIL' + userPassword = 'TEACHER_1_DBC_PASSWORD' break - case 'student': - userEmail = 'STUDENT_1_EMAIL' - userPassword = 'STUDENT_1_PASSWORD' + case 'student1_brb': + userEmail = 'STUDENT_1_BRB_EMAIL' + userPassword = 'STUDENT_1_BRB_PASSWORD' break - case 'student1': - userEmail = 'STUDENT_1_EMAIL' - userPassword = 'STUDENT_1_PASSWORD' + case 'student1_dbc': + userEmail = 'STUDENT_1_DBC_EMAIL' + userPassword = 'STUDENT_1_DBC_PASSWORD' break - case 'student2': - userEmail = 'STUDENT_2_EMAIL' - userPassword = 'STUDENT_2_PASSWORD' + case 'admin1_brb': + userEmail = 'ADMIN_1_BRB_EMAIL' + userPassword = 'ADMIN_1_BRB_PASSWORD' break - case 'admin': - userEmail = 'ADMIN_1_EMAIL' - userPassword = 'ADMIN_1_PASSWORD' + case 'admin1_nbc': + userEmail = 'ADMIN_1_NBC_EMAIL' + userPassword = 'ADMIN_1_NBC_PASSWORD' break - case 'expert': - userEmail = 'EXPERT_1_EMAIL' - userPassword = 'EXPERT_1_PASSWORD' + case 'admin1_dbc': + userEmail = 'ADMIN_1_DBC_EMAIL' + userPassword = 'ADMIN_1_DBC_PASSWORD' break - case 'student_extern': - userEmail = 'STUDENT_EXTERN' - userPassword = 'STUDENT_EXTERN_PASSWORD' + case 'student_extern_dbc': + userEmail = 'STUDENT_DBC_EXTERN' + userPassword = 'STUDENT_DBC_EXTERN_PASSWORD' doExternalLogin = true break } @@ -90,10 +89,10 @@ Cypress.Commands.add('login', (username, environment) => { }) }) } else { + console.log(`${env[userEmail]} ...... ${env[userPassword]}`) cy.get(emailInputFieldElement).type(env[userEmail], { log: false }) cy.get(passwordInputFieldElement).type(env[userPassword], { log: false }) - cy.get(submitButton) - .click() + cy.get(submitButton).click() } cy.url().should('contain', '/dashboard') cy.get(initials).click() @@ -102,4 +101,4 @@ Cypress.Commands.add('login', (username, environment) => { }) cy.visit('/dashboard') cy.get(titleOnDashboardPage).should('exist') -}) \ No newline at end of file +}) diff --git a/cypress/support/pages/course/pageCourses.js b/cypress/support/pages/course/pageCourses.js index 11e7966e..93f12191 100644 --- a/cypress/support/pages/course/pageCourses.js +++ b/cypress/support/pages/course/pageCourses.js @@ -399,12 +399,12 @@ class Courses { let userLastName switch (username) { case 'teacher1': - userFirstName = Cypress.env('TEACHER_1_FIRST_NAME') - userLastName = Cypress.env('TEACHER_1_LAST_NAME') + userFirstName = Cypress.env('TEACHER_1_BRB_FIRST_NAME') + userLastName = Cypress.env('TEACHER_1_BRB_LAST_NAME') break case 'teacher2': - userFirstName = Cypress.env('TEACHER_2_FIRST_NAME') - userLastName = Cypress.env('TEACHER_2_LAST_NAME') + userFirstName = Cypress.env('TEACHER_2_BRB_FIRST_NAME') + userLastName = Cypress.env('TEACHER_2_BRB_LAST_NAME') break } let userFullName = userLastName + ', ' + userFirstName diff --git a/cypress/support/pages/login_management/pageLoginManagement.js b/cypress/support/pages/login_management/pageLoginManagement.js index 587f7bf8..d65853ce 100644 --- a/cypress/support/pages/login_management/pageLoginManagement.js +++ b/cypress/support/pages/login_management/pageLoginManagement.js @@ -162,12 +162,12 @@ class Login_Management { } enterEmail () { - let userEmail = Cypress.env('STUDENT_PASSWORD_CHANGE_EMAIL') + let userEmail = Cypress.env('STUDENT_DBC_PASSWORD_CHANGE_EMAIL') this.typeEmailIntoField(Login_Management.#emailInputBox, userEmail) } enterPassword () { - let userPwd = Cypress.env('STUDENT_PASSWORD_CHANGE_OLD_PWD') + let userPwd = Cypress.env('STUDENT_DBC_PASSWORD_CHANGE_OLD_PWD') this.typePasswordIntoField(Login_Management.#passwordField, userPwd) } @@ -187,7 +187,7 @@ class Login_Management { } enterCurrentPassword () { - let userPwd = Cypress.env('STUDENT_PASSWORD_CHANGE_OLD_PWD') + let userPwd = Cypress.env('STUDENT_DBC_PASSWORD_CHANGE_OLD_PWD') this.typePasswordIntoField( Login_Management.#userSettingsCurrentPasswordField, userPwd @@ -195,7 +195,7 @@ class Login_Management { } enterNewPasswordInAllFields () { - let userPwd = Cypress.env('STUDENT_PASSWORD_CHANGE_NEW_PWD') + let userPwd = Cypress.env('STUDENT_DBC_PASSWORD_CHANGE_NEW_PWD') this.typePasswordIntoField( Login_Management.#userSettingsNewPasswordField, userPwd @@ -233,12 +233,12 @@ class Login_Management { } enterNewPassword () { - let userPwd = Cypress.env('STUDENT_PASSWORD_CHANGE_NEW_PWD') + let userPwd = Cypress.env('STUDENT_DBC_PASSWORD_CHANGE_NEW_PWD') this.typePasswordIntoField(Login_Management.#passwordField, userPwd) } enterNewPasswordInUserSettings () { - let userPwd = Cypress.env('STUDENT_PASSWORD_CHANGE_NEW_PWD') + let userPwd = Cypress.env('STUDENT_DBC_PASSWORD_CHANGE_NEW_PWD') this.typePasswordIntoField( Login_Management.#userSettingsCurrentPasswordField, userPwd @@ -246,7 +246,7 @@ class Login_Management { } enterOldPasswordInUserSettings () { - let userPwd = Cypress.env('STUDENT_PASSWORD_CHANGE_OLD_PWD') + let userPwd = Cypress.env('STUDENT_DBC_PASSWORD_CHANGE_OLD_PWD') this.typePasswordIntoField( Login_Management.#userSettingsNewPasswordField, userPwd diff --git a/scripts/set-env-vars.sh b/scripts/set-env-vars.sh index d878b1cb..6d687c34 100644 --- a/scripts/set-env-vars.sh +++ b/scripts/set-env-vars.sh @@ -10,31 +10,85 @@ fi # Define your environment variables declare -a env_vars=( - "CYPRESS_TEACHER_1_EMAIL" - "CYPRESS_TEACHER_1_PASSWORD" - "CYPRESS_TEACHER_2_EMAIL" - "CYPRESS_TEACHER_2_PASSWORD" - "CYPRESS_STUDENT_1_EMAIL" - "CYPRESS_STUDENT_1_PASSWORD" - "CYPRESS_STUDENT_2_EMAIL" - "CYPRESS_STUDENT_2_PASSWORD" - "CYPRESS_ADMIN_1_EMAIL" - "CYPRESS_ADMIN_1_PASSWORD" - "CYPRESS_EXPERT_1_EMAIL" - "CYPRESS_EXPERT_1_PASSWORD" - "CYPRESS_STUDENT_EXTERN" - "CYPRESS_STUDENT_EXTERN_PASSWORD" - "CYPRESS_STUDENT_PASSWORD_CHANGE_EMAIL" - "CYPRESS_STUDENT_PASSWORD_CHANGE_OLD_PWD" - "CYPRESS_STUDENT_PASSWORD_CHANGE_NEW_PWD" - "CYPRESS_TEACHER_1_FIRST_NAME" - "CYPRESS_TEACHER_1_LAST_NAME" - "CYPRESS_TEACHER_2_FIRST_NAME" - "CYPRESS_TEACHER_2_LAST_NAME" + "TEACHER_1_BRB_EMAIL" + "TEACHER_1_BRB_PASSWORD" + "TEACHER_1_BRB_FIRST_NAME" + "TEACHER_1_BRB_LAST_NAME" + "TEACHER_2_BRB_EMAIL" + "TEACHER_2_BRB_PASSWORD" + "TEACHER_2_BRB_FIRST_NAME" + "TEACHER_2_BRB_LAST_NAME" + "TEACHER_1_DBC_EMAIL" + "TEACHER_1_DBC_PASSWORD" + "TEACHER_1_DBC_FIRST_NAME" + "TEACHER_1_DBC_LAST_NAME" + "TEACHER_2_DBC_EMAIL" + "TEACHER_2_DBC_PASSWORD" + "TEACHER_2_DBC_FIRST_NAME" + "TEACHER_2_DBC_LAST_NAME" + "TEACHER_1_NBC_EMAIL" + "TEACHER_1_NBC_PASSWORD" + "TEACHER_1_NBC_FIRST_NAME" + "TEACHER_1_NBC_LAST_NAME" + "TEACHER_2_NBC_EMAIL" + "TEACHER_2_NBC_PASSWORD" + "TEACHER_2_NBC_FIRST_NAME" + "TEACHER_2_NBC_LAST_NAME" + "STUDENT_1_BRB_EMAIL" + "STUDENT_1_BRB_PASSWORD" + "STUDENT_2_BRB_EMAIL" + "STUDENT_2_BRB_PASSWORD" + "STUDENT_1_DBC_EMAIL" + "STUDENT_1_DBC_PASSWORD" + "STUDENT_2_DBC_EMAIL" + "STUDENT_2_DBC_PASSWORD" + "STUDENT_1_NBC_EMAIL" + "STUDENT_1_NBC_PASSWORD" + "STUDENT_2_NBC_EMAIL" + "STUDENT_2_NBC_PASSWORD" + "ADMIN_1_BRB_EMAIL" + "ADMIN_1_BRB_PASSWORD" + "ADMIN_1_DBC_EMAIL" + "ADMIN_1_DBC_PASSWORD" + "ADMIN_1_NBC_EMAIL" + "ADMIN_1_NBC_PASSWORD" + "EXPERT_1_BRB_EMAIL" + "EXPERT_1_BRB_PASSWORD" + "EXPERT_1_DBC_EMAIL" + "EXPERT_1_DBC_PASSWORD" + "EXPERT_1_NBC_EMAIL" + "EXPERT_1_NBC_PASSWORD" + "STUDENT_EXTERN_BRB" + "STUDENT_EXTERN_BRB_PASSWORD" + "STUDENT_EXTERN_DBC" + "STUDENT_EXTERN_DBC_PASSWORD" + "STUDENT_EXTERN_NBC" + "STUDENT_EXTERN_NBC_PASSWORD" + "STUDENT_BRB_PASSWORD_CHANGE_EMAIL" + "STUDENT_BRB_PASSWORD_CHANGE_OLD_PWD" + "STUDENT_BRB_PASSWORD_CHANGE_NEW_PWD" + "STUDENT_DBC_PASSWORD_CHANGE_EMAIL" + "STUDENT_DBC_PASSWORD_CHANGE_OLD_PWD" + "STUDENT_DBC_PASSWORD_CHANGE_NEW_PWD" + "STUDENT_NBC_PASSWORD_CHANGE_EMAIL" + "STUDENT_NBC_PASSWORD_CHANGE_OLD_PWD" + "STUDENT_NBC_PASSWORD_CHANGE_NEW_PWD" ) # Loop through and set environment variables for var in "${env_vars[@]}"; do - echo "Setting ${var}=${ENV_PREFIX}:${var}" - echo "${var}=op://cy-${ENV_PREFIX}-brb/cypress/${var}" >> $GITHUB_ENV + if [[ $var == *"_NBC_"* ]]; then + ENV="nbc" + echo "Setting ${var}=${ENV_PREFIX}:${var}" + echo "${var}=op://cy-${ENV_PREFIX}-${ENV}/cypress/${var}" >>$GITHUB_ENV + elif [[ $var == *"_BRB_"* ]]; then + ENV="brb" + echo "Setting ${var}=${ENV_PREFIX}:${var}" + echo "${var}=op://cy-${ENV_PREFIX}-${ENV}/cypress/${var}" >>$GITHUB_ENV + else + ENV="dbc" + echo "Setting ${var}=${ENV_PREFIX}:${var}" + echo "${var}=op://cy-${ENV_PREFIX}-${ENV}/cypress/${var}" >>$GITHUB_ENV + fi + done