Skip to content

Flaky e2e test: User with contact should quit training in modal, and be able to complete it later in the Training Material page, verify completed trainings display in the list #10564

@dianabarsan

Description

@dianabarsan

Describe the issue
Example run: https://github.com/medic/cht-core/actions/runs/20972062042/job/60279335217?pr=10563

Error:

[chrome 143.0.7499.169 linux #0-19]     User with contact
[chrome 143.0.7499.169 linux #0-19]        ✖ should quit training in modal, and be able to complete it later in the Training Material page, verify completed trainings display in the list (5x retries)
[chrome 143.0.7499.169 linux #0-19]        ✖ should revisit completed trainings and load uncompleted trainings (5x retries)
[chrome 143.0.7499.169 linux #0-19]
[chrome 143.0.7499.169 linux #0-19] 1 passing (1m 58.2s)
[chrome 143.0.7499.169 linux #0-19] 2 failing
[chrome 143.0.7499.169 linux #0-19]
[chrome 143.0.7499.169 linux #0-19] 1) User with contact should quit training in modal, and be able to complete it later in the Training Material page, verify completed trainings display in the list
[chrome 143.0.7499.169 linux #0-19] element ("#training-cards-form") still not displayed after 15000ms
[chrome 143.0.7499.169 linux #0-19] Error: element ("#training-cards-form") still not displayed after 15000ms
[chrome 143.0.7499.169 linux #0-19]     at async Object.waitForTrainingCards (/home/runner/work/cht-core/cht-core/tests/page-objects/default/enketo/training-cards.wdio.page.js:18:3)
[chrome 143.0.7499.169 linux #0-19]     at async Context.<anonymous> (/home/runner/work/cht-core/cht-core/tests/e2e/default/training-materials/training-materials.wdio-spec.js:95:7)
[chrome 143.0.7499.169 linux #0-19]
[chrome 143.0.7499.169 linux #0-19] 2) User with contact should revisit completed trainings and load uncompleted trainings
[chrome 143.0.7499.169 linux #0-19] expected false to be true      
      actual expected
      
      falsetrue
      
[chrome 143.0.7499.169 linux #0-19] AssertionError: expected false to be true
[chrome 143.0.7499.169 linux #0-19]     at Context.<anonymous> (/home/runner/work/cht-core/cht-core/tests/e2e/default/training-materials/training-materials.wdio-spec.js:149:82)

Screenshot:

Image

Describe the improvement you'd like
Stabilize the test.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FlakyIndicates a flaky or unreliable testTestingAffects how the code is testedType: Technical issueImprove something that users won't notice

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions