-
Notifications
You must be signed in to change notification settings - Fork 669
Cypress: Updated isPseudoLocalized() to correctly process multiple elements #9385
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -20,7 +20,15 @@ describe('Localization', () => { | |
| cy.log('test masthead'); | ||
| cy.visit('/dashboards?pseudolocalization=true&lng=en'); | ||
| masthead.clickMastheadLink('help-dropdown-toggle'); | ||
| cy.byTestID('application-launcher-item').isPseudoLocalized(); | ||
| // wait for both console help menu items and additionalHelpActions items to load | ||
| // additionalHelpActions come from ConsoleLinks 'HelpMenu' yaml and are not translated | ||
| cy.get('.pf-c-app-launcher__group').should('have.length', 2); | ||
|
||
| // only test console help items which are translated | ||
| cy.get('.pf-c-app-launcher__group') | ||
| .first() | ||
| .within(() => { | ||
| cy.get('[role="menuitem"]').isPseudoLocalized(); | ||
| }); | ||
| }); | ||
|
|
||
| it('pseudolocalizes navigation', () => { | ||
|
|
@@ -42,7 +50,10 @@ describe('Localization', () => { | |
| it('pseudolocalizes utilization card', () => { | ||
| cy.log('test utilization card components'); | ||
| cy.visit('/dashboards?pseudolocalization=true&lng=en'); | ||
| cy.byTestID('utilization-card-item-text').isPseudoLocalized(); | ||
| cy.byLegacyTestID('utilization-card').within(() => { | ||
| cy.byTestID('dashboard-card-title').isPseudoLocalized(); | ||
| cy.byTestID('utilization-card-item-text').isPseudoLocalized(); | ||
| }); | ||
| }); | ||
|
|
||
| it('pseudolocalizes monitoring pages', () => { | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tested this change locally, nice!