Skip to content

Commit

Permalink
Update file-panel.spec.ts to take a snapshot of the empty file panel (m…
Browse files Browse the repository at this point in the history
  • Loading branch information
luixxiul authored May 8, 2023
1 parent 53fcb0c commit 56f6946
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions cypress/e2e/right-panel/file-panel.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 56f6946

Please sign in to comment.