Commit 27d7ec70 authored by Filipa Lacerda's avatar Filipa Lacerda

Remove spec checking for scope 'all' since it's no longer part of component

Changes after review

Fix typo
parent 595afed2
......@@ -72,7 +72,8 @@ module.exports = Vue.component('environment-item', {
* @returns {Boolean}
*/
hasLastDeploymentKey() {
if (this.model.latest && this.model.latest.last_deployment &&
if (this.model.latest &&
this.model.latest.last_deployment &&
!this.$options.isObjectEmpty(this.model.latest.last_deployment)) {
return true;
}
......@@ -86,7 +87,8 @@ module.exports = Vue.component('environment-item', {
* @returns {Boolean|Undefined}
*/
hasManualActions() {
return this.model.latest && this.model.latest.last_deployment &&
return this.model.latest &&
this.model.latest.last_deployment &&
this.model.latest.last_deployment.manual_actions &&
this.model.latest.last_deployment.manual_actions.length > 0;
},
......
......@@ -58,11 +58,11 @@ describe('Environment', () => {
}), {
status: 200,
headers: {
'X-Next-Page': '2',
'X-Page': '1',
'X-nExt-pAge': '2',
'x-page': '1',
'X-Per-Page': '1',
'X-Prev-Page': '',
'X-Total': '37',
'X-TOTAL': '37',
'X-Total-Pages': '2',
},
}));
......
......@@ -34,7 +34,7 @@ describe('Pagination component', () => {
component.changePage({ target: { innerText: '1' } });
expect(changeChanges.one).toEqual(1);
expect(changeChanges.two).toEqual('all');
expect(changeChanges.two).toEqual(null);
});
it('should go to the previous page', () => {
......@@ -55,7 +55,7 @@ describe('Pagination component', () => {
component.changePage({ target: { innerText: 'Prev' } });
expect(changeChanges.one).toEqual(1);
expect(changeChanges.two).toEqual('all');
expect(changeChanges.two).toEqual(null);
});
it('should go to the next page', () => {
......@@ -76,7 +76,7 @@ describe('Pagination component', () => {
component.changePage({ target: { innerText: 'Next' } });
expect(changeChanges.one).toEqual(5);
expect(changeChanges.two).toEqual('all');
expect(changeChanges.two).toEqual(null);
});
it('should go to the last page', () => {
......@@ -97,7 +97,7 @@ describe('Pagination component', () => {
component.changePage({ target: { innerText: 'Last >>' } });
expect(changeChanges.one).toEqual(10);
expect(changeChanges.two).toEqual('all');
expect(changeChanges.two).toEqual(null);
});
it('should go to the first page', () => {
......@@ -118,7 +118,7 @@ describe('Pagination component', () => {
component.changePage({ target: { innerText: '<< First' } });
expect(changeChanges.one).toEqual(1);
expect(changeChanges.two).toEqual('all');
expect(changeChanges.two).toEqual(null);
});
it('should do nothing', () => {
......@@ -139,7 +139,7 @@ describe('Pagination component', () => {
component.changePage({ target: { innerText: '...' } });
expect(changeChanges.one).toEqual(1);
expect(changeChanges.two).toEqual('all');
expect(changeChanges.two).toEqual(null);
});
});
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment