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

fix(svelte): default mount log to true #23771

Merged
merged 3 commits into from Sep 12, 2022
Merged

Conversation

ZachJW34
Copy link
Contributor

@ZachJW34 ZachJW34 commented Sep 9, 2022

User facing changelog

Logs the Svelte mount command by default

Additional details

The mount log should default to true, but we missed the fallback. Found when pairing with @rockindahizzy (thanks Rocky!)

Steps to test

Throw a .only on svelte component testing and run yarn workspace @tooling/system-tests test component_testing_spec.ts --no-exit --headed, or test locally against a Svelte app. Check the reporter for a mount <MyComponent ...> log.

How has the user experience changed?

Before:
Screen Shot 2022-09-09 at 4 06 10 PM

After:
Screen Shot 2022-09-09 at 4 05 10 PM

PR Tasks

  • Have tests been added/updated?
  • Has the original issue (or this PR, if no issue exists) been tagged with a release in ZenHub? (user-facing changes only)
  • [na] Has a PR for user-facing changes been opened in cypress-documentation?
  • [na] Have API changes been updated in the type definitions?

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Sep 9, 2022

Thanks for taking the time to open a PR!

@ZachJW34 ZachJW34 self-assigned this Sep 9, 2022
@ZachJW34 ZachJW34 changed the title fix: default mount log to true fix(svelte): default mount log to true Sep 9, 2022
@ZachJW34 ZachJW34 marked this pull request as ready for review September 9, 2022 21:07
@cypress
Copy link

cypress bot commented Sep 9, 2022



Test summary

40019 0 3346 0Flakiness 3


Run details

Project cypress
Status Passed
Commit 21f85fd
Started Sep 12, 2022 9:43 PM
Ended Sep 12, 2022 9:58 PM
Duration 14:56 💡
OS Linux Debian - 11.3
Browser Multiple

View run in Cypress Dashboard ➡️


Flakiness

commands/xhr.cy.js Flakiness
1 src/cy/commands/xhr > abort > aborts xhrs currently in flight
e2e/origin/config_env.cy.ts Flakiness
1 cy.origin- Cypress.config() > serializable > overwrites different values in secondary, even if the Cypress.config() value does not exist in the primary
e2e/origin/commands/location.cy.ts Flakiness
1 cy.origin location > .hash()

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

@@ -76,7 +76,7 @@ export function mount<T extends SvelteComponent> (
// by waiting, we are delaying test execution for the next tick of event loop
// and letting hooks and component lifecycle methods to execute mount
return cy.wait(0, { log: false }).then(() => {
if (options.log) {
if (options.log !== false) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, all our adapters do this - this could be part of GA, the standard API that adapters must comply with. Part of that could be logging the component name, and we could enforce it via an interface or something.

@lmiller1990 lmiller1990 requested a review from a team September 10, 2022 04:31
.within(() =>
cy
.get(".command-name-mount")
.should("contain", "mount<Counter ... />")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it would be helpful for future us to add a comment detailing the fact there is no space here purposefully, but I'm not too concerned with it.

@ZachJW34 ZachJW34 merged commit 96b03ab into develop Sep 12, 2022
@ZachJW34 ZachJW34 deleted the zachw/fix-svelte-mount-log branch September 12, 2022 22:20
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Sep 13, 2022

Released in 10.8.0.

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

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Sep 13, 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 this pull request may close these issues.

None yet

3 participants