Skip to content

Commit

Permalink
fix asset url
Browse files Browse the repository at this point in the history
  • Loading branch information
danielleroux committed Oct 2, 2024
1 parent 427a94b commit 9c0c1e3
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
16 changes: 14 additions & 2 deletions apps/react-starter/e2e/devices.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,16 @@ async function filterDevicePageByDeviceName(page: Page, deviceName: string) {
const filterInput = filter.locator("input");

await filterInput.fill("deviceName");

const dropdown = filter.locator("ix-dropdown");
await expect(dropdown.getByText("Categories")).toBeVisible();

await page.keyboard.press("Tab");
await page.keyboard.press("Enter");

await expect(filter.locator("ix-dropdown").getByText("Categories")).not.toBeVisible();
await expect(filter.locator("ix-dropdown").getByText("deviceName")).toBeVisible();

await filterInput.fill(deviceName);
await page.keyboard.press("Enter");
await page.mouse.click(0, 0);
Expand All @@ -18,11 +25,16 @@ async function filterDevicePageByDeviceName(page: Page, deviceName: string) {
test("filter for specific deviceName", async ({ page }) => {
await page.goto("http://localhost:5173/#/devices");

await filterDevicePageByDeviceName(page, "s71200");

const aggrid = page.locator(".ag-root-wrapper");
const rows = aggrid.locator(".ag-center-cols-container .ag-row");

await expect(rows).toHaveCount(22, {
// AG-Grid takes some time to filter the rows
timeout: 500,
});

await filterDevicePageByDeviceName(page, "s71200");

await expect(rows).toHaveCount(1, {
// AG-Grid takes some time to filter the rows
timeout: 500,
Expand Down
2 changes: 1 addition & 1 deletion apps/react-starter/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default defineConfig({
/* Opt out of parallel tests on CI. */
workers: process.env.CI ? 1 : undefined,
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
reporter: "html",
reporter: "list",
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
use: {
/* Base URL to use in actions like `await page.goto('/')`. */
Expand Down
2 changes: 1 addition & 1 deletion apps/react-starter/src/util/mock-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import type { MockData } from "../types";

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

if (res.status !== 200) {
Expand Down

0 comments on commit 9c0c1e3

Please sign in to comment.