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
0e403386
Commit
0e403386
authored
Jun 04, 2019
by
Paul Gascou-Vaillancourt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix submit button selector in specs
parent
327cae1d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
spec/frontend/operation_settings/components/external_dashboard_spec.js
.../operation_settings/components/external_dashboard_spec.js
+5
-3
No files found.
spec/frontend/operation_settings/components/external_dashboard_spec.js
View file @
0e403386
...
...
@@ -114,6 +114,8 @@ describe('operation settings external dashboard component', () => {
});
describe
(
'
submit button
'
,
()
=>
{
const
findSubmitButton
=
()
=>
wrapper
.
find
(
'
.settings-content form
'
).
find
(
GlButton
);
const
endpointRequest
=
[
operationsSettingsEndpoint
,
{
...
...
@@ -127,14 +129,14 @@ describe('operation settings external dashboard component', () => {
it
(
'
renders button label
'
,
()
=>
{
mountComponent
();
const
submit
=
wrapper
.
find
(
GlButton
);
const
submit
=
findSubmitButton
(
);
expect
(
submit
.
text
()).
toBe
(
'
Save Changes
'
);
});
it
(
'
submits form on click
'
,
()
=>
{
mountComponent
(
false
);
axios
.
patch
.
mockResolvedValue
();
wrapper
.
find
(
GlButton
).
trigger
(
'
click
'
);
findSubmitButton
(
).
trigger
(
'
click
'
);
expect
(
axios
.
patch
).
toHaveBeenCalledWith
(...
endpointRequest
);
...
...
@@ -145,7 +147,7 @@ describe('operation settings external dashboard component', () => {
mountComponent
(
false
);
const
message
=
'
mockErrorMessage
'
;
axios
.
patch
.
mockRejectedValue
({
response
:
{
data
:
{
message
}
}
});
wrapper
.
find
(
GlButton
).
trigger
(
'
click
'
);
findSubmitButton
(
).
trigger
(
'
click
'
);
expect
(
axios
.
patch
).
toHaveBeenCalledWith
(...
endpointRequest
);
...
...
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