Commit d8cacac9 authored by Tim Zallmann's avatar Tim Zallmann

Merge branch '35176-log-open' into 'master'

Expand sections by default

Closes #35176

See merge request gitlab-org/gitlab!19320
parents 47472ce5 30cb18d1
...@@ -17,7 +17,7 @@ export const parseLine = (line = {}, lineNumber) => ({ ...@@ -17,7 +17,7 @@ export const parseLine = (line = {}, lineNumber) => ({
* @param Number lineNumber * @param Number lineNumber
*/ */
export const parseHeaderLine = (line = {}, lineNumber) => ({ export const parseHeaderLine = (line = {}, lineNumber) => ({
isClosed: true, isClosed: false,
isHeader: true, isHeader: true,
line: parseLine(line, lineNumber), line: parseLine(line, lineNumber),
lines: [], lines: [],
......
...@@ -60,8 +60,8 @@ describe('Job Log', () => { ...@@ -60,8 +60,8 @@ describe('Job Log', () => {
expect(wrapper.find('.collapsible-line').attributes('role')).toBe('button'); expect(wrapper.find('.collapsible-line').attributes('role')).toBe('button');
}); });
it('renders an icon with the closed state', () => { it('renders an icon with the open state', () => {
expect(wrapper.find('.collapsible-line svg').classes()).toContain('ic-angle-right'); expect(wrapper.find('.collapsible-line svg').classes()).toContain('ic-angle-down');
}); });
describe('on click header section', () => { describe('on click header section', () => {
......
...@@ -26,7 +26,7 @@ describe('Jobs Store Utils', () => { ...@@ -26,7 +26,7 @@ describe('Jobs Store Utils', () => {
const parsedHeaderLine = parseHeaderLine(headerLine, 2); const parsedHeaderLine = parseHeaderLine(headerLine, 2);
expect(parsedHeaderLine).toEqual({ expect(parsedHeaderLine).toEqual({
isClosed: true, isClosed: false,
isHeader: true, isHeader: true,
line: { line: {
...headerLine, ...headerLine,
...@@ -57,7 +57,7 @@ describe('Jobs Store Utils', () => { ...@@ -57,7 +57,7 @@ describe('Jobs Store Utils', () => {
it('adds the section duration to the correct header', () => { it('adds the section duration to the correct header', () => {
const parsed = [ const parsed = [
{ {
isClosed: true, isClosed: false,
isHeader: true, isHeader: true,
line: { line: {
section: 'prepare-script', section: 'prepare-script',
...@@ -66,7 +66,7 @@ describe('Jobs Store Utils', () => { ...@@ -66,7 +66,7 @@ describe('Jobs Store Utils', () => {
lines: [], lines: [],
}, },
{ {
isClosed: true, isClosed: false,
isHeader: true, isHeader: true,
line: { line: {
section: 'foo-bar', section: 'foo-bar',
...@@ -85,7 +85,7 @@ describe('Jobs Store Utils', () => { ...@@ -85,7 +85,7 @@ describe('Jobs Store Utils', () => {
it('does not add the section duration when the headers do not match', () => { it('does not add the section duration when the headers do not match', () => {
const parsed = [ const parsed = [
{ {
isClosed: true, isClosed: false,
isHeader: true, isHeader: true,
line: { line: {
section: 'bar-foo', section: 'bar-foo',
...@@ -94,7 +94,7 @@ describe('Jobs Store Utils', () => { ...@@ -94,7 +94,7 @@ describe('Jobs Store Utils', () => {
lines: [], lines: [],
}, },
{ {
isClosed: true, isClosed: false,
isHeader: true, isHeader: true,
line: { line: {
section: 'foo-bar', section: 'foo-bar',
...@@ -183,7 +183,7 @@ describe('Jobs Store Utils', () => { ...@@ -183,7 +183,7 @@ describe('Jobs Store Utils', () => {
describe('collpasible section', () => { describe('collpasible section', () => {
it('adds a `isClosed` property', () => { it('adds a `isClosed` property', () => {
expect(result[1].isClosed).toEqual(true); expect(result[1].isClosed).toEqual(false);
}); });
it('adds a `isHeader` property', () => { it('adds a `isHeader` property', () => {
...@@ -213,7 +213,7 @@ describe('Jobs Store Utils', () => { ...@@ -213,7 +213,7 @@ describe('Jobs Store Utils', () => {
const existingLog = [ const existingLog = [
{ {
isHeader: true, isHeader: true,
isClosed: true, isClosed: false,
line: { content: [{ text: 'bar' }], offset: 10, lineNumber: 1 }, line: { content: [{ text: 'bar' }], offset: 10, lineNumber: 1 },
}, },
]; ];
...@@ -263,7 +263,7 @@ describe('Jobs Store Utils', () => { ...@@ -263,7 +263,7 @@ describe('Jobs Store Utils', () => {
const existingLog = [ const existingLog = [
{ {
isHeader: true, isHeader: true,
isClosed: true, isClosed: false,
lines: [{ offset: 101, content: [{ text: 'foobar' }], lineNumber: 2 }], lines: [{ offset: 101, content: [{ text: 'foobar' }], lineNumber: 2 }],
line: { line: {
offset: 10, offset: 10,
...@@ -435,7 +435,7 @@ describe('Jobs Store Utils', () => { ...@@ -435,7 +435,7 @@ describe('Jobs Store Utils', () => {
expect(result).toEqual([ expect(result).toEqual([
{ {
isClosed: true, isClosed: false,
isHeader: true, isHeader: true,
line: { line: {
offset: 1, offset: 1,
...@@ -461,7 +461,7 @@ describe('Jobs Store Utils', () => { ...@@ -461,7 +461,7 @@ describe('Jobs Store Utils', () => {
expect(result).toEqual([ expect(result).toEqual([
{ {
isClosed: true, isClosed: false,
isHeader: true, isHeader: true,
line: { line: {
offset: 1, offset: 1,
......
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