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
6ea17c73
Commit
6ea17c73
authored
Jan 17, 2022
by
Ezekiel Kigbo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update settings panel specs
parent
479fa989
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
spec/frontend/pages/projects/shared/permissions/components/settings_panel_spec.js
...ects/shared/permissions/components/settings_panel_spec.js
+15
-0
No files found.
spec/frontend/pages/projects/shared/permissions/components/settings_panel_spec.js
View file @
6ea17c73
...
...
@@ -7,6 +7,7 @@ import {
visibilityLevelDescriptions
,
visibilityOptions
,
}
from
'
~/pages/projects/shared/permissions/constants
'
;
import
ConfirmDanger
from
'
~/vue_shared/components/confirm_danger/confirm_danger.vue
'
;
const
defaultProps
=
{
currentSettings
:
{
...
...
@@ -47,6 +48,7 @@ const defaultProps = {
packagesAvailable
:
false
,
packagesHelpPath
:
'
/help/user/packages/index
'
,
requestCveAvailable
:
true
,
confirmationPhrase
:
'
my-fake-project
'
,
};
describe
(
'
Settings Panel
'
,
()
=>
{
...
...
@@ -104,6 +106,7 @@ describe('Settings Panel', () => {
);
const
findMetricsVisibilitySettings
=
()
=>
wrapper
.
find
({
ref
:
'
metrics-visibility-settings
'
});
const
findOperationsSettings
=
()
=>
wrapper
.
find
({
ref
:
'
operations-settings
'
});
const
findConfirmDangerButton
=
()
=>
wrapper
.
findComponent
(
ConfirmDanger
);
afterEach
(()
=>
{
wrapper
.
destroy
();
...
...
@@ -177,6 +180,18 @@ describe('Settings Panel', () => {
expect
(
findRequestAccessEnabledInput
().
exists
()).
toBe
(
false
);
});
it
(
'
should render the confirmation dialog if the visibility is reduced
'
,
async
()
=>
{
wrapper
=
mountComponent
({
currentSettings
:
{
visibilityLevel
:
visibilityOptions
.
INTERNAL
},
});
expect
(
findConfirmDangerButton
().
exists
()).
toBe
(
false
);
await
findProjectVisibilityLevelInput
().
setValue
(
visibilityOptions
.
PRIVATE
);
expect
(
findConfirmDangerButton
().
exists
()).
toBe
(
true
);
});
});
describe
(
'
Issues settings
'
,
()
=>
{
...
...
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