Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-43217

Closing pipeline results "modal" after clicking on a stage sets the url incorrectly to the previous URL, not activity

    • Blue Ocean 1.0-rc4, Blue Ocean - 1.1-beta-1

      Closing the modal results screen always closes it, but the URI sometimes has an incorrect path. The side effect of this is if you click on anywhere else, you get a full page reload. 

       

      To reproduce: 

      • Open a pipeline finished run - note the URI (call that URI A)
      • Click on any stage - note the URI changes with the stage id (call that URI B)
      • Close the modal
      • Note that screen shows activity (where you originally came from) BUT the URI == URI A
      • Click on branches/activity and note you get a page reload

      It should show /activity or wherever it came from. It shouldn't just go back on item in the history. 

       

      In Scope: 

      • Fix
      • Unit or ATH test to ensure that the close actually restores the correct URI

       

      Perhaps this is best done with a change - don't use path to set stage ids, use a query parameter, that way "back" will go back to the correct place. Or close needs to push the history to where it remembers it originally came from... I dunno. Maybe the 2nd amendment people can do something about that, I don't know. FAKE NEWS.

          [JENKINS-43217] Closing pipeline results "modal" after clicking on a stage sets the url incorrectly to the previous URL, not activity

          Cliff Meyers added a comment -

          This also occurs if the user clicks on any tabs after opening the modal and then closes it.

          Be advised that in addition to the "full page reload after click" problem, the DOM shown in the browser is a snapshot that is "disconnected" from React and MobX, and therefore won't update in real time.

          I might suggest upgrading the priority of this bug.

          Cliff Meyers added a comment - This also occurs if the user clicks on any tabs after opening the modal and then closes it. Be advised that in addition to the "full page reload after click" problem, the DOM shown in the browser is a snapshot that is "disconnected" from React and MobX, and therefore won't update in real time. I might suggest upgrading the priority of this bug.

          Michael Neale added a comment -

          cliffmeyers ah nice one - want to pick this one up at some point? If you think this warrants an ATH - go for it. I think it is subtle enough that people either don't see it, or what they do after closing it, means that it doesn't affect them anyway (other than a blink-reload), or we would have heard more. As it is subtle though, it may generate some confusion but not enough for people to open a ticket. I only saw it as Thor and I were reviewing the latest karaoke changes. 

           

          I will bump it up. 

          Michael Neale added a comment - cliffmeyers ah nice one - want to pick this one up at some point? If you think this warrants an ATH - go for it. I think it is subtle enough that people either don't see it, or what they do after closing it, means that it doesn't affect them anyway (other than a blink-reload), or we would have heard more. As it is subtle though, it may generate some confusion but not enough for people to open a ticket. I only saw it as Thor and I were reviewing the latest karaoke changes.    I will bump it up. 

          Code changed in jenkins
          User: Cliff Meyers
          Path:
          src/main/js/custom_commands/index.js
          src/main/js/custom_commands/waitForLocationChange.js
          src/main/js/custom_commands/waitForLocationContains.js
          src/main/js/page_objects/blueocean/bluePipelineRunDetail.js
          src/test/js/edgeCases/runDetailsDeepLink.js
          src/test/js/runDetailsModal/runDetailsFallbackNavigation.js
          src/test/resources/test_scripts/hello-world.groovy
          http://jenkins-ci.org/commit/blueocean-acceptance-test/49e8845912961e76e3cb7518c46a348419e3dfda
          Log:
          JENKINS-43217 rewrite waitForLocationChange -> waitForLocationContains so it doesn't require the URL to actually change, as it could be brittle due to timing issues; rework "closeModal" page object command to just wait for the RunDetails-content element to go away; refactor the "runDetailsDeepLink" test to "runDetailsFallbackNavigation" and adjust to new API

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Cliff Meyers Path: src/main/js/custom_commands/index.js src/main/js/custom_commands/waitForLocationChange.js src/main/js/custom_commands/waitForLocationContains.js src/main/js/page_objects/blueocean/bluePipelineRunDetail.js src/test/js/edgeCases/runDetailsDeepLink.js src/test/js/runDetailsModal/runDetailsFallbackNavigation.js src/test/resources/test_scripts/hello-world.groovy http://jenkins-ci.org/commit/blueocean-acceptance-test/49e8845912961e76e3cb7518c46a348419e3dfda Log: JENKINS-43217 rewrite waitForLocationChange -> waitForLocationContains so it doesn't require the URL to actually change, as it could be brittle due to timing issues; rework "closeModal" page object command to just wait for the RunDetails-content element to go away; refactor the "runDetailsDeepLink" test to "runDetailsFallbackNavigation" and adjust to new API

          Code changed in jenkins
          User: Cliff Meyers
          Path:
          src/main/js/custom_commands/index.js
          src/main/js/custom_commands/waitForLocationChange.js
          src/main/js/custom_commands/waitForLocationContains.js
          src/main/js/page_objects/blueocean/bluePipelineRunDetail.js
          src/test/js/edgeCases/runDetailsDeepLink.js
          src/test/js/runDetailsModal/runDetailsFallbackNavigation.js
          src/test/resources/test_scripts/hello-world.groovy
          http://jenkins-ci.org/commit/blueocean-acceptance-test/2c3845dee290443631d6626a13d3ca7b1a853cd7
          Log:
          JENKINS-43217 rewrite waitForLocationChange -> waitForLocationContains so it doesn't require the URL to actually change, as it could be brittle due to timing issues; rework "closeModal" page object command to just wait for the RunDetails-content element to go away; refactor the "runDetailsDeepLink" test to "runDetailsFallbackNavigation" and adjust to new API (#132)

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Cliff Meyers Path: src/main/js/custom_commands/index.js src/main/js/custom_commands/waitForLocationChange.js src/main/js/custom_commands/waitForLocationContains.js src/main/js/page_objects/blueocean/bluePipelineRunDetail.js src/test/js/edgeCases/runDetailsDeepLink.js src/test/js/runDetailsModal/runDetailsFallbackNavigation.js src/test/resources/test_scripts/hello-world.groovy http://jenkins-ci.org/commit/blueocean-acceptance-test/2c3845dee290443631d6626a13d3ca7b1a853cd7 Log: JENKINS-43217 rewrite waitForLocationChange -> waitForLocationContains so it doesn't require the URL to actually change, as it could be brittle due to timing issues; rework "closeModal" page object command to just wait for the RunDetails-content element to go away; refactor the "runDetailsDeepLink" test to "runDetailsFallbackNavigation" and adjust to new API (#132)

          Code changed in jenkins
          User: Cliff Meyers
          Path:
          src/main/js/page_objects/blueocean/bluePipelineRunDetail.js
          src/test/js/runDetailsModal/runDetailsBackwardsNavigation.js
          http://jenkins-ci.org/commit/blueocean-acceptance-test/23e500a16a9adb4f28c4c6388b35fec596547416
          Log:
          JENKINS-43217 add a test case that ensures that navigating within run details and closing redirects back to the right URL

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Cliff Meyers Path: src/main/js/page_objects/blueocean/bluePipelineRunDetail.js src/test/js/runDetailsModal/runDetailsBackwardsNavigation.js http://jenkins-ci.org/commit/blueocean-acceptance-test/23e500a16a9adb4f28c4c6388b35fec596547416 Log: JENKINS-43217 add a test case that ensures that navigating within run details and closing redirects back to the right URL

          Code changed in jenkins
          User: Cliff Meyers
          Path:
          src/test/js/runDetailsModal/runDetailsBackwardsNavigation.js
          http://jenkins-ci.org/commit/blueocean-acceptance-test/55b26d530f10e21249fda2313532da7158ea0165
          Log:
          JENKINS-43217 make the steps more discrete

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Cliff Meyers Path: src/test/js/runDetailsModal/runDetailsBackwardsNavigation.js http://jenkins-ci.org/commit/blueocean-acceptance-test/55b26d530f10e21249fda2313532da7158ea0165 Log: JENKINS-43217 make the steps more discrete

          Code changed in jenkins
          User: Cliff Meyers
          Path:
          http://jenkins-ci.org/commit/blueocean-acceptance-test/fdcdaa4d9b0bad38a786455c97526dcc5d6aa64b
          Log:
          Merge branch 'master' into bug/JENKINS-43217-run-details-modal-madness

          Compare: https://github.com/jenkinsci/blueocean-acceptance-test/compare/23e500a16a9a^...fdcdaa4d9b0b

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Cliff Meyers Path: http://jenkins-ci.org/commit/blueocean-acceptance-test/fdcdaa4d9b0bad38a786455c97526dcc5d6aa64b Log: Merge branch 'master' into bug/ JENKINS-43217 -run-details-modal-madness Compare: https://github.com/jenkinsci/blueocean-acceptance-test/compare/23e500a16a9a ^...fdcdaa4d9b0b

          Code changed in jenkins
          User: Cliff Meyers
          Path:
          src/test/js/runDetailsModal/runDetailsBackwardsNavigation.js
          http://jenkins-ci.org/commit/blueocean-acceptance-test/922c8bd3fdfb81bc6180be519d099b2203acca2f
          Log:
          JENKINS-43217 better description for last step

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Cliff Meyers Path: src/test/js/runDetailsModal/runDetailsBackwardsNavigation.js http://jenkins-ci.org/commit/blueocean-acceptance-test/922c8bd3fdfb81bc6180be519d099b2203acca2f Log: JENKINS-43217 better description for last step

          Cliff Meyers added a comment - PR's: https://github.com/jenkinsci/blueocean-plugin/pull/935 https://github.com/jenkinsci/blueocean-acceptance-test/pull/133/files

          Code changed in jenkins
          User: Cliff Meyers
          Path:
          src/main/js/page_objects/blueocean/bluePipelineRunDetail.js
          src/test/js/runDetailsModal/runDetailsBackwardsNavigation.js
          http://jenkins-ci.org/commit/blueocean-acceptance-test/0354987e434201b6c485e5f1e1fe9fb799df546d
          Log:
          Bug/jenkins 43217 run details modal madness (#133)

          • JENKINS-43217 rewrite waitForLocationChange -> waitForLocationContains so it doesn't require the URL to actually change, as it could be brittle due to timing issues; rework "closeModal" page object command to just wait for the RunDetails-content element to go away; refactor the "runDetailsDeepLink" test to "runDetailsFallbackNavigation" and adjust to new API
          • JENKINS-43217 add a test case that ensures that navigating within run details and closing redirects back to the right URL

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Cliff Meyers Path: src/main/js/page_objects/blueocean/bluePipelineRunDetail.js src/test/js/runDetailsModal/runDetailsBackwardsNavigation.js http://jenkins-ci.org/commit/blueocean-acceptance-test/0354987e434201b6c485e5f1e1fe9fb799df546d Log: Bug/jenkins 43217 run details modal madness (#133) JENKINS-43217 rewrite waitForLocationChange -> waitForLocationContains so it doesn't require the URL to actually change, as it could be brittle due to timing issues; rework "closeModal" page object command to just wait for the RunDetails-content element to go away; refactor the "runDetailsDeepLink" test to "runDetailsFallbackNavigation" and adjust to new API JENKINS-43217 add a test case that ensures that navigating within run details and closing redirects back to the right URL JENKINS-43217 make the steps more discrete JENKINS-43217 better description for last step

            cliffmeyers Cliff Meyers
            michaelneale Michael Neale
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: