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
0
Merge Requests
0
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
Léo-Paul Géneau
gitlab-ce
Commits
7643a872
Commit
7643a872
authored
Jan 16, 2019
by
Sanad Liaquat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Created some more qa elements
parent
ffb17a3b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
9 deletions
+12
-9
app/views/shared/_personal_access_tokens_form.html.haml
app/views/shared/_personal_access_tokens_form.html.haml
+2
-2
app/views/shared/tokens/_scopes_form.html.haml
app/views/shared/tokens/_scopes_form.html.haml
+1
-1
qa/qa/page/profile/personal_access_tokens.rb
qa/qa/page/profile/personal_access_tokens.rb
+9
-6
No files found.
app/views/shared/_personal_access_tokens_form.html.haml
View file @
7643a872
...
...
@@ -12,7 +12,7 @@
.row
.form-group.col-md-6
=
f
.
label
:name
,
class:
'label-bold'
=
f
.
text_field
:name
,
class:
"form-control"
,
required:
true
=
f
.
text_field
:name
,
class:
"form-control
qa-personal-access-token-name-field
"
,
required:
true
.row
.form-group.col-md-6
...
...
@@ -26,4 +26,4 @@
=
render
'shared/tokens/scopes_form'
,
prefix:
'personal_access_token'
,
token:
token
,
scopes:
scopes
.prepend-top-default
=
f
.
submit
"Create
#{
type
}
token"
,
class:
"btn btn-success"
=
f
.
submit
"Create
#{
type
}
token"
,
class:
"btn btn-success
qa-create-token-button
"
app/views/shared/tokens/_scopes_form.html.haml
View file @
7643a872
...
...
@@ -4,6 +4,6 @@
-
scopes
.
each
do
|
scope
|
%fieldset
.form-group.form-check
=
check_box_tag
"
#{
prefix
}
[scopes][]"
,
scope
,
token
.
scopes
.
include?
(
scope
),
id:
"
#{
prefix
}
_scopes_
#{
scope
}
"
,
class:
'form-check-input'
=
check_box_tag
"
#{
prefix
}
[scopes][]"
,
scope
,
token
.
scopes
.
include?
(
scope
),
id:
"
#{
prefix
}
_scopes_
#{
scope
}
"
,
class:
"form-check-input qa-
#{
scope
}
-radio"
=
label_tag
(
"
#{
prefix
}
_scopes_
#{
scope
}
"
),
scope
,
class:
'label-bold form-check-label'
.text-secondary
=
t
scope
,
scope:
[
:doorkeeper
,
:scope_desc
]
qa/qa/page/profile/personal_access_tokens.rb
View file @
7643a872
...
...
@@ -3,9 +3,12 @@ module QA
module
Profile
class
PersonalAccessTokens
<
Page
::
Base
view
'app/views/shared/_personal_access_tokens_form.html.haml'
do
element
:personal_access_token_name_field
,
'text_field :name'
# rubocop:disable QA/ElementWithPattern
element
:create_token_button
,
'submit "Create #{type} token"'
# rubocop:disable QA/ElementWithPattern, Lint/InterpolationCheck
element
:scopes_api_radios
,
"label :scopes"
# rubocop:disable QA/ElementWithPattern
element
:personal_access_token_name_field
element
:create_token_button
end
view
'app/views/shared/tokens/_scopes_form.html.haml'
do
element
:api_radio
,
'qa-#{scope}-radio'
# rubocop:disable QA/ElementWithPattern, Lint/InterpolationCheck
end
view
'app/views/shared/_personal_access_tokens_created_container.html.haml'
do
...
...
@@ -16,15 +19,15 @@ module QA
end
def
fill_token_name
(
name
)
fill_
in
'personal_access_token_name'
,
with:
name
fill_
element
(
:personal_access_token_name_field
,
name
)
end
def
check_api
check
'personal_access_token_scopes_api'
check
_element
(
:api_radio
)
end
def
create_token
click_
on
'Create personal access token'
click_
element
(
:create_token_button
)
end
def
created_access_token
...
...
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