Не подтверждена Коммит 7f6b4185 создал по автору Alina Mihaila's avatar Alina Mihaila
Просмотр файлов

Add option to wait false to visit

владелец fe26bbd3
......@@ -828,6 +828,7 @@
context 'when user does not have access to read jobs' do
before do
project.update!(public_builds: false)
project.reload
end
describe 'GET /:project/-/pipelines/:id' do
......@@ -914,7 +915,7 @@
end
it 'does not create a new Pipeline' do
visit project_pipelines_path(project)
visit(project_pipelines_path(project), false)
expect(page).not_to have_selector('.ci-table')
expect(schedule.last_pipeline).to be_nil
......
......@@ -138,12 +138,13 @@ def fill_form
expect(page).to have_content('My Snippet')
link = find('a.no-attachment-icon img.js-lazy-loaded[alt="banana_sample"]')['src']
expect(link).to match(%r{/uploads/-/system/user/#{user.id}/\h{32}/banana_sample\.gif\z})
# Adds a cache buster for checking if the image exists as Selenium is now handling the cached requests
# not anymore as requests when they come straight from memory cache.
# accept_confirm is needed because of https://gitlab.com/gitlab-org/gitlab/-/issues/262102
reqs = inspect_requests { accept_confirm { visit("#{link}?ran=#{SecureRandom.base64(20)}") } }
reqs = inspect_requests { accept_confirm { visit("#{link}?ran=#{SecureRandom.base64(20)}", false) } }
expect(reqs.first.status_code).to eq(200)
end
end
......
......@@ -36,10 +36,10 @@ module WaitForAllRequests
include WaitHelpers
include WaitForRequests
def visit(visit_uri)
super
def visit(visit_uri, wait = true)
super(visit_uri)
wait_for_requests
wait_for_requests if wait
end
end
......
Поддерживает Markdown
0% или .
You are about to add 0 people to the discussion. Proceed with caution.
Сначала завершите редактирование этого сообщения!
Пожалуйста, зарегистрируйтесь или чтобы прокомментировать