Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Edit room-header.spec.ts to check apps button#10934

Merged
andybalaam merged 3 commits into
matrix-org:developfrom
luixxiul:RoomHeader-test
May 18, 2023
Merged

Edit room-header.spec.ts to check apps button#10934
andybalaam merged 3 commits into
matrix-org:developfrom
luixxiul:RoomHeader-test

Conversation

@luixxiul
Copy link
Copy Markdown
Contributor

@luixxiul luixxiul commented May 17, 2023

For #10495

This PR suggests to edit room-header.spec.ts to check apps button for a widget on the room header. The code to display a widget is based on layout.spec.ts.

0

This PR intends to add two Percy snapshots:

  • Room header - with apps button (highlighted)
  • Room header - with apps button (not highlighted)

type: task

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

Checklist

  • Tests written for new code (and old code if feasible)
  • Linter and other CI checks pass
  • Sign-off given on the changes (see CONTRIBUTING.md)

This change is marked as an internal change (Task), so will not be included in the changelog.

@github-actions github-actions Bot added Z-Community-PR Issue is solved by a community member's PR T-Task Refactoring, enabling or disabling functionality, other engineering tasks labels May 17, 2023
@luixxiul luixxiul marked this pull request as ready for review May 17, 2023 17:12
@luixxiul luixxiul requested a review from a team as a code owner May 17, 2023 17:12
Copy link
Copy Markdown
Member

@andybalaam andybalaam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, with one suggested change.

Comment thread cypress/e2e/room/room-header.spec.ts Outdated
.getPropertyValue("background-color"); // get "background-color" value

// Assert the value is equal to $accent == hex #0dbd8b == rgba(13, 189, 139)
expect(color).to.eq("rgb(13, 189, 139)");
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we check for a CSS class instead of an exact colour? I wouldn't want our test to fail if we tweak the colours.

Even better would be to check for an aria-label that said it was selected, or something like that, but it might not exist...

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

aria-label that said it was selected

Aria labels shouldn't be used for that, aria-selected, aria-checked, aria-pressed etc should be used instead

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah great, thank you.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With cd41594 I replaced assertions related to color with aria-selected, hope this should be fine.

Copy link
Copy Markdown
Member

@andybalaam andybalaam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thanks!

@luixxiul
Copy link
Copy Markdown
Contributor Author

Thanks both of you for reviewing!

@andybalaam andybalaam added this pull request to the merge queue May 18, 2023
Merged via the queue into matrix-org:develop with commit 7d0c68a May 18, 2023
@luixxiul luixxiul deleted the RoomHeader-test branch May 18, 2023 13:38
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

T-Task Refactoring, enabling or disabling functionality, other engineering tasks Z-Community-PR Issue is solved by a community member's PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants