Commit Graph

370 Commits

Author SHA1 Message Date
Andy Balaam
c55400de18
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>
2023-08-10 12:59:01 +00:00
Kerry
e0d498e338
Enable jsx-a11y/click-events-have-key-events eslint rule (#10362)
* enable "jsx-a11y/alt-text" lint rule

* enable "jsx-a11y/label-has-associated-control"

* make Spoilers keyboard accessible

* make invite reason keyboard accessible

* make invite suggestions keyboard accessible

* make avatar upload in space basic settings keyboard accessible

* ignore jsx-a11y/click-events-have-key-events issues in tests

* Update test expectation

---------

Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2023-08-09 06:27:31 +00:00
Michael Telatynski
033c600fa2
Switch to importing @types/{event,partials} from main js-sdk export (#11369) 2023-08-08 10:12:12 +00:00
Michael Telatynski
93b66501f5
Make a11y related lint rules more strict (#11372) 2023-08-07 07:57:12 +00:00
Michael Telatynski
47877ba2da
Switch to importing matrix-js-sdk from its main export (#11360)
* Switch to importing TypedEventEmitter from main js-sdk export

* Switch to importing js-sdk/matrix in cypress

* Remove duplicated imports

* Fix lint:js-fix to run prettier last otherwise ESLint --fix may cause a mess

* Add lint rule

* Fix cypress-axe import

* Fix cypress-axe import
2023-08-03 12:56:30 +00:00
Germain
6ae7c033d5
Add feature flag 'feature_new_room_decoration_ui' and segrate legacy UI component (#11345)
* Move RoomHeader to LegacyRoomHeader

* Create new RoomHeader component
2023-08-01 07:32:53 +00:00
Florian Duros
202af87b2e
Enable cypress test about login with SSSS to run with rust-crypto (#11323) 2023-07-27 13:21:19 +00:00
renovate[bot]
5405c22db1
Update all non-major dependencies (#11329)
* Update all non-major dependencies

* Add isLocation to ComposerEvent analytics events

* Remove cypress-each as it is incompatible with modern typescript

* Roll back eslint-plugin-deprecate

* Remove stale comment

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Andy Balaam <andy.balaam@matrix.org>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2023-07-27 11:34:44 +00:00
Richard van der Hoff
a47ee92094
Add cy.viewRoomById command (#11317)
... and use it to fix a racy composer test.

Fixes https://github.com/vector-im/element-web/issues/25527
2023-07-25 21:55:13 +00:00
Šimon Brandner
3b0ed17241
Don't hide room header buttons in video rooms and rooms with a call (#9712)
* Don't hide room header buttons in video rooms and rooms with a call

Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>

* Fix types

Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>

* Attempt to fix types 2

Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>

* Delint

Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>

* Update test case

---------

Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2023-07-21 10:33:37 +00:00
Michael Telatynski
19d927f497
Fix over-simplified cypress test (#11294) 2023-07-19 03:43:57 +00:00
Michael Telatynski
d9d0b84152
Revert "Do not filter users post search (#9556)" (#11288) 2023-07-18 09:26:54 +01:00
Maximilian Malek
f1db2b3687
Do not filter users post search (#9556)
* Do not filter users post search

Signed-off-by: Maximilian Malek <maximilian.malek@uni-graz.at>

* Iterate

* Iterate

---------

Signed-off-by: Maximilian Malek <maximilian.malek@uni-graz.at>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2023-07-17 15:31:38 +00:00
Michael Telatynski
f04a0e2860
Populate info.duration for audio & video file uploads (#11225)
* Improve m.file m.image m.audio m.video types

* Populate `info.duration` for audio & video file uploads

* Fix tests

* Iterate types

* Improve coverage

* Fix test

* Add small delay to stabilise cypress test

* Fix test idempotency

* Improve coverage

* Slow down

* iterate
2023-07-17 12:07:58 +00:00
Kerry
eced103458
Fix: cypress findByTestId and percySnapshotElement do not work together (#10947)
* check for testid in percySnapshotElement

* Update percy.ts

---------

Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2023-07-14 13:28:22 +00:00
Florian Duros
d7d60a3255
Disable failing login with SSSS tests with rust crypto (#11258) 2023-07-13 15:07:38 +00:00
Richard van der Hoff
46c12a808f
Cypress test for QR code display (#11240) 2023-07-13 13:56:15 +00:00
Germain
38d24f164a
Compound color pass (#11079)
* Integrate compound design tokens

The icons should not be included in this repo, and should live in the compound design token repo, but for simplicity sake at this phase of the integration they will be added here

* Pareto color pass on the light theme

* bugfixes in the light color pass

* Compound color pass dark theme

* Compound color pass high contrast

* Fix typo

* fix tooltip

* Fix PR feedback

* fix composer button mixin

* Normalise some of the auth page colors

* Update based on figma feedback

* lintfix

* regenerate theme index

* Fix cypress tests

Removed the CSS assertions in the room header as it overlaps with the Percy snapshot

* fix more e2e tests

* update colors based on feedback

* fix color pass

* Fix theme overrides

* Restore -transparent

* fix color mapping

* Final colour pass update

* Do not consume compound colors directly

* rethemedex

* Update pass

* Final tweaks

* a11y pass

* scope opacity to checkbox and not label

* Add missing customisations var for theming

* lintfix

* remove unwanted test
2023-07-12 17:46:49 +00:00
Kerry
db52cdd02d
wait for audio tile to load more (#11242) 2023-07-12 16:03:57 +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
Florian Duros
21a1bdf7b7
Cypress: Add test to verify device after login (#11217)
* Run cypress test without `cryptoCallbacks`

* Add security phrase test

* Add security key test

* Fix type import

* Move new test in `verification.spec.ts`

* The nest tests work with the new crypto

* Fix import yupe
2023-07-11 14:18:46 +00:00
Richard van der Hoff
1a75d5d869
Cypress: Use Rust crypto for the bot user in verification tests (#11173)
* Cypress: `crypto.verification.request` -> `crypto.verificationRequestReceived`

matrix-org/matrix-js-sdk#3514 deprecated crypto.verification.request.

* Cypress: `beginKeyVerification` -> `startVerification`

matrix-org/matrix-js-sdk#3528 deprecated beginKeyVerification

* simplify `setupBotClient`

no functional change here, just combining the various `cy.wrap()`ed things into
a single async func

* Cypress: Use Rust crypto for the bot user in verification tests

We can already start using the Rust crypto implementation for the "bot" user in
the verification tests!
2023-07-07 16:56:53 +00:00
Germain
252f2ebec0
Remove hidden read receipts migration (#11139)
* Remove hidden read receipts migration

* remove unused values

* Remove hidden RR migration test
2023-07-07 10:55:16 +00:00
Richard van der Hoff
0d14b03d71
Enable verification cypress tests for Element R (#11169) 2023-07-03 11:48:18 +00:00
Germain
9c7d935aae
Compound Typography pass (#11103)
* Integrate compound design tokens

The icons should not be included in this repo, and should live in the compound design token repo, but for simplicity sake at this phase of the integration they will be added here

* Delete unused or incorrect - sass variables

* Typography pass

* Deprecate _font-weights.pcss and use Compound instead

* lint fix

* Fix snapshot

* Fix typography pass feedback

* Remove unwanted e2e test

cypress tests should test functionality not visual output. And we should not test visual output by inspecting CSS properties

* lintfix

* Migration script for baseFontSize

* Updates after design review

* Update font scaling panel to use min/max size

* Fix custom font

* Fix font slider e2e test

* Update custom font

* Update new baseFontSizeV2

* Disambiguate heading props

* Fix appearance test

* change max font size

* fix e2ee test

* fix tests

* test baseFontSize migration code

* typescript strict

* Migrate baseFontSize account setting

* Change assertion for font size

* Fix font size controller test
2023-06-29 10:30:25 +00:00
Kerry
3de2bcdc1a
Fix: cypress toasts/analytics-toast.spec.ts failures (#11153)
* Revert "skip broken analytics tests (#11144)"

This reverts commit 83ee1946ea.

* reset window notification permission between tets
2023-06-28 21:02:58 +00:00
Kerry
9704c9fc13
test server switch in cypress login test (#11130) 2023-06-27 22:20:43 +00:00
Kerry
83ee1946ea
skip broken analytics tests (#11144) 2023-06-27 08:47:49 +00:00
Richard van der Hoff
35f8c525aa
Cypress test for incoming verification requests (#11123)
* Cypress: move verification tests to their own file

* Remove redundant cypress test

This does nothing that the verification test doesn't do better.

* Factor `beginKeyVerification` call out of `doTwoWaySasVerification`

... for more flexibility. This allows us to have tests where the other side
picks the verification method.

* Cypress test for incoming verification requests
2023-06-22 09:43:49 +00:00
Florian Duros
b84a230d58
Cypress: Run setting up secure key backup should work test for both verified and unverified devices (#11119)
* Add `cypress-each` dev dependencies

* Run `setting up secure key backup should work` test for both verified and unverified device.
2023-06-20 15:27:18 +00:00
Richard van der Hoff
6780287ecf
Cypress: Increase timeout for starting verification (#11109) 2023-06-19 12:37:28 +00:00
Richard van der Hoff
b9b93264b6
Remove references to VerificationRequest (#11050)
* Update references to `VerificationRequestEvent`

* Update references to `Phase`

* update references to legacy `PHASE_*` constants

* Replace `request.canAccept` with `canAcceptVerificationRequest`

* Replace `VerificationRequest` with the interface throughout

* Minor strict type fixes

* Add a couple of tests
2023-06-14 14:35:32 +00:00
Florian Duros
788c1c8f13
Cypress: improve secure key backup test (#11086)
* Check account data after secure key backup

* Add passphrase cypress test
2023-06-14 08:12:01 +00:00
Suguru Hirahara
0ce3664434
Conform to the naming policy - AppsContainer resizer (#11042)
* Add a snapshot to track AppTile in AppsDrawer

* Conform to the naming policy - AppsContainer resizer

* Nest 'mx_AppsContainer_resizer_container_handle' to enforce the style

- mx_AppsContainer_resizer
- mx_AppsContainer_resizer_container
- mx_AppsContainer_resizer_container_handle

* Rename "mx_AppsContainer_resizer" to "mx_AppsDrawer_resizer"

PersistentVResizer is defined by mx_AppsDrawer (see const "classes")
2023-06-13 11:13:07 +00:00
Suguru Hirahara
87f329789b
Fix translucent TextualEvent on search results panel (#10810)
* Unset the opacity value of textual events on the search results panel

* Add a test for checking opacity
2023-06-08 11:11:18 +00:00
Richard van der Hoff
7d36c8315b
Disable verification test for Element-R (#11046)
We haven't implemented this yet!
2023-06-06 07:50:30 +00:00
Suguru Hirahara
21b9dafb45
Take a Percy snapshot of SpaceSetupPrivateInvite (#11010) 2023-06-05 21:11:12 +00:00
Florian Duros
68ebcd2956
Removed DecryptionFailureBar.tsx (#11027) 2023-06-05 15:02:20 +00:00
Suguru Hirahara
6ed81dc1a5
Create left-panel.spec.ts (#11040) 2023-06-05 14:37:28 +00:00
Suguru Hirahara
1da43858f5
Update timeline.spec.ts - use Cypress Testing Library (#10721)
* Update timeline.spec.ts - use Cypress Testing Library - findByText() for the room creation message

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Update timeline.spec.ts - use Cypress Testing Library

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Feedback

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

---------

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2023-06-05 13:58:33 +00:00
Suguru Hirahara
6b1c2e09f6
Add general-room-settings-tab.spec.ts (#10997) 2023-06-05 13:58:25 +00:00
Florian Duros
89c814d385
Disabled sliding sync tests in failure (#11043) 2023-06-05 13:32:11 +00:00
Suguru Hirahara
ebf011fae9
Fix flaky Cypress test - invite-dialog.spec.ts (#11017)
Co-authored-by: Kerry <kerrya@element.io>
2023-05-31 05:13:25 +00:00
Suguru Hirahara
50f7317762
Remove hover effect from user name on a DM creation UI (#10887) 2023-05-30 09:23:23 +00:00
Suguru Hirahara
e6cddcbfe1
Remove obsolete style rules - mx_SpaceRoomView_inviteTeammates_betaDisclaimer (#11004)
* Remove obsolete style rules - mx_SpaceRoomView_inviteTeammates_betaDisclaimer

* Remove the deprecated disclaimer

* Remove ExternalLink

* Add a Percy snapshot - 'Invite your teammates' dialog
2023-05-29 21:13:52 +00:00
Kerry
b35fb4fed2
Use semantic headings in user settings - profile (#10973)
* account password section

* account email and phone numbers

* update cypress selectors

* use settingsection for General section

* use semantic headings for profile settings

* fix show advanced spacing

* udpate snapshot
2023-05-29 01:36:09 +00:00
Kerry
530197bfcd
Move session manager out of beta (#10968)
* remove old device manager

* undo type fix for cypress crypto

* update test case
2023-05-26 01:58:28 +00:00
Kerry
d0d9a36d07
Use semantic headings in user settings - account (#10972)
* account password section

* account email and phone numbers

* update cypress selectors
2023-05-25 22:42:01 +00:00
Florian Duros
8d77d6e4cc
Add cypress test for verifying a new device via SAS (#10940)
* Add WIP Sas cross-signing test

* Login after bot creation

* Figuring out how to make it work in ci

* Wait for `r0/login` to be called before bot creation

* Make waitForVerificationRequest automatically accept requests

... thereby making the `acceptVerificationRequest` helper redundant

* Clean up `deviceIsCrossSigned`

* combine `handleVerificationRequest` and `verifyEmojiSas`

* get rid of a  layer

... it adds no value

* fix bad merge

* minor cleanups to new test

* Move `logIntoElement` to utils module

* use `logIntoElement`  function

* Avoid intercept

* Avoid `CryptoTestContext`

---------

Co-authored-by: Richard van der Hoff <richard@matrix.org>
2023-05-25 18:24:50 +00:00
Richard van der Hoff
2571f54e8b
Cypress: skip tests known to fail when using Rust crypto (#10873)
* 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
2023-05-24 09:50:05 +00:00