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]: Codegen's Clear button doesn't work if not recording #33802

Closed
ruifigueira opened this issue Nov 28, 2024 · 0 comments · Fixed by #33821
Closed

[Bug]: Codegen's Clear button doesn't work if not recording #33802

ruifigueira opened this issue Nov 28, 2024 · 0 comments · Fixed by #33821
Assignees
Labels

Comments

@ruifigueira
Copy link
Contributor

ruifigueira commented Nov 28, 2024

Version

1.49.0

Steps to reproduce

  • Launch npx playwright codegen
  • Record a few steps
  • Stop recording
  • Click Clear button

Expected behavior

Should clear recorded actions

Actual behavior

Doesn't clean recorded actions. Besides, if recording is enabled again, it keeps the same actions but cleans them as soon as we record a new one.

Additional context

RecorderCollection.restart() clears its internal actions but only fires a change event if enabled, and when recorder is not recording, it is disabled, and that causes Recorder not to be notified of those changes. Those events are only sent when another action is recorded.

Environment

System:
    OS: Windows 11 10.0.22631
    CPU: (12) x64 13th Gen Intel(R) Core(TM) i5-1335U
    Memory: 6.99 GB / 31.66 GB
  Binaries:
    Node: 22.11.0 - ~\scoop\apps\nvm\current\nodejs\nodejs\node.EXE
    Yarn: 1.22.22 - ~\scoop\apps\yarn\current\bin\yarn.CMD
    npm: 10.9.0 - ~\scoop\apps\nvm\current\nodejs\nodejs\npm.CMD
    pnpm: 9.14.2 - ~\scoop\shims\pnpm.EXE
  IDEs:
    VSCode: 1.95.3 - C:\Users\rui.figueira\AppData\Local\Programs\Microsoft VS Code\bin\code.CMD
  Languages:
    Bash: 5.2.37 - C:\Users\rui.figueira\scoop\shims\bash.EXE
  npmPackages:
    @playwright/test: ^1.49.0 => 1.49.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants