BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
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
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
7 deletions
+10
-7
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