* Fix applying programmatically set height for "top" room layout
When applying a room layout automatically (e.g. via `io.element.widgets.layout` state event), in cases the layout mode container it set to "top", the height was previously not correctly updated.
Signed-off-by: Oliver Sand <oliver.sand@nordeck.net>
* Add cypress tests
Signed-off-by: Oliver Sand <oliver.sand@nordeck.net>
* bugfix: fix in-reply-to previews not disappearing when swapping rooms
This was caused by the fix for another issue:
- https://github.com/vector-im/element-web/issues/21462
Both bugs are now fixed with cypress regression tests.
* Linting
* Ensure the reply-to reappears when you click back
* Add jest test for replyTo in RVS
* Linting
* 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>
* Significantly reduce work of useUserOnboardingContext
* Wrap UserOnboardingButton to avoid unnecessary work when it's not shown
* Remove progress from user onboarding button
* Jitsi call is ended when member is banned
* cypress tests for widget PIP close on leave/kick/ban
* copyright updated
* import changes
* import changes, lint fixed
* import changes
* smaller spec changes to fix problems
* stale import removed, win.matrixcs.RoomStateEvent.Events is used
* fixed problem with kick, smaller test optimisations
* comment removed
Co-authored-by: mikhail.aheichyk <mikhail.aheichyk@nordeck.net>
Co-authored-by: Oliver Sand <oliver.sand@nordeck.net>
* Add safety to the spotlight search dialog
Fixes https://github.com/vector-im/element-web/issues/22851
This test was triggering the mentioned bug only occasionally because it was dependent on when the search settled: if it settled early then the length was wrong. In testing, the dialog was caught multiple times to have passed the length chat but update to show duplicated results before the test closed the client, indicating a race condition within the tests.
To fix this, we just make sure everything settles before moving on. We do this on unaffected tests too to ensure they don't regress later.
The affected test was "should find group DMs by usernames or user ids".
* Update cypress/e2e/spotlight/spotlight.spec.ts
Co-authored-by: Robin <robin@robin.town>
Co-authored-by: Robin <robin@robin.town>
* Fix space panel subspace indentation going missing
* Add cypress test around subspaces in space panel
* Add cypress test around subspaces in space panel
* Fix bad selector
* Fix aria axe violation heading-order
* Fix test
* Remove it.only
Otherwise you cannot debug anything with errors like:
```
> Command failed: docker exec 134c9a0afd7dadd0b82ce69b4d72d3d6d8ca1b211540d4390a88357b68fa03b9 pg_isready -U postgres
```
Now we include the stdout/err prior to logging this.
* Make percy snapshots for user onboarding more reliable
* Increase stability of lazy loading test
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
* Move pin drop out of labs (PSG-664)
Signed-off-by: Johannes Marbach <johannesm@element.io>
* Regenerate strings
Signed-off-by: Johannes Marbach <johannesm@element.io>
* 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
* Support for sending voice messages as replies and in threads
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
* Add tests
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
* Apply inline start margin to info event tile line to align the right edge with normal event tile lines
Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
* Rename the variable
Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
* Add a test to check inline start margin
Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
* Rerun CI
Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
* Improve tests a little bit
Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
* pin drop location test case
* own static location test
* remove unused bots
* lint
* enable labs flag
* remove own location test bc geolocation perms are hard
* 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
* 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>