Skip to content

[Testing:Submission] Cypress test for Navigation Buttons#10795

Merged
IDzyre merged 19 commits into
mainfrom
cypress-navigation-buttons
Nov 5, 2024
Merged

[Testing:Submission] Cypress test for Navigation Buttons#10795
IDzyre merged 19 commits into
mainfrom
cypress-navigation-buttons

Conversation

@williamschen23

@williamschen23 williamschen23 commented Aug 1, 2024

Copy link
Copy Markdown
Contributor

What is the current behavior?

No tests for navigation buttons and navigation colors
image

What is the new behavior?

Tests for these changes
NOTE TO SELF: it uses the grade only flag, not the normal create courses flag.

@williamschen23

williamschen23 commented Aug 3, 2024

Copy link
Copy Markdown
Contributor Author

Mergeable after newer navigation buttons

@williamschen23

Copy link
Copy Markdown
Contributor Author

Continue after #10852

@williamschen23
williamschen23 marked this pull request as ready for review August 21, 2024 22:40
@williamschen23

Copy link
Copy Markdown
Contributor Author

@IDzyre I'm not sure whether or not this should be merged or not. Since the CI does not use any autograding, most of the navigation buttons show up as 'OVERDUE SUBMISSION'. However, validating that the button should/should not exist should be important.

Comment thread site/app/templates/Navigation.twig Outdated
Co-authored-by: Cameron Peterson <[email protected]>
@IDzyre

IDzyre commented Aug 21, 2024

Copy link
Copy Markdown
Member

@IDzyre I'm not sure whether or not this should be merged or not. Since the CI does not use any autograding, most of the navigation buttons show up as 'OVERDUE SUBMISSION'. However, validating that the button should/should not exist should be important.

I think that having the buttons exist on the screen is slightly more important than what the buttons say. I will do a more thorough review tonight and then discuss in the meeting tomorrow with Barb and William to see their opinion

// Grade Released Homework, Grade Released Test,
it('should display instructor buttons correctly', () => {
cy.login('instructor');
cy.visit(`/courses/${getCurrentSemester()}/sample`);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This can just be cy.visit(['sample']);
Same with other places of this.

@williamschen23

Copy link
Copy Markdown
Contributor Author

Am waiting until I finish making a course in sample that has pre-req checking ig

@github-actions github-actions Bot added the Abandoned PR - Needs New Owner No activity on PR for more than 2 weeks -- seeking new owner to complete label Sep 14, 2024
@williamschen23

Copy link
Copy Markdown
Contributor Author

Am waiting until I finish making a course in sample that has pre-req checking ig

For the sake of less clutter, will be another PR

@williamschen23
williamschen23 requested a review from IDzyre October 30, 2024 17:00
@williamschen23 williamschen23 removed the Abandoned PR - Needs New Owner No activity on PR for more than 2 weeks -- seeking new owner to complete label Oct 30, 2024
@williamschen23

williamschen23 commented Oct 30, 2024

Copy link
Copy Markdown
Contributor Author

Also, it doesn't seem necessary to have a add another ID to the button class, will remove it in a future commit

Comment thread site/cypress/e2e/Cypress-UI/navigation_page.spec.js Outdated
@williamschen23
williamschen23 marked this pull request as draft October 30, 2024 17:25

@IDzyre IDzyre left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Once these changes are addressed, it looks good. Good work on finding a way to reduce duplicated code.

Comment thread site/cypress/e2e/Cypress-UI/navigation_page.spec.js Outdated
Comment thread site/cypress/e2e/Cypress-UI/navigation_page.spec.js Outdated
Comment thread site/cypress/e2e/Cypress-UI/navigation_page.spec.js Outdated
Comment thread site/cypress/e2e/Cypress-UI/navigation_page.spec.js Outdated
Comment thread site/cypress/e2e/Cypress-UI/navigation_page.spec.js Outdated
Comment thread site/cypress/e2e/Cypress-UI/navigation_page.spec.js Outdated
@williamschen23
williamschen23 marked this pull request as ready for review November 1, 2024 18:04
@williamschen23

Copy link
Copy Markdown
Contributor Author

Turns out we passed in a name into buttons that wasn't being used, but it is okay to use as a test-id

@williamschen23
williamschen23 requested a review from IDzyre November 3, 2024 17:59

@IDzyre IDzyre left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good, thanks for the PR.

@IDzyre
IDzyre merged commit 0c781ab into main Nov 5, 2024
@IDzyre
IDzyre deleted the cypress-navigation-buttons branch November 5, 2024 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants