Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: 149 aria snapshot feedback #33492

Open
3 of 8 tasks
debs-obrien opened this issue Nov 7, 2024 · 1 comment
Open
3 of 8 tasks

[Bug]: 149 aria snapshot feedback #33492

debs-obrien opened this issue Nov 7, 2024 · 1 comment
Assignees
Labels

Comments

@debs-obrien
Copy link
Contributor

debs-obrien commented Nov 7, 2024

Version

@latest

Steps to reproduce

open codegen and generate aria snapshot for getting started link(green button)

Expected behavior

  • I expected the aria tab to show me something
    • We would like to add a placeholder like Use 'Pick Locator'...
  • expected trace viewer to show me a tab with the aria snapshots perhaps
    • waiting for more feedback for now
  • expect.toMatchAriaSnapshot -> expect(page).toMatchAriaSnapshot
  • I expected codegen to generate a working example for the get started link yet it did not!
  • Thoughts: aria snapshot tab only in codegen but not in trace viewer and ui mode. Is this correct? What about when using VS Code extension? Should we tell people to use codegen instead of extension when using aria snapshots cause it will have a tab where when working you will see the snapshots?
    • waiting for more feedback
  • does update snapshots give you any message to say that it worked? how do you know it did anything?
  • for ui mode the expand all button can we not just make one button that toggles between the expands?
  • follow-up: fix collapsable log

Actual behavior

opening codegen to generate ariasnapshots.

  1. When recording there is an aria snapshots tab but it remained blank
    Image

  2. The log now has arrows to expand downwards but there seems nothing to expand
    Image

  3. When trying to get the aria snapshot for the getting started button/link on the home page it gives role of banner. Why does it not generate a getByRole('link')??
    await expect(page.getByRole('banner')).toMatchAriaSnapshot(- link "Get started")
    image

Additional context

Environment

System:
OS: macOS 15.1
CPU: (10) arm64 Apple M1 Max
Memory: 709.84 MB / 64.00 GB
Binaries:
Node: 20.11.1 - /usr/local/bin/node
Yarn: 1.22.19 - /usr/local/bin/yarn
npm: 10.2.4 - /usr/local/bin/npm
pnpm: 8.5.0 - /usr/local/bin/pnpm
IDEs:
VSCode: 1.95.1 - /usr/local/bin/code
Languages:
Bash: 3.2.57 - /bin/bash
npmPackages:
@playwright/test: ^1.49.0-alpha-2024-11-07 => 1.49.0-alpha-2024-11-07

@pavelfeldman
Copy link
Member

pavelfeldman commented Nov 8, 2024

From Yury:

  • rebase diff is very large, can we generate same suggested expectation as in codegen?
- - link "Get started2"
+ - banner:
+   - heading "Playwright enables reliable end-to-end testing for modern web apps." [level=1]
+   - link "Get started"
+   - link "Star microsoft/playwright on GitHub": Star
+   - link "66k+ stargazers on GitHub": 66k+
  • --update-snapshots - print some explanation before git apply ... command ?

  • git apply doesn't work in non-git project, print patch -p1 there ?

  • go to playwright releases and click on e.g. 1.47 release entry - link /Version \d+\.\d+/ is generated, I'd expect exact version instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants