summaryrefslogtreecommitdiff
path: root/qa/qa/specs/features/browser_ui/3_create/repository/add_file_template_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'qa/qa/specs/features/browser_ui/3_create/repository/add_file_template_spec.rb')
-rw-r--r--qa/qa/specs/features/browser_ui/3_create/repository/add_file_template_spec.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/qa/qa/specs/features/browser_ui/3_create/repository/add_file_template_spec.rb b/qa/qa/specs/features/browser_ui/3_create/repository/add_file_template_spec.rb
index c4a6ce13f4c..e42d538fdf8 100644
--- a/qa/qa/specs/features/browser_ui/3_create/repository/add_file_template_spec.rb
+++ b/qa/qa/specs/features/browser_ui/3_create/repository/add_file_template_spec.rb
@@ -6,8 +6,10 @@ module QA
include Runtime::Fixtures
def login
- Runtime::Browser.visit(:gitlab, Page::Main::Login)
- Page::Main::Login.perform(&:sign_in_using_credentials)
+ unless Page::Main::Menu.perform(&:signed_in?)
+ Runtime::Browser.visit(:gitlab, Page::Main::Login)
+ Page::Main::Login.perform(&:sign_in_using_credentials)
+ end
end
before(:all) do
@@ -57,12 +59,10 @@ module QA
@project.visit!
Page::Project::Show.perform(&:create_new_file!)
- Page::File::Form.perform do |page| # rubocop:disable QA/AmbiguousPageObjectName
- page.select_template template[:file_name], template[:name]
+ Page::File::Form.perform do |form|
+ form.select_template template[:file_name], template[:name]
end
- expect(page).to have_content('Template applied')
- expect(page).to have_button('Undo')
expect(page).to have_content(content[0..100])
Page::File::Form.perform(&:commit_changes)