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
500fd226
Commit
500fd226
authored
Apr 16, 2019
by
Nathan Friend
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add sync: false to fix Karma tests
parent
fe4f3a41
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
18 deletions
+32
-18
spec/javascripts/vue_mr_widget/components/mr_widget_alert_message_spec.js
.../vue_mr_widget/components/mr_widget_alert_message_spec.js
+32
-18
No files found.
spec/javascripts/vue_mr_widget/components/mr_widget_alert_message_spec.js
View file @
500fd226
...
@@ -11,6 +11,7 @@ describe('MrWidgetAlertMessage', () => {
...
@@ -11,6 +11,7 @@ describe('MrWidgetAlertMessage', () => {
wrapper
=
shallowMount
(
localVue
.
extend
(
MrWidgetAlertMessage
),
{
wrapper
=
shallowMount
(
localVue
.
extend
(
MrWidgetAlertMessage
),
{
propsData
:
{},
propsData
:
{},
localVue
,
localVue
,
sync
:
false
,
});
});
});
});
...
@@ -19,45 +20,58 @@ describe('MrWidgetAlertMessage', () => {
...
@@ -19,45 +20,58 @@ describe('MrWidgetAlertMessage', () => {
});
});
describe
(
'
when type is not provided
'
,
()
=>
{
describe
(
'
when type is not provided
'
,
()
=>
{
it
(
'
should render a red message
'
,
()
=>
{
it
(
'
should render a red message
'
,
done
=>
{
wrapper
.
vm
.
$nextTick
(()
=>
{
expect
(
wrapper
.
classes
()).
toContain
(
'
danger_message
'
);
expect
(
wrapper
.
classes
()).
toContain
(
'
danger_message
'
);
expect
(
wrapper
.
classes
()).
not
.
toContain
(
'
warning_message
'
);
expect
(
wrapper
.
classes
()).
not
.
toContain
(
'
warning_message
'
);
done
();
});
});
});
});
});
describe
(
'
when type === "danger"
'
,
()
=>
{
describe
(
'
when type === "danger"
'
,
()
=>
{
it
(
'
should render a red message
'
,
()
=>
{
it
(
'
should render a red message
'
,
done
=>
{
wrapper
.
setProps
({
type
:
'
danger
'
});
wrapper
.
setProps
({
type
:
'
danger
'
});
wrapper
.
vm
.
$nextTick
(()
=>
{
expect
(
wrapper
.
classes
()).
toContain
(
'
danger_message
'
);
expect
(
wrapper
.
classes
()).
toContain
(
'
danger_message
'
);
expect
(
wrapper
.
classes
()).
not
.
toContain
(
'
warning_message
'
);
expect
(
wrapper
.
classes
()).
not
.
toContain
(
'
warning_message
'
);
done
();
});
});
});
});
});
describe
(
'
when type === "warning"
'
,
()
=>
{
describe
(
'
when type === "warning"
'
,
()
=>
{
it
(
'
should render a red message
'
,
()
=>
{
it
(
'
should render a red message
'
,
done
=>
{
wrapper
.
setProps
({
type
:
'
warning
'
});
wrapper
.
setProps
({
type
:
'
warning
'
});
wrapper
.
vm
.
$nextTick
(()
=>
{
expect
(
wrapper
.
classes
()).
toContain
(
'
warning_message
'
);
expect
(
wrapper
.
classes
()).
toContain
(
'
warning_message
'
);
expect
(
wrapper
.
classes
()).
not
.
toContain
(
'
danger_message
'
);
expect
(
wrapper
.
classes
()).
not
.
toContain
(
'
danger_message
'
);
done
();
});
});
});
});
});
describe
(
'
when helpPath is not provided
'
,
()
=>
{
describe
(
'
when helpPath is not provided
'
,
()
=>
{
it
(
'
should not render a help icon/link
'
,
()
=>
{
it
(
'
should not render a help icon/link
'
,
done
=>
{
wrapper
.
vm
.
$nextTick
(()
=>
{
const
link
=
wrapper
.
find
(
GlLink
);
const
link
=
wrapper
.
find
(
GlLink
);
expect
(
link
.
exists
()).
toBe
(
false
);
expect
(
link
.
exists
()).
toBe
(
false
);
done
();
});
});
});
});
});
describe
(
'
when helpPath is provided
'
,
()
=>
{
describe
(
'
when helpPath is provided
'
,
()
=>
{
it
(
'
should render a help icon/link
'
,
()
=>
{
it
(
'
should render a help icon/link
'
,
done
=>
{
wrapper
.
setProps
({
helpPath
:
'
/path/to/help/docs
'
});
wrapper
.
setProps
({
helpPath
:
'
/path/to/help/docs
'
});
wrapper
.
vm
.
$nextTick
(()
=>
{
const
link
=
wrapper
.
find
(
GlLink
);
const
link
=
wrapper
.
find
(
GlLink
);
expect
(
link
.
exists
()).
toBe
(
true
);
expect
(
link
.
exists
()).
toBe
(
true
);
expect
(
link
.
attributes
().
href
).
toBe
(
'
/path/to/help/docs
'
);
expect
(
link
.
attributes
().
href
).
toBe
(
'
/path/to/help/docs
'
);
done
();
});
});
});
});
});
});
});
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