Открыть боковую панель
nt_test111
nt_project_u8hcxr42ygkw
Коммиты
ac3b6ae2
Коммит
ac3b6ae2
создал
Фев 05, 2018
по автору
Jose Ivan Vargas
Просмотр файлов
Added/corrected specs
владелец
c60f32d5
Изменения
5
Скрыть пробелы
Построчно
Рядом
features/project/commits/branches.feature
Просмотр файла @
ac3b6ae2
...
...
@@ -20,13 +20,6 @@ Feature: Project Commits Branches
And
I submit new branch form
Then
I should see new branch created
@javascript
Scenario
:
I
delete a branch
Given
I visit project branches page
And
I filter for branch improve/awesome
And
I click branch 'improve/awesome' delete link
Then
I should not see branch 'improve/awesome'
@javascript
Scenario
:
I
create a branch with invalid name
Given
I visit project branches page
...
...
features/steps/project/commits/branches.rb
Просмотр файла @
ac3b6ae2
...
...
@@ -64,21 +64,6 @@ class Spinach::Features::ProjectCommitsBranches < Spinach::FeatureSteps
expect
(
page
).
to
have_content
'Branch already exists'
end
step
'I filter for branch improve/awesome'
do
fill_in
'branch-search'
,
with:
'improve/awesome'
find
(
'#branch-search'
).
native
.
send_keys
(
:enter
)
end
step
"I click branch 'improve/awesome' delete link"
do
page
.
within
'.js-branch-improve\/awesome'
do
accept_alert
{
find
(
'.btn-remove'
).
click
}
end
end
step
"I should not see branch 'improve/awesome'"
do
expect
(
page
).
to
have_css
(
'.js-branch-improve\\/awesome'
,
visible: :hidden
)
end
def
select_branch
(
branch_name
)
find
(
'.git-revision-dropdown-toggle'
).
click
...
...
spec/features/projects/branches_spec.rb
Просмотр файла @
ac3b6ae2
...
...
@@ -67,10 +67,11 @@
expect
(
page
).
to
have_content
(
'fix'
)
expect
(
find
(
'.all-branches'
)).
to
have_selector
(
'li'
,
count:
1
)
accept_confirm
{
find
(
'.js-branch-fix .btn-remove'
).
click
}
expect
(
page
).
not_to
have_content
(
'fix'
)
expect
(
find
(
'.all-branches'
)).
to
have_selector
(
'li'
,
count:
0
)
delete_branch
wait_for_requests
expect
(
all
(
'li .ref-name'
,
text:
'fix'
).
count
).
to
eq
0
end
end
end
...
...
@@ -110,4 +111,13 @@ def sorted_branches(repository, count:, sort_by:)
Regexp
.
new
(
sorted_branches
.
join
(
'.*'
))
end
def
delete_branch
find
(
'#delete-branch-modal.modal'
,
visible:
false
)
# wait for Vue component to be loaded
find
(
".js-delete-branch"
).
click
page
.
within
'#delete-branch-modal'
do
click_on
'Delete branch'
end
end
end
spec/features/projects/environments/environment_spec.rb
Просмотр файла @
ac3b6ae2
require
'spec_helper'
feature
'Environment'
do
feature
'Environment'
,
:js
do
given
(
:project
)
{
create
(
:project
)
}
given
(
:user
)
{
create
(
:user
)
}
given
(
:role
)
{
:developer
}
...
...
@@ -237,7 +237,7 @@
visit
project_branches_path
(
project
,
search:
'feature'
)
remove_branch_with_hooks
(
project
,
user
,
'feature'
)
do
page
.
within
(
'.js-branch-feature'
)
{
find
(
'
a
.btn-remove'
).
click
}
page
.
within
(
'.js-branch-feature'
)
{
find
(
'
button
.btn-remove'
).
click
}
end
visit_environment
(
environment
)
...
...
spec/features/protected_branches_spec.rb
Просмотр файла @
ac3b6ae2
...
...
@@ -48,11 +48,8 @@
expect
(
page
).
to
have_content
(
'fix'
)
expect
(
find
(
'.all-branches'
)).
to
have_selector
(
'li'
,
count:
1
)
page
.
find
(
'[data-target="#modal-delete-branch"]'
).
click
expect
(
page
).
to
have_css
(
'.js-delete-branch[disabled]'
)
fill_in
'delete_branch_input'
,
with:
'fix'
click_link
'Delete protected branch'
delete_protected_branch
wait_for_requests
fill_in
'branch-search'
,
with:
'fix'
find
(
'#branch-search'
).
native
.
send_keys
(
:enter
)
...
...
@@ -175,4 +172,14 @@ def set_protected_branch_name(branch_name)
find
(
".dropdown-input-field"
).
set
(
branch_name
)
click_on
(
"Create wildcard
#{
branch_name
}
"
)
end
def
delete_protected_branch
find
(
'#delete-branch-modal.modal'
,
visible:
false
)
# wait for Vue component to be loaded
find
(
".js-delete-branch"
).
click
page
.
within
'#delete-branch-modal'
do
fill_in
'delete-branch-modal-input'
,
with:
'fix'
click_on
'Delete protected branch'
end
end
end
Редактирование
Предварительный просмотр
Поддерживает Markdown
0%
Попробовать снова
или
прикрепить новый файл
.
Отмена
You are about to add
0
people
to the discussion. Proceed with caution.
Сначала завершите редактирование этого сообщения!
Отмена
Пожалуйста,
зарегистрируйтесь
или
войдите
чтобы прокомментировать