Skip to content
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

CHT-form integration tests fail with unrelated error #9729

Open
dianabarsan opened this issue Jan 7, 2025 · 0 comments
Open

CHT-form integration tests fail with unrelated error #9729

dianabarsan opened this issue Jan 7, 2025 · 0 comments
Labels
Testing Affects how the code is tested Type: Bug Fix something that isn't working as intended

Comments

@dianabarsan
Copy link
Member

dianabarsan commented Jan 7, 2025

Describe the bug
A recent change caused cht-form integration tests to fail, however there no information about why the test fails, because this is covered by callback style implementation details, where all failing tests report that done was called multiple times.

Example run: https://github.com/medic/cht-core/actions/runs/12637681217/job/35213197636?pr=9727

Expected behavior
Tests should report why they fail.

Logs

[chrome 131.0.6778.139 linux #0-18] Running: chrome (v131.0.6778.139) on linux
[chrome 131.0.6778.139 linux #0-18] Session ID: 300c11e4571772b9d03c96b42d06bbb1
[chrome 131.0.6778.139 linux #0-18]
[chrome 131.0.6778.139 linux #0-18] » /tests/integration/cht-form/default/undo-death-report.wdio-spec.js
[chrome 131.0.6778.139 linux #0-18] cht-form web component - Undo Death Report Form
[chrome 131.0.6778.139 linux #0-18]    ✖ should submit an undo death report (5 retries)
[chrome 131.0.6778.139 linux #0-18]
[chrome 131.0.6778.139 linux #0-18] 7 failing (2.5s)
[chrome 131.0.6778.139 linux #0-18]
[chrome 131.0.6778.139 linux #0-18] 1) cht-form web component - Undo Death Report Form should submit an undo death report
[chrome 131.0.6778.139 linux #0-18] done() called multiple times in test <cht-form web component - Undo Death Report Form should submit an undo death report> of file /home/runner/work/cht-core/cht-core/tests/integration/cht-form/default/undo-death-report.wdio-spec.js
[chrome 131.0.6778.139 linux #0-18] Error: done() called multiple times in test <cht-form web component - Undo Death Report Form should submit an undo death report> of file /home/runner/work/cht-core/cht-core/tests/integration/cht-form/default/undo-death-report.wdio-spec.js
[chrome 131.0.6778.139 linux #0-18]     at createMultipleDoneError (/home/runner/work/cht-core/cht-core/node_modules/mocha/lib/errors.js:428:13)
[chrome 131.0.6778.139 linux #0-18]     at multiple (/home/runner/work/cht-core/cht-core/node_modules/mocha/lib/runnable.js:288:24)
[chrome 131.0.6778.139 linux #0-18]     at done (/home/runner/work/cht-core/cht-core/node_modules/mocha/lib/runnable.js:299:14)
[chrome 131.0.6778.139 linux #0-18]     at /home/runner/work/cht-core/cht-core/node_modules/mocha/lib/runnable.js:369:11
[chrome 131.0.6778.139 linux #0-18]     at processTicksAndRejections (node:internal/process/task_queues:105:5)

This is caused by us forcing a test failure because there are browser logs here:

test.callback(new Error(`Browser console logs are not empty: ${logs.join('\n')}`));

@dianabarsan dianabarsan added Testing Affects how the code is tested Type: Bug Fix something that isn't working as intended labels Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Testing Affects how the code is tested Type: Bug Fix something that isn't working as intended
Projects
None yet
Development

No branches or pull requests

1 participant