Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
4e88386b
Commit
4e88386b
authored
Oct 29, 2021
by
Ezekiel Kigbo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix feature specs
parent
eb0f66df
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
12 deletions
+17
-12
app/assets/javascripts/init_confirm_danger.js
app/assets/javascripts/init_confirm_danger.js
+3
-2
app/assets/javascripts/vue_shared/components/confirm_danger/confirm_danger.vue
...s/vue_shared/components/confirm_danger/confirm_danger.vue
+2
-2
app/assets/javascripts/vue_shared/components/confirm_danger/confirm_danger_modal.vue
...shared/components/confirm_danger/confirm_danger_modal.vue
+1
-0
app/views/groups/settings/_remove_button.html.haml
app/views/groups/settings/_remove_button.html.haml
+1
-1
ee/spec/views/groups/settings/_remove.html.haml_spec.rb
ee/spec/views/groups/settings/_remove.html.haml_spec.rb
+10
-7
No files found.
app/assets/javascripts/init_confirm_danger.js
View file @
4e88386b
...
...
@@ -11,9 +11,10 @@ export default () => {
phrase
,
buttonText
,
confirmDangerMessage
,
test
I
d
=
null
,
test
i
d
=
null
,
disabled
=
false
,
}
=
el
.
dataset
;
return
new
Vue
({
el
,
provide
:
{
...
...
@@ -24,7 +25,7 @@ export default () => {
props
:
{
phrase
,
buttonText
,
test
I
d
,
test
i
d
,
disabled
:
parseBoolean
(
disabled
),
},
on
:
{
...
...
app/assets/javascripts/vue_shared/components/confirm_danger/confirm_danger.vue
View file @
4e88386b
...
...
@@ -26,7 +26,7 @@ export default {
type
:
String
,
required
:
true
,
},
test
I
d
:
{
test
i
d
:
{
type
:
String
,
required
:
false
,
default
:
'
confirm-danger-button
'
,
...
...
@@ -42,7 +42,7 @@ export default {
class=
"gl-button"
variant=
"danger"
:disabled=
"disabled"
:data-testid=
"test
I
d"
:data-testid=
"test
i
d"
>
{{
buttonText
}}
</gl-button
>
<confirm-danger-modal
...
...
app/assets/javascripts/vue_shared/components/confirm_danger/confirm_danger_modal.vue
View file @
4e88386b
...
...
@@ -93,6 +93,7 @@ export default {
</p>
<gl-form-group
:state=
"isValid"
:invalid-feedback=
"$options.i18n.CONFIRM_DANGER_MODAL_ERROR"
>
<gl-form-input
id=
"confirm_name_input"
v-model=
"confirmationPhrase"
class=
"form-control"
data-testid=
"confirm-danger-input"
...
...
app/views/groups/settings/_remove_button.html.haml
View file @
4e88386b
-
remove_form_id
=
local_assigns
.
fetch
(
:remove_form_id
,
nil
)
-
confirm_modal_data
=
{
"remove_form_id"
=>
remove_form_id
,
"disabled"
=>
group
.
paid?
,
"button-text"
=>
_
(
'Remove group'
),
"confirm-danger-message"
=>
remove_group_message
(
group
),
phrase:
group
.
full_path
,
'testid'
=>
'remove-group-button'
}
-
confirm_modal_data
=
{
"remove_form_id"
=>
remove_form_id
,
"disabled"
=>
group
.
paid?
.
to_s
,
"button-text"
=>
_
(
'Remove group'
),
"confirm-danger-message"
=>
remove_group_message
(
group
),
phrase:
group
.
full_path
,
'testid'
=>
'remove-group-button'
}
-
if
group
.
paid?
.gl-alert.gl-alert-info.gl-mb-5
{
data:
{
testid:
'group-has-linked-subscription-alert'
}
}
...
...
ee/spec/views/groups/settings/_remove.html.haml_spec.rb
View file @
4e88386b
...
...
@@ -10,7 +10,7 @@ RSpec.describe 'groups/settings/_remove.html.haml' do
render
'groups/settings/remove'
,
group:
group
expect
(
rendered
).
to
have_selector
'[data-testid="remove-group-button"]'
expect
(
rendered
).
not_to
have_selector
'[data-testid="remove-group-button"].disabled
'
expect
(
rendered
).
not_to
match
'data-disabled="true"
'
expect
(
rendered
).
not_to
have_selector
'[data-testid="group-has-linked-subscription-alert"]'
end
...
...
@@ -19,7 +19,8 @@ RSpec.describe 'groups/settings/_remove.html.haml' do
render
'groups/settings/remove'
,
group:
group
expect
(
rendered
).
to
have_selector
'[data-testid="remove-group-button"].disabled'
expect
(
rendered
).
to
have_selector
'[data-testid="remove-group-button"]'
expect
(
rendered
).
to
match
'data-disabled="true"'
expect
(
rendered
).
to
have_selector
'[data-testid="group-has-linked-subscription-alert"]'
end
...
...
@@ -28,7 +29,8 @@ RSpec.describe 'groups/settings/_remove.html.haml' do
render
'groups/settings/remove'
,
group:
group
expect
(
rendered
).
to
have_selector
'[data-testid="remove-group-button"].disabled'
expect
(
rendered
).
to
have_selector
'[data-testid="remove-group-button"]'
expect
(
rendered
).
to
match
'data-disabled="true"'
expect
(
rendered
).
to
have_selector
'[data-testid="group-has-linked-subscription-alert"]'
end
...
...
@@ -39,7 +41,7 @@ RSpec.describe 'groups/settings/_remove.html.haml' do
render
'groups/settings/remove'
,
group:
subgroup
expect
(
rendered
).
to
have_selector
'[data-testid="remove-group-button"]'
expect
(
rendered
).
not_to
have_selector
'[data-testid="remove-group-button"].disabled
'
expect
(
rendered
).
not_to
match
'data-disabled="true"
'
expect
(
rendered
).
not_to
have_selector
'[data-testid="group-has-linked-subscription-alert"]'
end
...
...
@@ -52,7 +54,7 @@ RSpec.describe 'groups/settings/_remove.html.haml' do
render
'groups/settings/remove'
,
group:
group
expect
(
rendered
).
to
have_selector
'[data-testid="remove-group-button"]'
expect
(
rendered
).
not_to
have_selector
'[data-testid="remove-group-button"].disabled
'
expect
(
rendered
).
not_to
match
'data-disabled="true"
'
expect
(
rendered
).
not_to
have_selector
'[data-testid="group-has-linked-subscription-alert"]'
end
...
...
@@ -61,7 +63,8 @@ RSpec.describe 'groups/settings/_remove.html.haml' do
render
'groups/settings/remove'
,
group:
group
expect
(
rendered
).
to
have_selector
'[data-testid="remove-group-button"].disabled'
expect
(
rendered
).
to
have_selector
'[data-testid="remove-group-button"]'
expect
(
rendered
).
to
match
'data-disabled="true"'
expect
(
rendered
).
to
have_selector
'[data-testid="group-has-linked-subscription-alert"]'
end
...
...
@@ -72,7 +75,7 @@ RSpec.describe 'groups/settings/_remove.html.haml' do
render
'groups/settings/remove'
,
group:
subgroup
expect
(
rendered
).
to
have_selector
'[data-testid="remove-group-button"]'
expect
(
rendered
).
not_to
have_selector
'[data-testid="remove-group-button"].disabled
'
expect
(
rendered
).
not_to
match
'data-disabled="true"
'
expect
(
rendered
).
not_to
have_selector
'[data-testid="group-has-linked-subscription-alert"]'
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment