Skip to content

Commit

Permalink
Merge pull request #2934 from rsun19/default-cypress-vars
Browse files Browse the repository at this point in the history
configured default environment for cypress
  • Loading branch information
openshift-merge-bot[bot] authored Jun 24, 2024
2 parents 39ec5ca + 4639ee1 commit 3f0cf84
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
16 changes: 16 additions & 0 deletions frontend/.eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,22 @@
}
]
}
},
{
"files": ["src/__tests__/cypress/**"],
"rules": {
"no-restricted-syntax": [
"error",
{
"selector": "Literal[value=/\\bRed Hat OpenShift AI\\b/i],JSXText[value=/\\bRed Hat OpenShift AI\\b/i]",
"message": "Do not hard code product name `Red Hat OpenShift AI`. Use `Cypress.env('ODH_PRODUCT_NAME')` instead."
},
{
"selector": "Literal[value=/\\bOpen Data Hub\\b/i],JSXText[value=/\\bOpen Data Hub\\b/i]",
"message": "Do not hard code product name `Open Data Hub`. Use `Cypress.env('ODH_PRODUCT_NAME')` instead."
}
]
}
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export class JupyterCard extends Card {
.findByTestId('tooltip-img')
.trigger('mouseenter')
.then(() => {
cy.findByText('Open Data Hub certified and supported');
cy.findByText(`${Cypress.env('ODH_PRODUCT_NAME')} certified and supported`);
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ describe('Application', () => {
const applicationLauncher = appChrome.getApplicationLauncher();
applicationLauncher.toggleAppLauncherButton();
const applicationLauncherMenuGroup = applicationLauncher.getApplicationLauncherMenuGroup(
'Open Data Hub Applications',
`${Cypress.env('ODH_PRODUCT_NAME')} Applications`,
);
applicationLauncherMenuGroup.shouldHaveApplicationLauncherItem('OpenShift Cluster Manager');
applicationLauncher.toggleAppLauncherButton();
Expand Down

0 comments on commit 3f0cf84

Please sign in to comment.