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(e2e): More e2e test improvements #2163
test(e2e): More e2e test improvements #2163
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2163 +/- ##
=========================================
Coverage ? 93.85%
=========================================
Files ? 33
Lines ? 1270
Branches ? 366
=========================================
Hits ? 1192
Misses ? 71
Partials ? 7
Continue to review full report at Codecov.
|
fdf2bb7
to
fcde737
Compare
/cc @evilebottnawi I don't think just adding an empty Edit: I think it should not effect anything to have an empty handler https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/onerror I got the idea that this might solve the problem from: websockets/ws#246, websockets/ws#656, but not entirely sure why it would change anything |
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.
Code looks good, it is interesting questions, in theory will be better logging error
Page crashes still happening. I've thought about making some mechanism to retry the test if a page crashes, but that might just be sweeping an issue under the rug. Maybe we should just wait until there is further progress on this puppeteer/puppeteer#1454 |
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.
Need use logger
client-src/clients/SockJSClient.js
Outdated
@@ -11,7 +11,9 @@ module.exports = class SockJSClient extends BaseClient { | |||
super(); | |||
this.sock = new SockJS(url); | |||
|
|||
this.sock.onerror = () => {}; | |||
this.sock.onerror = (err) => { | |||
console.error(err); |
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.
We should use logger, instead console
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.
@evilebottnawi This is another case where the path from SockJSClient
to utils/log
is not the same in the client-src
directory compared to the client
directory. I think we should wait and add this after reorganizing client
directories on next
, rather than do more of this redirection:
webpack-dev-server/client-src/default/webpack.config.js
Lines 21 to 31 in c2da532
new webpack.NormalModuleReplacementPlugin( | |
/^\.\/clients\/SockJSClient$/, | |
(resource) => { | |
if (resource.context.startsWith(process.cwd())) { | |
resource.request = resource.request.replace( | |
/^\.\/clients\/SockJSClient$/, | |
'../clients/SockJSClient' | |
); | |
} | |
} | |
), |
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.
Let me remove the console.error
for now, since it did not exist before and we won't introduce anything new in console output.
/cc @hiroppy |
For Bugs and Features; did you add new tests?
Yes
Motivation / Use-Case
ClientOptions.test.js
Client.test.js
andProgress.test.js
could potentially write to the samemain.css
, so I split their tests to use two different configsBreaking Changes
None
Additional Info