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

Fix cypress test for events from unsigned devices #11636

Merged
merged 1 commit into from
Sep 21, 2023

Conversation

richvdh
Copy link
Member

@richvdh richvdh commented Sep 20, 2023

#11528 updated these tests, but I messed up one of the cases (cf matrix-org/matrix-js-sdk#3743) and didn't think hard enough about what I was doing.


This change is marked as an internal change (Task), so will not be included in the changelog.

@richvdh richvdh requested a review from a team as a code owner September 20, 2023 17:02
@richvdh richvdh added the T-Task Refactoring, enabling or disabling functionality, other engineering tasks label Sep 20, 2023
.should("have.class", "mx_EventTile_e2eIcon_warning")
.should("have.attr", "aria-label", "Encrypted by an unverified user.");
.should("have.attr", "aria-label", "Encrypted by a device not verified by its owner.");
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is the actual fix in this PR

@@ -404,9 +404,9 @@ describe("Cryptography", function () {

cy.get(".mx_EventTile_last")
.should("contain", "test encrypted from unverified")
.find(".mx_EventTile_e2eIcon", { timeout: 100000 })
.find(".mx_EventTile_e2eIcon")
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I set this timeout very high when I was debugging and apparently forgot to reduce it.

Comment on lines +418 to 424
// some debate over whether this should have a red or a grey shield. Legacy crypto shows a grey shield,
// Rust crypto a red one.
cy.get(".mx_EventTile_last")
.should("contain", "test encrypted from unverified")
.find(".mx_EventTile_e2eIcon")
.should("have.class", "mx_EventTile_e2eIcon_normal")
//.should("have.class", "mx_EventTile_e2eIcon_normal")
.should("have.attr", "aria-label", "Encrypted by an unknown or deleted device.");
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is actually a separate fix, but it's kinda handy to throw into this PR

cy.get(".mx_EventTile_last")
.should("contain", "test encrypted from unverified")
.find(".mx_EventTile_e2eIcon")
.should("have.class", "mx_EventTile_e2eIcon_normal")
//.should("have.class", "mx_EventTile_e2eIcon_normal")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be removed rather than comment out?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hrm, maybe. I'm trying to highlight the fact that we deliberately aren't testing the class (and also, making it easier to put back once we make our mind up what we're doing).

@richvdh richvdh added this pull request to the merge queue Sep 21, 2023
Merged via the queue into develop with commit f60ba1c Sep 21, 2023
23 of 24 checks passed
@richvdh richvdh deleted the rav/element-r/fix_unsigned_device_shield branch September 21, 2023 10:40
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
T-Task Refactoring, enabling or disabling functionality, other engineering tasks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants