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
5e4acfeb
Commit
5e4acfeb
authored
Jul 06, 2020
by
Robert Hunt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix column typo and rename spec variables
parent
3fd4fe97
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
14 deletions
+15
-14
ee/app/views/shared/credentials_inventory/_personal_access_tokens.html.haml
...d/credentials_inventory/_personal_access_tokens.html.haml
+1
-1
ee/spec/support/shared_examples/features/credentials_inventory_shared_examples.rb
...xamples/features/credentials_inventory_shared_examples.rb
+14
-13
No files found.
ee/app/views/shared/credentials_inventory/_personal_access_tokens.html.haml
View file @
5e4acfeb
...
...
@@ -4,6 +4,6 @@
.table-section.section-20
{
role:
'rowheader'
}=
_
(
'Scope'
)
.table-section.section-15
{
role:
'rowheader'
}=
_
(
'Created On'
)
.table-section.section-15
{
role:
'rowheader'
}=
_
(
'Expiration'
)
.table-section.section-1
5
{
role:
'rowheader'
}=
_
(
'Revoked'
)
.table-section.section-1
0
{
role:
'rowheader'
}=
_
(
'Revoked'
)
=
render
partial:
'shared/credentials_inventory/personal_access_tokens/personal_access_token'
,
collection:
credentials
ee/spec/support/shared_examples/features/credentials_inventory_shared_examples.rb
View file @
5e4acfeb
...
...
@@ -12,7 +12,7 @@ end
RSpec
.
shared_examples
'credentials inventory expiry date before'
do
before
do
travel_to
(
date_tim
e
)
travel_to
(
view_at_dat
e
)
end
after
do
...
...
@@ -28,7 +28,7 @@ end
RSpec
.
shared_examples
'credentials inventory expiry date close or past'
do
before
do
travel_to
(
date_tim
e
)
travel_to
(
view_at_dat
e
)
end
after
do
...
...
@@ -38,7 +38,7 @@ RSpec.shared_examples 'credentials inventory expiry date close or past' do
it
'adds a warning to the expiry date'
do
visit
credentials_path
expect
(
first_row
).
to
have_selector
(
'[data-testid="expiry-date-icon"]'
,
class:
css_class
)
expect
(
first_row
).
to
have_selector
(
'[data-testid="expiry-date-icon"]'
,
class:
expected_
css_class
)
end
end
...
...
@@ -64,6 +64,7 @@ RSpec.shared_examples_for 'credentials inventory personal access tokens' do |gro
expect
(
first_row
.
text
).
to
include
(
'2019-12-10'
)
expect
(
first_row
.
text
).
to
include
(
'Never'
)
expect
(
first_row
.
text
).
not_to
include
(
'2020-06-22'
)
expect
(
first_row
.
text
).
not_to
include
(
'2020-06-22'
)
end
end
...
...
@@ -79,23 +80,23 @@ RSpec.shared_examples_for 'credentials inventory personal access tokens' do |gro
end
context
'and is not expired'
do
let
(
:
date_tim
e
)
{
20
.
days
.
ago
}
let
(
:
view_at_dat
e
)
{
20
.
days
.
ago
}
it_behaves_like
'credentials inventory expiry date'
it_behaves_like
'credentials inventory expiry date before'
end
context
'and is near expiry'
do
let
(
:css_class
)
{
'text-warning'
}
let
(
:
date_tim
e
)
{
1
.
day
.
ago
}
let
(
:
expected_
css_class
)
{
'text-warning'
}
let
(
:
view_at_dat
e
)
{
1
.
day
.
ago
}
it_behaves_like
'credentials inventory expiry date'
it_behaves_like
'credentials inventory expiry date close or past'
end
context
'and is expired'
do
let
(
:css_class
)
{
'text-danger'
}
let
(
:
date_tim
e
)
{
2
.
days
.
since
}
let
(
:
expected_
css_class
)
{
'text-danger'
}
let
(
:
view_at_dat
e
)
{
2
.
days
.
since
}
it_behaves_like
'credentials inventory expiry date'
it_behaves_like
'credentials inventory expiry date close or past'
...
...
@@ -161,23 +162,23 @@ RSpec.shared_examples_for 'credentials inventory SSH keys' do |group_managed_acc
end
context
'and is not expired'
do
let
(
:
date_tim
e
)
{
20
.
days
.
ago
}
let
(
:
view_at_dat
e
)
{
20
.
days
.
ago
}
it_behaves_like
'credentials inventory expiry date'
it_behaves_like
'credentials inventory expiry date before'
end
context
'and is near expiry'
do
let
(
:css_class
)
{
'text-warning'
}
let
(
:
date_tim
e
)
{
1
.
day
.
ago
}
let
(
:
expected_
css_class
)
{
'text-warning'
}
let
(
:
view_at_dat
e
)
{
1
.
day
.
ago
}
it_behaves_like
'credentials inventory expiry date'
it_behaves_like
'credentials inventory expiry date close or past'
end
context
'and is expired'
do
let
(
:css_class
)
{
'text-danger'
}
let
(
:
date_tim
e
)
{
2
.
days
.
since
}
let
(
:
expected_
css_class
)
{
'text-danger'
}
let
(
:
view_at_dat
e
)
{
2
.
days
.
since
}
it_behaves_like
'credentials inventory expiry date'
it_behaves_like
'credentials inventory expiry date close or past'
...
...
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