Skip to content

Commit

Permalink
[frontend] Title usage in testing for controlled dial
Browse files Browse the repository at this point in the history
  • Loading branch information
Bonsai8863 committed Apr 24, 2024
1 parent af02e11 commit df37925
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export const StyledCreateButton = styled(Button)({

const CreateEntityControlledDial = (entity_type: string) => {
const { t_i18n } = useFormatter();
const buttonValue = `${t_i18n('Create')} ${t_i18n(entity_type)}`;
const controlledDial = ({ onOpen }: {
onOpen: () => void
}) => (
Expand All @@ -18,10 +19,10 @@ const CreateEntityControlledDial = (entity_type: string) => {
color='primary'
size='small'
variant='contained'
aria-label={`${t_i18n('Create')} ${t_i18n(entity_type)}`}
data-testid='CreateEntityControlledDial'
aria-label={buttonValue}
title={buttonValue}
>
{t_i18n('Create')} {t_i18n(entity_type)} <Add />
{buttonValue} <Add />
</StyledCreateButton>
);
return controlledDial;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default class GroupingsPage {
}

getCreateButton() {
return this.page.getByRole('button', { name: 'Create' })
return this.page.getByRole('button', { name: 'Create Grouping' })
}

getItemFromList(name: string) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default class ReportPage {
}

addNewReport() {
return this.page.getByRole('button', { name: 'Create' }).click();
return this.page.getByRole('button', { name: 'Create Report' }).click();
}

closeNewreport() {
Expand Down

0 comments on commit df37925

Please sign in to comment.