Пример #1
0
 @Test
 public void manage_measure_filters() {
   Selenese selenese =
       Selenese.builder()
           .setHtmlTestsInClasspath(
               "manage_measure_filters",
               "/measure/suite/measure_filters/save_with_special_characters.html")
           .build();
   // Use the old runner because it fails with the new Selenium runner
   orchestrator.executeSelenese(selenese);
 }
Пример #2
0
 @Test
 public void copy_measure_filters() {
   Selenese selenese =
       Selenese.builder()
           .setHtmlTestsInClasspath(
               "copy_measure_filters",
               "/measure/suite/measure_filters/copy_measure_filter.html",
               "/measure/suite/measure_filters/copy_uniqueness_of_name.html")
           .build();
   // Use the old runner because it fails with the new Selenium runner
   orchestrator.executeSelenese(selenese);
 }
Пример #3
0
 @Test
 public void measure_filter_list_widget() {
   Selenese selenese =
       Selenese.builder()
           .setHtmlTestsInClasspath(
               "measure_filter_list_widget",
               "/measure/suite/measure_filters/list_widget.html",
               "/measure/suite/measure_filters/list_widget_sort.html",
               "/measure/suite/measure_filters/list_widget_warning_if_missing_filter.html")
           .build();
   // Use the old runner because it fails with the new Selenium runner
   orchestrator.executeSelenese(selenese);
 }
Пример #4
0
 @Test
 public void display_measure_filter_as_list() {
   Selenese selenese =
       Selenese.builder()
           .setHtmlTestsInClasspath(
               "display_measure_filter_as_list",
               "/measure/suite/measure_filters/list_change_columns.html",
               "/measure/suite/measure_filters/list_delete_column.html",
               "/measure/suite/measure_filters/list_move_columns.html",
               "/measure/suite/measure_filters/list_sort_by_descending_name.html",
               "/measure/suite/measure_filters/list_sort_by_ncloc.html")
           .build();
   // Use the old runner because it fails with the new Selenium runner
   orchestrator.executeSelenese(selenese);
 }
  /** SONAR-4700 */
  @Test
  public void not_display_periods_selection_dropdown_on_first_analysis() {
    orchestrator.getServer().provisionProject(PROJECT_KEY, PROJECT_KEY);
    orchestrator.getServer().associateProjectToQualityProfile(PROJECT_KEY, "xoo", "empty");
    orchestrator.executeBuild(SonarRunner.create(projectDir("shared/xoo-sample")));

    // Use old way to execute Selenium because 'assertSelectOptions' action is not supported by
    // SeleneseTest
    orchestrator.executeSelenese(
        Selenese.builder()
            .setHtmlTestsInClasspath(
                "not-display-periods-selection-dropdown-on-first-analysis",
                "/measureHistory/DifferentialPeriodsTest/not-display-periods-selection-dropdown-on-dashboard.html")
            .build());

    orchestrator.executeBuild(SonarRunner.create(projectDir("shared/xoo-sample")));

    orchestrator.executeSelenese(
        Selenese.builder()
            .setHtmlTestsInClasspath(
                "display-periods-selection-dropdown-after-first-analysis",
                "/measureHistory/DifferentialPeriodsTest/display-periods-selection-dropdown-on-dashboard.html")
            .build());
  }
Пример #6
0
  /** SONAR-4099 */
  @Test
  public void should_not_share_filter_when_user_have_no_sharing_permissions() {
    String user = "******";
    createUser(user, "User Measure Filters without sharing permission");

    try {
      // Use the old runner because it fails with the new Selenium runner
      orchestrator.executeSelenese(
          Selenese.builder()
              .setHtmlTestsInClasspath(
                  "should_not_share_filter_when_user_have_no_sharing_permissions",
                  "/measure/suite/measure_filters/should-not-share-filter-when-user-have-no-sharing-permissions.html")
              .build());
    } finally {
      deactivateUser(user);
    }
  }
Пример #7
0
 @Test
 public void execute_measure_filters() {
   Selenese selenese =
       Selenese.builder()
           .setHtmlTestsInClasspath(
               "execution_of_measure_filters",
               "/measure/suite/measure_filters/link_from_main_header.html",
               "/measure/suite/measure_filters/initial_search_form.html",
               "/measure/suite/measure_filters/search_for_projects.html",
               "/measure/suite/measure_filters/search_for_files.html",
               // SONAR-4195
               "/measure/suite/measure_filters/search-by-key.html",
               "/measure/suite/measure_filters/search-by-name.html",
               "/measure/suite/measure_filters/empty_filter.html")
           .build();
   // Use the old runner because it fails with the new Selenium runner
   orchestrator.executeSelenese(selenese);
 }
Пример #8
0
  @Test
  public void should_support_property_sets() {
    Selenese selenese =
        Selenese.builder()
            .setHtmlTestsInClasspath(
                "property-sets",
                "/settings/PropertySetsTest/property-sets/create.html",
                "/settings/PropertySetsTest/property-sets/delete.html",
                "/settings/PropertySetsTest/property-sets/reference.html",
                "/settings/PropertySetsTest/property-sets/all_types.html")
            .build();
    // Use the old runner because it fails with the new Selenium runner
    orchestrator.executeSelenese(selenese);

    // SSF-25 Check that the password has well be setted as now it does not appears in the html
    // source code
    String sonarDemoValue = getProperty("sonar.demo");
    assertThat(getProperty("sonar.demo." + sonarDemoValue + ".password")).isEqualTo("abcde");
  }
Пример #9
0
  @Test
  public void share_measure_filters() {
    // SONAR-4099
    String user = "******";
    createUser(user, "User Measure Filters with sharing permission", "shareDashboard");

    try {
      Selenese selenese =
          Selenese.builder()
              .setHtmlTestsInClasspath(
                  "share_measure_filters",
                  // SONAR-4469
                  "/measure/suite/measure_filters/should-unshare-filter-remove-other-filters-favourite.html")
              .build();
      // Use the old runner because it fails with the new Selenium runner
      orchestrator.executeSelenese(selenese);

    } finally {
      deactivateUser(user);
    }
  }
Пример #10
0
 private void seleniumSuite(String suiteName, String... tests) {
   Selenese selenese = Selenese.builder().setHtmlTestsInClasspath(suiteName, tests).build();
   orchestrator.executeSelenese(selenese);
 }