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
4d5abf60
Commit
4d5abf60
authored
May 03, 2021
by
Kev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add spec for single what's new feature
parent
36dd8219
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
0 deletions
+39
-0
spec/frontend/whats_new/components/feature_spec.js
spec/frontend/whats_new/components/feature_spec.js
+39
-0
No files found.
spec/frontend/whats_new/components/feature_spec.js
0 → 100644
View file @
4d5abf60
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
Feature
from
'
~/whats_new/components/feature.vue
'
;
describe
(
"
What's new single feature
"
,
()
=>
{
/** @type {import("@vue/test-utils").Wrapper} */
let
wrapper
;
const
exampleFeature
=
{
title
:
'
Compliance pipeline configurations
'
,
body
:
'
<p>We are thrilled to announce that it is now possible to define enforceable pipelines that will run for any project assigned a corresponding compliance framework.</p>
'
,
stage
:
'
Manage
'
,
'
self-managed
'
:
true
,
'
gitlab-com
'
:
true
,
packages
:
[
'
Ultimate
'
],
url
:
'
https://docs.gitlab.com/ee/user/project/settings/#compliance-pipeline-configuration
'
,
image_url
:
'
https://img.youtube.com/vi/upLJ_equomw/hqdefault.jpg
'
,
published_at
:
'
2021-04-22T00:00:00.000Z
'
,
release
:
'
13.11
'
,
};
const
findReleaseDate
=
()
=>
wrapper
.
find
(
'
[data-testid="release-date"]
'
).
text
();
const
createWrapper
=
({
feature
}
=
{})
=>
{
wrapper
=
shallowMount
(
Feature
,
{
propsData
:
{
feature
},
});
};
afterEach
(()
=>
{
wrapper
.
destroy
();
wrapper
=
null
;
});
it
(
'
renders the date
'
,
()
=>
{
createWrapper
({
feature
:
exampleFeature
});
expect
(
findReleaseDate
()).
toBe
(
'
April 22, 2021
'
);
});
});
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