Skip to content

Commit

Permalink
Merge pull request #156 from Lemoncode/develop
Browse files Browse the repository at this point in the history
to production div log fix
  • Loading branch information
brauliodiez authored Sep 30, 2022
2 parents e9295f1 + 6ce20fe commit 0fe63ea
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 12 deletions.
4 changes: 2 additions & 2 deletions front/src/pods/student/student.component.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ describe('StudentComponent tests', () => {

// Assert
const sessionName = screen.getByRole('heading');
const textArea = screen.getByRole('log');
const textArea = screen.getByTestId('session');

expect(sessionName).toHaveTextContent(expectedSessionNameText);
expect(textArea).toHaveValue(props.log);
Expand Down Expand Up @@ -69,7 +69,7 @@ describe('StudentComponent tests', () => {
render(<StudentComponent {...props} />);

// Assert
const textArea = screen.getByRole('log');
const textArea = screen.getByTestId('session');
expect(textArea).toHaveTextContent('');
});

Expand Down
22 changes: 12 additions & 10 deletions front/src/pods/student/student.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,18 @@ export const StudentComponent: React.FC<Props> = props => {
<label className={innerClasses.label} htmlFor="session">
Content
</label>
<TextareaAutosize
role="log"
ref={textAreaRef}
id="session"
rowsMax={30}
rowsMin={30}
className={innerClasses.textarea}
value={log ?? ''}
readOnly={true}
/>
<div role="log">
<TextareaAutosize
ref={textAreaRef}
data-testid="session"
id="session"
rowsMax={30}
rowsMin={30}
className={innerClasses.textarea}
value={log ?? ''}
readOnly={true}
/>
</div>
<FormControlLabel
label="Disable AutoScroll"
control={
Expand Down
1 change: 1 addition & 0 deletions front/src/pods/student/student.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ export const label = css`
`;

export const textarea = css`
width: 100%;
box-sizing: border-box;
padding: ${spacing(2)};
font-family: ${typography.fontFamily};
Expand Down
6 changes: 6 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 0fe63ea

Please sign in to comment.