Commit Graph

18 Commits (8f353537589ca5e738dd4225b5f7ca9337f091e8)

Author SHA1 Message Date
David Baker 1fc0122523
Deflake unskippable verification (#28222)
Discovering what is the correct way of asserting that an element is *not*
on screen with Playwright, which apparently is nontrivial.
2024-10-17 14:44:53 +00:00
Florian Duros 63986f8c42
Remove feature_dehydration (#138)
* Remove feature_dehydration

* Remove remaining old dehydration

* Update test
2024-10-14 16:10:41 +00:00
David Baker 67cb8b7590
Force verification even for refreshed clients (#44)
* Force verification even for refreshed cients

Set a flag on login to remember that the device needs to be verified
so that we don't forget if the user refreshes the page, but still allow
user with an existing unverified session to stay logged in.

* Hopefully make matrixchat tests pass?

Much, much tweaking to make the matrixchat tests pass again. Should
hopefully make them a bit more solid in general with judicious use of
waitFor rather than flushPromises(). Also lots of fun to stop the state
bleeding between tests.

* Manual yarn.lock manipulation

to hopefully resolve infinite package sadness

* Make final test pass(?)

Mock out the createClient method to return the same client, because
we've mocked the peg to always return that client, so if we let the
code make another one having still overridden the peg, everything becomes
cursed.

Also mock out the autodiscovery stuff rather than relying on fetch-mock.

* another waitFor

* death to flushPromises

* Put the logged in dispatch back

Actually it breaks all sorts of other things too, having fixed all the
MatrixChat tests (although this is useful anyway).

* Try displaying the screen in onClientStarted instead

* Put post login screen back in logged in

but move ready transition to avoid flash of main UI

* Rejig more in the hope it does the right thing

* Make hook work before push rules are fetched

* Add test for unskippable verification

* Add test for use case selection

* Fix test

* Add playwright test for unskippable verification

* Remove console log

* Add log message to log line

* Add tsdoc

* Use useTypedEventEmitter

* Remove commented code

* Use catch instead of empty then on unawaited promises

or in one case just await it because the caller was async anyway

* Add new mock
2024-10-03 08:55:06 +00:00
David Langley 491f0cd08a
Change license (#13)
* Copyright headers 1

* Licence headers 2

* Copyright Headers 3

* Copyright Headers 4

* Copyright Headers 5

* Copyright Headers 6

* Copyright headers 7

* Add copyright headers for html and config file

* Replace license files and update package.json

* Update with CLA

* lint
2024-09-09 13:57:16 +00:00
David Baker 06117695bc
Fix close button on forgot password flow (#12732)
* Fix close button on forgot password flow

The 'x' had escaped out the right of the button for some reason

* Add test that actually opens the dialog in question

* Actually screenshot the right thing

* Unnecessary screenshot
2024-07-05 09:51:21 +00:00
Richard van der Hoff 87bdc784b8
Playwright: check the welcome page is loaded and works (#12660) 2024-06-21 11:21:24 +00:00
Richard van der Hoff 5bcf76c9ab
Playwright test: ensure that links are preserved over login (#12657) 2024-06-20 17:18:11 +00:00
David Baker 7a4ac57954
Disable the login overwriting test (#12507)
See conmment

Fixes https://github.com/element-hq/element-web/issues/27363
2024-05-14 07:20:07 +00:00
Michael Telatynski b283b18898
Fix flakiness in playwright tests (#12512)
* Remove redundant option

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Stabilise app download dialog screenshot test

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Try to stabilise user menu opening in playwright tests

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Stabilise one-to-one-chat.spec.ts

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Stabilise kick.spec.ts

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Iterate

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Discard changes to playwright/element-web-test.ts

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-05-13 16:58:49 +00:00
Valere 8a70260c81
ModuleAPI: `overwrite_login` action was not stopping the existing client resulting in the action failing with rust-sdk (#12272)
* Fix overwrite login action not stopping client

* remove unneeded fixture for overwrite login test

* Fix playwrite bad import of app sources

* revert uneeded change on fore OnLoggedIn causing side effects

* Add unit test for overwrite login action

* remove un needed ts-ignore
2024-02-22 15:41:21 +00:00
Michael Telatynski e180ca841b
Improve stability of Playwright screenshot tests (#11983) 2023-12-04 11:02:48 +00:00
Michael Telatynski 446400b6b6
Migrate right-panel/* from Cypress to Playwright (#11954)
* Migrate file-panel.spec.ts from Cypress to Playwright

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Migrate right-panel.spec.ts from Cypress to Playwright

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Migrate notification-panel.spec.ts from Cypress to Playwright

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Update screenshots

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Update screenshots

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Fix test flakes

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* delint

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Update screenshot

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Fix tests

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Update screenshots

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Try stabilise test

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* sleep

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Handle both cases

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Fix assertion

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Flip

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Test

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Iterate

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Test

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2023-12-01 12:24:49 +00:00
Michael Telatynski 79daa1a63c
Migrate remaining editing.spec.ts from Cypress to Playwright (#11976)
* Migrate user-view.spec.ts from Cypress to Playwright

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Add bot support & update screenshot

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Add screenshot

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Use JSHandle

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Remove stale snapshots

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Migrate remaining editing.spec.ts from Cypress to Playwright

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* yay

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Fix tests

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Fix tests

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2023-11-30 10:18:18 +00:00
Michael Telatynski f7aab0e042
Implement dendrite & pinecone support in Playwright (#11943)
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2023-11-27 14:40:45 +00:00
Michael Telatynski d827723b3d
Migrate user-onboarding-*.spec.ts from Cypress to Playwright (#11927)
Co-authored-by: R Midhun Suresh <hi@midhun.dev>
Co-authored-by: Johannes Marbach <johannesm@element.io>
Co-authored-by: Milton Moura <miltonmoura@gmail.com>
2023-11-27 12:11:00 +00:00
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
Michael Telatynski 52e3e0de1f
Add a login test against Synapse to Playwright (#11913)
* Install playwright

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Add foundations for writing tests under Playwright

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* .gitignore juggling

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Add tsconfig and fix eslint rules

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Add docker & synapse plugins

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Add login.spec.ts

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Wire up fixture which sets up ElementAppPage & bakes config.json

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Remove launch test, it has served its purpose

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Remove test which has been ported to Playwright

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Fix test not cleaning up after itself

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Move registerUser to the Homeserver interface

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Remove unused fixture param

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Remove redundant launch test

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Add newline

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
Co-authored-by: R Midhun Suresh <hi@midhun.dev>
2023-11-22 11:49:51 +00:00