-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
36d50d3
commit ce68919
Showing
13 changed files
with
2,008 additions
and
204 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
import { test, expect } from "@playwright/test"; | ||
|
||
test("Basic app runs", async ({ page }) => { | ||
await page.goto( | ||
"/admin/slide/list?published=all&page=1&order=asc&sort=title" | ||
); | ||
|
||
await page.route("**/slides*", async (route) => { | ||
const json = { | ||
"hydra:member": [ | ||
{ | ||
"@id": "/v2/slides/0086TQQC671WHA1S150MMF1Q3T", | ||
title: "Title on slide", | ||
description: | ||
"description", | ||
created: "1978-12-11T09:47:36.000Z", | ||
modified: "2021-12-09T12:01:33.000Z", | ||
modifiedBy: "", | ||
createdBy: "", | ||
templateInfo: { | ||
"@id": "/v2/templates/00MWCNKC4P0X5C0AT70E741E2V", | ||
}, | ||
theme: "", | ||
onPlaylists: ["/v2/playlists/00S7ZQK8Y90R351YES1DJN0RKR"], | ||
duration: 70592, | ||
published: { | ||
from: null, | ||
to: "1989-08-28T18:14:52.000Z", | ||
}, | ||
}, | ||
], | ||
}; | ||
await route.fulfill({ json }); | ||
}); | ||
await page.route("**/token", async (route) => { | ||
const json = { | ||
token: "1", | ||
refresh_token: "2", | ||
tenants: [ | ||
{ | ||
tenantKey: "ABC", | ||
title: "ABC Tenant", | ||
description: "Description", | ||
roles: ["ROLE_ADMIN"], | ||
}, | ||
], | ||
user: { | ||
fullname: "John Doe", | ||
email: "[email protected]", | ||
}, | ||
}; | ||
await route.fulfill({ json }); | ||
}); | ||
|
||
await expect(page).toHaveTitle(/OS2Display admin/); | ||
await page.getByLabel("Email").fill("[email protected]"); | ||
await page.getByLabel("Kodeord").fill("password"); | ||
await page.locator("#login").click(); | ||
await expect(page.getByText("Title on slide")).toBeVisible(); | ||
}); |
Oops, something went wrong.