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

Prepare Studio Feature branch for review #23461

Closed
lmiller1990 opened this issue Aug 19, 2022 · 4 comments · Fixed by #23544
Closed

Prepare Studio Feature branch for review #23461

lmiller1990 opened this issue Aug 19, 2022 · 4 comments · Fixed by #23544
Assignees

Comments

@lmiller1990
Copy link
Contributor

lmiller1990 commented Aug 19, 2022

Part of #23230

Studio support is in feature branch feat/studio-cypress-10

Once all the other Studio stories are complete, we need to do a final pass on the feature branch, test it all out, and prepare it for a thorough review and QA.

AC:

  • it all works
  • add lots of tests
  • fix up any obvious tech debt from 9.x
@lmiller1990
Copy link
Contributor Author

This is blocked until all other things in #23230 are completed.

@lmiller1990
Copy link
Contributor Author

lmiller1990 commented Aug 22, 2022

Testing

There are quite a number of workflows we need to consider to have feature parity. I'll document those here. I'll use Cypress 9 to document the stories, since that's the parity we are aiming for.

1. Basic "happy" path

  • Create an empty spec, eg untitled.spec.js.
  • Run it.

You should be prompted to create a test with Cypress Studio:

image

  • Click "Create test with Cypress Studio".
  • You will be greeted with a modal:

image

  • Click "Get Started".
  • You should see the default blank page and be prompted to enter a URL.
  • We do not validate this URL - just that something is entered.
  • Enter a valid URL.

image

  • Upon doing so, the runner refreshes (to update the domain). You visit the URL. It'll look something like this

image

  • Note the Studio Toolbar is showing:

image

  • Click around. It'll record the commands as actions in the command log.

image

  • Hit "Save Commands". It'll prompt you for a new test name:

image

  • Hit "Save Test". It will write the test to file, and re-execute the test (which should pass).

This is what was generated for mine:

/* ==== Test Created with Cypress Studio ==== */
it('My awesome test', function() {
  /* ==== Generated with Cypress Studio ==== */
  cy.visit('https://lmiller1990.github.io');
  cy.get('.center').click();
  cy.get('.job-title > strong').click();
  /* ==== End Cypress Studio ==== */
});
  • You can extend a test, too! Click the wand in the command log:

image

  • Cypress executing the test, then waits.
  • Click around a bit more, and hit "Save Commands" again.
  • It should update your spec file in this fashion:
/* ==== Test Created with Cypress Studio ==== */
it('jj', function() {
  /* ==== Generated with Cypress Studio ==== */
  cy.visit('https://lmiller1990.github.io/');
  cy.get(':nth-child(3) > :nth-child(3)').click();
  /* ==== End Cypress Studio ==== */
  /* ==== Generated with Cypress Studio ==== */
  cy.get('.resume > :nth-child(5)').click();
  cy.get('.resume > :nth-child(5)').click();
  cy.get('.resume > :nth-child(5)').click();
  /* ==== End Cypress Studio ==== */
});

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Aug 29, 2022

The code for this is done in cypress-io/cypress#23544, but has yet to be released.
We'll update this issue and reference the changelog when it's released.

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Aug 30, 2022

Released in 10.7.0.

This comment thread has been locked. If you are still experiencing this issue after upgrading to
Cypress v10.7.0, please open a new issue.

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Aug 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant