confluentinc / confluentinc/vscode

E2E: Set up custom matcher for `aria-expanded`

Open
#2,566 0 comments 0 reactions 0 assignees View on GitHub
cleanup testing
Dominant language
TypeScript
Stars
34
Forks
17
Avg merge
1d 22h
Merged PRs (30d)
8

Description

We have multiple instances where we're checking for the value of the [`"aria-expanded"` attribute](https://github.com/search?q=repo%3Aconfluentinc%2Fvscode+%22aria-expanded%22+path%3Atests%2F&type=code) (including in https://github.com/confluentinc/vscode/pull/2557), and that will continue to be common when we deal with views and (expandable) tree items.

We should implement a [custom matcher](https://playwright.dev/docs/test-assertions#add-custom-matchers-using-expectextend) to clean those up. Ideally we could just call:
```ts
await expect().toBeExpanded()
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.