diff --git a/cypress/e2e/account/selfEditAccountSettings.feature b/cypress/e2e/account/selfEditAccountSettings.feature index 2a799fc5..54f59809 100644 --- a/cypress/e2e/account/selfEditAccountSettings.feature +++ b/cypress/e2e/account/selfEditAccountSettings.feature @@ -2,36 +2,36 @@ @stable_test Feature: Account - Edit E-mail in the account setting page - As a user I want to navigation to my account's settings page so that I can see and edit my account details (e. g. email). - - Scenario: I see my E-mail is editable as an internal user, including pre conditions - Given I am logged in as a '' at '' - - # user changes/updates the E-mail - When I go to my account settings - Then I see my email is editable - When I change my email to a new email - When I enter my current password - When I click on the button Save Account Settings - Then I see the message successful - - # user can login with the changed E-mail - When I visit the login page - When I enter my updated email - When I enter my current password on the login page - When I click on the button Login - Then I see the dashboard - - # @staging_test - # Please do not execute this feature against STAGING environment, because after changing the E-mail user can not revert the old E-mail again. - # The system does not allow reverting to an old or existing E-mail. - - @school_api_test - Examples: - | user | namespace | - | student1_dbc | dbc | - | teacher1_dbc | dbc | - | admin1_dbc | dbc | + As a user I want to navigation to my account's settings page so that I can see and edit my account details (e. g. email). + + Scenario: I see my E-mail is editable as an internal user, including pre conditions + Given I am logged in as a '' at '' + + # user changes/updates the E-mail + When I go to my account settings + Then I see my email is editable + When I change my email to a new email + When I enter my current password + When I click on the button Save Account Settings + Then I see the message successful + + # user can login with the changed E-mail + When I visit the login page + When I enter my updated email + When I enter my current password on the login page + When I click on the button Login + Then I see the dashboard + + # @staging_test + # Please do not execute this feature against STAGING environment, because after changing the E-mail user can not revert the old E-mail again. + # The system does not allow reverting to an old or existing E-mail. + + @school_api_test + Examples: + | user | namespace | + | student1_brb | brb | + | teacher1_brb | brb | + | admin1_brb | brb | # E-mail is not editable by an external student user # Note: this scenario is currently unstable diff --git a/cypress/e2e/admin/adminRegistersStudentWithLink.feature b/cypress/e2e/admin/adminRegistersStudentWithLink.feature index 27d039d3..c9f13266 100644 --- a/cypress/e2e/admin/adminRegistersStudentWithLink.feature +++ b/cypress/e2e/admin/adminRegistersStudentWithLink.feature @@ -73,5 +73,5 @@ Feature: Admin - Student registration with registration link send by admin @school_api_test Examples: | namespace | admin | role_to_manage | user_firstname | user_lastname | user_email | - | dbc | admin1_dbc | student | cypress | student_admintest | original_student_adminusers@cypress-mail.de | + | brb | admin1_brb | student | cypress | student_admintest | original_student_adminusers@cypress-mail.de | diff --git a/cypress/e2e/admin/adminRegistersTeacherWithLink.feature b/cypress/e2e/admin/adminRegistersTeacherWithLink.feature index c622be48..9286ef6e 100644 --- a/cypress/e2e/admin/adminRegistersTeacherWithLink.feature +++ b/cypress/e2e/admin/adminRegistersTeacherWithLink.feature @@ -68,4 +68,4 @@ Feature: Admin - Teacher registration with registration link send by admin @school_api_test Examples: | namespace | admin | role_to_manage | user_firstname | user_lastname | user_email | - | dbc | admin1_dbc | teacher | cypress | teacher_admintest | original_teacher_adminusers@cypress-mail.de | \ No newline at end of file + | brb | admin1_brb | teacher | cypress | teacher_admintest | original_teacher_adminusers@cypress-mail.de | \ No newline at end of file diff --git a/cypress/e2e/admin/forcePasswordChangeTeacher.feature b/cypress/e2e/admin/forcePasswordChangeTeacher.feature index 716e6664..ea71cbc1 100644 --- a/cypress/e2e/admin/forcePasswordChangeTeacher.feature +++ b/cypress/e2e/admin/forcePasswordChangeTeacher.feature @@ -90,5 +90,5 @@ Feature: Admin - user must set a new password during login @school_api_test Examples: | namespace | admin | role_to_manage | user_firstname | user_lastname | user_email | - | dbc | admin1_dbc | teacher | cypress | teacher_admintest | original_teacher_adminusers@cypress-mail.de | + | brb | admin1_brb | teacher | cypress | teacher_admintest | original_teacher_adminusers@cypress-mail.de | diff --git a/cypress/e2e/course_board/shareBoardCardLink.feature b/cypress/e2e/course_board/shareBoardCardLink.feature index fcb0ce9a..96028ec2 100644 --- a/cypress/e2e/course_board/shareBoardCardLink.feature +++ b/cypress/e2e/course_board/shareBoardCardLink.feature @@ -1,5 +1,5 @@ @regression_test -@stable_test +@unstable_test Feature: Course Board - To share a board card link As a teacher I want to share a link to a board card. @@ -63,10 +63,10 @@ Feature: Course Board - To share a board card link @staging_test Examples: - | teacher_1 | teacher_2 | namespace | fullname_teacher_1 | fullname_teacher_2 | course_name | - | teacher1_nbc | teacher2_nbc | nbc | Karl Herzog | Lara Hande | Cypress Test Course | + | teacher_1 | teacher_2 | namespace | fullname_teacher_1 | fullname_teacher_2 | course_name | + | teacher1_nbc | teacher2_nbc | nbc | Karl Herzog | Lara Hande | Cypress Test Course | @school_api_test Examples: - | teacher_1 | teacher_2 | namespace | fullname_teacher_1 | fullname_teacher_2 | course_name | - | teacher1_nbc | teacher2_nbc | nbc | cypress teacher_1 | cypress teacher_2 | Cypress Test Course | + | teacher_1 | teacher_2 | namespace | fullname_teacher_1 | fullname_teacher_2 | course_name | + | teacher1_nbc | teacher2_nbc | nbc | cypress teacher_1 | cypress teacher_2 | Cypress Test Course | diff --git a/cypress/e2e/news/createReadDeleteTeamNewsTimeOptions.feature b/cypress/e2e/news/createReadDeleteTeamNewsTimeOptions.feature index b9a80d11..785b4a79 100644 --- a/cypress/e2e/news/createReadDeleteTeamNewsTimeOptions.feature +++ b/cypress/e2e/news/createReadDeleteTeamNewsTimeOptions.feature @@ -1,63 +1,63 @@ -@stable_test +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 '' at '' - Given I am logged in as a '' at '' - - # 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 '' - 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 '' - 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 '' - When I enter news description '' - When I set news-visibility-start-date to '' days at '' - Then I see time input field - When I click on save button - Then I see news is created successfully with title '' and with description '' - - # first user reads a team news on teams news overview page - When I go to teams overview - When I go to a team '' - When I click on news tab on the team detail page - Then I can read the news '' with description '' - Then I can see the publishing time info '' on overview page - When I click on the news teaser '' - Then I can read the news '' with description '' on news detail page - Then I can see the publishing time info '' on news detail page - - # first user deletes the team news - When I arrive on the dashboard - When I click on the news teaser '' - When I click on delete button - When I confirm the deletion on confirmation dialog box - Then I do not see the news '' - - # first user deletes the team - When I go to teams overview - When I go to a team '' - 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 '' - - @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 | \ No newline at end of file + 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 '' at '' + Given I am logged in as a '' at '' + + # 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 '' + 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 '' + 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 '' + When I enter news description '' + When I set news-visibility-start-date to '' days at '' + Then I see time input field + When I click on save button + Then I see news is created successfully with title '' and with description '' + + # first user reads a team news on teams news overview page + When I go to teams overview + When I go to a team '' + When I click on news tab on the team detail page + Then I can read the news '' with description '' + Then I can see the publishing time info '' on overview page + When I click on the news teaser '' + Then I can read the news '' with description '' on news detail page + Then I can see the publishing time info '' on news detail page + + # first user deletes the team news + When I arrive on the dashboard + When I click on the news teaser '' + When I click on delete button + When I confirm the deletion on confirmation dialog box + Then I do not see the news '' + + # first user deletes the team + When I go to teams overview + When I go to a team '' + 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 '' + + @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 | brb | 0 | currentTime | vor ein | vor ein | CypressAut - News Team | CypressAut - this is a team news | test team news description | +#| admin1_brb | student1_brb | brb | notselected | none | vor ein | vor ein | CypressAut - News Team | CypressAut - this is a team news | test team news description | +#| admin1_brb | teacher1_brb | brb | -7 | currentTime | vor 7 Tage | -7 | CypressAut - News Team | CypressAut - this is a team news | test team news description | \ No newline at end of file diff --git a/cypress/e2e/room_board/shareBoardCardLinkInRoom.feature b/cypress/e2e/room_board/shareBoardCardLinkInRoom.feature index 3a8d6f28..04d6310b 100644 --- a/cypress/e2e/room_board/shareBoardCardLinkInRoom.feature +++ b/cypress/e2e/room_board/shareBoardCardLinkInRoom.feature @@ -1,5 +1,5 @@ @regression_test -@stable_test +@unstable_test Feature: Room Board - To share a board card link As a teacher I want to share a link to a board card. @@ -68,10 +68,10 @@ Feature: Room Board - To share a board card link @staging_test Examples: - | teacher_1 | teacher_2 | namespace | name_teacher_1 | name_teacher_2 | room_name | role_name | school_name | - | teacher1_nbc | teacher2_nbc | nbc | Herzog | Hande | Cypress Test Room | Lehrkraft | Felix Mendelssohn-Gymnasium | + | teacher_1 | teacher_2 | namespace | name_teacher_1 | name_teacher_2 | room_name | role_name | school_name | + | teacher1_nbc | teacher2_nbc | nbc | Herzog | Hande | Cypress Test Room | Lehrkraft | Felix Mendelssohn-Gymnasium | @school_api_test Examples: - | teacher_1 | teacher_2 | namespace | name_teacher_1 | name_teacher_2 | room_name | role_name | school_name | - | teacher1_nbc | teacher2_nbc | nbc | teacher_1 | teacher_2 | Cypress Test Room | Lehrkraft | cypress-automated-tests | + | teacher_1 | teacher_2 | namespace | name_teacher_1 | name_teacher_2 | room_name | role_name | school_name | + | teacher1_nbc | teacher2_nbc | nbc | teacher_1 | teacher_2 | Cypress Test Room | Lehrkraft | cypress-automated-tests | diff --git a/cypress/e2e/room_board/shareMultiColumnRoomBoardInSameSchool.feature b/cypress/e2e/room_board/shareMultiColumnRoomBoardInSameSchool.feature new file mode 100644 index 00000000..20e7a8f6 --- /dev/null +++ b/cypress/e2e/room_board/shareMultiColumnRoomBoardInSameSchool.feature @@ -0,0 +1,67 @@ +@regression_test +@stable_test +Feature: Rooms - Share multi-column room board in the Rooms with teacher from the same school + + As a teacher, I want to share a multi-column board with another teacher within the same school so that I can collaborate effectively. + + Scenario: Share a multi-column board with a Teacher within the Sameschool + + # pre-condition: Creating teacher accounts + Given I am logged in as a '' at '' + Given I am logged in as a '' at '' + + # pre-condition: Room and multi-column board exist + Given a room named '' exists + Given a multi-column board named '' exists in the room + + # the first teacher shares the multi-column board with another teacher in the same school using the copied URL + Then I see the page board details + When I click on the three dot menu in room board + When I select the three dot menu action 'share' + Then I see the Share settings dialog + Then I see the title in the share modal + Then I see the information box in share modal + Then I see the button Cancel in the share modal + Then I see the checkbox Link valid for the same school is by default checked + Then I see the checkbox Link valid for 21 days is by default checked + When I click on the button Continue + Then I see the Share via modal + Then I see the result url text box in the modal + Then I see the option Share via Email + Then I see the option Copy link + Then I see the option Scan QR Code + Then I copy the board URL + Then I see the alert message + + # pre-condition: the second teacher is logged into the application, and a room exists + Given I am logged in as a '' at '' + Given a room named '' exists + + # the second teacher within the same school imports the multi-column board + When I open the shared URL + Then I see the modal to import the shared board into the room + Then I see the title in the share modal + When I select the room from the room list in the modal + When I click on the Continue button in the modal + When I enter a new name for the imported board '' in the modal + When I click on the button Import in the modal + Then I see the detail page of room '' + When I click on the multi-column board in the room detail page + Then I see the page board details + Then I see the chip Draft + + # post-condition: rooms created by both teachers are deleted + Given I am logged in as a '' at '' + Given the room named '' is deleted + Given I am logged in as a '' at '' + Given the room named '' is deleted + + @school_api_test + Examples: + | teacher1 | teacher2 | namespace | room_name_source | room_name_target | board_title | import_board_title | + | teacher1_brb | teacher2_brb | brb | Cypress Room Name-1 | Cypress Room Name-2 | Board Cy Title | Board Cy Import Title | + + @staging_test + Examples: + | teacher1 | teacher2 | namespace | room_name_source | room_name_target | board_title | import_board_title | + | teacher1_brb | teacher2_brb | brb | Cypress Room Name-1 | Cypress Room Name-2 | Board Cy Title | Board Cy Import Title | diff --git a/cypress/e2e/room_board/shareMultiColumnRoomBoardWithDifferentSchoolOnMainDev.feature b/cypress/e2e/room_board/shareMultiColumnRoomBoardWithDifferentSchoolOnMainDev.feature new file mode 100644 index 00000000..b951cd5d --- /dev/null +++ b/cypress/e2e/room_board/shareMultiColumnRoomBoardWithDifferentSchoolOnMainDev.feature @@ -0,0 +1,86 @@ +@unstable_test + +# Note: This feature can not be currently executed using the school API, as creating two different school within the same scenario is not possible. And creating them in two different scenarios results in separate sessions, which prevents the copied board URL from the first scenario from being used in the second scenario. + +Feature: Rooms - Share multi-column board in the rooms with the teacher from different school + + As a teacher, I want to share a multi-column board with another teacher from a different school so that I can collaborate effectively. + + Scenario: Share a multi-column board with a teacher from differentschool + + # pre-condition: creating teacher accounts for two different schools + Given I am logged in as a '' at '' + Given I am logged in as a '' at '' + + # pre-condition: room and multi-column board are available in the first school + Given a room named '' exists + Given a multi-column board named '' exists in the room + + # first teacher from the first school allows sharing the multi-column board with another teacher from a different school + Then I see the page board details + When I click on the three dot menu in room board + When I select the three dot menu action 'share' + Then I see the Share settings dialog + Then I see the title in the share modal + Then I see the information box in share modal + Then I see the button Cancel in the share modal + Then I see the checkbox Link valid for the same school is by default checked + Then I click to uncheck Link valid for the same school + Then I see the checkbox Link valid for 21 days is by default checked + When I click on the button Continue + Then I see the Share via modal + Then I see the result url text box in the modal + Then I see the option Share via Email + Then I see the option Copy link + Then I see the option Scan QR Code + Then I copy the board URL + Then I see the alert message + + # pre-condition: second teacher logged into the application, and a room exists + Given I am logged in as a '' at '' + Given a room named '' exists + + # second teacher from the second school can access the shared URL and import the multi-column board + When I open the shared URL + Then I see the modal to import the shared board into the room + Then I see the title in the share modal + When I select the room from the room list in the modal + When I click on the Continue button in the modal + When I enter a new name for the imported board '' in the modal + When I click on the button Import in the modal + When I click on the multi-column board in the room detail page + Then I see the page board details + Then I see the chip Draft + + # first teacher from the first school does not allow sharing the multi-column board with another teacher from a different school + Given I am logged in as a '' at '' + When I go to room overview + When I go to room '' + Then I see the detail page of room '' + When I click on the multi-column board in the room detail page + Then I see the page board details + When I click on the three dot menu in room board + When I select the three dot menu action 'share' + Then I see the Share settings dialog + Then I see the checkbox Link valid for the same school is by default checked + When I click on the button Continue + Then I see the Share via modal + Then I see the option Copy link + Then I copy the board URL + + # second teacher from the second school can not access the shared board URL and sees the 'Not Allowed' alert + Given I am logged in as a '' at '' + When I open the shared URL + Then I see an alert that importing the board is not allowed + + # post-condition: rooms created by both teachers are deleted + Given I am logged in as a '' at '' + Given the room named '' is deleted + Given I am logged in as a '' at '' + Given the room named '' is deleted + + @school_api_test + Examples: + | teacher1 | teacherExt1 | namespace | room_name_source | room_name_target | board_title | import_board_title | + | teacher1_brb | teacherExt1_brb | brb | Cypress Room Name-1 | Cypress Room Name-2 | Board Cy Title | Board Cy Import Title | + diff --git a/cypress/e2e/room_board/shareMultiColumnRoomBoardWithDifferentSchoolOnStaging.feature b/cypress/e2e/room_board/shareMultiColumnRoomBoardWithDifferentSchoolOnStaging.feature new file mode 100644 index 00000000..16838480 --- /dev/null +++ b/cypress/e2e/room_board/shareMultiColumnRoomBoardWithDifferentSchoolOnStaging.feature @@ -0,0 +1,84 @@ +@regression_test +@stable_test + +# Note: This feature should only be executed in the staging environment due to the school API limitation, which prevents creating two separate schools in the same scenario and using the copied URL from Scenario One in Scenario Two due to new sessions. + +Feature: Rooms - Share multi-column board in the rooms with the teacher from different school + + As a teacher, I want to share a multi-column board with another teacher from a different school so that I can collaborate effectively. + + Scenario: Share a multi-column board with a teacher from different school + + # pre-condition: room and multi-column board exist + Given I am logged in as a '' at '' + Given a room named '' exists + Given a multi-column board named '' exists in the room + + # first teacher from the first school allows sharing the multi-column board with another teacher from a different school + Then I see the page board details + When I click on the three dot menu in room board + When I select the three dot menu action 'share' + Then I see the Share settings dialog + Then I see the title in the share modal + Then I see the information box in share modal + Then I see the button Cancel in the share modal + Then I see the checkbox Link valid for the same school is by default checked + Then I click to uncheck Link valid for the same school + Then I see the checkbox Link valid for 21 days is by default checked + When I click on the button Continue + Then I see the Share via modal + Then I see the result url text box in the modal + Then I see the option Share via Email + Then I see the option Copy link + Then I see the option Scan QR Code + Then I copy the board URL + Then I see the alert message + + # pre-condition: second teacher logged into the application, and a room exists + Given I am logged in as a '' at '' + Given a room named '' exists + + # second teacher from the second school can access the shared URL and import the multi-column board + When I open the shared URL + Then I see the modal to import the shared board into the room + Then I see the title in the share modal + When I select the room from the room list in the modal + When I click on the Continue button in the modal + When I enter a new name for the imported board '' in the modal + When I click on the button Import in the modal + When I click on the multi-column board in the room detail page + Then I see the page board details + Then I see the chip Draft + + # first teacher from the first school does not allow sharing the multi-column board with another teacher from a different school + Given I am logged in as a '' at '' + When I go to room overview + When I go to room '' + Then I see the detail page of room '' + When I click on the multi-column board in the room detail page + Then I see the page board details + When I click on the three dot menu in room board + When I select the three dot menu action 'share' + Then I see the Share settings dialog + Then I see the checkbox Link valid for the same school is by default checked + When I click on the button Continue + Then I see the Share via modal + Then I see the option Copy link + Then I copy the board URL + + # second teacher from the second school can not access the shared board URL and sees the 'Not Allowed' alert + Given I am logged in as a '' at '' + When I open the shared URL + Then I see an alert that importing the board is not allowed + + # post-condition: rooms created by both teachers are deleted + Given I am logged in as a '' at '' + Given the room named '' is deleted + Given I am logged in as a '' at '' + Given the room named '' is deleted + + @staging_test + Examples: + | teacher1 | teacherExt1 | namespace | room_name_source | room_name_target | board_title | import_board_title | + | teacher1_brb | teacherExt1_brb | brb | Cypress Room Name-1 | Cypress Room Name-2 | Board Cy Title | Board Cy Import Title | + diff --git a/cypress/support/custom_commands/login.helper.js b/cypress/support/custom_commands/login.helper.js index a5cf277d..6fe0ff9c 100644 --- a/cypress/support/custom_commands/login.helper.js +++ b/cypress/support/custom_commands/login.helper.js @@ -57,7 +57,6 @@ export const getUserCredentials = (username) => { return ["TEACHER_LDAP_DBC", "TEACHER_LDAP_DBC_PASSWORD"]; case "admin_ldap_dbc": return ["ADMIN_LDAP_DBC", "ADMIN_LDAP_DBC_PASSWORD"]; - case "admin1_nbc": return ["ADMIN_1_NBC_EMAIL", "ADMIN_1_NBC_PASSWORD"]; case "teacher1_nbc": @@ -74,6 +73,36 @@ export const getUserCredentials = (username) => { return ["TEACHER_LDAP_NBC", "TEACHER_LDAP_NBC_PASSWORD"]; case "admin_ldap_nbc": return ["ADMIN_LDAP_NBC", "ADMIN_LDAP_NBC_PASSWORD"]; + case "teacherExt1_brb": + return ["TEACHER_EXT_1_BRB_EMAIL", "TEACHER_EXT_1_BRB_PASSWORD"]; + case "adminExt1_brb": + return ["ADMIN_EXT_1_BRB_EMAIL", "ADMIN_EXT_1_BRB_PASSWORD"]; + case "studentExt1_brb": + return ["STUDENT_EXT_1_BRB_EMAIL", "STUDENT_EXT_1_BRB_PASSWORD"]; + case "teacherExt2_brb": + return ["TEACHER_EXT_2_BRB_EMAIL", "TEACHER_EXT_2_BRB_PASSWORD"]; + case "studentExt2_brb": + return ["STUDENT_EXT_2_BRB_EMAIL", "STUDENT_EXT_2_BRB_PASSWORD"]; + case "teacherExt1_nbc": + return ["TEACHER_EXT_1_NBC_EMAIL", "TEACHER_EXT_1_NBC_PASSWORD"]; + case "adminExt1_nbc": + return ["ADMIN_EXT_1_NBC_EMAIL", "ADMIN_EXT_1_NBC_PASSWORD"]; + case "studentExt1_nbc": + return ["STUDENT_EXT_1_NBC_EMAIL", "STUDENT_EXT_1_NBC_PASSWORD"]; + case "teacherExt2_nbc": + return ["TEACHER_EXT_2_NBC_EMAIL", "TEACHER_EXT_2_NBC_PASSWORD"]; + case "studentExt2_nbc": + return ["STUDENT_EXT_2_NBC_EMAIL", "STUDENT_EXT_2_NBC_PASSWORD"]; + case "teacherExt1_dbc": + return ["TEACHER_EXT_1_DBC_EMAIL", "TEACHER_EXT_1_DBC_PASSWORD"]; + case "adminExt1_dbc": + return ["ADMIN_EXT_1_DBC_EMAIL", "ADMIN_EXT_1_DBC_PASSWORD"]; + case "studentExt1_nbc": + return ["STUDENT_EXT_1_DBC_EMAIL", "STUDENT_EXT_1_DBC_PASSWORD"]; + case "teacherExt2_dbc": + return ["TEACHER_EXT_2_DBC_EMAIL", "TEACHER_EXT_2_DBC_PASSWORD"]; + case "studentExt2_nbc": + return ["STUDENT_EXT_2_DBC_EMAIL", "STUDENT_EXT_2_DBC_PASSWORD"]; default: return [null, null]; diff --git a/cypress/support/pages/course/pageCourses.js b/cypress/support/pages/course/pageCourses.js index 3453c0d5..25a0fede 100644 --- a/cypress/support/pages/course/pageCourses.js +++ b/cypress/support/pages/course/pageCourses.js @@ -35,7 +35,7 @@ class Courses { '[data-testid="task-card-menu-0"]'; static #taskCardInCoursePageWithIndex = '[data-testid="room-task-card-0"]'; static #topicCardPublishBtn = '[data-testid="lesson-card-action-publish-0"]'; - static #dropDownCourse = '[data-testid="room-menu"]'; + static #dropDownCourse = '[data-testid="sidebar-rooms"]'; static #btnCourseEdit = '[data-testid="room-menu-edit-delete"]'; static #pageTitle = '[id="page-title"]'; static #contentCardTaskInfoSubmissionsChipWithIndex = @@ -711,7 +711,10 @@ class Courses { } checkIfToolIsVisibleInToolTable(toolName) { - cy.get(Courses.#courseExternalToolSection).contains(toolName).scrollIntoView().should("be.visible"); + cy.get(Courses.#courseExternalToolSection) + .contains(toolName) + .scrollIntoView() + .should("be.visible"); } checkIfToolIsNotVisibleInToolTable(toolName) { @@ -720,9 +723,7 @@ class Courses { clickThreeDotMenuOnTool(toolName) { cy.get(`[data-testid="external-tool-card-${toolName}"]`).within(() => { - cy.get(Courses.#threeDotMenuOnTool) - .should("be.visible") - .click(); + cy.get(Courses.#threeDotMenuOnTool).should("be.visible").click(); }); } diff --git a/cypress/support/pages/room_board/pageRoomBoards.js b/cypress/support/pages/room_board/pageRoomBoards.js index eb57a367..ce916a18 100644 --- a/cypress/support/pages/room_board/pageRoomBoards.js +++ b/cypress/support/pages/room_board/pageRoomBoards.js @@ -37,10 +37,149 @@ class RoomBoards { static #deleteButtonOnVideoConferenceElementDialog = '[data-testid="dialog-confirm"]'; static #threeDotButtonInCard = '[data-testid="card-menu-btn-0-0"]'; static #editOptionInCardThreeDot = '[data-testid="kebab-menu-action-edit"]'; + static #shareSettingsDialog = '[data-testid="dialog-content"]'; + static #sameSchoolCheckbox = '[data-testid="isSchoolInternal"]'; + static #days21Checkbox = '[data-testid="hasExpiryDate"]'; + static #continueButton = '[data-testid="dialog-next"]'; + static #shareEmailOption = '[data-testid="shareMailAction"]'; + static #copyLinkOption = '[data-testid="copyAction"]'; + static #urlInputBoxCopyBoard = '[data-testid="share-course-result-url"]'; + static #scanQRCodeOption = '[data-testid="qrCodeAction"]'; + static #roomSelectionBoxModal = '[data-testid="import-destination-select"]'; + static #continueButtonInImportModal = '[data-testid="dialog-next"]'; + static #boardNameInput = '[data-testid="import-modal-name-input"]'; + static #importButton = '[data-testid="dialog-confirm"]'; + static #shareModalTitle = '[data-testid="dialog-title"]'; + static #shareInformationBox = '[data-testid="share-options-info-text"]'; + static #cancelButtonInShareModal = '[data-testid="dialog-cancel"]'; + static #sharedBoardResultUrlTextBox = '[data-testid="share-course-result-url"]'; + static #shareImportAlert = '[data-testid="alert-text"]'; + static #checkBoxCopyShareBoardModal = 'input[type="checkbox"]'; + + uncheckLinkValidForSameSchool() { + cy.get(RoomBoards.#sameSchoolCheckbox).click(); + cy.get(RoomBoards.#sameSchoolCheckbox) + .find(RoomBoards.#checkBoxCopyShareBoardModal) + .should("not.be.checked"); + } + + verifyShareImportBoardAlert() { + cy.wait(500); + cy.get(RoomBoards.#shareImportAlert).should("be.visible"); + } + + verifySharedBoardResultUrlTextBox() { + cy.get(RoomBoards.#sharedBoardResultUrlTextBox).should("be.visible"); + } + + verifyShareModalTitle() { + cy.get(RoomBoards.#shareModalTitle).should("be.visible"); + } + + verifyShareInformationBox() { + cy.get(RoomBoards.#shareInformationBox).should("be.visible"); + } + + verifyCancelButtonInShareModal() { + cy.get(RoomBoards.#cancelButtonInShareModal).should("be.visible"); + } + + verifyImportSharedBoardModal() { + cy.get(RoomBoards.#shareSettingsDialog).should("be.visible"); + } + + selectRoomForImport() { + // Go to parent element + cy.get(RoomBoards.#shareSettingsDialog) + // Locate the selection input of the room name + .find(RoomBoards.#roomSelectionBoxModal) + // Navigate to the room name as a first option and press enter + .type("{downarrow}{enter}"); + } + + clickContinueOnImportModal() { + cy.get(RoomBoards.#continueButtonInImportModal).click(); + } + + enterNewBoardNameForImport(roomNameTarget) { + cy.get(RoomBoards.#boardNameInput).clear().type(roomNameTarget); + } + + clickImportOnModal() { + cy.get(RoomBoards.#importButton).click(); + } + + seeShareSettingsDialog() { + cy.get(RoomBoards.#shareSettingsDialog).should("be.visible"); + } + + verifySameSchoolLinkCheckboxChecked() { + cy.get(RoomBoards.#sameSchoolCheckbox) + // Move to the parent container holding the checkbox + .parent() + .find(RoomBoards.#checkBoxCopyShareBoardModal) + .should("be.checked"); + } + + verify21DaysLinkCheckboxChecked() { + cy.get(RoomBoards.#days21Checkbox) + // Move to the parent container holding the checkbox + .parent() + .find(RoomBoards.#checkBoxCopyShareBoardModal) + .should("be.checked"); + } + + clickContinueButtonInShareSettingsDialog() { + cy.get(RoomBoards.#continueButton).click(); + } + + verifyShareViaModal() { + cy.get(RoomBoards.#shareSettingsDialog).should("be.visible"); + } + + verifyShareViaEmailOption() { + cy.get(RoomBoards.#shareEmailOption).should("be.visible"); + } + + verifyCopyLinkOption() { + cy.get(RoomBoards.#copyLinkOption).should("be.visible"); + } + + verifyScanQRCodeOption() { + cy.get(RoomBoards.#scanQRCodeOption).should("be.visible"); + } + + copyBoardURLInModal() { + cy.get(RoomBoards.#urlInputBoxCopyBoard) + .parent() + .find('input[type="text"]') + .should("be.visible") + .invoke("val") + .then((boardUrl) => { + expect(boardUrl).to.be.a("string").and.not.be.empty; + cy.wrap(boardUrl).as("copiedURL"); + cy.window().then((win) => { + cy.stub(win.navigator.clipboard, "writeText") + .as("writeTextStub") + .resolves(); + }); + cy.get(RoomBoards.#copyLinkOption).click(); + cy.get("@writeTextStub").should("be.calledOnce"); + cy.get("@writeTextStub").should("be.calledWith", boardUrl); + }); + } + + openSharedBoardURL() { + cy.get("@copiedURL").then((boardUrl) => { + cy.visit(boardUrl); + // Wait for 500 msec for any JavaScript actions to complete + cy.wait(500); + }); + } clickOnThreeDotInCard() { cy.get(RoomBoards.#threeDotButtonInCard) - //three dot has same data-testid and needs to be located inside the parent element + //Three dot has same data-testid and needs to be located inside the parent element .find(RoomBoards.#globalCommonThreeDotButton) .click(); cy.get(RoomBoards.#editOptionInCardThreeDot).should("be.visible"); @@ -52,7 +191,7 @@ class RoomBoards { clickThreeDotMenuInVideoConferenceElement() { cy.get(RoomBoards.#videoConferenceElement) - //three dot has same data-testid and needs to be located inside the parent element + //Three dot has same data-testid and needs to be located inside the parent element .find(RoomBoards.#globalCommonThreeDotButton) .click(); } @@ -81,7 +220,8 @@ class RoomBoards { verifyModeratorApprovalCheckboxCheckedInBBBModal() { cy.get(RoomBoards.#moderatorApprovalCheckbox) - .find('input[type="checkbox"]') // Find the checkbox inside the parent options + // Find the checkbox inside the parent options + .find(RoomBoards.#checkBoxCopyShareBoardModal) .should("be.checked"); } @@ -121,7 +261,7 @@ class RoomBoards { cy.get(RoomBoards.#createVideoConferenceButton).should("be.visible"); } - verifyMultiColumnCopiedBoardTileVisibleOnRoomDetailsPage() { + verifyMultiColumnCopiedOrSharedBoardTileVisibleOnRoomDetailsPage() { cy.get(RoomBoards.#multiColumnCopiedBoardSelector).should("be.visible"); } diff --git a/cypress/support/step_definition/common_helper/prePostConditionSteps.spec.js b/cypress/support/step_definition/common_helper/prePostConditionSteps.spec.js index 2dbfa5f8..5c3ec949 100644 --- a/cypress/support/step_definition/common_helper/prePostConditionSteps.spec.js +++ b/cypress/support/step_definition/common_helper/prePostConditionSteps.spec.js @@ -20,6 +20,9 @@ Given("admin enables video conference for the school in the school settings page }); Given("the room named {string} is deleted", (room_name) => { + rooms.navigateToRoomsOverview(); + rooms.navigateToRoom(room_name); + rooms.seeRoomDetailPage(room_name); rooms.openThreeDotMenuForRoom(); rooms.clickOnKebabMenuAction("delete"); rooms.seeConfirmationModalForRoomDeletion(); diff --git a/cypress/support/step_definition/room_boards/roomBoardSteps.spec.js b/cypress/support/step_definition/room_boards/roomBoardSteps.spec.js index d7fba780..658e2a02 100644 --- a/cypress/support/step_definition/room_boards/roomBoardSteps.spec.js +++ b/cypress/support/step_definition/room_boards/roomBoardSteps.spec.js @@ -3,6 +3,97 @@ import RoomBoards from "../../pages/room_board/pageRoomBoards"; const roomBoards = new RoomBoards(); +Then("I see the alert message", () => { + roomBoards.verifyShareImportBoardAlert(); +}); + +Then("I click to uncheck Link valid for the same school", () => { + roomBoards.uncheckLinkValidForSameSchool(); +}); + +Then("I see an alert that importing the board is not allowed", () => { + roomBoards.verifyShareImportBoardAlert(); +}); + +Then("I see the result url text box in the modal", () => { + roomBoards.verifySharedBoardResultUrlTextBox(); +}); + +Then("I see the title in the share modal", () => { + roomBoards.verifyShareModalTitle(); +}); + +Then("I see the information box in share modal", () => { + roomBoards.verifyShareInformationBox(); +}); + +Then("I see the button Cancel in the share modal", () => { + roomBoards.verifyCancelButtonInShareModal(); +}); + +When("I open the shared URL", () => { + roomBoards.openSharedBoardURL(); +}); + +Then("I see the modal to import the shared board into the room", () => { + roomBoards.verifyImportSharedBoardModal(); +}); + +When("I select the room from the room list in the modal", () => { + roomBoards.selectRoomForImport(); +}); + +When("I click on the Continue button in the modal", () => { + roomBoards.clickContinueOnImportModal(); +}); + +When( + "I enter a new name for the imported board {string} in the modal", + (importBoardName) => { + roomBoards.enterNewBoardNameForImport(importBoardName); + } +); + +When("I click on the button Import in the modal", () => { + roomBoards.clickImportOnModal(); +}); + +Then("I see the Share settings dialog", () => { + roomBoards.seeShareSettingsDialog(); +}); + +Then("I see the checkbox Link valid for the same school is by default checked", () => { + roomBoards.verifySameSchoolLinkCheckboxChecked(); +}); + +Then("I see the checkbox Link valid for 21 days is by default checked", () => { + roomBoards.verify21DaysLinkCheckboxChecked(); +}); + +When("I click on the button Continue", () => { + roomBoards.clickContinueButtonInShareSettingsDialog(); +}); + +Then("I see the Share via modal", () => { + roomBoards.verifyShareViaModal(); +}); + +Then("I see the option Share via Email", () => { + roomBoards.verifyShareViaEmailOption(); +}); + +Then("I see the option Copy link", () => { + roomBoards.verifyCopyLinkOption(); +}); + +Then("I see the option Scan QR Code", () => { + roomBoards.verifyScanQRCodeOption(); +}); + +Then("I copy the board URL", () => { + roomBoards.copyBoardURLInModal(); +}); + When("I click on the option edit in the three dot menu on the card", () => { roomBoards.clickEditOptionInCardThreeDot(); }); @@ -89,7 +180,7 @@ Then( ); Then("I see copied multi-column board tile in the rooms details page", () => { - roomBoards.verifyMultiColumnCopiedBoardTileVisibleOnRoomDetailsPage(); + roomBoards.verifyMultiColumnCopiedOrSharedBoardTileVisibleOnRoomDetailsPage(); }); Then("I see copied single-column board tile in the room details page", () => { @@ -105,7 +196,8 @@ When("I click on the multi-column board in the room detail page", () => { }); Then("I do not see the chip Draft", () => { - roomBoards.verifyDraftChipNotVisible(); // Method to verify the Draft chip is not visible + // Method to verify the Draft chip is not visible + roomBoards.verifyDraftChipNotVisible(); }); Then("I see the chip Draft", () => { diff --git a/env_variables/stagingTemplate.env.json b/env_variables/stagingTemplate.env.json index 41cd4c73..333f645b 100644 --- a/env_variables/stagingTemplate.env.json +++ b/env_variables/stagingTemplate.env.json @@ -86,6 +86,66 @@ "TEACHER_LDAP_NBC": "", "TEACHER_LDAP_NBC_PASSWORD": "", "ADMIN_LDAP_NBC": "", - "ADMIN_LDAP_NBC_PASSWORD": "" + "ADMIN_LDAP_NBC_PASSWORD": "", + "TEACHER_EXT_1_BRB_EMAIL": "", + "TEACHER_EXT_1_BRB_PASSWORD": "", + "TEACHER_EXT_1_BRB_FIRST_NAME": "", + "TEACHER_EXT_1_BRB_LAST_NAME": "", + "STUDENT_EXT_1_BRB_EMAIL": "", + "STUDENT_EXT_1_BRB_PASSWORD": "", + "STUDENT_EXT_1_BRB_FIRST_NAME": "", + "STUDENT_EXT_1_BRB_LAST_NAME": "", + "ADMIN_EXT_1_BRB_EMAIL": "", + "ADMIN_EXT_1_BRB_PASSWORD": "", + "ADMIN_EXT_1_BRB_FIRST_NAME": "", + "ADMIN_EXT_1_BRB_LAST_NAME": "", + "TEACHER_EXT_2_BRB_EMAIL": "", + "TEACHER_EXT_2_BRB_PASSWORD": "", + "TEACHER_EXT_2_BRB_FIRST_NAME": "", + "TEACHER_EXT_2_BRB_LAST_NAME": "", + "STUDENT_EXT_2_BRB_EMAIL": "", + "STUDENT_EXT_2_BRB_PASSWORD": "", + "STUDENT_EXT_2_BRB_FIRST_NAME": "", + "STUDENT_EXT_2_BRB_LAST_NAME": "", + "TEACHER_EXT_1_DBC_EMAIL": "", + "TEACHER_EXT_1_DBC_PASSWORD": "", + "TEACHER_EXT_1_DBC_FIRST_NAME": "", + "TEACHER_EXT_1_DBC_LAST_NAME": "", + "STUDENT_EXT_1_DBC_EMAIL": "", + "STUDENT_EXT_1_DBC_PASSWORD": "", + "STUDENT_EXT_1_DBC_FIRST_NAME": "", + "STUDENT_EXT_1_DBC_LAST_NAME": "", + "ADMIN_EXT_1_DBC_EMAIL": "", + "ADMIN_EXT_1_DBC_PASSWORD": "", + "ADMIN_EXT_1_DBC_FIRST_NAME": "", + "ADMIN_EXT_1_DBC_LAST_NAME": "", + "TEACHER_EXT_2_DBC_EMAIL": "", + "TEACHER_EXT_2_DBC_PASSWORD": "", + "TEACHER_EXT_2_DBC_FIRST_NAME": "", + "TEACHER_EXT_2_DBC_LAST_NAME": "", + "STUDENT_EXT_2_DBC_EMAIL": "", + "STUDENT_EXT_2_DBC_PASSWORD": "", + "STUDENT_EXT_2_DBC_FIRST_NAME": "", + "STUDENT_EXT_2_DBC_LAST_NAME": "", + "TEACHER_EXT_1_NBC_EMAIL": "", + "TEACHER_EXT_1_NBC_PASSWORD": "", + "TEACHER_EXT_1_NBC_FIRST_NAME": "", + "TEACHER_EXT_1_NBC_LAST_NAME": "", + "STUDENT_EXT_1_NBC_EMAIL": "", + "STUDENT_EXT_1_NBC_PASSWORD": "", + "STUDENT_EXT_1_NBC_FIRST_NAME": "", + "STUDENT_EXT_1_NBC_LAST_NAME": "", + "ADMIN_EXT_1_NBC_EMAIL": "", + "ADMIN_EXT_1_NBC_PASSWORD": "", + "ADMIN_EXT_1_NBC_FIRST_NAME": "", + "ADMIN_EXT_1_NBC_LAST_NAME": "", + "TEACHER_EXT_2_NBC_EMAIL": "", + "TEACHER_EXT_2_NBC_PASSWORD": "", + "TEACHER_EXT_2_NBC_FIRST_NAME": "", + "TEACHER_EXT_2_NBC_LAST_NAME": "", + "STUDENT_EXT_2_NBC_EMAIL": "", + "STUDENT_EXT_2_NBC_PASSWORD": "", + "STUDENT_EXT_2_NBC_FIRST_NAME": "", + "STUDENT_EXT_2_NBC_LAST_NAME": "" } }