Skip to content

Commit ab01b65

Browse files
committed
chore: update unit test snapshot
1 parent d66a1bf commit ab01b65

File tree

11 files changed

+24
-17
lines changed

11 files changed

+24
-17
lines changed

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

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -49,26 +49,23 @@ test.describe("capabilities: sorting", () => {
4949
await page.goto("/");
5050
await page.waitForLoadState("networkidle");
5151
await expect(page.locator(".mx-name-datagrid1 .column-header").nth(1)).toHaveText("First Name");
52-
await expect(page.locator(".mx-name-datagrid1 .column-header").nth(1).locator("svg")).toHaveAttribute(
53-
"data-icon",
54-
"arrows-alt-v"
55-
);
52+
await expect(
53+
page.locator(".mx-name-datagrid1 .column-header").nth(1).locator("svg[data-icon='arrows-alt-v']")
54+
).toBeVisible();
5655
await expect(page.getByRole("gridcell", { name: "12" }).first()).toHaveText("12");
5756
});
5857

5958
test("changes order of data to ASC when clicking sort option", async ({ page }) => {
6059
await page.goto("/");
6160
await page.waitForLoadState("networkidle");
6261
await expect(page.locator(".mx-name-datagrid1 .column-header").nth(1)).toHaveText("First Name");
63-
await expect(page.locator(".mx-name-datagrid1 .column-header").nth(1).locator("svg")).toHaveAttribute(
64-
"data-icon",
65-
"arrows-alt-v"
66-
);
62+
await expect(
63+
page.locator(".mx-name-datagrid1 .column-header").nth(1).locator("svg[data-icon='arrows-alt-v']")
64+
).toBeVisible();
6765
await page.locator(".mx-name-datagrid1 .column-header").nth(1).click();
68-
await expect(page.locator(".mx-name-datagrid1 .column-header").nth(1).locator("svg")).toHaveAttribute(
69-
"data-icon",
70-
"long-arrow-alt-up"
71-
);
66+
await expect(
67+
page.locator(".mx-name-datagrid1 .column-header").nth(1).locator("svg[data-icon='long-arrow-alt-up']")
68+
).toBeVisible();
7269
await expect(page.getByRole("gridcell", { name: "10" }).first()).toHaveText("10");
7370
});
7471

@@ -78,10 +75,9 @@ test.describe("capabilities: sorting", () => {
7875
await expect(page.locator(".mx-name-datagrid1 .column-header").nth(1)).toHaveText("First Name");
7976
await page.locator(".mx-name-datagrid1 .column-header").nth(1).click();
8077
await page.locator(".mx-name-datagrid1 .column-header").nth(1).click();
81-
await expect(page.locator(".mx-name-datagrid1 .column-header").nth(1).locator("svg")).toHaveAttribute(
82-
"data-icon",
83-
"long-arrow-alt-down"
84-
);
78+
await expect(
79+
page.locator(".mx-name-datagrid1 .column-header").nth(1).locator("svg[data-icon='long-arrow-alt-down']")
80+
).toBeVisible();
8581
await expect(page.getByRole("gridcell", { name: "12" }).first()).toHaveText("12");
8682
});
8783
});
245 Bytes
Loading
-609 Bytes
Loading
2.8 KB
Loading
475 Bytes
Loading
671 Bytes
Loading
377 Bytes
Loading
497 Bytes
Loading
Loading
Loading

0 commit comments

Comments
 (0)