Skip to content

Commit

Permalink
refactor: rename testid
Browse files Browse the repository at this point in the history
  • Loading branch information
perzeuss committed Oct 23, 2024
1 parent eba2e7d commit a5e9f2a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion web/app/components/base/toast/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const Toast = ({
{type === 'info' && <InformationCircleIcon className="w-5 h-5 text-blue-400" aria-hidden="true" />}
</div>
<div className="ml-3">
<h3 data-testid={`${type}-toast-message`} className={
<h3 data-testid={`toast-message-${type}`} className={
classNames(
'text-sm font-medium',
type === 'success' ? 'text-green-800' : '',
Expand Down
2 changes: 1 addition & 1 deletion web/cypress/e2e/shared-steps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ Then('I should stay on page {string}', (path: string) => {
})

Then('I should see a toast {string} message', (type: 'success' | 'error' | 'warning' | 'info') => {
cy.get(`[data-testid=${type}-toast-message]`).should('be.visible')
cy.get(`[data-testid=toast-message-${type}]`).should('be.visible')
})

Then('I should see the {string}', (elementName: string) => {
Expand Down

0 comments on commit a5e9f2a

Please sign in to comment.