Skip to content
This repository has been archived by the owner on Jan 4, 2023. It is now read-only.

Bug/jenkins 40662 run details close problem #93

Merged
merged 5 commits into from Jan 9, 2017

Conversation

cliffmeyers
Copy link
Contributor

@cliffmeyers cliffmeyers commented Jan 3, 2017

Description

  • Add a regression test for the scenario when a user deep-links to run details with no tab specified in the URL.
  • Added a new "waitForLocationChange" custom command that polls for a URL change and only allows the actions to proceed once it changes. Important for things like closing the modal that trigger an async location change
  • See JENKINS-40662.

Submitter checklist

  • Link to JIRA ticket in description, if appropriate.
  • Change is code complete and matches issue description
  • Reviewer's manual test instructions provided in PR description. See Reviewer's first task below.
  • Ran Acceptance Test Harness against PR changes.

Reviewer checklist

  • Run the changes and verified the change matches the issue description
  • Reviewed the code
  • Verified that the appropriate tests have been written or valid explanation given

@reviewbybees

Cliff Meyers added 3 commits January 3, 2017 15:55
…etails in the URL form of :org/:pipeline/:branch/:runId and the modal doesn't close properly
…e the modal is closed as this will ensure downstream actions occur after the navigation is completed
@ghost
Copy link

ghost commented Jan 3, 2017

This pull request originates from a CloudBees employee. At CloudBees, we require that all pull requests be reviewed by other CloudBees employees before we seek to have the change accepted. If you want to learn more about our process please see this explanation.

const blueActivityPage = browser.page.bluePipelineActivity().forJob(jobName, 'jenkins');
blueActivityPage.waitForRunRunningVisible(jobName + '-1');
const blueRunDetailPage = browser.page.bluePipelineRunDetail().forRun(jobName, 'jenkins', 1);
blueRunDetailPage.closeModal('/activity');
Copy link
Collaborator

Choose a reason for hiding this comment

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

@cliffmeyers you need to wait until the run is finished otherwise this can lead to flaky tests 🐛

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@scherler closing the modal while the job is running can lead to a flaky test? Can you explain why?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed in 00843f0

Copy link
Collaborator

@scherler scherler left a comment

Choose a reason for hiding this comment

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

@cliffmeyers no not that. You do not finished the test with waitForJobEnd (or similar) that can lead to suprises

@@ -0,0 +1,60 @@
/**
* @module waitForLocationChange
* @memberof custom_commands
Copy link
Collaborator

Choose a reason for hiding this comment

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

You have to add this to the index in the comment for documentation reasons 🐜

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed in 136d786

Copy link
Collaborator

@scherler scherler left a comment

Choose a reason for hiding this comment

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

BTW you can as well switch line 36 and 37 if that better suite your case. The important is to have the command somewhere in your code. Thanks

@cliffmeyers cliffmeyers merged commit 6d1b816 into master Jan 9, 2017
@cliffmeyers cliffmeyers deleted the bug/JENKINS-40662-run-details-close-problem branch January 9, 2017 18:24
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
2 participants