Skip to content

Commit 9c0c1e3

Browse files
committed
fix asset url
1 parent 427a94b commit 9c0c1e3

File tree

3 files changed

+16
-4
lines changed

3 files changed

+16
-4
lines changed

apps/react-starter/e2e/devices.e2e.ts

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,16 @@ async function filterDevicePageByDeviceName(page: Page, deviceName: string) {
55
const filterInput = filter.locator("input");
66

77
await filterInput.fill("deviceName");
8+
9+
const dropdown = filter.locator("ix-dropdown");
10+
await expect(dropdown.getByText("Categories")).toBeVisible();
11+
812
await page.keyboard.press("Tab");
913
await page.keyboard.press("Enter");
1014

15+
await expect(filter.locator("ix-dropdown").getByText("Categories")).not.toBeVisible();
16+
await expect(filter.locator("ix-dropdown").getByText("deviceName")).toBeVisible();
17+
1118
await filterInput.fill(deviceName);
1219
await page.keyboard.press("Enter");
1320
await page.mouse.click(0, 0);
@@ -18,11 +25,16 @@ async function filterDevicePageByDeviceName(page: Page, deviceName: string) {
1825
test("filter for specific deviceName", async ({ page }) => {
1926
await page.goto("http://localhost:5173/#/devices");
2027

21-
await filterDevicePageByDeviceName(page, "s71200");
22-
2328
const aggrid = page.locator(".ag-root-wrapper");
2429
const rows = aggrid.locator(".ag-center-cols-container .ag-row");
2530

31+
await expect(rows).toHaveCount(22, {
32+
// AG-Grid takes some time to filter the rows
33+
timeout: 500,
34+
});
35+
36+
await filterDevicePageByDeviceName(page, "s71200");
37+
2638
await expect(rows).toHaveCount(1, {
2739
// AG-Grid takes some time to filter the rows
2840
timeout: 500,

apps/react-starter/playwright.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export default defineConfig({
2424
/* Opt out of parallel tests on CI. */
2525
workers: process.env.CI ? 1 : undefined,
2626
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
27-
reporter: "html",
27+
reporter: "list",
2828
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
2929
use: {
3030
/* Base URL to use in actions like `await page.goto('/')`. */

apps/react-starter/src/util/mock-api.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import type { MockData } from "../types";
1010

1111
export const fetchDataSheet = async (): Promise<MockData[]> => {
12-
const res = await fetch(`${import.meta.env.BASE_URL}/data.json`);
12+
const res = await fetch(`${import.meta.env.BASE_URL}data.json`);
1313
const text = await res.text();
1414

1515
if (res.status !== 200) {

0 commit comments

Comments
 (0)