Skip to content

Flaky test: EuiGlobalToastList lifetime elapse #1999

@thompsongl

Description

@thompsongl

Had one-off CI failures here a couple times this week. Noting for possible fix in the future

e.g., https://kibana-ci.elastic.co/job/elastic-eui-pull-request/11/console

09:23:02 Summary of all failing tests
09:23:02 FAIL src/components/toast/global_toast_list.test.js
09:23:02   ● EuiGlobalToastList › props › dismissToast › is called when the toast lifetime elapses
09:23:02 
09:23:02     expect(received).toBe(expected) // Object.is equality
09:23:02 
09:23:02     Expected: true
09:23:02     Received: false
09:23:02 
09:23:02       87 |             toasts={[
09:23:02       88 |               {
09:23:02     > 89 |                 'data-test-subj': 'b',
09:23:02          |                                       ^
09:23:02       90 |                 id: 'b',
09:23:02       91 |               },
09:23:02       92 |             ]}
09:23:02 
09:23:02       at src/components/toast/global_toast_list.test.js:89:42
09:23:02       at Timeout.callback [as _onTimeout] (node_modules/jsdom/lib/jsdom/browser/Window.js:633:19)
09:23:02 
09:23:02   ● EuiGlobalToastList › props › dismissToast › is called when the toast lifetime elapses
09:23:02 
09:23:02     Error: Uncaught [Error: expect(received).toBe(expected) // Object.is equality
09:23:02 
09:23:02     Expected: true
09:23:02     Received: false]
09:23:02 
09:23:02       2 | // failed prop types check.
09:23:02       3 | console.error = message => {
09:23:02     > 4 |   throw new Error(message);
09:23:02         |         ^
09:23:02       5 | };
09:23:02       6 | 
09:23:02 
09:23:02       at reportException (node_modules/jsdom/lib/jsdom/living/helpers/runtime-script-errors.js:66:24)
09:23:02       at Timeout.callback [as _onTimeout] (node_modules/jsdom/lib/jsdom/browser/Window.js:635:7)
09:23:02       at BufferedConsole.Object.<anonymous>.console.error (scripts/jest/setup/throw_on_console_error.js:4:9)
09:23:02       at VirtualConsole.on.e (node_modules/jsdom/lib/jsdom/virtual-console.js:29:45)
09:23:02       at reportException (node_modules/jsdom/lib/jsdom/living/helpers/runtime-script-errors.js:70:28)
09:23:02       at Timeout.callback [as _onTimeout] (node_modules/jsdom/lib/jsdom/browser/Window.js:635:7)

Metadata

Metadata

Assignees

No one assigned

    Labels

    testingIssues or PRs that only affect tests - will not need changelog entries

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions