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', { ...@@ -72,7 +72,8 @@ module.exports = Vue.component('environment-item', {
* @returns {Boolean} * @returns {Boolean}
*/ */
hasLastDeploymentKey() { 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)) { !this.$options.isObjectEmpty(this.model.latest.last_deployment)) {
return true; return true;
} }
...@@ -86,7 +87,8 @@ module.exports = Vue.component('environment-item', { ...@@ -86,7 +87,8 @@ module.exports = Vue.component('environment-item', {
* @returns {Boolean|Undefined} * @returns {Boolean|Undefined}
*/ */
hasManualActions() { 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 &&
this.model.latest.last_deployment.manual_actions.length > 0; this.model.latest.last_deployment.manual_actions.length > 0;
}, },
......
...@@ -58,11 +58,11 @@ describe('Environment', () => { ...@@ -58,11 +58,11 @@ describe('Environment', () => {
}), { }), {
status: 200, status: 200,
headers: { headers: {
'X-Next-Page': '2', 'X-nExt-pAge': '2',
'X-Page': '1', 'x-page': '1',
'X-Per-Page': '1', 'X-Per-Page': '1',
'X-Prev-Page': '', 'X-Prev-Page': '',
'X-Total': '37', 'X-TOTAL': '37',
'X-Total-Pages': '2', 'X-Total-Pages': '2',
}, },
})); }));
......
...@@ -34,7 +34,7 @@ describe('Pagination component', () => { ...@@ -34,7 +34,7 @@ describe('Pagination component', () => {
component.changePage({ target: { innerText: '1' } }); component.changePage({ target: { innerText: '1' } });
expect(changeChanges.one).toEqual(1); expect(changeChanges.one).toEqual(1);
expect(changeChanges.two).toEqual('all'); expect(changeChanges.two).toEqual(null);
}); });
it('should go to the previous page', () => { it('should go to the previous page', () => {
...@@ -55,7 +55,7 @@ describe('Pagination component', () => { ...@@ -55,7 +55,7 @@ describe('Pagination component', () => {
component.changePage({ target: { innerText: 'Prev' } }); component.changePage({ target: { innerText: 'Prev' } });
expect(changeChanges.one).toEqual(1); expect(changeChanges.one).toEqual(1);
expect(changeChanges.two).toEqual('all'); expect(changeChanges.two).toEqual(null);
}); });
it('should go to the next page', () => { it('should go to the next page', () => {
...@@ -76,7 +76,7 @@ describe('Pagination component', () => { ...@@ -76,7 +76,7 @@ describe('Pagination component', () => {
component.changePage({ target: { innerText: 'Next' } }); component.changePage({ target: { innerText: 'Next' } });
expect(changeChanges.one).toEqual(5); expect(changeChanges.one).toEqual(5);
expect(changeChanges.two).toEqual('all'); expect(changeChanges.two).toEqual(null);
}); });
it('should go to the last page', () => { it('should go to the last page', () => {
...@@ -97,7 +97,7 @@ describe('Pagination component', () => { ...@@ -97,7 +97,7 @@ describe('Pagination component', () => {
component.changePage({ target: { innerText: 'Last >>' } }); component.changePage({ target: { innerText: 'Last >>' } });
expect(changeChanges.one).toEqual(10); expect(changeChanges.one).toEqual(10);
expect(changeChanges.two).toEqual('all'); expect(changeChanges.two).toEqual(null);
}); });
it('should go to the first page', () => { it('should go to the first page', () => {
...@@ -118,7 +118,7 @@ describe('Pagination component', () => { ...@@ -118,7 +118,7 @@ describe('Pagination component', () => {
component.changePage({ target: { innerText: '<< First' } }); component.changePage({ target: { innerText: '<< First' } });
expect(changeChanges.one).toEqual(1); expect(changeChanges.one).toEqual(1);
expect(changeChanges.two).toEqual('all'); expect(changeChanges.two).toEqual(null);
}); });
it('should do nothing', () => { it('should do nothing', () => {
...@@ -139,7 +139,7 @@ describe('Pagination component', () => { ...@@ -139,7 +139,7 @@ describe('Pagination component', () => {
component.changePage({ target: { innerText: '...' } }); component.changePage({ target: { innerText: '...' } });
expect(changeChanges.one).toEqual(1); 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