Skip to content

Commit

Permalink
Fix element view test for PR 439
Browse files Browse the repository at this point in the history
  • Loading branch information
NateLanza committed Jan 8, 2025
1 parent c93cf45 commit a5e2095
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions e2e-tests/elementView.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ test('Element View', async ({ page, browserName }) => {
await row.dispatchEvent('click');

// test expansion buttons
await page.getByLabel('Expand the sidebar in full').click();
await page.getByRole('button', { name: 'Expand the sidebar in full' }).click();
await page.getByLabel('Reduce the sidebar to normal').click();

// Ensure all headings are visible
Expand All @@ -78,8 +78,9 @@ test('Element View', async ({ page, browserName }) => {

// Check that the datatable is visible and populated
const dataTable = page.getByText(
'LabelAgeSchoolBlue HairDuff FanEvilMalePower PlantBart10yesnononoyesnoRalph8yesnononoyesnoMartin Prince10yesnononoyesnoRows per page:1001–3 of',
'LabelDegreeDeviationAgeSchoolBlue HairDuff FanEvilBart10yesnononoRalph8yesnononoMartin Prince10yesnononoRows per page:1001–3 of',
);
dataTable.scrollIntoViewIfNeeded();
await expect(dataTable).toBeVisible();
const nameCell = await page.getByRole('cell', { name: 'Bart' });
await expect(nameCell).toBeVisible();
Expand Down Expand Up @@ -122,7 +123,7 @@ test('Element View', async ({ page, browserName }) => {
await downloadPromise;

// Check that the close button is visible and works
const elementViewClose = await page.getByLabel('Close the sidebar');
const elementViewClose = await page.getByRole('button', { name: 'Close the sidebar' });
await expect(elementViewClose).toBeVisible();
await elementViewClose.click();

Expand Down

0 comments on commit a5e2095

Please sign in to comment.