Открыть боковую панель
Захаров Дмитрий Сергеевич
Gitlab
Коммиты
7f6b4185
Не подтверждена
Коммит
7f6b4185
создал
Апр 19, 2023
по автору
Alina Mihaila
Просмотр файлов
Add option to wait false to visit
владелец
fe26bbd3
Изменения
3
Скрыть пробелы
Построчно
Рядом
spec/features/projects/pipelines/pipeline_spec.rb
Просмотр файла @
7f6b4185
...
...
@@ -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
...
...
spec/features/snippets/user_creates_snippet_spec.rb
Просмотр файла @
7f6b4185
...
...
@@ -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
...
...
spec/support/capybara_slow_finder.rb
Просмотр файла @
7f6b4185
...
...
@@ -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.
Сначала завершите редактирование этого сообщения!
Отмена
Пожалуйста,
зарегистрируйтесь
или
войдите
чтобы прокомментировать