Commit Graph

14 Commits (2cfdf2ced99eb0d84e21bbe38e90b09051928133)

Author SHA1 Message Date
Michael Telatynski 3c52ba0c92
Use Intl to localise dates and times (#11422)
* Use Intl to generate better internationalised date formats

* Get `Yesterday` and `Today` from Intl also

* Correct capitalisation blunder

* Fix formatTime include weekday

* Iterate

* Fix tests

* use jest setSystemTime

* Discard changes to cypress/e2e/settings/general-user-settings-tab.spec.ts

* Discard changes to res/css/_components.pcss

* Discard changes to res/css/views/elements/_LanguageDropdown.pcss

* Discard changes to src/components/views/elements/LanguageDropdown.tsx

* Add docs & tests for getDaysArray & getMonthsArray

* Discard changes to test/components/structures/__snapshots__/MatrixChat-test.tsx.snap

* Consolidate consts

* Improve testing & documentation

* Update snapshot

* Apply suggestions from code review

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>

* Iterate

* Clarify comments

* Update src/DateUtils.ts

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>

* Specify hourCycle

* Discard changes to test/components/views/settings/devices/DeviceDetails-test.tsx

* Update comments

---------

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
2023-08-21 19:38:59 +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
Suguru Hirahara 7b5d1802b1
Update `editing.spec.ts` (#10543)
* Update editing.spec.ts - deprecate custom commands

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

* Update editing.spec.ts - use findByRole textbox etc

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

---------

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2023-04-11 08:22:45 +00:00
Suguru Hirahara 4ed6e39067
Use Cypress Testing Library - editing.spec.ts (#10480)
Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2023-04-03 16:06:58 +12:00
Suguru Hirahara beb8861df6
Add E2E test of `MessageEditHistoryDialog` (#10406) 2023-03-30 10:32:02 +02:00
Richard van der Hoff 7975b07128
Deflake new edited-event test (#9908)
We don't need to send as many padding events as we were; reducing the spam
speeds up the test and deflakes it.
2023-01-13 14:14:48 +00:00
Richard van der Hoff 1b5f06b16f
Add a Cypress test for displaying edited events (#9886)
MSC3925 is changing this, so let's make sure it keeps working.
2023-01-12 10:38:41 +00:00
devonh 79033eb034
Add dendrite support to cypress tests (#9884)
* 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
2023-01-10 16:29:56 -07:00
Travis Ralston 19ba620de2 Revert "Revert "Factor out `MessageEvent.from()` usage (#9882)""
This reverts commit 99e38ca88e.
2023-01-10 13:43:15 -07:00
Travis Ralston 99e38ca88e Revert "Factor out `MessageEvent.from()` usage (#9882)"
This reverts commit c09ca7b4ee.
2023-01-10 13:32:07 -07:00
Travis Ralston c09ca7b4ee
Factor out `MessageEvent.from()` usage (#9882)
* Factor out `MessageEvent.from()` usage

The class/function is disappearing from the events-sdk, at least in this form.

* Manually create contents for events used by cypress

The utility function is out of range of the calling code at runtime, for some reason.

* Run prettier

* Maybe this will fix the build
2023-01-10 09:20:10 -07:00
Michael Weimann 526645c791
Apply prettier formatting 2022-12-12 12:24:14 +01:00
Michael Telatynski 2cf8a9a2f7
Stabilise Cypress login tests (#9446)
* 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
2022-10-18 17:07:23 +01:00
Michael Telatynski 6796375b10
Fix dismissing edit composer when change was undone (#9109)
* Fix dismissing edit composer when change was undone

* Add tests
2022-08-02 14:54:40 +01:00