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
0fe5eca4
Commit
0fe5eca4
authored
Apr 12, 2022
by
anna_vovchenko
Committed by
Anna Vovchenko
Apr 13, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated tests to use label instead of the checkbox
parent
6802c153
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
7 deletions
+8
-7
app/views/shared/tokens/_scopes_form.html.haml
app/views/shared/tokens/_scopes_form.html.haml
+2
-1
qa/qa/page/component/access_tokens.rb
qa/qa/page/component/access_tokens.rb
+2
-2
spec/features/admin/admin_users_impersonation_tokens_spec.rb
spec/features/admin/admin_users_impersonation_tokens_spec.rb
+2
-2
spec/features/profiles/personal_access_tokens_spec.rb
spec/features/profiles/personal_access_tokens_spec.rb
+2
-2
No files found.
app/views/shared/tokens/_scopes_form.html.haml
View file @
0fe5eca4
...
...
@@ -10,4 +10,5 @@
help_text:
help_text
,
checkbox_options:
{
checked:
token
.
scopes
.
include?
(
scope
),
id:
"
#{
prefix
}
_scopes_
#{
scope
}
"
,
multiple:
true
,
data:
{
qa_selector:
"
#{
scope
}
_checkbox"
}
},
checked_value:
scope
,
unchecked_value:
nil
unchecked_value:
nil
,
label_options:
{
data:
{
qa_selector:
"
#{
scope
}
_label"
}
}
qa/qa/page/component/access_tokens.rb
View file @
0fe5eca4
...
...
@@ -19,7 +19,7 @@ module QA
end
base
.
view
'app/views/shared/tokens/_scopes_form.html.haml'
do
element
:api_
checkbox
,
'#{scope}_checkbox
'
# rubocop:disable QA/ElementWithPattern, Lint/InterpolationCheck
element
:api_
label
,
'#{scope}_label
'
# rubocop:disable QA/ElementWithPattern, Lint/InterpolationCheck
end
base
.
view
'app/views/shared/access_tokens/_created_container.html.haml'
do
...
...
@@ -36,7 +36,7 @@ module QA
end
def
check_api
c
heck_element
(
:api_checkbox
)
c
lick_element
(
:api_label
)
end
def
click_create_token_button
...
...
spec/features/admin/admin_users_impersonation_tokens_spec.rb
View file @
0fe5eca4
...
...
@@ -36,14 +36,14 @@ RSpec.describe 'Admin > Users > Impersonation Tokens', :js do
click_on
"1"
# Scopes
check
"api"
check
"
read_
api"
check
"read_user"
click_on
"Create impersonation token"
expect
(
active_impersonation_tokens
).
to
have_text
(
name
)
expect
(
active_impersonation_tokens
).
to
have_text
(
'in'
)
expect
(
active_impersonation_tokens
).
to
have_text
(
'api'
)
expect
(
active_impersonation_tokens
).
to
have_text
(
'
read_
api'
)
expect
(
active_impersonation_tokens
).
to
have_text
(
'read_user'
)
expect
(
PersonalAccessTokensFinder
.
new
(
impersonation:
true
).
execute
.
count
).
to
equal
(
1
)
expect
(
created_impersonation_token
).
not_to
be_empty
...
...
spec/features/profiles/personal_access_tokens_spec.rb
View file @
0fe5eca4
...
...
@@ -47,14 +47,14 @@ RSpec.describe 'Profile > Personal Access Tokens', :js do
click_on
"1"
# Scopes
check
"api"
check
"
read_
api"
check
"read_user"
click_on
"Create personal access token"
expect
(
active_personal_access_tokens
).
to
have_text
(
name
)
expect
(
active_personal_access_tokens
).
to
have_text
(
'in'
)
expect
(
active_personal_access_tokens
).
to
have_text
(
'api'
)
expect
(
active_personal_access_tokens
).
to
have_text
(
'
read_
api'
)
expect
(
active_personal_access_tokens
).
to
have_text
(
'read_user'
)
expect
(
created_personal_access_token
).
not_to
be_empty
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