Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add eyes test for choice and validated progress levels #58546

Merged
merged 5 commits into from
May 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -160,3 +160,81 @@ 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"

# 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"

# 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

# 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 "#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"

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

# 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"