Commit Graph

18 Commits (078de432936b2614a8fe12b0d7febb0829b9d99d)

Author SHA1 Message Date
Michael Telatynski a6705304aa
Port remaining login.spec.ts & soft_logout.spec.ts tests from Cypress to Playwright (#11917)
Co-authored-by: R Midhun Suresh <hi@midhun.dev>
2023-11-23 10:27:11 +00:00
Michael Telatynski 8dcd13eb6d
Migrate email.spec.ts from Cypress to Playwright (#11920)
Co-authored-by: R Midhun Suresh <hi@midhun.dev>
2023-11-23 09:09:32 +00:00
R Midhun Suresh 8df76839b2
Remove plugin code 2023-11-09 00:01:28 +05:30
Richard van der Hoff 241df0ba0a
Cypress: write logs to file (#11712)
... in an attempt to make the github actions output easier to grok
2023-10-04 10:03:33 +00:00
Michael Telatynski 24b10a87c0
Switch to sorry-cypress (#11668) 2023-09-26 07:17:14 +01:00
Michael Telatynski 0842559fb2
Simplify registration with email validation (#11398) 2023-08-15 16:14:53 +01:00
Richard van der Hoff f65c6726c9
Add a cypress test for SSO login (#11401)
* Allow `startHomeserver` to take an options object

... so that we can add more options

* Add a Cypress test for SSO login
2023-08-14 11:08:12 +00:00
Richard van der Hoff 113b6301f8
Use cypress-terminal-report (#11226)
* Use cypress-terminal-report

This cypress plugin gives nice console logs about what is happening: I hope it
will help us debug mysteriously failing tests.

In its default config, it only logs for failing tests.

* another anti-morgan hack

* Disable collection of `console.debug`

* `ctr:info` is not real
2023-07-11 15:10:13 +00:00
devonh 79033eb034
Add dendrite support to cypress tests (#9884)
* Minimum hacks required to run cypress tests with dendrite

* Remove wget hack since dendrite containers now have curl

* Add basic dendritedocker plugin & hack into login spec for testing

* Add generic HomeserverInstance interface

* Add env var to configure which homeserver to use

* Remove synapse specific homeserver support api

* Update the rest of the tests to use HomeserverInstance

* Update cypress docs to reference new homeserver abstraction

* Fix formatting issues

* Change dendrite to use main branch container
2023-01-10 16:29:56 -07:00
Michael Weimann 526645c791
Apply prettier formatting 2022-12-12 12:24:14 +01:00
Travis Ralston 6fe8744e4d
Remove performance metrics from cypress (#9467)
They are unfortunately unreliable and have been broken since June anyways.
2022-10-20 00:52:17 -06:00
kegsay a215027c6b
Implement MSC3575: Sliding Sync (#8328)
* Add labs flag for sliding sync; add sliding_sync_proxy_url to config.json

* Disable the labs toggle if sliding_sync_proxy_url is not set

* Do validation checks on the sliding sync proxy URL before enabling it in Labs

* Enable sliding sync and add SlidingSyncManager

* Get room subscriptions working

* Hijack renderSublists in sliding sync mode

* Add support for sorting alphabetically/recency and room name filters

* Filter out tombstoned rooms; start adding show more logic

list ranges update but the UI doesn't

* update the UI when the list is updated

* bugfix: make sure the list sorts numerically

* Get invites transitioning correctly

* Force enable sliding sync and labs for now

* Linting

* Disable spotlight search

* Initial cypress plugins for Sliding Sync Proxy

* Use --rm when running Synapse in Docker for Cypress tests

* Update src/MatrixClientPeg.ts

Co-authored-by: Travis Ralston <travisr@matrix.org>

* Update src/components/views/rooms/RoomSublist.tsx

Co-authored-by: Travis Ralston <travisr@matrix.org>

* Update src/settings/controllers/SlidingSyncController.ts

Co-authored-by: Travis Ralston <travisr@matrix.org>

* Update src/components/views/rooms/RoomSublist.tsx

Co-authored-by: Travis Ralston <travisr@matrix.org>

* WIP add room searching to spotlight search

* Only read sliding sync results when there is a result, else use the local cache

* Use feature_sliding_sync not slidingSync

* Some review comments

* More review comments

* Use RoomViewStore to set room subscriptions

* Comment why any

* Update src/components/views/rooms/RoomSublist.tsx

Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>

* Fix cypress docker abstraction

* Iterate sliding sync proxy support

* Stash mostly functional test

* Update sliding sync proxy image

* i18n

* Add support for spaces; use list ID -> index mappings

- Mappings are more reusable and easier to understand than
  racing for index positions.
- Register for all spaces immediately on startup.

* When the active space is updated, update the list registration

* Set spaces filter in the correct place

* Skeleton placeholder whilst loading the space

* Filter out spaces from the room list

* Use the new txn_id promises

* Ensure we actually resolve list registrations

* Fix matrix-org/sliding-sync#30: don't show tombstoned search results

* Remove unused imports

* Add SYNCV3_SECRET to proxy to ensure it starts up; correct aliases for SS test

* Add another basic sliding sync e2e test

* Unbreak netlify

* Add more logging for debugging duplicate rooms

* If sliding sync is enabled, always use the rooms result even if it's empty

* Drop-in copy of RoomListStore for sliding sync

* Remove conditionals from RoomListStore - we have SlidingRoomListStore now

* WIP SlidingRoomListStore

* Add most sliding sync logic to SlidingRoomListStore

Still lots of logic in RoomSublist. Broken things:
 - Join count is wrong completely.
 - No skeleton placeholder when switching spaces.

* Migrate joined count to SS RLS

* Reinstate the skeleton UI when the list is loading

* linting

* Add support for sticky rooms based on the currently active room

* Add a bunch of passing SS E2E tests; some WIP

* Unbreak build from git merge

* Suppress unread indicators in sliding sync mode

* Add regression test for https://github.com/matrix-org/sliding-sync/issues/28

* Add invite test flows; show the invite list

The refactor to SS RLS removed the invite list entirely.

* Remove show more click as it wasn't the bug

* Linting and i18n

* only enable SS by default on netlify

* Jest fixes; merge conflict fixes; remove debug logging; use right sort enum values

* Actually fix jest tests

* Add support for favourites and low priority

* Bump sliding sync version

* Update sliding sync labs to be user configurable

* delint

* To disable SS or change proxy URL the user has to log out

* Review comments

* Linting

* Apply suggestions from code review

Co-authored-by: Travis Ralston <travisr@matrix.org>

* Update src/stores/room-list/SlidingRoomListStore.ts

Co-authored-by: Travis Ralston <travisr@matrix.org>

* Review comments

* Add issue link for TODO markers

* Linting

* Apply suggestions from code review

Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>

* More review comments

* More review comments

* stricter types

Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
Co-authored-by: Travis Ralston <travisr@matrix.org>
2022-09-07 15:42:39 +00:00
Michael Telatynski d5db131eef
Spike AXE A11Y testing in Cypress (#9111)
* Spike AXE A11Y testing in Cypress

* Fix NewRoomIntro breaking html/aria list rules

* Fix HeaderButtons breaking aria role semantics rules

* missing type

* Switch left panel from aside to nav and include space panel

* Give the page a main heading of the room name when viewing a room

* Use header landmark on RoomHeader

* Improve aria attributes on composer when autocomplete is closed

* Fix aria-owns on RoomHeader

* Give Spinner an aria role

* Give server picker help button an aria label

* Improve auth aria attributes and semantics

* Improve heading semantics in use case selection screen

* Fix autocomplete attribute to be valid

* Fix heading semantics on login page

* Improve Cypress axe testing

* Add axe tests

* Stop synapse after the timeline tests

* Await spinners to fade before percy snapshotting timeline tests

* Improve naming of plugin

* Update snapshots

* Fix accidental heading change

* Fix double synapse stoppage

* Fix Cypress timeline avatar assertions to be DPI agnostic

* Fix aria attributes on date separators

* delint

* Update snapshots

* Revert style change

* Skip redundant call
2022-08-01 08:31:14 +01:00
Michael Telatynski ca1d9729fd
Extract dockery bits from Cypress' synapsedocker plugin (#9103)
* Extract dockery bits from Cypress' synapsedocker plugin

* Update cypress/plugins/docker/index.ts

Co-authored-by: David Baker <dbkr@users.noreply.github.com>

Co-authored-by: David Baker <dbkr@users.noreply.github.com>
2022-07-27 15:22:14 +00:00
Travis Ralston 4171c008a4
Convert sticker end-to-end tests to Cypress (#8807)
* Convert sticker end-to-end tests to Cypress

Reference materials:
* https://www.cypress.io/blog/2020/02/12/working-with-iframes-in-cypress/
* https://github.com/cypress-io/cypress/issues/136
* https://docs.cypress.io/api/commands/origin#Other-limitations

Ideally we'd be able to use `cy.origin()` to jump into the iframe, but it's explicitly not supported. Instead we disable web security as instructed by cypress because it's our only reasonable option here. Thankfully, disabling web security doesn't appear to remove the crypto libraries from the browser so we can still function in that respect.

Rationale for why we can't just serve the sticker picker off the app domain is included in the code.

* Appease the linter

* More linter appeasement
2022-06-10 09:24:15 -06:00
J. Ryan Stinnett c122c5cd3b
Add basic performance testing via Cypress (#8586) 2022-05-17 15:38:45 +01:00
Michael Telatynski c616bd7a62
Attempt to fix the cypress flake (#8492) 2022-05-04 11:07:37 +00:00
David Baker b8013fc52a
Add a Cypress Test 🌲 (#8295)
* A first, maybe working cypress test

Plus cypress plugins to manage synapses in docker containers

* Fix yaml

* This file is important

* try & find where it's put the artifact

* Download artifact to a directory

* pics or it didn't happen

* Add conditional, otherwise no artifacts on failure...

* Try increasing timeout

also actually give the test a name

* Try in chrome

* Get docker logs to see why it's failing

also document the chrome setting

* Try changing mode on homeserver.yaml

* debug

* More debugging

* more file permissions debugging

* ARGH

* more debug

* sigh

* Eugh, that's not how arguments work

* Add the option to really allow open registration

and remove debug logging / comment fixes

* failure to yaml

* Upload docker logs as artifacts

and temporarily remove contional to test

* Put the conditional back

* Upgrade types in end to end tests

to be compatible with fs-extra types

* Try reducing timeout a bit

also make password more... sensible

* Hex is not octal

* Remove file mode

Seems to be unnecessary since the signing key is perfectly fine

* Give the log files extensions

* Rename workflow file now it also does tests

* Add cypress scripts

* copyright headers

* Use ? operator

Co-authored-by: Travis Ralston <travisr@matrix.org>

* Use develop synapse image

* Tidy up any remaining synapses after each spec run

Also:
 * Move the synapseStart / synapseStop functions out to the top level
   so they can be reused
 * Add a tsconfig file
 * Give the containers names

* Don't upload video on test pass

We don't upload it anyway so tell cypress not to so it can not
bother encoding them

* Enable linting on cypress files

and fix existing lint errors

* Type check cypress files

and make it pass the type checks, specifically:
 * Upgrade sinon fake timers to a version that has the right types
 * Set module resolution
 * Type check cypress files separately

* Rename workflow file again

Probably better to just call it an element web build

* Don't plus + characters in container name

* Fix yaml

* Stream logs to file

* Add note to end to end tester to sya what's been ported

* Put docker rm in finally block

Co-authored-by: Travis Ralston <travisr@matrix.org>
2022-04-14 10:41:58 +01:00