diff options
author | Filipa Lacerda <filipa@gitlab.com> | 2019-03-08 13:01:46 +0300 |
---|---|---|
committer | Filipa Lacerda <filipa@gitlab.com> | 2019-03-08 17:35:12 +0300 |
commit | cf7068000b24729c13e35bcbcdf7718a8707ce37 (patch) | |
tree | 7aa15c902bfcc7d9802a52ca5c921bbde0195202 /spec/javascripts | |
parent | 26477f388952f9b8d02fcca6ac4395915e48218c (diff) |
Reduces EE differences for environments table
Async loads EE components
Creates a Mixin for EE properties
Diffstat (limited to 'spec/javascripts')
-rw-r--r-- | spec/javascripts/environments/environment_table_spec.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/javascripts/environments/environment_table_spec.js b/spec/javascripts/environments/environment_table_spec.js index ecd28594873..a3f34232a85 100644 --- a/spec/javascripts/environments/environment_table_spec.js +++ b/spec/javascripts/environments/environment_table_spec.js @@ -6,6 +6,14 @@ describe('Environment table', () => { let Component; let vm; + const eeOnlyProps = { + canaryDeploymentFeatureId: 'canary_deployment', + showCanaryDeploymentCallout: true, + userCalloutsPath: '/callouts', + lockPromotionSvgPath: '/assets/illustrations/lock-promotion.svg', + helpCanaryDeploymentsPath: 'help/canary-deployments', + }; + beforeEach(() => { Component = Vue.extend(environmentTableComp); }); @@ -27,6 +35,7 @@ describe('Environment table', () => { vm = mountComponent(Component, { environments: [mockItem], canReadEnvironment: true, + ...eeOnlyProps, }); expect(vm.$el.getAttribute('class')).toContain('ci-table'); @@ -67,6 +76,7 @@ describe('Environment table', () => { vm = mountComponent(Component, { environments: mockItems, canReadEnvironment: true, + ...eeOnlyProps, }); const [old, newer, older, noDeploy] = mockItems; @@ -130,6 +140,7 @@ describe('Environment table', () => { vm = mountComponent(Component, { environments: mockItems, canReadEnvironment: true, + ...eeOnlyProps, }); const [prod, review, staging] = mockItems; @@ -166,6 +177,7 @@ describe('Environment table', () => { vm = mountComponent(Component, { environments: mockItems, canReadEnvironment: true, + ...eeOnlyProps, }); const [old, newer, older] = mockItems; @@ -192,6 +204,7 @@ describe('Environment table', () => { vm = mountComponent(Component, { environments: mockItems, canReadEnvironment: true, + ...eeOnlyProps, }); const [old, newer, older] = mockItems; @@ -240,6 +253,7 @@ describe('Environment table', () => { vm = mountComponent(Component, { environments: mockItems, canReadEnvironment: true, + ...eeOnlyProps, }); expect(vm.sortedEnvironments.map(env => env.name)).toEqual([ |