riot-web/test
Suguru Hirahara 232daaff68
Fix decryption failure bar covering the timeline (#10360)
* Use grid layout instead

- BEM naming style
- Increase block gap from 4px to 8px
- Use flexbox inside 'header' grid-area to let the buttons wrapped
- Use variables
- Remove 4px gap when one of the buttons is not rendered
- Change 'body' to 'message'
- Set 'align-self: start' to the icon and spinner

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

* Unset height of spinner

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

* Break lines at newline characters with white-space: pre-line

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

* Edit tests to check decryption failure bars on narrow timeline

- checkTimelineNarrow() looks for buttons by default
- Test indicator as well

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

* Remove a line

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

* Edit the test to have it check mx_EventTile_last only inside mx_RoomView_body

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

* Fix double underscores

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

* Fix double underscores - pcss

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

* Iterate - buttons at the bottom

- Set common spacing to buttons with variables
- Remove line breaks, yarn run i18n
- Set data-testid for headlines and buttons in case the tested strings would be displayed elsewhere simultaneously

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

* Check waiting headline as well

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

* Increase spacing between the message and the buttons

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

* lint

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

* Increase block gap between wrapped buttons for clickability

Apply 8px between wrapped buttons

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

* Revert bottom margin of buttons which are not expected to be wrapped

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

* Check visibility instead of existence

This commit removes data-testid from headlines and data-testid-button and checks whether the elements are really visible, not overflowing the viewport.

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

* Remove redundant gap between 'mx_DecryptionFailureBar_start' and the bottom edge

This commit adds '.mx_DecryptionFailureBar--withEnd' class name to have it applied to the bar only if it has button(s). This way the bar is rendered with a flexbox and the row-gap declaration is respected only if there is a 'mx_DecryptionFailureBar--withEnd' element. The element  currently includes the button(s) only.

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

* lint - prettier

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

* Have Percy take a snapshot of the bar loading spinner before checkTimelineNarrow()

The loading spinner is likely to disappear while checking the bar on the narrow timeline.

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

---------

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
Co-authored-by: Kerry <kerrya@element.io>
2023-03-30 10:11:16 +01:00
..
@types
__snapshots__ add fallback reply for poll start (#10380) 2023-03-16 21:27:56 +00:00
accessibility Add ESLint Jest (#10261) 2023-03-01 16:23:35 +01:00
actions/handlers
audio Conform more code to strict null checking (#10169) 2023-02-16 09:38:44 +00:00
autocomplete Support dynamic room predecessor in SpaceProvider (#10348) 2023-03-10 11:01:45 +00:00
components Fix decryption failure bar covering the timeline (#10360) 2023-03-30 10:11:16 +01:00
contexts Add `UserProfilesStore`, `LruCache` and cache for user permalink profiles (#10425) 2023-03-27 10:07:43 +02:00
dispatcher Remove flux dependency (#10313) 2023-03-08 14:19:05 +00:00
editor Fix strict `strictNullChecks` to `src/editor/*` (#10428 2023-03-23 13:35:55 +00:00
events Add ESLint Jest (#10261) 2023-03-01 16:23:35 +01:00
hooks Convert remaining hook tests to RTL (#10166) 2023-02-16 14:13:05 +00:00
i18n
i18n-test Add ESLint Jest (#10261) 2023-03-01 16:23:35 +01:00
images
img
models Properly type Modal props to ensure useful typescript checking (#10238 2023-02-28 10:31:48 +00:00
modules Fixes user authentication when registering via the module API (#10257) 2023-03-07 16:24:44 +01:00
notifications
settings Add stable unstable version for jump to date before `v1.6` is fully supported on a homeserver (#10398) 2023-03-17 15:08:17 -05:00
setup Fix some features not being configurable via `features` (#10276) 2023-03-03 13:31:51 +00:00
stores Merge branch 'master' into develop 2023-03-28 14:30:52 +01:00
test-utils Better error handling in jump to date (#10405) 2023-03-24 14:39:24 -05:00
toasts Handle group call redaction (#10465) 2023-03-28 13:16:30 +00:00
utils Apply `strictNullChecks` to `src/utils/exportUtils` (#10379) 2023-03-29 21:47:07 +00:00
voice-broadcast Better error handling in jump to date (#10405) 2023-03-24 14:39:24 -05:00
Avatar-test.ts Conform more of the code base to strict null checking (#10147) 2023-02-13 17:01:43 +00:00
ContentMessages-test.ts Implement MSC3952: intentional mentions (#9983) 2023-03-23 11:47:40 +00:00
DecryptionFailureTracker-test.js Add ESLint Jest (#10261) 2023-03-01 16:23:35 +01:00
DeviceListener-test.ts
HtmlUtils-test.tsx
Image-test.ts
KeyBindingsManager-test.ts
LegacyCallHandler-test.ts
Markdown-test.ts
MatrixClientPeg-test.ts Prevent rust-crypto setting from leaking to other tests (#10464) 2023-03-27 18:03:17 +00:00
MediaDeviceHandler-test.ts
Notifier-test.ts Add ESLint Jest (#10261) 2023-03-01 16:23:35 +01:00
PosthogAnalytics-test.ts Add ESLint Jest (#10261) 2023-03-01 16:23:35 +01:00
PreferredRoomVersions-test.ts
Reply-test.ts add fallback reply for poll start (#10380) 2023-03-16 21:27:56 +00:00
RoomNotifs-test.ts Add ESLint Jest (#10261) 2023-03-01 16:23:35 +01:00
Rooms-test.ts
ScalarAuthClient-test.ts Add ESLint Jest (#10261) 2023-03-01 16:23:35 +01:00
SdkConfig-test.ts
SlashCommands-test.tsx Conform more code to strict null checking (#10169) 2023-02-16 09:38:44 +00:00
SlidingSyncManager-test.ts Fix jest/no-conditional-expect lint and enable it (#10307) 2023-03-07 13:58:10 +00:00
Terms-test.tsx Add ESLint Jest (#10261) 2023-03-01 16:23:35 +01:00
TestSdkContext.ts
TextForEvent-test.ts Add ESLint Jest (#10261) 2023-03-01 16:23:35 +01:00
Unread-test.ts
UserActivity-test.ts Conform more of the code base to strict null checking (#10147) 2023-02-13 17:01:43 +00:00
createRoom-test.ts Changes for v3.69.0 2023-03-28 11:23:16 +01:00
email-test.ts Factor out basic email check (#10244) 2023-02-28 10:39:35 +01:00
globalSetup.js
languageHandler-test.ts
linkify-matrix-test.ts
setupTests.js Kill off enzyme in preference of react testing library (#10255) 2023-03-06 15:17:46 +00:00
slowReporter.js
theme-test.ts Add ESLint Jest (#10261) 2023-03-01 16:23:35 +01:00
useTopic-test.tsx Update usages of test utilities preferring RTL (#10203) 2023-02-22 10:52:55 +00:00