cypress-io / cypress-example-kitchensink

This is an example app used to showcase Cypress.io testing.
https://example.cypress.io/
MIT License
1.22k stars 2.2k forks source link

Update HTML examples to conform to scaffolded tests #804

Closed cacieprins closed 6 months ago

cacieprins commented 7 months ago

The HTML that gets deployed to example.cypress.io for, e.g., commands, should align with the tests that get scaffolded from cypress/*

MikeMcC399 commented 7 months ago

@cacieprins

The HTML that gets deployed to example.cypress.io for, e.g., commands, should align with the tests that get scaffolded from cypress/*

Is this an issue for this repo or for the build and deploy process defined in https://github.com/cypress-io/cypress/tree/develop/packages/example ?

jennifer-shehane commented 7 months ago

@MikeMcC399 It's an issue with this repo. This PR updated the test files: https://github.com/cypress-io/cypress-example-kitchensink/pull/802/files but there is HTML that reflects the code in the test files that should be updated. https://example.cypress.io/commands/actions

Screenshot 2024-03-14 at 12 21 51 PM

MikeMcC399 commented 7 months ago

@jennifer-shehane

Thanks for explaining. I see that now that you've provided the details. 👍🏻

MikeMcC399 commented 7 months ago

Perhaps @rubysolo would like to follow up with a related PR to change the HTML to match the tests?

For instance, the following would need to be aligned:

https://github.com/cypress-io/cypress-example-kitchensink/blob/9755df4a0addcfe8bbee59fa8faa4f21522e0b84/app/commands/actions.html#L80-L88

https://github.com/cypress-io/cypress-example-kitchensink/blob/9755df4a0addcfe8bbee59fa8faa4f21522e0b84/cypress/e2e/2-advanced-examples/actions.cy.js#L15-L23

rubysolo commented 7 months ago

Oh, I assumed those were generated. Would there be any interest in templatizing the example HTML files so that they could be autogenerated from the examples with a script?

jennifer-shehane commented 7 months ago

@rubysolo We don't update these examples very often honestly, so I don't think there'd be a lot of utility with that.

rubysolo commented 7 months ago

One question I had -- the tests no longer call end, since click isn't chainable. Is there a better example of using end that we could use in the tests / docs?

MikeMcC399 commented 7 months ago

@rubysolo

One question I had -- the tests no longer call end, since click isn't chainable. Is there a better example of using end that we could use in the tests / docs?

Apparently nobody noticed that the .end test had been deactivated. Although that achieved the goal of passing linting, it was at the expense of no longer demonstrating cy.end.

I've raised the following interrelated issues accordingly:

jennifer-shehane commented 7 months ago

I'd be in favor of removing the .end example I think.

cypress-app-bot commented 6 months ago

:tada: This issue has been resolved in version 2.0.4 :tada:

The release is available on:

Your semantic-release bot :package::rocket: