mirror of
https://github.com/penpot/penpot.git
synced 2025-05-10 01:36:38 +02:00
♻️ Refactor application routing
Mainly removes an inconsistent use of path params and normalize all routes to use query params for make it extensible without breaking urls.
This commit is contained in:
parent
b2f02de5c1
commit
3e090b126e
90 changed files with 1617 additions and 1548 deletions
|
@ -36,6 +36,14 @@ export class WorkspacePage extends BaseWebSocketPage {
|
|||
"get-team?id=*",
|
||||
"workspace/get-team-default.json",
|
||||
);
|
||||
await BaseWebSocketPage.mockRPC(page, "get-teams", "get-teams.json");
|
||||
|
||||
await BaseWebSocketPage.mockRPC(
|
||||
page,
|
||||
"get-team-members?team-id=*",
|
||||
"logged-in-user/get-team-members-your-penpot.json",
|
||||
);
|
||||
|
||||
await BaseWebSocketPage.mockRPC(
|
||||
page,
|
||||
"get-profiles-for-file-comments?file-id=*",
|
||||
|
@ -43,6 +51,7 @@ export class WorkspacePage extends BaseWebSocketPage {
|
|||
);
|
||||
}
|
||||
|
||||
static anyTeamId = "c7ce0794-0992-8105-8004-38e630f7920a";
|
||||
static anyProjectId = "c7ce0794-0992-8105-8004-38e630f7920b";
|
||||
static anyFileId = "c7ce0794-0992-8105-8004-38f280443849";
|
||||
static anyPageId = "c7ce0794-0992-8105-8004-38f28044384a";
|
||||
|
@ -83,7 +92,7 @@ export class WorkspacePage extends BaseWebSocketPage {
|
|||
pageId = WorkspacePage.anyPageId,
|
||||
} = {}) {
|
||||
await this.page.goto(
|
||||
`/#/workspace/${WorkspacePage.anyProjectId}/${fileId}?page-id=${pageId}`,
|
||||
`/#/workspace?team-id=${WorkspacePage.anyTeamId}&file-id=${fileId}&page-id=${pageId}`,
|
||||
);
|
||||
|
||||
this.#ws = await this.waitForNotificationsWebSocket();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue