* 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
* Port remaining Puppeteer tests over to Cypress
* Remove puppeteer support files
* Fix lifecycle matrixclientpeg setup race condition
* Alternative solution to the lifecycle problem
* Dismiss the notifications toast
* Early implementation of module API surface + functions for ILAG module
* Wire up dialog functions and ILAG-needed surface
* Ensure component renders for modules get overridden
* Respond to changes from module API interface
* Use a real module-api dependency
* Update for new Dialogs interface
* Add support for getConfigValue from module API
* Update the remainder of the module API interface
* Docs & cleanup
* Add some unit tests around module stuff
Needs end-to-end tests still.
* Appease early linters
* Break import cycles by not directly depending on Lifecycle
* Appease the linter
* Fix bad merge
* Move spaces tests from Puppeteer to Cypress
* Add missing fixture
* Tweak synapsedocker to not double error on a docker failure
* Fix space hierarchy loading race condition
Fixes https://github.com/matrix-org/element-web-rageshakes/issues/10345
* Fix race condition when creating public space with url update code
* Try Electron once more due to perms issues around clipboard
* Try set browser permissions properly
* Try to enable clipboard another way
* Try electron again
* Try electron again again
* Switch to built-in cypress feature for file uploads
* Mock clipboard instead
* TMPDIR ftw?
* uid:gid pls
* Clipboard tests can now run on any browser due to mocking
* Test Enter as well as button for space creation
* Make the test actually work
* Update cypress/support/util.ts
Co-authored-by: Eric Eastwood <erice@element.io>
Co-authored-by: Eric Eastwood <erice@element.io>
* Add non-consent (default) Synapse template
* Add consent test
* Add create room test
* Stash work
* Initial threads tests
* fix
* Delete old threads e2e tests, plan new ones
* Fix typed s'more
* Try something else
* specify d.ts
* Fix types once and for all?
* Fix the consent tests
* Iterate threads test harness
* Fix dispatcher types
* Iterate threads test
* fix typing
* Alternative import attempt
* let it break let it break let it break
* Tweak types
* Stash
* delint and update docs
* null-guard scrollIntoView
* Iterate threads test
* Apply suggestions from code review
* 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>
* Replace browser-encrypt-attachment with matrix-encrypt-attachment
matrix-encrypt-attachment is maintained and includes TS typings
* Upgrade matrix-encrypt-attachment to latest with default exports
* react-focus-lock to 2.5.1
Signed-off-by: Kerry Archibald <kerrya@element.io>
* use enzyme in ASSD test so focus lock finds active element
Signed-off-by: Kerry Archibald <kerrya@element.io>
* findById and flushPromises to test utils
Signed-off-by: Kerry Archibald <kerrya@element.io>
MSC: https://github.com/matrix-org/matrix-doc/pull/2918
Fixes https://github.com/vector-im/element-web/issues/18698
Fixes https://github.com/vector-im/element-web/issues/20648
**Requires https://github.com/matrix-org/matrix-js-sdk/pull/2178**
**Note**: There's a lot of logging in this PR. That is intentional to ensure that if/when something goes wrong we can chase the exact code path. It does not log any tokens - just where the code is going. Overall, it should be fairly low volume spam (and can be relaxed at a later date).
----
This approach uses indexeddb (through a mutex library) to manage which tab actually triggers the refresh, preventing issues where multiple tabs try to update the token. If multiple tabs update the token then the server might consider the account hacked and hard logout all the tokens.
If for some reason the timer code gets it wrong, or the user has been offline for too long and the token can't be refreshed, they should be sent to a soft logout screen by the server. This will retain the user's encryption state - they simply need to reauthenticate to get an active access token again.
This additionally contains a change to fix soft logout not working, per the issue links above.
Of interest may be the IPC approach which was ultimately declined in favour of this change instead: https://github.com/matrix-org/matrix-react-sdk/pull/7803