Compound color pass (#11079)
* Integrate compound design tokens The icons should not be included in this repo, and should live in the compound design token repo, but for simplicity sake at this phase of the integration they will be added here * Pareto color pass on the light theme * bugfixes in the light color pass * Compound color pass dark theme * Compound color pass high contrast * Fix typo * fix tooltip * Fix PR feedback * fix composer button mixin * Normalise some of the auth page colors * Update based on figma feedback * lintfix * regenerate theme index * Fix cypress tests Removed the CSS assertions in the room header as it overlaps with the Percy snapshot * fix more e2e tests * update colors based on feedback * fix color pass * Fix theme overrides * Restore -transparent * fix color mapping * Final colour pass update * Do not consume compound colors directly * rethemedex * Update pass * Final tweaks * a11y pass * scope opacity to checkbox and not label * Add missing customisations var for theming * lintfix * remove unwanted test
This commit is contained in:
@@ -116,17 +116,7 @@ describe("Room Header", () => {
|
||||
const buttonsHighlighted = ["Threads", "Notifications", "Room info"];
|
||||
|
||||
for (const name of buttonsHighlighted) {
|
||||
cy.findByRole("button", { name: name })
|
||||
.click() // Highlight the button
|
||||
.then(($btn) => {
|
||||
// Note it is not possible to get CSS values of a pseudo class with "have.css".
|
||||
const color = $btn[0].ownerDocument.defaultView // get window reference from element
|
||||
.getComputedStyle($btn[0], "before") // get the pseudo selector
|
||||
.getPropertyValue("background-color"); // get "background-color" value
|
||||
|
||||
// Assert the value is equal to $accent == hex #0dbd8b == rgba(13, 189, 139)
|
||||
expect(color).to.eq("rgb(13, 189, 139)");
|
||||
});
|
||||
cy.findByRole("button", { name: name }).click(); // Highlight the button
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -299,32 +299,5 @@ describe("Appearance user settings tab", () => {
|
||||
cy.findByLabelText("Use high contrast").should("not.exist");
|
||||
},
|
||||
);
|
||||
|
||||
it("should support enabling the high contast theme", () => {
|
||||
cy.createRoom({ name: "Test Room" }).viewRoomByName("Test Room");
|
||||
|
||||
cy.get(".mx_GenericEventListSummary").within(() => {
|
||||
// Assert that $primary-content is applied to GELS summary on the light theme
|
||||
// $primary-content on the light theme = #17191c = rgb(23, 25, 28)
|
||||
cy.get(".mx_TextualEvent.mx_GenericEventListSummary_summary")
|
||||
.should("have.css", "color", "rgb(23, 25, 28)")
|
||||
.should("have.css", "opacity", "0.5");
|
||||
});
|
||||
|
||||
cy.openUserSettings("Appearance")
|
||||
.findByTestId("mx_ThemeChoicePanel")
|
||||
.findByLabelText("Use high contrast")
|
||||
.click({ force: true }); // force click because the size of the checkbox is zero
|
||||
|
||||
cy.closeDialog();
|
||||
|
||||
cy.get(".mx_GenericEventListSummary").within(() => {
|
||||
// Assert that $secondary-content is specified for GELS summary on the high contrast theme
|
||||
// $secondary-content on the high contrast theme = #5e6266 = rgb(94, 98, 102)
|
||||
cy.get(".mx_TextualEvent.mx_GenericEventListSummary_summary")
|
||||
.should("have.css", "color", "rgb(94, 98, 102)")
|
||||
.should("have.css", "opacity", "1");
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -64,9 +64,6 @@ describe("Threads", () => {
|
||||
"Hello there. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt " +
|
||||
"ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi";
|
||||
|
||||
// --MessageTimestamp-color = #acacac = rgb(172, 172, 172)
|
||||
// See: _MessageTimestamp.pcss
|
||||
const MessageTimestampColor = "rgb(172, 172, 172)";
|
||||
const ThreadViewGroupSpacingStart = "56px"; // --ThreadView_group_spacing-start
|
||||
// Exclude timestamp and read marker from snapshots
|
||||
const percyCSS = ".mx_MessageTimestamp, .mx_MessagePanel_myReadMarker { visibility: hidden !important; }";
|
||||
@@ -75,13 +72,6 @@ describe("Threads", () => {
|
||||
// User sends message
|
||||
cy.findByRole("textbox", { name: "Send a message…" }).type("Hello Mr. Bot{enter}");
|
||||
|
||||
// Check the colour of timestamp on the main timeline
|
||||
cy.get(".mx_EventTile_last .mx_EventTile_line .mx_MessageTimestamp").should(
|
||||
"have.css",
|
||||
"color",
|
||||
MessageTimestampColor,
|
||||
);
|
||||
|
||||
// Wait for message to send, get its ID and save as @threadId
|
||||
cy.contains(".mx_EventTile[data-scroll-tokens]", "Hello Mr. Bot")
|
||||
.invoke("attr", "data-scroll-tokens")
|
||||
@@ -151,13 +141,6 @@ describe("Threads", () => {
|
||||
cy.get(".mx_ThreadView").within(() => {
|
||||
// User responds in thread
|
||||
cy.findByRole("textbox", { name: "Send a message…" }).type("Test{enter}");
|
||||
|
||||
// Check the colour of timestamp on EventTile in a thread (mx_ThreadView)
|
||||
cy.get(".mx_EventTile_last[data-layout='group'] .mx_EventTile_line .mx_MessageTimestamp").should(
|
||||
"have.css",
|
||||
"color",
|
||||
MessageTimestampColor,
|
||||
);
|
||||
});
|
||||
|
||||
// User asserts summary was updated correctly
|
||||
@@ -307,9 +290,6 @@ describe("Threads", () => {
|
||||
// Check the number of the replies
|
||||
cy.get(".mx_ThreadPanel_replies_amount").findByText("2").should("exist");
|
||||
|
||||
// Check the colour of timestamp on thread list
|
||||
cy.get(".mx_EventTile_details .mx_MessageTimestamp").should("have.css", "color", MessageTimestampColor);
|
||||
|
||||
// Make sure the notification dot is visible
|
||||
cy.get(".mx_NotificationBadge_visible").should("be.visible");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user