diff options
author | Mark Lapierre <mlapierre@gitlab.com> | 2019-02-08 15:39:34 +0000 |
---|---|---|
committer | Mark Lapierre <mlapierre@gitlab.com> | 2019-02-08 15:39:34 +0000 |
commit | d5e9eef08dedca1deba9ef3df28daff81336459f (patch) | |
tree | e73a2017788eb5ce25c3f11da57d3efb4bcc82d5 | |
parent | c220bee5ca1a025321df01a5c95310d397edbcc5 (diff) | |
parent | b4c2dd73875aa50d2a72e694203388446599d8eb (diff) | |
download | gitlab-ce-d5e9eef08dedca1deba9ef3df28daff81336459f.tar.gz |
Merge branch 'qa-staging-33-wait-for-viewers-to-load' into 'master'
Fix push_http_private_token_spec by waiting for viewers to load
Closes gitlab-org/quality/staging#33
See merge request gitlab-org/gitlab-ce!25030
-rw-r--r-- | app/views/projects/blob/viewers/_loading.html.haml | 2 | ||||
-rw-r--r-- | qa/qa/page/project/show.rb | 10 | ||||
-rw-r--r-- | qa/qa/specs/features/browser_ui/3_create/repository/push_http_private_token_spec.rb | 6 |
3 files changed, 16 insertions, 2 deletions
diff --git a/app/views/projects/blob/viewers/_loading.html.haml b/app/views/projects/blob/viewers/_loading.html.haml index 120c0540335..df1f3e4e01b 100644 --- a/app/views/projects/blob/viewers/_loading.html.haml +++ b/app/views/projects/blob/viewers/_loading.html.haml @@ -1,2 +1,2 @@ .text-center.prepend-top-default.append-bottom-default - = icon('spinner spin 2x', 'aria-hidden' => 'true', 'aria-label' => 'Loading content…') + = icon('spinner spin 2x', 'aria-hidden' => 'true', 'aria-label' => 'Loading content…', class: 'qa-spinner') diff --git a/qa/qa/page/project/show.rb b/qa/qa/page/project/show.rb index 945b244df15..9c21d9ddbfa 100644 --- a/qa/qa/page/project/show.rb +++ b/qa/qa/page/project/show.rb @@ -51,6 +51,16 @@ module QA element :branches_dropdown end + view 'app/views/projects/blob/viewers/_loading.html.haml' do + element :spinner + end + + def wait_for_viewers_to_load + wait(reload: false) do + has_no_element?(:spinner) + end + end + def create_first_new_file! within_element(:quick_actions) do click_link_with_text 'New file' diff --git a/qa/qa/specs/features/browser_ui/3_create/repository/push_http_private_token_spec.rb b/qa/qa/specs/features/browser_ui/3_create/repository/push_http_private_token_spec.rb index 3310a873a60..73f020e7d05 100644 --- a/qa/qa/specs/features/browser_ui/3_create/repository/push_http_private_token_spec.rb +++ b/qa/qa/specs/features/browser_ui/3_create/repository/push_http_private_token_spec.rb @@ -22,7 +22,11 @@ module QA end push.project.visit! - Page::Project::Show.perform(&:wait_for_push) + + Page::Project::Show.perform do |page| + page.wait_for_push + page.wait_for_viewers_to_load + end expect(page).to have_content('README.md') expect(page).to have_content('This is a test project') |