From 23db6a5a64e21a1f7dea3d80d9f79c378a8d3eb0 Mon Sep 17 00:00:00 2001 From: Liam Frye-Mason Date: Fri, 10 May 2024 15:48:26 -0700 Subject: [PATCH 1/5] Add eyes test for choice and validated progress levels --- .../teacher_dashboard_progress_v2.feature | 73 +++++++++++++++++++ 1 file changed, 73 insertions(+) diff --git a/dashboard/test/ui/features/teacher_tools/teacher_dashboard/teacher_dashboard_progress_v2.feature b/dashboard/test/ui/features/teacher_tools/teacher_dashboard/teacher_dashboard_progress_v2.feature index 5cc8ff17ee9e4..476f4d2fd0b4f 100644 --- a/dashboard/test/ui/features/teacher_tools/teacher_dashboard/teacher_dashboard_progress_v2.feature +++ b/dashboard/test/ui/features/teacher_tools/teacher_dashboard/teacher_dashboard_progress_v2.feature @@ -160,3 +160,76 @@ Scenario: Teacher can view student work, ask student to keep working, on rubric And I close my eyes +@eyes +Scenario: Teacher can view choice levels + And I open my eyes to test "V2 Progress - Choice Levels" + + Given I create an authorized teacher-associated student named "Sally" + Given I am assigned to unit "allthethings" + + # Student submits choice level + Given I am on "http://studio.code.org/s/allthethings/lessons/40/levels/1/sublevel/2?noautoplay=true" + And I wait until I see selector "button:contains(Submit)" + And I click selector "button:contains(Submit)" + And I wait to see "#confirm-button" + And I press "confirm-button" + + When I sign in as "Teacher_Sally" and go home + And I get levelbuilder access + And I navigate to the V2 progress dashboard + + # View unexpanded choice level + And I wait until element "#ui-test-lesson-header-1" is visible + And I scroll to "#ui-test-lesson-header-40" + And I click selector "#ui-test-lesson-header-40" + Then I wait until I see selector "button:contains(40.1)" + And I see no difference for "unexpanded choice level" + + # View expanded choice level + And I click selector "button:contains(40.1)" + Then I wait until I see selector "button:contains(b)" + And I see no difference for "expanded choice level" + + # View expanded choice level + And I click selector "button:contains(b)" + And I see no difference for "unexpanded choice level - closed" + +@eyes +Scenario: Teacher can view validated level + And I open my eyes to test "V2 Progress - Validated Levels" + + Given I create an authorized teacher-associated student named "Sally" + Given I am assigned to unit "allthethings" + + # Student makes progress in validated level + Given I am on "http://studio.code.org/s/allthethings/lessons/44/levels/11?noautoplay=true" + And I wait until I see selector "button:contains(Commit Code)" + And I click selector "button:contains(Commit Code)" + And I wait to see "#commit-notes" + And I press the first "#commit-notes" element + And I press keys "Commit message" for element "#commit-notes" + And I wait until "#confirmationButton" is not disabled + And I press "confirmationButton" + And I wait for 5 seconds + + # Student submits validated level + Given I am on "http://studio.code.org/s/allthethings/lessons/44/levels/12?noautoplay=true" + And I wait to see "#runButton" + And I press "runButton" + And I wait until "#finishButton" is not disabled + And I press "finishButton" + + When I sign in as "Teacher_Sally" and go home + And I get levelbuilder access + And I navigate to the V2 progress dashboard + + # eyes test for unexpanded lessons + And I wait until element "#ui-test-lesson-header-1" is visible + And I scroll to "#ui-test-lesson-header-44" + And I see no difference for "unexpanded lessons" + + # eyes test for expanded lessons with in progress and completed validated levels + And I click selector g"#ui-test-lesson-header-44" + And I wait until I see selector "div:contains('44.12')" + And I scroll to "#ui-test-lesson-header-45" + And I see no difference for "expanded lesson" \ No newline at end of file From d3803531446a67f5a8e40d08e631a80a6fa38203 Mon Sep 17 00:00:00 2001 From: Liam Frye-Mason Date: Mon, 13 May 2024 07:20:33 -0700 Subject: [PATCH 2/5] Try fix test --- .../teacher_dashboard_progress_v2.feature | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/dashboard/test/ui/features/teacher_tools/teacher_dashboard/teacher_dashboard_progress_v2.feature b/dashboard/test/ui/features/teacher_tools/teacher_dashboard/teacher_dashboard_progress_v2.feature index 476f4d2fd0b4f..5c3a525a5bde0 100644 --- a/dashboard/test/ui/features/teacher_tools/teacher_dashboard/teacher_dashboard_progress_v2.feature +++ b/dashboard/test/ui/features/teacher_tools/teacher_dashboard/teacher_dashboard_progress_v2.feature @@ -214,9 +214,10 @@ Scenario: Teacher can view validated level # Student submits validated level Given I am on "http://studio.code.org/s/allthethings/lessons/44/levels/12?noautoplay=true" - And I wait to see "#runButton" - And I press "runButton" - And I wait until "#finishButton" is not disabled + And I wait to see "#finishButton" + And I press "testButton" + And I wait until element ".javalab-console" contains text "[JAVALAB] Program completed." + And I wait until "#finishButton" is enabled And I press "finishButton" When I sign in as "Teacher_Sally" and go home @@ -232,4 +233,4 @@ Scenario: Teacher can view validated level And I click selector g"#ui-test-lesson-header-44" And I wait until I see selector "div:contains('44.12')" And I scroll to "#ui-test-lesson-header-45" - And I see no difference for "expanded lesson" \ No newline at end of file + And I see no difference for "expanded lesson" From dc03c737c673cdcb1c1856d0f2dd7a8fc0cbf4c6 Mon Sep 17 00:00:00 2001 From: Liam Frye-Mason Date: Mon, 13 May 2024 08:30:45 -0700 Subject: [PATCH 3/5] Fix tests --- .../teacher_dashboard/teacher_dashboard_progress_v2.feature | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dashboard/test/ui/features/teacher_tools/teacher_dashboard/teacher_dashboard_progress_v2.feature b/dashboard/test/ui/features/teacher_tools/teacher_dashboard/teacher_dashboard_progress_v2.feature index 5c3a525a5bde0..860547e8bc72d 100644 --- a/dashboard/test/ui/features/teacher_tools/teacher_dashboard/teacher_dashboard_progress_v2.feature +++ b/dashboard/test/ui/features/teacher_tools/teacher_dashboard/teacher_dashboard_progress_v2.feature @@ -198,7 +198,9 @@ Scenario: Teacher can view choice levels Scenario: Teacher can view validated level And I open my eyes to test "V2 Progress - Validated Levels" - Given I create an authorized teacher-associated student named "Sally" + # Student must be in CSA to run java lab + # Teacher for this step is named `Dumbledore` + Given I create a student named "Sally" in a CSA section Given I am assigned to unit "allthethings" # Student makes progress in validated level @@ -220,7 +222,7 @@ Scenario: Teacher can view validated level And I wait until "#finishButton" is enabled And I press "finishButton" - When I sign in as "Teacher_Sally" and go home + When I sign in as "Dumbledore" and go home And I get levelbuilder access And I navigate to the V2 progress dashboard From dfea087d07b8a62688686a2f8935a7fd8f1218ab Mon Sep 17 00:00:00 2001 From: Liam Frye-Mason Date: Mon, 13 May 2024 09:32:21 -0700 Subject: [PATCH 4/5] Try moving assignment --- .../teacher_dashboard/teacher_dashboard_progress_v2.feature | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dashboard/test/ui/features/teacher_tools/teacher_dashboard/teacher_dashboard_progress_v2.feature b/dashboard/test/ui/features/teacher_tools/teacher_dashboard/teacher_dashboard_progress_v2.feature index 860547e8bc72d..a1ec689a9cf86 100644 --- a/dashboard/test/ui/features/teacher_tools/teacher_dashboard/teacher_dashboard_progress_v2.feature +++ b/dashboard/test/ui/features/teacher_tools/teacher_dashboard/teacher_dashboard_progress_v2.feature @@ -201,7 +201,6 @@ Scenario: Teacher can view validated level # Student must be in CSA to run java lab # Teacher for this step is named `Dumbledore` Given I create a student named "Sally" in a CSA section - Given I am assigned to unit "allthethings" # Student makes progress in validated level Given I am on "http://studio.code.org/s/allthethings/lessons/44/levels/11?noautoplay=true" @@ -222,6 +221,8 @@ Scenario: Teacher can view validated level And I wait until "#finishButton" is enabled And I press "finishButton" + Given I am assigned to unit "allthethings" + When I sign in as "Dumbledore" and go home And I get levelbuilder access And I navigate to the V2 progress dashboard From 212b159155d19b530c023b93e529d1f1709993e3 Mon Sep 17 00:00:00 2001 From: Liam Frye-Mason Date: Mon, 13 May 2024 11:05:14 -0700 Subject: [PATCH 5/5] Fix test --- .../teacher_dashboard/teacher_dashboard_progress_v2.feature | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dashboard/test/ui/features/teacher_tools/teacher_dashboard/teacher_dashboard_progress_v2.feature b/dashboard/test/ui/features/teacher_tools/teacher_dashboard/teacher_dashboard_progress_v2.feature index a1ec689a9cf86..cdba7edfec751 100644 --- a/dashboard/test/ui/features/teacher_tools/teacher_dashboard/teacher_dashboard_progress_v2.feature +++ b/dashboard/test/ui/features/teacher_tools/teacher_dashboard/teacher_dashboard_progress_v2.feature @@ -194,7 +194,8 @@ Scenario: Teacher can view choice levels And I click selector "button:contains(b)" And I see no difference for "unexpanded choice level - closed" -@eyes +# The test requires java-lab which does not run on correctly on drone +@eyes @no_circle Scenario: Teacher can view validated level And I open my eyes to test "V2 Progress - Validated Levels"