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