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
f2b6ac83
Commit
f2b6ac83
authored
Feb 24, 2017
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix broken tests
parent
f047c4f8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
15 deletions
+11
-15
spec/javascripts/environments/deploy_board_component_spec.js.es6
...vascripts/environments/deploy_board_component_spec.js.es6
+5
-7
spec/javascripts/environments/deploy_board_instance_component_spec.js.es6
.../environments/deploy_board_instance_component_spec.js.es6
+6
-8
No files found.
spec/javascripts/environments/deploy_board_component_spec.js.es6
View file @
f2b6ac83
const Vue = require('vue');
const DeployBoard
Component
= require('~/environments/components/deploy_board_component');
const DeployBoard = require('~/environments/components/deploy_board_component');
const Service = require('~/environments/services/environments_service');
const { deployBoardMockData } = require('./mock_data');
describe('Deploy Board', () => {
preloadFixtures('static/environments/element.html.raw')
;
let DeployBoardComponent
;
beforeEach(() => {
loadFixtures('static/environments/element.html.raw'
);
DeployBoardComponent = Vue.extend(DeployBoard
);
});
describe('successfull request', () => {
...
...
@@ -25,14 +25,13 @@ describe('Deploy Board', () => {
this.service = new Service('environments');
component = new DeployBoardComponent({
el: document.querySelector('.test-dom-element'),
propsData: {
store: {},
service: this.service,
deployBoardData: deployBoardMockData,
environmentID: 1,
},
});
})
.$mount()
;
});
afterEach(() => {
...
...
@@ -92,14 +91,13 @@ describe('Deploy Board', () => {
this.service = new Service('environments');
component = new DeployBoardComponent({
el: document.querySelector('.test-dom-element'),
propsData: {
store: {},
service: this.service,
deployBoardData: {},
environmentID: 1,
},
});
})
.$mount()
;
});
afterEach(() => {
...
...
spec/javascripts/environments/deploy_board_instance_component_spec.js.es6
View file @
f2b6ac83
require('vue');
const DeployBoardInstance
Component
= require('~/environments/components/deploy_board_instance_component');
const Vue =
require('vue');
const DeployBoardInstance = require('~/environments/components/deploy_board_instance_component');
describe('Deploy Board Instance', () => {
preloadFixtures('static/environments/element.html.raw')
;
let DeployBoardInstanceComponent
;
beforeEach(() => {
loadFixtures('static/environments/element.html.raw'
);
DeployBoardInstanceComponent = Vue.extend(DeployBoardInstance
);
});
it('should render a div with the correct css status and tooltip data', () => {
const component = new DeployBoardInstanceComponent({
el: document.querySelector('.test-dom-element'),
propsData: {
status: 'ready',
tooltipText: 'This is a pod',
},
});
})
.$mount()
;
expect(component.$el.classList.contains('deploy-board-instance-ready')).toBe(true);
expect(component.$el.getAttribute('data-title')).toEqual('This is a pod');
...
...
@@ -23,11 +22,10 @@ describe('Deploy Board Instance', () => {
it('should render a div without tooltip data', () => {
const component = new DeployBoardInstanceComponent({
el: document.querySelector('.test-dom-element'),
propsData: {
status: 'deploying',
},
});
})
.$mount()
;
expect(component.$el.classList.contains('deploy-board-instance-deploying')).toBe(true);
expect(component.$el.getAttribute('data-title')).toEqual('');
...
...
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