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

Add auto record #259

Closed
wants to merge 1 commit into from
Closed

Add auto record #259

wants to merge 1 commit into from

Conversation

jasonLaster
Copy link
Contributor

Proof of concept for what it would look like to launch chrome in an auto-record mode. The biggest missing piece is that we'd need a workflow for which recordings users would want to view.

@replay-io
Copy link

replay-io bot commented Oct 4, 2023

flake

19 replays were recorded for 7aafd51.

image 2 Failed
  • cypress/e2e/adding-spec.ts
    1. should allow me to add todo items
    2. adds new items using a custom command
    3. adds items
    4. should clear text input field when an item is added
    5. should append new items to the bottom of the list
    6. should trim text input
    7. should show #main and #footer when items added
    8. should fail on this test
      AssertionError: Timed out retrying after 4000ms: Expected to find content: 'Sorry, something went wrong' but never did.
          at Context.eval (webpack:///./cypress/e2e/adding-spec.ts:99:49)
    9. calls inform
  • cypress/e2e/button-spec.ts
      CypressError: Timed out retrying after 4050ms: `cy.click()` failed because this element is detached from the DOM.
      `<button data-test-id="disappearingButton" data-reactid=".0.0">Disappe...</button>`
      Cypress requires elements be attached in the DOM to interact with them.
      The previous command that ran was:
        > `cy.get()`
      This DOM element likely became detached somewhere between the previous and current command.
      Common situations why this happens:
        - Your JS framework re-rendered asynchronously
        - Your app code reacted to an event firing and removed the element
      You typically need to re-query for the element or add 'guards' which delay Cypress from running new commands.
      https://on.cypress.io/element-has-detached-from-dom
          at $Cy.ensureAttached (http://localhost:8888/__cypress/runner/cypress_runner.js:147471:76)
          at runAllChecks (http://localhost:8888/__cypress/runner/cypress_runner.js:133346:12)
          at retryActionability (http://localhost:8888/__cypress/runner/cypress_runner.js:133426:16)
          at tryCatcher (http://localhost:8888/__cypress/runner/cypress_runner.js:11318:23)
          at Promise.attempt.Promise.try (http://localhost:8888/__cypress/runner/cypress_runner.js:8592:29)
          at whenStable (http://localhost:8888/__cypress/runner/cypress_runner.js:152665:65)
          at <unknown> (http://localhost:8888/__cypress/runner/cypress_runner.js:152095:14)
          at tryCatcher (http://localhost:8888/__cypress/runner/cypress_runner.js:11318:23)
          at Promise._settlePromiseFromHandler (http://localhost:8888/__cypress/runner/cypress_runner.js:9253:31)
          at Promise._settlePromise (http://localhost:8888/__cypress/runner/cypress_runner.js:9310:18)
          at Promise._settlePromise0 (http://localhost:8888/__cypress/runner/cypress_runner.js:9355:10)
          at Promise._settlePromises (http://localhost:8888/__cypress/runner/cypress_runner.js:9435:18)
          at Promise._fulfill (http://localhost:8888/__cypress/runner/cypress_runner.js:9379:18)
          at <unknown> (http://localhost:8888/__cypress/runner/cypress_runner.js:10993:46)
      From Your Spec Code:
          at Context.eval (webpack:///./cypress/e2e/button-spec.ts:3:48)
image 17 Passed

View test run on Replay ↗︎

@jasonLaster
Copy link
Contributor Author

jasonLaster commented Oct 14, 2023

Just pushed a commit with a new replay play command that launches the browser with playwright and listens for new and closed tabs. Now i'm creating lots of recordings, but i'm not sure how to associate them with the uploaded recordings

https://replay.metabaseapp.com/question/1320-jasons-recent-recordings
Screenshot 2023-10-14 at 2 57 07 PM

I think we've got something from how Cypress/playwright works that should help us.

@jasonLaster jasonLaster force-pushed the launch-auto-record branch 4 times, most recently from 8ae7bb0 to 8587bff Compare October 27, 2023 16:46
@jasonLaster jasonLaster marked this pull request as ready for review October 27, 2023 17:28
@jasonLaster jasonLaster force-pushed the launch-auto-record branch 2 times, most recently from d2b2e35 to 3a23e14 Compare October 27, 2023 17:32
@socket-security
Copy link

New dependencies detected. Learn more about Socket for GitHub ↗︎

Packages Version New capabilities Transitives Size Publisher
playwright 1.39.0 network, filesystem, shell, environment +1 10 MB aslushnikov
dotenv 16.3.1 environment +0 71.6 kB motdotla

@jasonLaster jasonLaster force-pushed the launch-auto-record branch 5 times, most recently from d7be558 to af43146 Compare October 27, 2023 17:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants