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

[RHOAIENG-10454] mock cypress test flake: pipelines.cy.ts 'imports a new pipeline' #3036

Merged
merged 1 commit into from
Jul 29, 2024

Conversation

jpuzz0
Copy link
Contributor

@jpuzz0 jpuzz0 commented Jul 26, 2024

RHOAIENG-10454

Description

The reloading of pipelines after uploading a new pipeline in the 2 tests updated here was causing the page to reload and in some cases that reload would impede on the redirect to the pipeline details page.

Test Impact

2 cypress tests were updated to address the issue

Request review criteria:

Self checklist (all need to be checked):

  • The developer has manually tested the changes and verified that the changes work
  • Commits have been squashed into descriptive, self-contained units of work (e.g. 'WIP' and 'Implements feedback' style messages have been removed)
  • Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
  • The developer has added tests or explained why testing cannot be added (unit or cypress tests for related changes)

If you have UI changes:

  • Included any necessary screenshots or gifs if it was a UI change.
  • Included tags to the UX team if it was a UI/UX change.

After the PR is posted & before it merges:

  • The developer has tested their solution on a cluster by using the image produced by the PR to main

Copy link
Member

@Gkrumbach07 Gkrumbach07 left a comment

Choose a reason for hiding this comment

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

/lgtm

@christianvogt christianvogt added the do-not-merge/hold This PR is hold for some reason label Jul 26, 2024
@christianvogt
Copy link
Contributor

@jpuzz0 The test still ends on the table and not the details page, although now without waiting for the refresh, we don't see the new entry.
image

When running locally, the browser navigates very briefly to the details page before redirecting back to the table.

I suspect that this will continue to be a flakey test.

Why is the final page not the details page?

@christianvogt christianvogt removed the do-not-merge/hold This PR is hold for some reason label Jul 26, 2024
@jpuzz0
Copy link
Contributor Author

jpuzz0 commented Jul 26, 2024

@christianvogt

Every time I upload a pipeline via url or yaml in dev, I see the redirect happen, and I've run these 2 tests successfully locally ~10 times in a row, and I am seeing a redirect happen right after the upload for both, why the page lands on the table page is because we have a redirect setup to where if the newly created version associated with the version ID in the URL is not fetched, we move the user back to the list table.

Since the expectation is that the page redirects and not that the new resource exists in the table, that new resource showing in the table shouldn't matter IMO as the user wouldn't see that until navigating back to the list page anyways.

@christianvogt
Copy link
Contributor

Agreed that we do not need to wait for the refresh to return. However the test should end on the details page if that's the next page to be asserted. It's still a race condition but now has a smaller chance to occur.

@jpuzz0
Copy link
Contributor Author

jpuzz0 commented Jul 26, 2024

Agreed that we do not need to wait for the refresh to return. However the test should end on the details page if that's the next page to be asserted. It's still a race condition but now has a smaller chance to occur.

@christianvogt should be updated now. Both of these tests land on the pipeline details page now and do not redirect afterwards.

@christianvogt
Copy link
Contributor

Ran locally to confirm tests pass and land now on the correct page.

/lgtm
/approve

Copy link
Contributor

openshift-ci bot commented Jul 26, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: christianvogt, Gkrumbach07

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link
Contributor

openshift-ci bot commented Jul 26, 2024

New changes are detected. LGTM label has been removed.

@jpuzz0 jpuzz0 added the lgtm label Jul 29, 2024
@openshift-merge-bot openshift-merge-bot bot merged commit 1db9c9c into opendatahub-io:main Jul 29, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants