Skip to content

Commit a79017b

Browse files
committed
fix: update sorting test to use the correct sort button locator
1 parent 07a7060 commit a79017b

8 files changed

Lines changed: 4 additions & 4 deletions

packages/pluggableWidgets/datagrid-web/e2e/DataGrid.spec.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import path from "path";
2-
import { test, expect } from "@playwright/test";
2+
import { expect, test } from "@playwright/test";
33
import * as XLSX from "xlsx";
44
import AxeBuilder from "@axe-core/playwright";
55

@@ -62,7 +62,7 @@ test.describe("capabilities: sorting", () => {
6262
await expect(
6363
page.locator(".mx-name-datagrid1 .column-header").nth(1).locator("svg[data-icon='arrows-alt-v']")
6464
).toBeVisible();
65-
await page.locator(".mx-name-datagrid1 .column-header").nth(1).click();
65+
await page.locator(".mx-name-datagrid1 .column-header").nth(1).locator(".sort-button").click();
6666
await expect(
6767
page.locator(".mx-name-datagrid1 .column-header").nth(1).locator("svg[data-icon='long-arrow-alt-up']")
6868
).toBeVisible();
@@ -73,8 +73,8 @@ test.describe("capabilities: sorting", () => {
7373
await page.goto("/");
7474
await page.waitForLoadState("networkidle");
7575
await expect(page.locator(".mx-name-datagrid1 .column-header").nth(1)).toHaveText("First Name");
76-
await page.locator(".mx-name-datagrid1 .column-header").nth(1).click();
77-
await page.locator(".mx-name-datagrid1 .column-header").nth(1).click();
76+
await page.locator(".mx-name-datagrid1 .column-header").nth(1).locator(".sort-button").click();
77+
await page.locator(".mx-name-datagrid1 .column-header").nth(1).locator(".sort-button").click();
7878
await expect(
7979
page.locator(".mx-name-datagrid1 .column-header").nth(1).locator("svg[data-icon='long-arrow-alt-down']")
8080
).toBeVisible();
9 Bytes
Loading
30 Bytes
Loading
235 Bytes
Loading
24 Bytes
Loading
73 Bytes
Loading
31 Bytes
Loading
31 Bytes
Loading

0 commit comments

Comments
 (0)