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
Jérome Perrin
gitlab-ce
Commits
dc3de71f
Commit
dc3de71f
authored
May 31, 2017
by
kushalpandya
Committed by
Jarka Kadlecova
Jun 01, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update tests based on source changes
parent
576e30ee
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
7 deletions
+10
-7
spec/javascripts/integrations/integration_settings_form_spec.js
...avascripts/integrations/integration_settings_form_spec.js
+10
-7
No files found.
spec/javascripts/integrations/integration_settings_form_spec.js
View file @
dc3de71f
...
...
@@ -29,7 +29,7 @@ describe('IntegrationSettingsForm', () => {
});
it
(
'
should initialize form metadata on class object
'
,
()
=>
{
expect
(
integrationSettingsForm
.
e
ndPoint
).
toBeDefined
();
expect
(
integrationSettingsForm
.
testE
ndPoint
).
toBeDefined
();
expect
(
integrationSettingsForm
.
canTestService
).
toBeDefined
();
});
});
...
...
@@ -62,22 +62,25 @@ describe('IntegrationSettingsForm', () => {
});
it
(
'
should set Save button label to "Test settings and save changes" when serviceActive & canTestService are `true`
'
,
()
=>
{
integrationSettingsForm
.
toggleSubmitBtnLabel
(
true
,
true
)
;
integrationSettingsForm
.
canTestService
=
true
;
integrationSettingsForm
.
toggleSubmitBtnLabel
(
true
);
expect
(
integrationSettingsForm
.
$submitBtnLabel
.
text
()).
toEqual
(
'
Test settings and save changes
'
);
});
it
(
'
should set Save button label to "Save changes" when either serviceActive or canTestService (or both) is `false`
'
,
()
=>
{
integrationSettingsForm
.
toggleSubmitBtnLabel
(
false
,
false
)
;
integrationSettingsForm
.
canTestService
=
false
;
integrationSettingsForm
.
toggleSubmitBtnLabel
(
false
);
expect
(
integrationSettingsForm
.
$submitBtnLabel
.
text
()).
toEqual
(
'
Save changes
'
);
integrationSettingsForm
.
toggleSubmitBtnLabel
(
false
,
true
);
integrationSettingsForm
.
toggleSubmitBtnLabel
(
true
);
expect
(
integrationSettingsForm
.
$submitBtnLabel
.
text
()).
toEqual
(
'
Save changes
'
);
integrationSettingsForm
.
toggleSubmitBtnLabel
(
true
,
false
);
integrationSettingsForm
.
canTestService
=
true
;
integrationSettingsForm
.
toggleSubmitBtnLabel
(
false
);
expect
(
integrationSettingsForm
.
$submitBtnLabel
.
text
()).
toEqual
(
'
Save changes
'
);
});
});
...
...
@@ -121,7 +124,7 @@ describe('IntegrationSettingsForm', () => {
expect
(
$
.
ajax
).
toHaveBeenCalledWith
({
type
:
'
PUT
'
,
url
:
`
${
integrationSettingsForm
.
endPoint
}
/test`
,
url
:
integrationSettingsForm
.
testEndPoint
,
data
:
formData
,
});
});
...
...
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