Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Remove an obsolete CSS declaration and add a test to `file-panel.spec…
Browse files Browse the repository at this point in the history
….ts` (#10498)

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
  • Loading branch information
luixxiul authored Apr 4, 2023
1 parent 7a250f4 commit a340387
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
16 changes: 16 additions & 0 deletions cypress/e2e/right-panel/file-panel.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,22 @@ describe("FilePanel", () => {
});
});
});

it("should not add inline padding to a tile when it is selected with right click", () => {
// Upload a file
uploadFile("cypress/fixtures/1sec.ogg");

cy.get(".mx_FilePanel .mx_RoomView_MessageList").within(() => {
// Wait until the spinner of the audio player vanishes
cy.get(".mx_InlineSpinner").should("not.exist");

// Right click the uploaded file to select the tile
cy.get(".mx_EventTile").rightclick();

// Assert that inline padding is not applied
cy.get(".mx_EventTile_selected .mx_EventTile_line").should("have.css", "padding-inline", "0px");
});
});
});

describe("download", () => {
Expand Down
4 changes: 0 additions & 4 deletions res/css/structures/_FilePanel.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,6 @@ limitations under the License.
.mx_EventTile_line {
margin-inline-end: 0;
padding-inline-start: 0;

.mx_EventTile_selected & {
padding-inline-start: 0;
}
}
}

Expand Down

0 comments on commit a340387

Please sign in to comment.