-
Notifications
You must be signed in to change notification settings - Fork 130
Closed
Description
This could be due to failing to wait long enough for async tests...?
In #669, all of these three tests failed, but then all passed on re-running:
>> Expected 2 to be 20. Error: Expected 2 to be 20.
>> at <Jasmine>
>> at UserContext.<anonymous> (file:///home/runner/work/PublicLab.Editor/PublicLab.Editor/spec/javascripts/history_spec.js:94:40)
>> at <Jasmine>
Then:
>> Expected undefined not to be undefined. Error: Expected undefined not to be undefined.
>> at <Jasmine>
>> at UserContext.<anonymous> (file:///home/runner/work/PublicLab.Editor/PublicLab.Editor/spec/javascripts/editor_spec.js:14:39)
>> at <Jasmine>
Expected <textarea class="ple-textarea form-control">...</textarea> to be undefined. (2)
>> Expected <textarea class="ple-textarea form-control">...</textarea> to be undefined. Error: Expected <textarea class="ple-textarea form-control">...</textarea> to be undefined.
>> at <Jasmine>
>> at UserContext.<anonymous> (file:///home/runner/work/PublicLab.Editor/PublicLab.Editor/spec/javascripts/editor_spec.js:17:37)
>> at <Jasmine>
And in Jest:
FAIL test/ui-testing/CustomInsert.test.js (5.961 s)
Custom Insert text
✕ Add Custom Insert text in rich text mode (4 ms)
● Custom Insert text › Add Custom Insert text in rich text mode
Timeout - Async callback was not invoked within the 5000 ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 5000 ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:27:45)
● Custom Insert text › Add Custom Insert text in rich text mode
Evaluation failed: ReferenceError: $ is not defined
at __puppeteer_evaluation_script__:1:37
at ExecutionContext._evaluateInternal (node_modules/puppeteer/lib/ExecutionContext.js:122:13)
at ExecutionContext.evaluate (node_modules/puppeteer/lib/ExecutionContext.js:48:12)
at Object.<anonymous> (test/ui-testing/CustomInsert.test.js:10:9)
-- ASYNC --
at ExecutionContext.<anonymous> (node_modules/puppeteer/lib/helper.js:111:15)
at DOMWorld.evaluate (node_modules/puppeteer/lib/DOMWorld.js:112:20)
-- ASYNC --
at Frame.<anonymous> (node_modules/puppeteer/lib/helper.js:111:15)
at Page.evaluate (node_modules/puppeteer/lib/Page.js:860:43)
at Page.evaluate (node_modules/puppeteer/lib/helper.js:112:23)
at Object.<anonymous> (test/ui-testing/CustomInsert.test.js:10:20)
(node:2652) UnhandledPromiseRejectionWarning: Error: Navigation failed because browser has disconnected!
Reactions are currently unavailable