diff options
Diffstat (limited to 'qa')
8 files changed, 18 insertions, 21 deletions
diff --git a/qa/qa/page/project/job/show.rb b/qa/qa/page/project/job/show.rb index a1a5b3c296e..451ac8069e5 100644 --- a/qa/qa/page/project/job/show.rb +++ b/qa/qa/page/project/job/show.rb @@ -5,8 +5,8 @@ module QA::Page class Show < QA::Page::Base include Component::CiBadgeLink - view 'app/assets/javascripts/jobs/components/job_log.vue' do - element :build_trace + view 'app/assets/javascripts/jobs/components/log/log.vue' do + element :job_log_content end view 'app/assets/javascripts/jobs/components/stages_dropdown.vue' do @@ -25,7 +25,7 @@ module QA::Page result = '' wait(reload: false, max: wait, interval: 1) do - result = find_element(:build_trace).text + result = find_element(:job_log_content).text result.include?('Job') end @@ -37,7 +37,7 @@ module QA::Page def loaded?(wait: 60) wait(reload: true, max: wait, interval: 1) do - has_element?(:build_trace, wait: 1) + has_element?(:job_log_content, wait: 1) end end end diff --git a/qa/qa/resource/merge_request.rb b/qa/qa/resource/merge_request.rb index 24fb96a20a2..6c0f4621dd9 100644 --- a/qa/qa/resource/merge_request.rb +++ b/qa/qa/resource/merge_request.rb @@ -54,7 +54,7 @@ module QA @assignee = nil @milestone = nil @labels = [] - @file_name = "added_file.txt" + @file_name = "added_file-#{SecureRandom.hex(8)}.txt" @file_content = "File Added" @target_new_branch = true @no_preparation = false diff --git a/qa/qa/resource/merge_request_from_fork.rb b/qa/qa/resource/merge_request_from_fork.rb index 6c9a096289b..9cb4e6a49ca 100644 --- a/qa/qa/resource/merge_request_from_fork.rb +++ b/qa/qa/resource/merge_request_from_fork.rb @@ -1,5 +1,7 @@ # frozen_string_literal: true +require 'securerandom' + module QA module Resource class MergeRequestFromFork < MergeRequest @@ -13,7 +15,7 @@ module QA Repository::ProjectPush.fabricate! do |resource| resource.project = fork.project resource.branch_name = fork_branch - resource.file_name = 'file2.txt' + resource.file_name = "file2-#{SecureRandom.hex(8)}.txt" resource.user = fork.user end end diff --git a/qa/qa/resource/protected_branch.rb b/qa/qa/resource/protected_branch.rb index f0cef624e0b..6aadbd55d0a 100644 --- a/qa/qa/resource/protected_branch.rb +++ b/qa/qa/resource/protected_branch.rb @@ -1,5 +1,7 @@ # frozen_string_literal: true +require 'securerandom' + module QA module Resource class ProtectedBranch < Base @@ -15,7 +17,7 @@ module QA attribute :branch do Repository::ProjectPush.fabricate! do |project_push| project_push.project = project - project_push.file_name = 'new_file.md' + project_push.file_name = "new_file-#{SecureRandom.hex(8)}.md" project_push.commit_message = 'Add new file' project_push.branch_name = branch_name project_push.new_branch = true diff --git a/qa/qa/resource/repository/project_push.rb b/qa/qa/resource/repository/project_push.rb index f79bb035c46..17596601cf9 100644 --- a/qa/qa/resource/repository/project_push.rb +++ b/qa/qa/resource/repository/project_push.rb @@ -1,5 +1,7 @@ # frozen_string_literal: true +require 'securerandom' + module QA module Resource module Repository @@ -15,7 +17,7 @@ module QA end def initialize - @file_name = 'file.txt' + @file_name = "file-#{SecureRandom.hex(8)}.txt" @file_content = '# This is test project' @commit_message = "This is a test commit" @branch_name = 'master' diff --git a/qa/qa/resource/repository/push.rb b/qa/qa/resource/repository/push.rb index 68674248be2..902ae9f3135 100644 --- a/qa/qa/resource/repository/push.rb +++ b/qa/qa/resource/repository/push.rb @@ -1,6 +1,7 @@ # frozen_string_literal: true require 'pathname' +require 'securerandom' module QA module Resource @@ -13,7 +14,7 @@ module QA attr_writer :remote_branch, :gpg_key_id def initialize - @file_name = 'file.txt' + @file_name = "file-#{SecureRandom.hex(8)}.txt" @file_content = '# This is test file' @commit_message = "This is a test commit" @branch_name = 'master' diff --git a/qa/qa/specs/features/browser_ui/3_create/merge_request/view_merge_request_diff_patch_spec.rb b/qa/qa/specs/features/browser_ui/3_create/merge_request/view_merge_request_diff_patch_spec.rb index 0eaec61b2fa..604b6c10aee 100644 --- a/qa/qa/specs/features/browser_ui/3_create/merge_request/view_merge_request_diff_patch_spec.rb +++ b/qa/qa/specs/features/browser_ui/3_create/merge_request/view_merge_request_diff_patch_spec.rb @@ -4,12 +4,7 @@ module QA context 'Create' do describe 'Download merge request patch and diff' do before(:context) do - project = Resource::Project.fabricate_via_api! do |project| - project.name = 'project' - end - @merge_request = Resource::MergeRequest.fabricate_via_api! do |merge_request| - merge_request.project = project merge_request.title = 'This is a merge request' merge_request.description = '... for downloading patches and diffs' end @@ -23,7 +18,7 @@ module QA expect(page.text).to start_with('From') expect(page).to have_content('Subject: [PATCH] This is a test commit') - expect(page).to have_content('diff --git a/added_file.txt b/added_file.txt') + expect(page).to have_content("diff --git a/#{@merge_request.file_name} b/#{@merge_request.file_name}") end it 'views the merge request plain diff' do @@ -32,7 +27,7 @@ module QA @merge_request.visit! Page::MergeRequest::Show.perform(&:view_plain_diff) - expect(page.text).to start_with('diff --git a/added_file.txt b/added_file.txt') + expect(page.text).to start_with("diff --git a/#{@merge_request.file_name} b/#{@merge_request.file_name}") expect(page).to have_content('+File Added') end end diff --git a/qa/qa/specs/features/browser_ui/6_release/deploy_key/clone_using_deploy_key_spec.rb b/qa/qa/specs/features/browser_ui/6_release/deploy_key/clone_using_deploy_key_spec.rb index 3badaa983cb..2e03e4bd43c 100644 --- a/qa/qa/specs/features/browser_ui/6_release/deploy_key/clone_using_deploy_key_spec.rb +++ b/qa/qa/specs/features/browser_ui/6_release/deploy_key/clone_using_deploy_key_spec.rb @@ -6,10 +6,6 @@ module QA context 'Release', :docker do describe 'Git clone using a deploy key' do before do - # Handle WIP Job Logs flag - https://gitlab.com/gitlab-org/gitlab/issues/31162 - @job_log_json_flag_enabled = Runtime::Feature.enabled?('job_log_json') - Runtime::Feature.disable('job_log_json') if @job_log_json_flag_enabled - Flow::Login.sign_in @runner_name = "qa-runner-#{Time.now.to_i}" @@ -29,7 +25,6 @@ module QA end after do - Runtime::Feature.enable('job_log_json') if @job_log_json_flag_enabled Service::DockerRun::GitlabRunner.new(@runner_name).remove! end |