From 56f694620c8d2fb4145ef6045066379475bae024 Mon Sep 17 00:00:00 2001 From: Suguru Hirahara Date: Mon, 8 May 2023 05:25:23 +0000 Subject: [PATCH] Update file-panel.spec.ts to take a snapshot of the empty file panel (#10814) --- cypress/e2e/right-panel/file-panel.spec.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/cypress/e2e/right-panel/file-panel.spec.ts b/cypress/e2e/right-panel/file-panel.spec.ts index f2e0e0a013..ffffac2950 100644 --- a/cypress/e2e/right-panel/file-panel.spec.ts +++ b/cypress/e2e/right-panel/file-panel.spec.ts @@ -70,6 +70,16 @@ describe("FilePanel", () => { }); describe("render", () => { + it("should render empty state", () => { + // Wait until the information about the empty state is rendered + cy.get(".mx_FilePanel_empty").should("exist"); + + // Take a snapshot of empty FilePanel + cy.get(".mx_FilePanel").percySnapshotElement("File Panel - empty", { + widths: [264], // Emulate the UI. The value is based on minWidth specified on MainSplit.tsx + }); + }); + it("should list tiles on the panel", () => { // Upload multiple files uploadFile("cypress/fixtures/riot.png"); // Image