-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
test(client): add e2e reload client tests #1940
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
test(client): add e2e reload client tests #1940
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1940 +/- ##
==========================================
+ Coverage 91.13% 91.25% +0.11%
==========================================
Files 18 18
Lines 835 835
Branches 262 262
==========================================
+ Hits 761 762 +1
+ Misses 70 69 -1
Partials 4 4
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #1940 +/- ##
==========================================
+ Coverage 91.8% 92.24% +0.44%
==========================================
Files 23 23
Lines 903 903
Branches 283 283
==========================================
+ Hits 829 833 +4
+ Misses 71 67 -4
Partials 3 3
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job!
Some notes:
- Let's create test_e2e directory in root
- Rename
ClientReload.test.js
toClient.test.js
- Maybe move other e2e test to this directory
Also need fix linting problem |
@evilebottnawi What should I name the other e2e test if I move it into the same directory? Maybe |
Sounds good |
@evilebottnawi Why not |
I made the |
👍 We can refactor tests in any time, just want keep e2e test separate from unit tests, same for integration tests we should do, but not in this PR, let's do it future |
.gitignore
Outdated
@@ -12,3 +12,5 @@ node_modules | |||
.vscode | |||
|
|||
.eslintcache | |||
|
|||
test/temp/*.css |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you use editorconfig?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does that mean? I'm not sure what editorconfig does. Is there something wrong with doing this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure but only this file has EoF icon. see https://github.com/webpack/webpack-dev-server/blob/master/.editorconfig#L7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh I see. I saw that too but overlooked it earlier. I think the file just needs another line at the end.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/cc @hiroppy
What is wrong with azure 😕 : |
Good job! |
For Bugs and Features; did you add new tests?
N/A
Motivation / Use-Case
#1933
More tests are needed for the client. These tests confirm that reloading in the browser is working.
Breaking Changes
Sometimes reload took long to occur, so I set a long wait time of 10000. I think this was fixed after I set
poll: 500
.Also note that I added a
temp
directory in the testing directory so that my tests can write to files for reload simulationAdditional Info
Things that can still be added onto this:
sockjs
communications to confirm all the messages pass as expectedhotOnly: true
then do something that cannot be reloaded withhot
and see the error in the console, or shut off the server early and make sure the console saysWDS Disconnected
EDIT:
Another use case for this method
hot-update.json