From 1cf29959550b98d38a2190c188e7e0e201f4f203 Mon Sep 17 00:00:00 2001 From: Desiree Chevalier Date: Mon, 24 Jun 2019 13:42:56 -0400 Subject: Screenshot link fix --- .gitlab/ci/review.gitlab-ci.yml | 6 +++++- .../specs/features/browser_ui/1_manage/login/log_in_spec.rb | 2 +- scripts/merge-html-reports | 13 ++++++++++++- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/.gitlab/ci/review.gitlab-ci.yml b/.gitlab/ci/review.gitlab-ci.yml index edf1ce932f1..2dc70d97153 100644 --- a/.gitlab/ci/review.gitlab-ci.yml +++ b/.gitlab/ci/review.gitlab-ci.yml @@ -186,6 +186,7 @@ parallel-spec-reports: variables: SETUP_DB: "false" NEW_PARALLEL_SPECS_REPORT: qa/report-new.html + BASE_ARTIFACT_URL: "${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/file/qa/" stage: post-test allow_failure: true retry: 0 @@ -199,8 +200,11 @@ parallel-spec-reports: script: - apk add --update build-base libxml2-dev libxslt-dev && rm -rf /var/cache/apk/* - gem install nokogiri + - cd qa/gitlab-qa-run-*/gitlab-* + - ARTIFACT_DIRS=$(pwd |rev| awk -F / '{print $1,$2}' | rev | sed s_\ _/_) + - cd ../../.. - '[[ -f $NEW_PARALLEL_SPECS_REPORT ]] || echo "{}" > ${NEW_PARALLEL_SPECS_REPORT}' - - scripts/merge-html-reports ${NEW_PARALLEL_SPECS_REPORT} qa/gitlab-qa-run-*/**/rspec.htm + - scripts/merge-html-reports ${NEW_PARALLEL_SPECS_REPORT} ${BASE_ARTIFACT_URL}${ARTIFACT_DIRS} qa/gitlab-qa-run-*/**/rspec.htm .review-performance-base: &review-performance-base <<: *review-qa-base diff --git a/qa/qa/specs/features/browser_ui/1_manage/login/log_in_spec.rb b/qa/qa/specs/features/browser_ui/1_manage/login/log_in_spec.rb index 09d1d3fe76e..a6f794bff1a 100644 --- a/qa/qa/specs/features/browser_ui/1_manage/login/log_in_spec.rb +++ b/qa/qa/specs/features/browser_ui/1_manage/login/log_in_spec.rb @@ -8,7 +8,7 @@ module QA Page::Main::Login.act { sign_in_using_credentials } Page::Main::Menu.perform do |menu| - expect(menu).to have_personal_area + expect(menu).not_to have_personal_area end Support::Retrier.retry_until(sleep_interval: 0.5) do diff --git a/scripts/merge-html-reports b/scripts/merge-html-reports index da4fcc07095..7d1e15186c8 100755 --- a/scripts/merge-html-reports +++ b/scripts/merge-html-reports @@ -4,7 +4,13 @@ require 'nokogiri' main_report_file = ARGV.shift unless main_report_file - puts 'usage: merge-html-reports [extra reports...]' + puts 'usage: merge-html-reports [parallel reports...]' + exit 1 +end + +base_artifact_url = ARGV.shift +unless base_artifact_url + puts 'usage: merge-html-reports [parallel reports...]' exit 1 end @@ -17,6 +23,11 @@ new_report.at_css('head').add_next_sibling(empty_body) ARGV.each do |report_file| report = Nokogiri::HTML.parse(File.read(report_file)) + report.css('a').each do |link| + link_suffix = link['href'].slice(19..-1) + link['href'] = base_artifact_url + link_suffix + end + header = report.css('div #rspec-header') tests = report.css('dt[id^="example_group_"]') -- cgit v1.2.1