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
eb5142cf
Commit
eb5142cf
authored
Jul 24, 2020
by
Tom Quirk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Settings_panel_spec: Prefer `toBe` over `toEqual`
parent
283b8ea5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
27 deletions
+23
-27
spec/frontend/pages/projects/shared/permissions/components/settings_panel_spec.js
...ects/shared/permissions/components/settings_panel_spec.js
+23
-27
No files found.
spec/frontend/pages/projects/shared/permissions/components/settings_panel_spec.js
View file @
eb5142cf
...
...
@@ -162,7 +162,7 @@ describe('Settings Panel', () => {
it
(
'
should set the repository help text when the visibility level is set to private
'
,
()
=>
{
wrapper
=
overrideCurrentSettings
({
visibilityLevel
:
visibilityOptions
.
PRIVATE
});
expect
(
findRepositoryFeatureProjectRow
().
props
().
helpText
).
to
Equal
(
expect
(
findRepositoryFeatureProjectRow
().
props
().
helpText
).
to
Be
(
'
View and edit files in this project
'
,
);
});
...
...
@@ -170,7 +170,7 @@ describe('Settings Panel', () => {
it
(
'
should set the repository help text with a read access warning when the visibility level is set to non-private
'
,
()
=>
{
wrapper
=
overrideCurrentSettings
({
visibilityLevel
:
visibilityOptions
.
PUBLIC
});
expect
(
findRepositoryFeatureProjectRow
().
props
().
helpText
).
to
Equal
(
expect
(
findRepositoryFeatureProjectRow
().
props
().
helpText
).
to
Be
(
'
View and edit files in this project. Non-project members will only have read access
'
,
);
});
...
...
@@ -184,7 +184,7 @@ describe('Settings Panel', () => {
wrapper
.
find
(
'
[name="project[project_feature_attributes][merge_requests_access_level]"]
'
)
.
props
().
disabledInput
,
).
to
Equal
(
false
);
).
to
Be
(
false
);
});
it
(
'
should disable the merge requests access level input when the repository is disabled
'
,
()
=>
{
...
...
@@ -194,7 +194,7 @@ describe('Settings Panel', () => {
wrapper
.
find
(
'
[name="project[project_feature_attributes][merge_requests_access_level]"]
'
)
.
props
().
disabledInput
,
).
to
Equal
(
true
);
).
to
Be
(
true
);
});
});
...
...
@@ -205,7 +205,7 @@ describe('Settings Panel', () => {
expect
(
wrapper
.
find
(
'
[name="project[project_feature_attributes][forking_access_level]"]
'
).
props
()
.
disabledInput
,
).
to
Equal
(
false
);
).
to
Be
(
false
);
});
it
(
'
should disable the forking access level input when the repository is disabled
'
,
()
=>
{
...
...
@@ -214,7 +214,7 @@ describe('Settings Panel', () => {
expect
(
wrapper
.
find
(
'
[name="project[project_feature_attributes][forking_access_level]"]
'
).
props
()
.
disabledInput
,
).
to
Equal
(
true
);
).
to
Be
(
true
);
});
});
...
...
@@ -225,7 +225,7 @@ describe('Settings Panel', () => {
expect
(
wrapper
.
find
(
'
[name="project[project_feature_attributes][builds_access_level]"]
'
).
props
()
.
disabledInput
,
).
to
Equal
(
false
);
).
to
Be
(
false
);
});
it
(
'
should disable the builds access level input when the repository is disabled
'
,
()
=>
{
...
...
@@ -234,7 +234,7 @@ describe('Settings Panel', () => {
expect
(
wrapper
.
find
(
'
[name="project[project_feature_attributes][builds_access_level]"]
'
).
props
()
.
disabledInput
,
).
to
Equal
(
true
);
).
to
Be
(
true
);
});
});
...
...
@@ -295,7 +295,7 @@ describe('Settings Panel', () => {
expect
(
wrapper
.
find
(
'
[name="project[container_registry_enabled]"]
'
).
props
().
disabledInput
,
).
to
Equal
(
false
);
).
to
Be
(
false
);
});
it
(
'
should disable the container registry input when the repository is disabled
'
,
()
=>
{
...
...
@@ -306,7 +306,7 @@ describe('Settings Panel', () => {
expect
(
wrapper
.
find
(
'
[name="project[container_registry_enabled]"]
'
).
props
().
disabledInput
,
).
to
Equal
(
true
);
).
to
Be
(
true
);
});
});
...
...
@@ -315,7 +315,7 @@ describe('Settings Panel', () => {
wrapper
.
setProps
({
lfsAvailable
:
true
});
return
wrapper
.
vm
.
$nextTick
(()
=>
{
expect
(
findLFSSettingsRow
().
exists
()).
to
Equal
(
true
);
expect
(
findLFSSettingsRow
().
exists
()).
to
Be
(
true
);
});
});
...
...
@@ -323,7 +323,7 @@ describe('Settings Panel', () => {
wrapper
.
setProps
({
lfsAvailable
:
false
});
return
wrapper
.
vm
.
$nextTick
(()
=>
{
expect
(
findLFSSettingsRow
().
exists
()).
to
Equal
(
false
);
expect
(
findLFSSettingsRow
().
exists
()).
to
Be
(
false
);
});
});
...
...
@@ -337,7 +337,7 @@ describe('Settings Panel', () => {
{
lfsAvailable
:
true
},
);
expect
(
findLFSFeatureToggle
().
props
().
disabledInput
).
to
Equal
(
false
);
expect
(
findLFSFeatureToggle
().
props
().
disabledInput
).
to
Be
(
false
);
});
it
(
'
should disable the LFS input when the repository is disabled
'
,
()
=>
{
...
...
@@ -346,7 +346,7 @@ describe('Settings Panel', () => {
{
lfsAvailable
:
true
},
);
expect
(
findLFSFeatureToggle
().
props
().
disabledInput
).
to
Equal
(
true
);
expect
(
findLFSFeatureToggle
().
props
().
disabledInput
).
to
Be
(
true
);
});
it
(
'
should not change lfsEnabled when disabling the repository
'
,
async
()
=>
{
...
...
@@ -393,14 +393,14 @@ describe('Settings Panel', () => {
expect
(
message
.
text
()).
toContain
(
'
LFS objects from this repository are still available to forks
'
,
);
expect
(
link
.
text
()).
to
Equal
(
'
How do I remove them?
'
);
expect
(
link
.
attributes
(
'
href
'
)).
to
Equal
(
expect
(
link
.
text
()).
to
Be
(
'
How do I remove them?
'
);
expect
(
link
.
attributes
(
'
href
'
)).
to
Be
(
'
/help/topics/git/lfs/index#removing-objects-from-lfs
'
,
);
});
}
else
{
it
(
'
does not show warning message
'
,
()
=>
{
expect
(
findLFSSettingsMessage
().
exists
()).
to
Equal
(
false
);
expect
(
findLFSSettingsMessage
().
exists
()).
to
Be
(
false
);
});
}
},
...
...
@@ -412,7 +412,7 @@ describe('Settings Panel', () => {
wrapper
.
setProps
({
packagesAvailable
:
true
});
return
wrapper
.
vm
.
$nextTick
(()
=>
{
expect
(
wrapper
.
find
({
ref
:
'
package-settings
'
}).
exists
()).
to
Equal
(
true
);
expect
(
wrapper
.
find
({
ref
:
'
package-settings
'
}).
exists
()).
to
Be
(
true
);
});
});
...
...
@@ -420,7 +420,7 @@ describe('Settings Panel', () => {
wrapper
.
setProps
({
packagesAvailable
:
false
});
return
wrapper
.
vm
.
$nextTick
(()
=>
{
expect
(
wrapper
.
find
({
ref
:
'
package-settings
'
}).
exists
()).
to
Equal
(
false
);
expect
(
wrapper
.
find
({
ref
:
'
package-settings
'
}).
exists
()).
to
Be
(
false
);
});
});
...
...
@@ -440,9 +440,7 @@ describe('Settings Panel', () => {
{
packagesAvailable
:
true
},
);
expect
(
wrapper
.
find
(
'
[name="project[packages_enabled]"]
'
).
props
().
disabledInput
).
toEqual
(
false
,
);
expect
(
wrapper
.
find
(
'
[name="project[packages_enabled]"]
'
).
props
().
disabledInput
).
toBe
(
false
);
});
it
(
'
should disable the packages input when the repository is disabled
'
,
()
=>
{
...
...
@@ -451,9 +449,7 @@ describe('Settings Panel', () => {
{
packagesAvailable
:
true
},
);
expect
(
wrapper
.
find
(
'
[name="project[packages_enabled]"]
'
).
props
().
disabledInput
).
toEqual
(
true
,
);
expect
(
wrapper
.
find
(
'
[name="project[packages_enabled]"]
'
).
props
().
disabledInput
).
toBe
(
true
);
});
});
...
...
@@ -532,7 +528,7 @@ describe('Settings Panel', () => {
});
it
(
'
should contain help text
'
,
()
=>
{
expect
(
wrapper
.
find
({
ref
:
'
metrics-visibility-settings
'
}).
props
().
helpText
).
to
Equal
(
expect
(
wrapper
.
find
({
ref
:
'
metrics-visibility-settings
'
}).
props
().
helpText
).
to
Be
(
'
With Metrics Dashboard you can visualize this project performance metrics
'
,
);
});
...
...
@@ -543,7 +539,7 @@ describe('Settings Panel', () => {
const
metricsSettingsRow
=
wrapper
.
find
({
ref
:
'
metrics-visibility-settings
'
});
expect
(
wrapper
.
vm
.
metricsOptionsDropdownEnabled
).
toBe
(
true
);
expect
(
metricsSettingsRow
.
find
(
'
select
'
).
attributes
(
'
disabled
'
)).
to
Equal
(
'
disabled
'
);
expect
(
metricsSettingsRow
.
find
(
'
select
'
).
attributes
(
'
disabled
'
)).
to
Be
(
'
disabled
'
);
});
});
});
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