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

ATH: Configuring the default value of a "Password" job parameter fails

      This started to fail on 2.236, after JENKINS-61808.

       

      When running some ATHs that are configuring a Job with a 'Password' parameter, can not set it's default value:

      org.openqa.selenium.NoSuchElementException: Unable to locate By.cssSelector: [path='/properties/hudson-model-ParametersDefinitionProperty/parameterDefinitions/defaultValue'] in http://127.0.0.1:51242/job/established_willpower/configure
      

      To reproduce it:

      @Describable("Password Parameter")
      public class PasswordParameter extends Parameter {
          public PasswordParameter(Job job, String path) {
              super(job, path);
          }
      
          @Override
          public void fillWith(Object v) {
              control("value").set(v.toString());
          }
      }
      

       

      @Test
      public void buildParametrized() {
          FreeStyleJob j = jenkins.jobs.create(FreeStyleJob.class);
          j.configure();
          j.addParameter(PasswordParameter.class).setName("password").setDefault("foopass").setDescription("apass");
          j.save();
      }
      

       

       

          [JENKINS-62822] ATH: Configuring the default value of a "Password" job parameter fails

          Tim Jacomb added a comment -

          ealvarez is there any specific test that fails?

          Tim Jacomb added a comment - ealvarez is there any specific test that fails?

          timja I found it in a proprietary test.

          While trying to reproduce it in the acceptance-test-harness repository, I've found that it is not related to MavenModuleSet jobs, but to the Parameters of type "Password" in all the jobs.

          Also, the breaking change is not related to tables-to-divs, but to the 2.236 release.

          The path to the Password parameter default value changed with https://github.com/jenkinsci/jenkins/pull/4630/files#diff-bb80f35e7698754c0c72d989e4f04406.

          The default defaultValue path is no longer valid. Now it has to be defaultValueAsSecret. I'm creating a PR to provide a PO for PasswordParameter with this change, and a small test to validate it

          Esther Álvarez Feijoo added a comment - timja I found it in a proprietary test. While trying to reproduce it in the acceptance-test-harness repository, I've found that it is not related to MavenModuleSet jobs, but to the Parameters of type "Password" in all the jobs. Also, the breaking change is not related to tables-to-divs, but to the 2.236 release. The path to the Password parameter default value changed with  https://github.com/jenkinsci/jenkins/pull/4630/files#diff-bb80f35e7698754c0c72d989e4f04406 . The default defaultValue  path is no longer valid. Now it has to be  defaultValueAsSecret . I'm creating a PR to provide a PO for PasswordParameter with this change, and a small test to validate it

          I've updated the description and title

          Esther Álvarez Feijoo added a comment - I've updated the description and title

            ealvarez Esther Álvarez Feijoo
            ealvarez Esther Álvarez Feijoo
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: