mirror of
https://github.com/penpot/penpot.git
synced 2025-05-10 11:16:36 +02:00
🐛 Fix link in penpot logo spanning way below it (in viewer)
This commit is contained in:
parent
83090826f7
commit
67ababf1ed
7 changed files with 266 additions and 9 deletions
48
frontend/playwright/ui/pages/ViewerPage.js
Normal file
48
frontend/playwright/ui/pages/ViewerPage.js
Normal file
|
@ -0,0 +1,48 @@
|
|||
import { BaseWebSocketPage } from "./BaseWebSocketPage";
|
||||
|
||||
export class ViewerPage extends BaseWebSocketPage {
|
||||
static anyFileId = "c7ce0794-0992-8105-8004-38f280443849";
|
||||
static anyPageId = "c7ce0794-0992-8105-8004-38f28044384a";
|
||||
|
||||
/**
|
||||
* This should be called on `test.beforeEach`.
|
||||
*
|
||||
* @param {Page} page
|
||||
* @returns
|
||||
*/
|
||||
static async init(page) {
|
||||
await BaseWebSocketPage.initWebSockets(page);
|
||||
}
|
||||
|
||||
async setupLoggedInUser() {
|
||||
await this.mockRPC("get-profile", "logged-in-user/get-profile-logged-in.json");
|
||||
}
|
||||
|
||||
async setupEmptyFile() {
|
||||
await this.mockRPC(/get\-view\-only\-bundle\?/, "viewer/get-view-only-bundle-empty-file.json");
|
||||
await this.mockRPC("get-comment-threads?file-id=*", "workspace/get-comment-threads-empty.json");
|
||||
await this.mockRPC(
|
||||
"get-file-fragment?file-id=*&fragment-id=*",
|
||||
"viewer/get-file-fragment-empty-file.json",
|
||||
);
|
||||
}
|
||||
|
||||
#ws = null;
|
||||
|
||||
constructor(page) {
|
||||
super(page);
|
||||
}
|
||||
|
||||
async goToViewer() {
|
||||
await this.page.goto(
|
||||
`/#/view/${ViewerPage.anyFileId}?page-id=${ViewerPage.anyPageId}§ion=interactions&index=0`,
|
||||
);
|
||||
|
||||
this.#ws = await this.waitForNotificationsWebSocket();
|
||||
await this.#ws.mockOpen();
|
||||
}
|
||||
|
||||
async cleanUp() {
|
||||
await this.#ws.mockClose();
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue