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

test(SSR e2e): re-enable test "should receive response with status 500 if HTTP error occurred when calling other than cms/pages API URL" #19331

Merged
merged 11 commits into from
Oct 4, 2024

Conversation

Platonn
Copy link
Contributor

@Platonn Platonn commented Oct 3, 2024

Note: the change of the intercepted API URL cms/pages to cms/components is not the fix of the flakiness.
It's simply reverting an accidental change that was made in the very recent PR - see https://github.com/SAP/spartacus/pull/19307/files?w=1#diff-799b5da094cfd6cc4192ea13d66afac3f264e0502fe21893c3c4e04f024fae45R73 (change from cms/components to cms/pages). This accidental change wasn't spotted before, because this test used to be skipped.

Now we're un-skipping it.

The flakiness could have been fix by the PR #19307, which introduced a new way of intercepting requests - responseInterceptor (instead of the old callback).

I've re-run this test 20+ times on local and it passes.

closes https://jira.tools.sap/browse/CXSPA-8570

…0 if HTTP error occurred when calling other than cms/pages API URL"
@Platonn Platonn marked this pull request as ready for review October 3, 2024 12:28
@Platonn Platonn requested a review from a team as a code owner October 3, 2024 12:28
@github-actions github-actions bot marked this pull request as draft October 3, 2024 13:25
@Platonn Platonn marked this pull request as ready for review October 3, 2024 13:26
Copy link

cypress bot commented Oct 3, 2024

spartacus    Run #45135

Run Properties:  status check passed Passed #45135  •  git commit 5d61fb06c4: refactor: reuse `surroundingLinesRadius` variable
Project spartacus
Branch Review feature/CXSPA-8570
Run status status check passed Passed #45135
Run duration 57m 22s
Commit git commit 5d61fb06c4: refactor: reuse `surroundingLinesRadius` variable
Committer Krzysztof Platis
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 3
Tests that did not run due to a developer annotating a test with .skip  Pending 22
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 805
⚠️ You've recorded test results over your free plan limit.
Upgrade your plan to view test results.
View all changes introduced in this branch ↗︎

…in logs. And provide more context about the problem with parsing
@github-actions github-actions bot marked this pull request as draft October 3, 2024 14:32
@Platonn Platonn marked this pull request as ready for review October 3, 2024 14:34
Copy link

cypress bot commented Oct 3, 2024

spartacus    Run #45132

Run Properties:  status check passed Passed #45132  •  git commit dcaae57d40 ℹ️: Merge 5d61fb06c496aefaa77074fdeb29a35e8eb89d8e into 23b72bb0749577b194d3a53c18fe...
Project spartacus
Branch Review feature/CXSPA-8570
Run status status check passed Passed #45132
Run duration 12m 05s
Commit git commit dcaae57d40 ℹ️: Merge 5d61fb06c496aefaa77074fdeb29a35e8eb89d8e into 23b72bb0749577b194d3a53c18fe...
Committer Krzysztof Platis
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 3
Tests that did not run due to a developer annotating a test with .skip  Pending 2
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 125
⚠️ You've recorded test results over your free plan limit.
Upgrade your plan to view test results.
View all changes introduced in this branch ↗︎

@github-actions github-actions bot marked this pull request as draft October 3, 2024 15:37
@Platonn Platonn marked this pull request as ready for review October 3, 2024 15:40
function validateJsonsInLogs(logs: string[]): void {
logs.forEach((text) => {
if (text.charAt(0) === '{') {
function validateJsonsInLogs(rawLogs: string[]): void {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium: Can you provide steps to verify the warning locally? Btw. the SSR testing framework is getting more complex and maybe we should consider covering by testing at least the most crucial parts of utils

Copy link
Contributor Author

@Platonn Platonn Oct 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question.
After rethinking, I believe we shouldn't validate logs in runtime of tests to detect if the app is built in dev mode. But instead we should check if the app is built in prod mode, before running the tests.
So I reverted changes to logs validation made in this PR.
And in this PR I'm leaving only the un-skip of the test.

Created a separate PR for checking if app is built in prod mode: #19334

… proxy backend before running tests. Previously we were checking the app's behavior in the runtime of tests, checking its symptoms of running in dev mode.
@github-actions github-actions bot marked this pull request as draft October 4, 2024 09:41
@Platonn
Copy link
Contributor Author

Platonn commented Oct 4, 2024

Full pipeline run, with SSR Tests: https://github.com/SAP/spartacus/actions/runs/11181040768

@pawelfras pawelfras marked this pull request as ready for review October 4, 2024 14:20
Copy link
Contributor

@pawelfras pawelfras left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

QA done.

@Platonn Platonn merged commit a6f91eb into develop Oct 4, 2024
35 of 37 checks passed
@Platonn Platonn deleted the feature/CXSPA-8570 branch October 4, 2024 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants