Skip to content

Conversation

@dtaylor113
Copy link
Contributor

@dtaylor113 dtaylor113 commented Jun 30, 2021

Previously a call such as:
cy.byTestID('nav').isPseudoLocalized();
would incorrectly result in one call to isPseudoLocalized() which would test a single combined text string consisting of all of the text of matching elements! In this example "[Ḥṓṓṃḛḛ] [ṎṎṽḛḛṛṽḭḭḛḛẁ] [Ṕṛṓṓĵḛḛͼţṡ]...[ṎṎṗḛḛṛααţṓṓṛṡ] [Ḉṓṓṃṗṵṵţḛḛ]..." -instead of testing each element text individually. So, isPseudoLocalized() would pass as long as first and last elements were translated.

Updated isPseudoLocalized() to correctly process multiple elements, as well as:

  • updated pseudolocalization.spec.ts to correctly test masthead Help menu items and Overview dashboard 'Cluster utilization' card.
  • added translations for 'Report Bug to Red Hat' Help menu items
  • added data-test ids

@dtaylor113 dtaylor113 requested review from spadgett and yapei June 30, 2021 19:28
@openshift-ci openshift-ci bot requested review from andybraren and kyoto June 30, 2021 19:28
@openshift-ci openshift-ci bot added component/core Related to console core functionality component/dashboard Related to dashboard component/shared Related to console-shared kind/cypress Related to Cypress e2e integration testing kind/i18n Indicates issue or PR relates to internationalization or has content that needs to be translated labels Jun 30, 2021
Comment on lines +51 to +56
Copy link
Contributor

@yapei yapei Jul 1, 2021

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!

Copy link
Contributor

@yapei yapei left a comment

Choose a reason for hiding this comment

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

looks good to me!

@dtaylor113 dtaylor113 requested a review from rebeccaalpert July 1, 2021 18:24
Copy link
Contributor

@rebeccaalpert rebeccaalpert left a comment

Choose a reason for hiding this comment

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

This looks great! Just one comment about passing the TFunction around since it's something Sam dinged me for a lot. :)

Copy link
Member

Choose a reason for hiding this comment

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

We should open a Bugzilla for the menu items not translated. I think it would be better to move this into console so they can be translated instead of leaving them as ConsoleLink resources, although it will require some operator changes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

@rebeccaalpert rebeccaalpert left a comment

Choose a reason for hiding this comment

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

I added some examples here based on what we've done elsewhere. If you remove the t argument and adjust those lines of code, this should be all set.

@dtaylor113 dtaylor113 force-pushed the cypress-i18n-tests branch from 3fdd2bf to 9c930b7 Compare July 8, 2021 19:02
@dtaylor113
Copy link
Contributor Author

apologies @rebeccaalpert, looks like I didn't push the fixes :-) Should be updated now.

Copy link
Contributor

@rebeccaalpert rebeccaalpert left a comment

Choose a reason for hiding this comment

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

Looks good to me! Thank you.

@rebeccaalpert rebeccaalpert added the lgtm Indicates that a PR is ready to be merged. label Jul 8, 2021
@rhamilto
Copy link
Member

rhamilto commented Jul 8, 2021

/approve

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 8, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dtaylor113, rebeccaalpert, rhamilto

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 8, 2021
@openshift-merge-robot openshift-merge-robot merged commit 27b9c94 into openshift:master Jul 8, 2021
@spadgett spadgett added this to the v4.9 milestone Jul 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. component/core Related to console core functionality component/dashboard Related to dashboard component/shared Related to console-shared kind/cypress Related to Cypress e2e integration testing kind/i18n Indicates issue or PR relates to internationalization or has content that needs to be translated lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants