Commit 03087faa authored by GitLab Bot's avatar GitLab Bot

Add latest changes from gitlab-org/gitlab@master

parent fc96671f
...@@ -76,7 +76,7 @@ module QA ...@@ -76,7 +76,7 @@ module QA
end end
def configure_identity(name, email) def configure_identity(name, email)
run(%Q{git config user.name #{name}}) run(%Q{git config user.name "#{name}"})
run(%Q{git config user.email #{email}}) run(%Q{git config user.email #{email}})
end end
......
...@@ -59,9 +59,9 @@ module QA ...@@ -59,9 +59,9 @@ module QA
def actions def actions
pending_actions = [] pending_actions = []
@add_files.map { |file| pending_actions << file.merge({ action: "create" }) } if @add_files pending_actions << @add_files.map { |file| file.merge({ action: "create" }) } if @add_files
@update_files.map { |file| pending_actions << file.merge({ action: "update" }) } if @update_files pending_actions << @update_files.map { |file| file.merge({ action: "update" }) } if @update_files
pending_actions pending_actions.flatten
end end
private private
......
...@@ -26,7 +26,7 @@ module QA ...@@ -26,7 +26,7 @@ module QA
end end
def name def name
@name ||= api_resource&.dig(:name) || username @name ||= api_resource&.dig(:name) || "QA User #{unique_id}"
end end
def email def email
...@@ -91,9 +91,8 @@ module QA ...@@ -91,9 +91,8 @@ module QA
def self.fabricate_or_use(username = nil, password = nil) def self.fabricate_or_use(username = nil, password = nil)
if Runtime::Env.signup_disabled? if Runtime::Env.signup_disabled?
self.new.tap do |user| self.fabricate_via_api! do |user|
user.username = username user.username = username
user.password = password
end end
else else
self.fabricate! self.fabricate!
......
...@@ -46,7 +46,7 @@ module QA ...@@ -46,7 +46,7 @@ module QA
project.standalone = true project.standalone = true
project.add_name_uuid = false project.add_name_uuid = false
project.name = project_name project.name = project_name
project.path_with_namespace = "#{user.name}/#{project_name}" project.path_with_namespace = "#{user.username}/#{project_name}"
project.user = user project.user = user
project.api_client = api_client project.api_client = api_client
end end
......
...@@ -6,8 +6,10 @@ module QA ...@@ -6,8 +6,10 @@ module QA
include Runtime::Fixtures include Runtime::Fixtures
def login def login
Runtime::Browser.visit(:gitlab, Page::Main::Login) unless Page::Main::Menu.perform(&:signed_in?)
Page::Main::Login.perform(&:sign_in_using_credentials) Runtime::Browser.visit(:gitlab, Page::Main::Login)
Page::Main::Login.perform(&:sign_in_using_credentials)
end
end end
before(:all) do before(:all) do
......
...@@ -35,8 +35,8 @@ describe QA::Resource::User do ...@@ -35,8 +35,8 @@ describe QA::Resource::User do
end end
describe '#name' do describe '#name' do
it 'defaults to the username' do it 'defaults to a name based on the username' do
expect(subject.name).to eq(subject.username) expect(subject.name).to match(/#{subject.username.tr('-', ' ')}/i)
end end
it 'retrieves the name from the api_resource if present' do it 'retrieves the name from the api_resource if present' do
......
...@@ -39,16 +39,28 @@ describe 'Dropdown milestone', :js do ...@@ -39,16 +39,28 @@ describe 'Dropdown milestone', :js do
end end
describe 'behavior' do describe 'behavior' do
it 'opens when the search bar has milestone:' do context 'filters by "milestone:"' do
filtered_search.set('milestone:') before do
filtered_search.set('milestone:')
end
expect(page).to have_css(js_dropdown_milestone, visible: true) it 'opens when the search bar has milestone:' do
end expect(page).to have_css(js_dropdown_milestone, visible: true)
end
it 'closes when the search bar is unfocused' do it 'closes when the search bar is unfocused' do
find('body').click find('body').click
expect(page).to have_css(js_dropdown_milestone, visible: false) expect(page).to have_css(js_dropdown_milestone, visible: false)
end
it 'hides loading indicator when loaded' do
expect(find(js_dropdown_milestone)).not_to have_css('.filter-dropdown-loading')
end
it 'loads all the milestones when opened' do
expect(filter_dropdown).to have_selector('.filter-dropdown .filter-dropdown-item', count: 6)
end
end end
it 'shows loading indicator when opened' do it 'shows loading indicator when opened' do
...@@ -58,18 +70,6 @@ describe 'Dropdown milestone', :js do ...@@ -58,18 +70,6 @@ describe 'Dropdown milestone', :js do
expect(page).to have_css('#js-dropdown-milestone .filter-dropdown-loading', visible: true) expect(page).to have_css('#js-dropdown-milestone .filter-dropdown-loading', visible: true)
end end
end end
it 'hides loading indicator when loaded' do
filtered_search.set('milestone:')
expect(find(js_dropdown_milestone)).not_to have_css('.filter-dropdown-loading')
end
it 'loads all the milestones when opened' do
filtered_search.set('milestone:')
expect(filter_dropdown).to have_selector('.filter-dropdown .filter-dropdown-item', count: 6)
end
end end
describe 'filtering' do describe 'filtering' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment