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

Properly pass context in folder's page objects

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Let's describe the issue with a test. Assumming we already have an injector and a JenkinsController, the following test will fail:

      Jenkins j1 = new Jenkins(injector, jenkinsController);
      FolderItem f = j1.jobs.create(FolderItem.class);
      Assert.assertSame(j1, f.jobs.getJenkins());
      

      The problem reproduced is the same described in JENKINS-37615, but specific to {{FolderItem}}s, since they are not properly receiving their context when created.

        Attachments

          Issue Links

            Activity

            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Manuel Franco
            Path:
            src/main/java/org/jenkinsci/test/acceptance/po/FolderItem.java
            src/main/java/org/jenkinsci/test/acceptance/po/Job.java
            src/main/java/org/jenkinsci/test/acceptance/po/JobsMixIn.java
            src/main/java/org/jenkinsci/test/acceptance/po/PageObject.java
            src/main/java/org/jenkinsci/test/acceptance/po/TopLevelItem.java
            http://jenkins-ci.org/commit/acceptance-test-harness/7454e7762a9fe63e6d2e7761b3cf6c090d869311
            Log:
            JENKINS-38058 pass context when creating 'FolderItem' objects

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Manuel Franco Path: src/main/java/org/jenkinsci/test/acceptance/po/FolderItem.java src/main/java/org/jenkinsci/test/acceptance/po/Job.java src/main/java/org/jenkinsci/test/acceptance/po/JobsMixIn.java src/main/java/org/jenkinsci/test/acceptance/po/PageObject.java src/main/java/org/jenkinsci/test/acceptance/po/TopLevelItem.java http://jenkins-ci.org/commit/acceptance-test-harness/7454e7762a9fe63e6d2e7761b3cf6c090d869311 Log: JENKINS-38058 pass context when creating 'FolderItem' objects
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Manuel Franco
            Path:
            src/main/java/org/jenkinsci/test/acceptance/po/JobsMixIn.java
            http://jenkins-ci.org/commit/acceptance-test-harness/b26cce4360c36228d60393a2d3a4ce8d06497b66
            Log:
            JENKINS-38058 explicit check for constructor existence

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Manuel Franco Path: src/main/java/org/jenkinsci/test/acceptance/po/JobsMixIn.java http://jenkins-ci.org/commit/acceptance-test-harness/b26cce4360c36228d60393a2d3a4ce8d06497b66 Log: JENKINS-38058 explicit check for constructor existence
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Oliver Gondža
            Path:
            src/main/java/org/jenkinsci/test/acceptance/po/FolderItem.java
            src/main/java/org/jenkinsci/test/acceptance/po/Job.java
            src/main/java/org/jenkinsci/test/acceptance/po/JobsMixIn.java
            src/main/java/org/jenkinsci/test/acceptance/po/PageObject.java
            src/main/java/org/jenkinsci/test/acceptance/po/TopLevelItem.java
            http://jenkins-ci.org/commit/acceptance-test-harness/002b21349a9cad8e478e7d44f665517db12a370c
            Log:
            Merge pull request #186 from mafraba/JENKINS-38058

            JENKINS-38058 pass context when creating 'FolderItem' objects

            Compare: https://github.com/jenkinsci/acceptance-test-harness/compare/7d482f4e3315...002b21349a9c

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oliver Gondža Path: src/main/java/org/jenkinsci/test/acceptance/po/FolderItem.java src/main/java/org/jenkinsci/test/acceptance/po/Job.java src/main/java/org/jenkinsci/test/acceptance/po/JobsMixIn.java src/main/java/org/jenkinsci/test/acceptance/po/PageObject.java src/main/java/org/jenkinsci/test/acceptance/po/TopLevelItem.java http://jenkins-ci.org/commit/acceptance-test-harness/002b21349a9cad8e478e7d44f665517db12a370c Log: Merge pull request #186 from mafraba/ JENKINS-38058 JENKINS-38058 pass context when creating 'FolderItem' objects Compare: https://github.com/jenkinsci/acceptance-test-harness/compare/7d482f4e3315...002b21349a9c
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Oliver Gondža
            Path:
            src/main/java/org/jenkinsci/test/acceptance/po/Folder.java
            http://jenkins-ci.org/commit/acceptance-test-harness/88be022841ce43fe79fe57f32a8169314384fd48
            Log:
            Merge pull request #264 from mafraba/JENKINS-38058

            JENKINS-38058 bring back lost constructor for 'Folder'

            Compare: https://github.com/jenkinsci/acceptance-test-harness/compare/252150450053...88be022841ce

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oliver Gondža Path: src/main/java/org/jenkinsci/test/acceptance/po/Folder.java http://jenkins-ci.org/commit/acceptance-test-harness/88be022841ce43fe79fe57f32a8169314384fd48 Log: Merge pull request #264 from mafraba/ JENKINS-38058 JENKINS-38058 bring back lost constructor for 'Folder' Compare: https://github.com/jenkinsci/acceptance-test-harness/compare/252150450053...88be022841ce

              People

              Assignee:
              mfranco Manuel Franco
              Reporter:
              mfranco Manuel Franco
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: