Skip to content

Commit

Permalink
fix: missing data-testid (#405)
Browse files Browse the repository at this point in the history
  • Loading branch information
timwessman authored Sep 11, 2024
1 parent ae290c1 commit 55001ae
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions e2e/tests/resource-page.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ test.describe('Resource page', async () => {
const holidayInput = page
.locator('input[data-test*="holiday-"]:not(:checked):not(:disabled)')
.first();
const holidayTestId = await holidayInput.getAttribute('data-test');
const holidayTestId = await holidayInput.getAttribute('data-testid');

await page.locator(`[data-testid="${holidayTestId}"]`).check();
await page.locator('[data-testid="submit-opening-hours-button"]').click();
Expand All @@ -148,7 +148,7 @@ test.describe('Resource page', async () => {
const holidayInput = page
.locator('input[data-test*="holiday-"]:not(:checked):not(:disabled)')
.first();
const holidayTestId = await holidayInput.getAttribute('data-test');
const holidayTestId = await holidayInput.getAttribute('data-testid');

await page.locator(`[data-testid="${holidayTestId}"]`).check();
await page.getByText('Poikkeava aukioloaika').click();
Expand Down
2 changes: 1 addition & 1 deletion src/pages/EditHolidaysPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ const HolidayListItem = ({
const checkboxId = `${id}-checkbox`;
const commonCheckBoxProps = {
id: checkboxId,
'data-test': checkboxId,
'data-testid': checkboxId,
label: `${name[language]} ${formatDate(date)}`,
checked,
style: {
Expand Down

0 comments on commit 55001ae

Please sign in to comment.