Commit 2d87bb36 authored by Vitaly Slobodin's avatar Vitaly Slobodin

Merge branch 'ag-chore-rename-files' into 'master'

chore: Update files and variables names

See merge request gitlab-org/gitlab!45405
parents 2977d9d9 bc83b303
import initEnviroments from '~/environments/';
import initEnvironments from '~/environments/';
document.addEventListener('DOMContentLoaded', initEnviroments);
document.addEventListener('DOMContentLoaded', initEnvironments);
......@@ -35,12 +35,12 @@ describe('Ci environments dropdown', () => {
wrapper = null;
});
describe('No enviroments found', () => {
describe('No environments found', () => {
beforeEach(() => {
createComponent('stable');
});
it('renders create button with search term if enviroments do not contain search term', () => {
it('renders create button with search term if environments do not contain search term', () => {
expect(findAllDropdownItems()).toHaveLength(2);
expect(findDropdownItemByIndex(1).text()).toBe('Create wildcard: stable');
});
......@@ -55,7 +55,7 @@ describe('Ci environments dropdown', () => {
createComponent('');
});
it('renders all enviroments when search term is empty', () => {
it('renders all environments when search term is empty', () => {
expect(findAllDropdownItems()).toHaveLength(3);
expect(findDropdownItemByIndex(0).text()).toBe('dev');
expect(findDropdownItemByIndex(1).text()).toBe('prod');
......@@ -67,19 +67,19 @@ describe('Ci environments dropdown', () => {
});
});
describe('Enviroments found', () => {
describe('Environments found', () => {
beforeEach(() => {
createComponent('prod');
});
it('renders only the enviroment searched for', () => {
it('renders only the environment searched for', () => {
expect(findAllDropdownItems()).toHaveLength(1);
expect(findDropdownItemByIndex(0).text()).toBe('prod');
});
it('should not display create button', () => {
const enviroments = findAllDropdownItems().filter(env => env.text().startsWith('Create'));
expect(enviroments).toHaveLength(0);
const environments = findAllDropdownItems().filter(env => env.text().startsWith('Create'));
expect(environments).toHaveLength(0);
expect(findAllDropdownItems()).toHaveLength(1);
});
......
......@@ -3,7 +3,7 @@ import mockData from '../services/mock_data';
describe('Ci variable getters', () => {
describe('joinedEnvironments', () => {
it('should join fetched enviroments with variable environment scopes', () => {
it('should join fetched environments with variable environment scopes', () => {
const state = {
environments: ['All (default)', 'staging', 'deployment', 'prod'],
variables: mockData.mockVariableScopes,
......
......@@ -73,7 +73,7 @@ describe('CI variable list mutations', () => {
});
describe('ADD_WILD_CARD_SCOPE', () => {
it('should add wild card scope to enviroments array and sort', () => {
it('should add wild card scope to environments array and sort', () => {
stateCopy.environments = ['dev', 'staging'];
mutations[types.ADD_WILD_CARD_SCOPE](stateCopy, 'production');
......
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