diff options
author | Mark Lapierre <mlapierre@gitlab.com> | 2018-12-13 18:25:25 +0000 |
---|---|---|
committer | Mark Lapierre <mlapierre@gitlab.com> | 2018-12-13 18:25:25 +0000 |
commit | 352fe16265a488360241c46ce65093258b81b41e (patch) | |
tree | fd9b7c32b18687280b73f4a5992e444957dc84d2 | |
parent | 477890261cbec008af1c76a3454c89bfa94d22bd (diff) | |
parent | 98e6bd2122db3ac6b61697be6bb12c9e80a442e8 (diff) | |
download | gitlab-ce-352fe16265a488360241c46ce65093258b81b41e.tar.gz |
Merge branch 'qa-fix-nightly-42' into 'master'
[QA] Fix the 'Commit data' QA test
Closes gitlab-org/quality/nightly#42
See merge request gitlab-org/gitlab-ce!23800
3 files changed, 12 insertions, 2 deletions
diff --git a/qa/qa/resource/repository/project_push.rb b/qa/qa/resource/repository/project_push.rb index 37feab4ad70..f4692c3dd4d 100644 --- a/qa/qa/resource/repository/project_push.rb +++ b/qa/qa/resource/repository/project_push.rb @@ -26,6 +26,11 @@ module QA def repository_ssh_uri @repository_ssh_uri ||= project.repository_ssh_location.uri end + + def fabricate! + super + project.visit! + end end end end diff --git a/qa/qa/resource/repository/wiki_push.rb b/qa/qa/resource/repository/wiki_push.rb index f1c39d507fe..77c4c8a514d 100644 --- a/qa/qa/resource/repository/wiki_push.rb +++ b/qa/qa/resource/repository/wiki_push.rb @@ -30,6 +30,11 @@ module QA end end end + + def fabricate! + super + wiki.visit! + end end end end diff --git a/qa/qa/specs/features/browser_ui/3_create/repository/user_views_raw_diff_patch_requests_spec.rb b/qa/qa/specs/features/browser_ui/3_create/repository/user_views_raw_diff_patch_requests_spec.rb index 75ad18a4111..203338ddf77 100644 --- a/qa/qa/specs/features/browser_ui/3_create/repository/user_views_raw_diff_patch_requests_spec.rb +++ b/qa/qa/specs/features/browser_ui/3_create/repository/user_views_raw_diff_patch_requests_spec.rb @@ -7,17 +7,17 @@ module QA Runtime::Browser.visit(:gitlab, Page::Main::Login) Page::Main::Login.perform(&:sign_in_using_credentials) - @project = Resource::Repository::ProjectPush.fabricate! do |push| + project_push = Resource::Repository::ProjectPush.fabricate! do |push| push.file_name = 'README.md' push.file_content = '# This is a test project' push.commit_message = 'Add README.md' end + @project = project_push.project # first file added has no parent commit, thus no diff data # add second file to repo to enable diff from initial commit @commit_message = 'Add second file' - @project.visit! Page::Project::Show.perform(&:create_new_file!) Page::File::Form.perform do |f| f.add_name('second') |