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
26bb62e5
Commit
26bb62e5
authored
Mar 06, 2017
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ci skip] Fix bad solved conflict in spec/javascripts/environments/environment_table_spec.js
parent
c9afd7aa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
83 additions
and
4 deletions
+83
-4
spec/javascripts/environments/environment_table_spec.js
spec/javascripts/environments/environment_table_spec.js
+83
-4
No files found.
spec/javascripts/environments/environment_table_spec.js
View file @
26bb62e5
...
...
@@ -9,22 +9,101 @@ describe('Environment item', () => {
it
(
'
Should render a table
'
,
()
=>
{
const
mockItem
=
{
name
:
'
review
'
,
folderName
:
'
review
'
,
size
:
3
,
isFolder
:
true
,
latest
:
{
environment_path
:
'
url
'
,
},
environment_path
:
'
url
'
,
};
const
component
=
new
EnvironmentTable
({
el
:
document
.
querySelector
(
'
.test-dom-element
'
),
propsData
:
{
environments
:
[
{
mockItem
}
],
environments
:
[
mockItem
],
canCreateDeployment
:
false
,
canReadEnvironment
:
true
,
toggleDeployBoard
:
()
=>
{},
store
:
{},
service
:
{},
},
});
expect
(
component
.
$el
.
tagName
).
toEqual
(
'
TABLE
'
);
});
it
(
'
should render deploy board container when data is provided
'
,
()
=>
{
const
mockItem
=
{
name
:
'
review
'
,
size
:
1
,
environment_path
:
'
url
'
,
id
:
1
,
rollout_status_path
:
'
url
'
,
hasDeployBoard
:
true
,
deployBoardData
:
{
instances
:
[
{
status
:
'
ready
'
,
tooltip
:
'
foo
'
},
],
abort_url
:
'
url
'
,
rollback_url
:
'
url
'
,
completion
:
100
,
is_completed
:
true
,
},
isDeployBoardVisible
:
true
,
};
const
component
=
new
EnvironmentTable
({
el
:
document
.
querySelector
(
'
.test-dom-element
'
),
propsData
:
{
environments
:
[
mockItem
],
canCreateDeployment
:
true
,
canReadEnvironment
:
true
,
toggleDeployBoard
:
()
=>
{},
store
:
{},
service
:
{},
},
});
expect
(
component
.
$el
.
querySelector
(
'
.js-deploy-board-row
'
)).
toBeDefined
();
expect
(
component
.
$el
.
querySelector
(
'
.deploy-board-icon i
'
).
classList
.
contains
(
'
fa-caret-right
'
),
).
toEqual
(
true
);
});
it
(
'
should toggle deploy board visibility when arrow is clicked
'
,
()
=>
{
const
mockItem
=
{
name
:
'
review
'
,
size
:
1
,
environment_path
:
'
url
'
,
id
:
1
,
rollout_status_path
:
'
url
'
,
hasDeployBoard
:
true
,
deployBoardData
:
{
instances
:
[
{
status
:
'
ready
'
,
tooltip
:
'
foo
'
},
],
abort_url
:
'
url
'
,
rollback_url
:
'
url
'
,
completion
:
100
,
is_completed
:
true
,
},
isDeployBoardVisible
:
false
,
};
const
spy
=
jasmine
.
createSpy
(
'
spy
'
);
const
component
=
new
EnvironmentTable
({
el
:
document
.
querySelector
(
'
.test-dom-element
'
),
propsData
:
{
environments
:
[
mockItem
],
canCreateDeployment
:
true
,
canReadEnvironment
:
true
,
toggleDeployBoard
:
spy
,
store
:
{},
service
:
{},
},
});
component
.
$el
.
querySelector
(
'
.deploy-board-icon
'
).
click
();
expect
(
spy
).
toHaveBeenCalled
();
});
});
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