Commit 8e6f1709 authored by Jacques Erasmus's avatar Jacques Erasmus

Merge branch 'sh-fix-collapsible-spelling' into 'master'

Fix spelling of collapsible

See merge request gitlab-org/gitlab!35565
parents 386a9d5e 32fe88b9
......@@ -3,7 +3,7 @@ import LogLine from './line.vue';
import LogLineHeader from './line_header.vue';
export default {
name: 'CollpasibleLogSection',
name: 'CollapsibleLogSection',
components: {
LogLine,
LogLineHeader,
......
<script>
import { mapState, mapActions } from 'vuex';
import CollpasibleLogSection from './collapsible_section.vue';
import CollapsibleLogSection from './collapsible_section.vue';
import LogLine from './line.vue';
export default {
components: {
CollpasibleLogSection,
CollapsibleLogSection,
LogLine,
},
computed: {
......@@ -51,7 +51,7 @@ export default {
<template>
<code class="job-log d-block" data-qa-selector="job_log_content">
<template v-for="(section, index) in trace">
<collpasible-log-section
<collapsible-log-section
v-if="section.isHeader"
:key="`collapsible-${index}`"
:section="section"
......
......@@ -195,7 +195,7 @@ export const receiveTraceError = ({ dispatch }) => {
flash(__('An error occurred while fetching the job log.'));
};
/**
* When the user clicks a collpasible line in the job
* When the user clicks a collapsible line in the job
* log, we commit a mutation to update the state
*
* @param {Object} section
......
......@@ -11,7 +11,7 @@ export const parseLine = (line = {}, lineNumber) => ({
/**
* When a line has `section_header` set to true, we create a new
* structure to allow to nest the lines that belong to the
* collpasible section
* collapsible section
*
* @param Object line
* @param Number lineNumber
......@@ -91,7 +91,7 @@ export const getIncrementalLineNumber = acc => {
* Parses the job log content into a structure usable by the template
*
* For collaspible lines (section_header = true):
* - creates a new array to hold the lines that are collpasible,
* - creates a new array to hold the lines that are collapsible,
* - adds a isClosed property to handle toggle
* - adds a isHeader property to handle template logic
* - adds the section_duration
......
import { mount } from '@vue/test-utils';
import CollpasibleSection from '~/jobs/components/log/collapsible_section.vue';
import CollapsibleSection from '~/jobs/components/log/collapsible_section.vue';
import { collapsibleSectionClosed, collapsibleSectionOpened } from './mock_data';
describe('Job Log Collapsible Section', () => {
......@@ -11,7 +11,7 @@ describe('Job Log Collapsible Section', () => {
const findCollapsibleLineSvg = () => wrapper.find('.collapsible-line svg');
const createComponent = (props = {}) => {
wrapper = mount(CollpasibleSection, {
wrapper = mount(CollapsibleSection, {
propsData: {
...props,
},
......
......@@ -181,7 +181,7 @@ describe('Jobs Store Utils', () => {
});
});
describe('collpasible section', () => {
describe('collapsible section', () => {
it('adds a `isClosed` property', () => {
expect(result[1].isClosed).toEqual(false);
});
......@@ -190,7 +190,7 @@ describe('Jobs Store Utils', () => {
expect(result[1].isHeader).toEqual(true);
});
it('creates a lines array property with the content of the collpasible section', () => {
it('creates a lines array property with the content of the collapsible section', () => {
expect(result[1].lines.length).toEqual(2);
expect(result[1].lines[0].content).toEqual(utilsMockData[2].content);
expect(result[1].lines[1].content).toEqual(utilsMockData[3].content);
......
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