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

Regression: core-js config.js forces to have windows.location

    XMLWordPrintable

Details

    • Blue Ocean 1.4 - beta 1

    Description

      https://github.com/jenkinsci/blueocean-plugin/blame/release/1.3/blueocean-core-js/src/js/config.js#L13

      (window.location.href.split('?')[1] || '').split('&')
      

      window.location in unit testing is normally undefined and can be until href.

      our unit tests are failing now with

      /home/thorsten/opt/src/cloudbees/operations-center-all/bluesteel/bluesteel-cjoc/node_modules/@jenkins-cd/blueocean-core-js/dist/js/config.js:19
      (window.location.href.split('?')[1] || '').split('&').forEach(function (p) {
                      ^
      
      TypeError: Cannot read property 'href' of undefined
          at Object.<anonymous> (/source/js/config.js:13:2)
      

      Attachments

        Activity

          tscherler Thorsten Scherler created issue -
          tscherler Thorsten Scherler made changes -
          Field Original Value New Value
          Assignee Thorsten Scherler [ tscherler ]
          jamesdumay James Dumay made changes -
          Epic Link JENKINS-35749 [ 171790 ]
          jamesdumay James Dumay made changes -
          Sprint Blue Ocean 1.4 - beta 1 [ 401 ]
          michaelneale Michael Neale made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          michaelneale Michael Neale made changes -
          Resolution Fixed [ 1 ]
          Status In Progress [ 3 ] Resolved [ 5 ]
          kshultz Karl Shultz made changes -
          Labels cloudbees-internal-steel cloudbees-internal-steel testing-notes-not-applicable
          jbriden Jenn Briden made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

          People

            tscherler Thorsten Scherler
            tscherler Thorsten Scherler
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: