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
7bc2ec58
Commit
7bc2ec58
authored
Jan 14, 2021
by
Tom Quirk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use fixture for integration helpHtml spec
parent
de1567a7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
7 deletions
+12
-7
spec/frontend/integrations/edit/components/integration_form_spec.js
...end/integrations/edit/components/integration_form_spec.js
+12
-7
No files found.
spec/frontend/integrations/edit/components/integration_form_spec.js
View file @
7bc2ec58
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
{
mockIntegrationProps
}
from
'
jest/integrations/edit/mock_data
'
;
import
{
extendedWrapper
}
from
'
helpers/vue_test_utils_helper
'
;
import
{
setHTMLFixture
}
from
'
helpers/fixtures
'
;
import
{
createStore
}
from
'
~/integrations/edit/store
'
;
import
IntegrationForm
from
'
~/integrations/edit/components/integration_form.vue
'
;
import
OverrideDropdown
from
'
~/integrations/edit/components/override_dropdown.vue
'
;
...
...
@@ -296,18 +297,22 @@ describe('IntegrationForm', () => {
});
describe
(
'
with `helpHtml` prop
'
,
()
=>
{
const
mockTestId
=
'
jest-helpHtml-test
'
;
const
mockHelpHtml
=
document
.
createElement
(
'
div
'
);
mockHelpHtml
.
setAttribute
(
'
data-testid
'
,
mockTestId
);
mockHelpHtml
.
appendChild
(
document
.
createElement
(
'
svg
'
));
const
mockTestId
=
'
jest-help-html-test
'
;
const
mockHelpHtmlContainer
=
document
.
createElement
(
'
div
'
);
mockHelpHtmlContainer
.
appendChild
(
mockHelpHtml
);
setHTMLFixture
(
`
<div data-testid="
${
mockTestId
}
">
<svg class="gl-icon">
<use></use>
</svg>
</div>
`
);
it
(
'
renders `helpHtml`
'
,
async
()
=>
{
const
mockHelpHtml
=
document
.
querySelector
(
`[data-testid="
${
mockTestId
}
"]`
);
createComponent
({
props
:
{
helpHtml
:
mockHelpHtml
Container
.
inn
erHTML
,
helpHtml
:
mockHelpHtml
.
out
erHTML
,
},
});
...
...
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