Skip to content

Commit 752d661

Browse files
Merge branch 'develop' into feat/DEVSU-2556-key-alterations-table-redesign
2 parents 21d1fa5 + b76d6cb commit 752d661

4 files changed

Lines changed: 15 additions & 3 deletions

File tree

app/views/ReportView/components/AnalystComments/__tests__/AnalystComments.test.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
import React from 'react';
2+
import { readFileSync } from 'fs';
3+
import path from 'path';
24
import { render, screen, waitFor } from '@testing-library/react';
35
import { QueryClient, QueryClientProvider } from 'react-query';
46
import { when, resetAllWhenMocks } from 'jest-when';
@@ -103,6 +105,12 @@ describe('AnalystComments', () => {
103105
expect(testElem).toHaveAttribute('style', 'color:red');
104106
});
105107

108+
test('avoids breaking list items inside in print', () => {
109+
const styles = readFileSync(path.resolve(__dirname, '../index.scss'), 'utf8');
110+
111+
expect(styles).toMatch(/\.analyst-comments__body\s*\{[\s\S]*?li\s*\{\s*break-inside:\s*avoid;\s*\}/);
112+
});
113+
106114
const renderWithFailingComments = (isPrint: boolean) => {
107115
when(api.get as (endpoint: string) => Partial<ApiCall>)
108116
.calledWith(`/reports/${mockReport.ident}/summary/analyst-comments`)

app/views/ReportView/components/AnalystComments/index.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@
3232
.analyst-comments__body {
3333
max-width: unset;
3434
margin: 0;
35+
36+
li {
37+
break-inside: avoid;
38+
}
3539
}
3640

3741
.analyst-comments__user-text {

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"private": true,
33
"name": "ipr-client",
4-
"version": "7.5.5",
4+
"version": "7.6.1",
55
"keywords": [],
66
"license": "GPL-3.0",
77
"sideEffects": false,

0 commit comments

Comments
 (0)