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

Improve error reporting in containers e2e test #7276

Closed
odockal opened this issue May 22, 2024 · 1 comment
Closed

Improve error reporting in containers e2e test #7276

odockal opened this issue May 22, 2024 · 1 comment
Assignees
Labels
area/tests 🚦 kind/enhancement ✨ Issue for requesting an improvement

Comments

@odockal
Copy link
Contributor

odockal commented May 22, 2024

Is your enhancement related to a problem? Please describe

We have this example of the failed test case in containers-smoke.spec.ts:

 ⎯⎯⎯⎯⎯⎯⎯ Failed Tests 4 ⎯⎯⎯⎯⎯⎯⎯

 FAIL  tests/playwright/src/specs/container-smoke.spec.ts > Verification of container creation workflow > Start a container 'alpine-container'
Error: expect(received).toBeTruthy()

Received: false

Call Log:
- Timeout 10000ms exceeded while waiting on the predicate
 ❯ pollMatcher node_modules/playwright/lib/matchers/expect.js:255:11
 ❯ tests/playwright/src/specs/container-smoke.spec.ts:105:5
    103|     await pdRunner.screenshot('containers-run-image.png');
    104|     const containers = await runImage.startContainer(containerToRun);
    105|     await playExpect
       |     ^
    106|       .poll(async () => await containers.containerExists(containerToRu…
    107|       .toBeTruthy();

We know that the container creation was not successful. although, there is an error message showed after "Start container" button was pressed which has more information as of why the action failed.

Describe the solution you'd like

Handle the error message and show it in the assertion if test case fails so it is immediately visible in the test log.

Describe alternatives you've considered

No response

Additional context

No response

@odockal
Copy link
Contributor Author

odockal commented May 28, 2024

Fixed by #7283

@odockal odockal closed this as completed May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/tests 🚦 kind/enhancement ✨ Issue for requesting an improvement
Projects
Archived in project
Development

No branches or pull requests

1 participant