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

Teacher dashboard UI tests - part 1 #57269

Merged
merged 17 commits into from Apr 10, 2024

Conversation

kobryan0619
Copy link
Contributor

@kobryan0619 kobryan0619 commented Mar 14, 2024

This starts to add to UI tests for our teacher_dashboard_V2 work.

  • Updates the existing teacher_dashboard tests
  • Creates test for Icon Key

Links

Ticket

@kobryan0619 kobryan0619 marked this pull request as ready for review March 15, 2024 19:42
@kobryan0619 kobryan0619 changed the title modified to add tests Teacher dashboard UI tests - part 1 Mar 15, 2024
Copy link
Contributor

@lfryemason lfryemason left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Thanks for starting on the UI tests!

styles.gridBox,
styles.gridBoxLevel,
feedbackStyle,
'ui-level-data-cell'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add this as id instead of className?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

@@ -60,7 +60,8 @@ export default function LessonProgressColumnHeader({
className={classNames(
styles.gridBox,
styles.lessonHeaderCell,
styles.pointerMouse
styles.pointerMouse,
'ui-progress-column'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add this as id instead of className?

Then I click selector "a:contains('More Details')"
And I wait until element "h3:contains(Progress Tracking Icon Key)" is visible
And I click selector "#ui-close-dialog"
And element "h3:contains(Progress Tracking Icon Key)" is hidden
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

newline at end of file

Copy link
Contributor

@lfryemason lfryemason left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fantastic start! Just a few small nits

type="primary"
size="s"
onClick={onShowProgressTableV2Change}
id="ui-test-link-to-new-progress-view"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
id="ui-test-link-to-new-progress-view"
id="ui-toggle-progress-views"

This button will also turn from new to old views.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point - changed!

@@ -32,6 +33,15 @@ Feature: Using the teacher dashboard
Then I navigate to teacher dashboard for the section I saved
And I wait until element "#uitest-course-dropdown" is visible
And I select the "All the Things! *" option in dropdown "uitest-course-dropdown"
Then I append "/?enableExperiments=section_progress_v2" to the URL
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about moving this to line 29 before the v1 progress tab tests to test that it shows up even with the toggle button displayed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was tricky... I could not get the experiment to work unless I added this experiment ON the progress view... I still don't know why that was. For that reason, I added the experiment right before it was needed. BUT I think we could move it to as soon as the test got to the progress page.

Then I click selector "#ui-test-link-to-new-progress-view"
And I wait until element "h6:contains(Icon Key)" is visible
And I wait until element "#ui-test-progress-table-v2" is visible
And element "#ui-test-progress-table-v2" is visible
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
And element "#ui-test-progress-table-v2" is visible

I think this is covered by the line above?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct... chagned!

@@ -242,4 +252,4 @@ 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"
And element ".announcement-notification" contains text matching "You are already an instructor for section"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you know what changed here and why? It's probably fine, but just want to check.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Honestly, I cannot see a difference myself...

Copy link
Contributor

@lfryemason lfryemason left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉 YAY, I'm so glad we are getting some ui tests!

@kobryan0619 kobryan0619 merged commit 009155e into staging Apr 10, 2024
2 checks passed
@kobryan0619 kobryan0619 deleted the kaitie/ui-tests-for-progress-view-1 branch April 10, 2024 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants