Commit ee0ec656 authored by Natalia Tepluhina's avatar Natalia Tepluhina

Merge branch...

Merge branch '266948-broken-master-spec-frontend-environments-environments_app_spec-js-environment-environment' into 'master'

Fix environment_app spec and pipelines_table spec

See merge request gitlab-org/gitlab!44896
parents f888d84c e4b61b7c
......@@ -182,7 +182,7 @@ describe('Environment', () => {
describe('when user can create environment', () => {
beforeEach(() => {
mockRequest([environment]);
wrapper = mount(EnvironmentsApp, { propsData: mockData });
wrapper = shallowMount(EnvironmentsApp, { propsData: mockData });
});
it('should render', () => {
......@@ -193,7 +193,7 @@ describe('Environment', () => {
describe('when user can not create environment', () => {
beforeEach(() => {
mockRequest([environment]);
wrapper = mount(EnvironmentsApp, {
wrapper = shallowMount(EnvironmentsApp, {
propsData: { ...mockData, canCreateEnvironment: false },
});
});
......
import { GlButton } from '@gitlab/ui';
import { mount } from '@vue/test-utils';
import PipelinesTable from '~/pipelines/components/pipelines_list/pipelines_table.vue';
......@@ -20,7 +19,6 @@ describe('Pipelines Table', () => {
});
};
const findRows = () => wrapper.findAll('.commit.gl-responsive-table-row');
const findGlButtons = () => wrapper.findAll(GlButton);
preloadFixtures(jsonFixtureName);
......@@ -65,28 +63,4 @@ describe('Pipelines Table', () => {
expect(findRows()).toHaveLength(1);
});
});
describe('pipline actions', () => {
it('should set the "Re-deploy" title', () => {
const pipelines = [{ ...pipeline, flags: { cancelable: false, retryable: true } }];
createComponent({ ...defaultProps, pipelines });
expect(findGlButtons().length).toBe(1);
expect(
findGlButtons()
.at(0)
.attributes('title'),
).toMatch('Retry');
});
it('should set the "Cancel" title', () => {
const pipelines = [{ ...pipeline, flags: { cancelable: true, retryable: false } }];
createComponent({ ...defaultProps, pipelines });
expect(findGlButtons().length).toBe(1);
expect(
findGlButtons()
.at(0)
.attributes('title'),
).toMatch('Cancel');
});
});
});
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