Skip to content

Conversation

@kuceb
Copy link
Contributor

@kuceb kuceb commented Mar 27, 2020

  • watch+reload on file change for e2e tests with --no-exit

tasks:

  • Closes N/A

User facing changelog

N/A

Additional details

How has the user experience changed?

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Mar 27, 2020

Thanks for the contribution! Below are some guidelines Cypress uses when doing PR reviews.

  • Please write [WIP] in the title of your Pull Request if your PR is not ready for review - someone will review your PR as soon as the [WIP] is removed.
  • Please familiarize yourself with the PR Review Checklist and feel free to make updates on your PR based on these guidelines.

PR Review Checklist

If any of the following requirements can't be met, leave a comment in the review selecting 'Request changes', otherwise 'Approve'.

User Experience

  • The feature/bugfix is self-documenting from within the product.
  • The change provides the end user with a way to fix their problem (no dead ends).

Functionality

  • The code works and performs its intended function with the correct logic.
  • Performance has been factored in (for example, the code cleans up after itself to not cause memory leaks).
  • The code guards against edge cases and invalid input and has tests to cover it.

Maintainability

  • The code is readable (too many nested 'if's are a bad sign).
  • Names used for variables, methods, etc, clearly describe their function.
  • The code is easy to understood and there are relevant comments explaining.
  • New algorithms are documented in the code with link(s) to external docs (flowcharts, w3c, chrome, firefox).
  • There are comments containing link(s) to the addressed issue (in tests and code).

Quality

  • The change does not reimplement code.
  • There's not a module from the ecosystem that should be used instead.
  • There is no redundant or duplicate code.
  • There are no irrelevant comments left in the code.
  • Tests are testing the code’s intended functionality in the best way possible.

Internal

  • The original issue has been tagged with a release in ZenHub.

@kuceb kuceb requested a review from flotwig March 27, 2020 16:25
Copy link
Contributor

@flotwig flotwig left a comment

Choose a reason for hiding this comment

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

can you add some documentation in the README for how to use this?

@cypress
Copy link

cypress bot commented Mar 27, 2020



Test summary

7182 0 98 0


Run details

Project cypress
Status Passed
Commit bd478ed
Started Apr 22, 2020 4:38 AM
Ended Apr 22, 2020 4:43 AM
Duration 05:31 💡
OS Linux Debian - 10.1
Browser Multiple

View run in Cypress Dashboard ➡️


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

@kuceb kuceb requested a review from flotwig March 27, 2020 16:48
Copy link
Contributor

@chrisbreiding chrisbreiding left a comment

Choose a reason for hiding this comment

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

I tested this out locally and discovered something odd. If you run certain tests, the process will exit even with the --no-exit flag. The one I tried out was 1_async_timeouts_spec.coffee. However, 1_base_url_spec.coffee does the right thing and doesn't exit.

As far as I can tell, the difference is that 1_base_url_spec.coffee uses e2e.it(...), while 1_async_timeouts_spec.coffee uses the default mocha it(...) and e2e.exec(...).

I would guess this has something to do with upgrading mocha and now passing --exit to it.

@kuceb
Copy link
Contributor Author

kuceb commented Apr 1, 2020

@chrisbreiding should be fixed in 1505ecf

@kuceb kuceb requested a review from chrisbreiding April 1, 2020 17:18
Copy link
Contributor

@chrisbreiding chrisbreiding left a comment

Choose a reason for hiding this comment

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

Now when there's a spec using e2e.exec(...) with the browser flag, the browser doesn't open. For example I ran:

yarn test-e2e 1_blacklist_hosts --no-exit --browser chrome

and it doesn't exit, but it must have run in electron, because Chrome doesn't open. I rolled back a few commits and verified this didn't used to be the case.

@kuceb kuceb requested a review from chrisbreiding April 2, 2020 14:32
@kuceb kuceb requested a review from brian-mann April 2, 2020 17:23
@kuceb kuceb requested a review from chrisbreiding April 3, 2020 13:53
@kuceb
Copy link
Contributor Author

kuceb commented Apr 3, 2020

had to keep the npmInstall step as part of helpers/e2e because cypress cannot find hoisted mocha reporters, so the node_modules must be present in the .projects directory

Copy link
Member

@brian-mann brian-mann left a comment

Choose a reason for hiding this comment

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

had to keep the npmInstall step as part of helpers/e2e because cypress cannot find hoisted mocha reporters, so the node_modules must be present in the .projects directory

We can pass an absolute path to the reporter configuration to find the module. Update this PR so we can remove the npmInstall phase again.

@kuceb kuceb changed the title watch+reload on file change for e2e tests with --no-exit [internal] watch+reload on file change for e2e tests with --no-exit Apr 22, 2020
@kuceb kuceb requested a review from brian-mann April 22, 2020 04:35
@kuceb kuceb merged commit 16aecba into develop Apr 23, 2020
@emilyrohrbough emilyrohrbough deleted the server-e2e-tests-allow-watch branch August 1, 2024 13:48
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.

5 participants