* Cypress: skip tests known to fail when using Rust crypto
... which means we can then run the cypress test suite against Element Web R to
check we aren't introducing regressions.
* Update cypress/e2e/register/register.spec.ts
* Use env var to detect rust crypto
* Hoist `skipIfRustCrypto` call earlier
* Add intercept of `config.json`
To help make sure that we run our tests against a known config, rather than
accidentally making requests to `matrix.org`.
* Remove now-redundant stubs of matrix.org files
Now that we intercept config.json, all this stuff is redundant.
* Reinstate fixture which is actually used
Turns out this is used after all
* Add a `map_style_url`
* disable failing axe check
* 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
* Improve decryption error UI by consolidating error messages and providing instructions when possible
* Fix TS strict errors
* Rename .scss to .pcss
* Avoid accessing clipboard, Cypress doesn't like it
* Display DecryptionFailureBar alongside other AuxPanel bars
* Add comments
* Add small margin off-screen for visible decryption failures
* Fix some more TS strict errors
* Add unit tests for DecryptionFailureBar
* Add button to resend key requests manually
* Remove references to matrix-js-sdk crypto internals
* Add hysteresis to visible decryption failures
* Add comment
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
* Add comment
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
* Don't create empty div if we're not showing resend requests button
* cancel updateSessions on unmount
* Update unit tests
* Fix lint and implicit any
* Simplify visible event bounds checking
* Adjust cypress test descriptions
* Add percy snapshots
* Update src/components/structures/TimelinePanel.tsx
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
* Add comments on TimelinePanel IState
* comment
* Add names to percy snapshots
* Show Resend Key Requests button when there are sessions that haven't already been requested via this bar
* We no longer request keys from senders
* update i18n
* update expected text in cypress test
* don't download keys ourselves, update device info in response to updates from client
* fix ts strict errors
* visibledecryptionfailures undefined handling
* Fix implicitAny errors
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
* Attempt to stabilise login tests
* More stability
* Stabilise s'more
* don't clear LS as we rely on it for enablements
* Add small delay
* Iterate
* Update login.ts
* 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
* Fixmatrix-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>
* 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
* Implement searching for public rooms and users in new search experience
* Implement loading indicator for spotlight results
* Moved spotlight dialog into own subfolder
* Extract search result avatar into separate component
* Build generic new dropdown menu component
* Build new network menu based on new network dropdown component
* Switch roomdirectory to use new network dropdown
* Replace old networkdropdown with new networkdropdown
* Added component for public room result details
* Extract hooks and subcomponents from SpotlightDialog
* Create new hook to get profile info based for an mxid
* Add hook to automatically re-request search results
* Add hook to prevent out-of-order search results
* Extract member sort algorithm from InviteDialog
* Keep sorting for non-room results stable
* Sort people suggestions using sort algorithm from InviteDialog
* Add copy/copied tooltip for invite link option in spotlight
* Clamp length of topic for public room results
* Add unit test for useDebouncedSearch
* Add unit test for useProfileInfo
* Create cypress test cases for spotlight dialog
* Add test for useLatestResult to prevent out-of-order results
* 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