From eae4a14f3936a697aefe9b15daad14e58520bf3b Mon Sep 17 00:00:00 2001 From: Kaitie O Date: Mon, 13 May 2024 08:23:14 -0500 Subject: [PATCH] Added ui tests for invitation to V2 progress view (#58501) * Added ui tests * modified id --- .../teacher_dashboard.feature | 47 ++++++++++++++++++- 1 file changed, 46 insertions(+), 1 deletion(-) diff --git a/dashboard/test/ui/features/teacher_tools/teacher_dashboard/teacher_dashboard.feature b/dashboard/test/ui/features/teacher_tools/teacher_dashboard/teacher_dashboard.feature index a62a60fc02cf2..f33d841121556 100644 --- a/dashboard/test/ui/features/teacher_tools/teacher_dashboard/teacher_dashboard.feature +++ b/dashboard/test/ui/features/teacher_tools/teacher_dashboard/teacher_dashboard.feature @@ -252,4 +252,49 @@ Feature: Using the teacher dashboard And I enter the section code into "input.ui-test-join-section" And I click selector "button.ui-test-join-section" Then I wait until element ".announcement-notification" is visible - And element ".announcement-notification" contains text matching "You are already an instructor for section" \ No newline at end of file + And element ".announcement-notification" contains text matching "You are already an instructor for section" + + Scenario: Decline invitation to new progress view + Given I create an authorized teacher-associated student named "Sally" + Given I am assigned to unit "allthethings" + And I complete the level on "http://studio.code.org/s/allthethings/lessons/2/levels/1" + + When I sign in as "Teacher_Sally" and go home + And I get levelbuilder access + And I wait until element "a:contains('Untitled Section')" is visible + And I save the section id from row 0 of the section table + Then I navigate to teacher dashboard for the section I saved + Then I append "/?enableExperiments=section_progress_v2" to the URL + Then I click selector "#ui-close-dialog" + And I wait until element "#uitest-course-dropdown" is visible + And I select the "All the Things! *" option in dropdown "uitest-course-dropdown" + + Scenario: Accept invitation to new progress view and see new view immediately. + Given I create an authorized teacher-associated student named "Sally" + Given I am assigned to unit "allthethings" + And I complete the level on "http://studio.code.org/s/allthethings/lessons/2/levels/1" + + When I sign in as "Teacher_Sally" and go home + And I get levelbuilder access + And I wait until element "a:contains('Untitled Section')" is visible + And I save the section id from row 0 of the section table + Then I navigate to teacher dashboard for the section I saved + Then I append "/?enableExperiments=section_progress_v2" to the URL + Then I click selector "#accept-invitation" + And I wait until element "h6:contains(Icon Key)" is visible + And I wait until element "#ui-test-progress-table-v2" is visible + + Scenario: Delay responding to invitation to new progress view and see old view immediately. + Given I create an authorized teacher-associated student named "Sally" + Given I am assigned to unit "allthethings" + And I complete the level on "http://studio.code.org/s/allthethings/lessons/2/levels/1" + + When I sign in as "Teacher_Sally" and go home + And I get levelbuilder access + And I wait until element "a:contains('Untitled Section')" is visible + And I save the section id from row 0 of the section table + Then I navigate to teacher dashboard for the section I saved + Then I append "/?enableExperiments=section_progress_v2" to the URL + Then I click selector "#remind-me-later-option" + And I wait until element "#uitest-course-dropdown" is visible + And I select the "All the Things! *" option in dropdown "uitest-course-dropdown" \ No newline at end of file