diff options
author | Filipa Lacerda <filipa@gitlab.com> | 2017-04-20 18:41:21 +0100 |
---|---|---|
committer | Filipa Lacerda <filipa@gitlab.com> | 2017-04-20 18:41:21 +0100 |
commit | f521ecd1535ce04ed1688b86ccdb8d45f161e9bf (patch) | |
tree | fba33e3905b8e6abc4172dfd9569d2af219cd84d /spec/javascripts/pipelines/empty_state_spec.js | |
parent | 60a6389a7223f14156aeeec9a3854f8ea88de1f0 (diff) | |
download | gitlab-ce-f521ecd1535ce04ed1688b86ccdb8d45f161e9bf.tar.gz |
Change spec folder to match the assets onevue-pipelines-folder
Diffstat (limited to 'spec/javascripts/pipelines/empty_state_spec.js')
-rw-r--r-- | spec/javascripts/pipelines/empty_state_spec.js | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/spec/javascripts/pipelines/empty_state_spec.js b/spec/javascripts/pipelines/empty_state_spec.js new file mode 100644 index 00000000000..bb47a28d9fe --- /dev/null +++ b/spec/javascripts/pipelines/empty_state_spec.js @@ -0,0 +1,38 @@ +import Vue from 'vue'; +import emptyStateComp from '~/pipelines/components/empty_state.vue'; + +describe('Pipelines Empty State', () => { + let component; + let EmptyStateComponent; + + beforeEach(() => { + EmptyStateComponent = Vue.extend(emptyStateComp); + + component = new EmptyStateComponent({ + propsData: { + helpPagePath: 'foo', + }, + }).$mount(); + }); + + it('should render empty state SVG', () => { + expect(component.$el.querySelector('.svg-content svg')).toBeDefined(); + }); + + it('should render emtpy state information', () => { + expect(component.$el.querySelector('h4').textContent).toContain('Build with confidence'); + + expect( + component.$el.querySelector('p').textContent, + ).toContain('Continous Integration can help catch bugs by running your tests automatically'); + + expect( + component.$el.querySelector('p').textContent, + ).toContain('Continuous Deployment can help you deliver code to your product environment'); + }); + + it('should render a link with provided help path', () => { + expect(component.$el.querySelector('.btn-info').getAttribute('href')).toEqual('foo'); + expect(component.$el.querySelector('.btn-info').textContent).toContain('Get started with Pipelines'); + }); +}); |