Merge remote-tracking branch 'origin/staging' into develop

This commit is contained in:
Andrey Antukh
2025-02-12 14:37:20 +01:00
12 changed files with 205 additions and 63 deletions

View File

@@ -155,6 +155,9 @@ export class DashboardPage extends BaseWebSocketPage {
await this.mockRPC("search-files", "dashboard/search-files.json", {
method: "POST",
});
await this.mockRPC("delete-team", "dashboard/delete-team.json", {
method: "POST",
});
await this.mockRPC("search-files", "dashboard/search-files.json");
await this.mockRPC("get-teams", "logged-in-user/get-teams-complete.json");
}

View File

@@ -84,6 +84,33 @@ test("User has context menu options for edit file", async ({ page }) => {
await expect(dashboardPage.page.getByText("delete")).toBeVisible();
});
test("Multiple elements in context", async ({ page }) => {
await DashboardPage.mockRPC(
page,
"get-all-projects",
"dashboard/get-all-projects.json",
);
const dashboardPage = new DashboardPage(page);
await dashboardPage.setupDrafts();
await dashboardPage.goToDrafts();
const button = dashboardPage.page.getByRole("button", { name: /New File 1/ });
await button.click();
const button2 = dashboardPage.page.getByRole("button", {
name: /New File 2/,
});
await button2.click({ modifiers: ["Shift"] });
await button.click({ button: "right" });
await expect(button.getByTestId("duplicate-multi")).toBeVisible();
await expect(button.getByTestId("file-move-multi")).toBeVisible();
await expect(button.getByTestId("file-binary-export-multi")).toBeVisible();
await expect(button.getByTestId("file-delete-multi")).toBeVisible();
});
test("User has create file button", async ({ page }) => {
const dashboardPage = new DashboardPage(page);
await dashboardPage.setupDrafts();
@@ -131,3 +158,31 @@ test("Bug 9927, Don't show the banner to invite team members if the user has dis
await expect(page.getByText("Second team")).toBeVisible();
await expect(page.getByText("Team Up")).not.toBeVisible();
});
test("Bug 10141, The team does not disappear from the team list after deletion", async ({
page,
}) => {
const dashboardPage = new DashboardPage(page);
await dashboardPage.setupDashboardFull();
await DashboardPage.mockRPC(
page,
"get-teams",
"logged-in-user/get-teams-complete-owner.json",
);
await dashboardPage.goToDashboard();
await dashboardPage.teamDropdown.click();
await expect(page.getByText("Second Team")).toBeVisible();
await page.getByText("Second Team").click();
await page.getByRole("button", { name: "team-management" }).click();
await page.getByTestId("delete-team").click();
await DashboardPage.mockRPC(
page,
"get-teams",
"logged-in-user/get-teams-default.json",
);
await page.getByRole("button", { name: "Delete team" }).click();
await dashboardPage.teamDropdown.click();
await expect(page.getByText("Second Team")).not.toBeVisible();
});

View File

@@ -15,6 +15,17 @@ test("User loads worskpace with empty file", async ({ page }) => {
await expect(workspacePage.pageName).toHaveText("Page 1");
});
test("User opens a file with a bad page id", async ({ page }) => {
const workspacePage = new WorkspacePage(page);
await workspacePage.setupEmptyFile(page);
await workspacePage.goToWorkspace({
pageId: "badpage",
});
await expect(workspacePage.pageName).toHaveText("Page 1");
});
test("User receives presence notifications updates in the workspace", async ({
page,
}) => {