Tests for read/unread status (#11301)
* Add some fantasy tests * Turn commented code into pretend-real code * First pass at a list of all the cases we should test * List test cases related to redactions * Add testcases about paging up * Add a case about notification counts * More test cases related to replies, notifications, room list * Iterate tests * Wire up additional tests * Wire up more tests * Tidy * Wire up more tests * Wire up more tests * Wire up more tests * Wire up more tests * Mute browser * Silence electron warnings * Iterate * revert * Wire up more tests * Try to stabilise tests * Try to stabilise tests * Validate that the notification dot is missing as well as the count * Skip a test that is failing for unknown reasons * Use markAsRead in 'marking as read' test and add related test * Fix incorrect comment * Extract tests to their own suite * Attempt to fix test * Wire up more tests * Wire up more tests * Wire up more tests * Wire up more tests * Iterate * Add comments * Iterate * Fix comments * Update cypress/e2e/read-receipts/high-level.spec.ts Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com> --------- Co-authored-by: Michael Telatynski <7t3chguy@gmail.com> Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
This commit is contained in:
parent
ef385e6028
commit
c55400de18
2 changed files with 996 additions and 3 deletions
|
@ -23,8 +23,10 @@ declare global {
|
|||
namespace Cypress {
|
||||
interface Chainable {
|
||||
/**
|
||||
* Opens the given room by name. The room must be visible in the
|
||||
* room list.
|
||||
* Opens the given room by name. The room must be visible in the room list.
|
||||
* It uses a start-anchored regexp to accommodate for room tiles for unread rooms containing additional
|
||||
* context in their aria labels, e.g. "Room name 3 unread messages."
|
||||
*
|
||||
* @param name The room name to find and click on/open.
|
||||
*/
|
||||
viewRoomByName(name: string): Chainable<JQuery<HTMLElement>>;
|
||||
|
@ -63,7 +65,10 @@ declare global {
|
|||
}
|
||||
|
||||
Cypress.Commands.add("viewRoomByName", (name: string): Chainable<JQuery<HTMLElement>> => {
|
||||
return cy.findByRole("treeitem", { name: name }).should("have.class", "mx_RoomTile").click();
|
||||
return cy
|
||||
.findByRole("treeitem", { name: new RegExp("^" + name) })
|
||||
.should("have.class", "mx_RoomTile")
|
||||
.click();
|
||||
});
|
||||
|
||||
Cypress.Commands.add("viewRoomById", (id: string): void => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue