Skip to content

Commit

Permalink
Update test to use findByRole
Browse files Browse the repository at this point in the history
  • Loading branch information
felixhabib committed May 23, 2024
1 parent 8a4f3cc commit e633c9a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cypress/support/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export const selectWidthPreference = (width: number) => {
cy.findByRole('checkbox', { name: `${width}` }).click();
};

export const getResetButton = () => cy.get('[data-testid="resetButton"]');
export const getResetButton = () => cy.findByRole('button', { name: 'Clear' });

export const togglePreviewPanel = () =>
cy.findByRole('button', { name: 'Preview playroom' }).click();
Expand Down
2 changes: 1 addition & 1 deletion src/Playroom/FramesPanel/FramesPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ interface ResetButtonProps {
}

const ResetButton = ({ onClick, children }: ResetButtonProps) => (
<button className={styles.reset} onClick={onClick} data-testid="resetButton">
<button className={styles.reset} onClick={onClick}>
{children}
</button>
);
Expand Down

0 comments on commit e633c9a

Please sign in to comment.