Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
83d46d5
add OpenShift LogSnippet
InsaneZein Feb 8, 2024
3af9de9
fix layout; switch to pf variables
InsaneZein Feb 9, 2024
e63ddfa
add test
InsaneZein Feb 9, 2024
3fcba6e
pf variables and fix typos
InsaneZein Feb 13, 2024
6ce785e
fix snapshot
InsaneZein Feb 13, 2024
e510823
wip: add leftBorderVariant
InsaneZein Feb 15, 2024
e659560
fix dynamic styling
InsaneZein Feb 19, 2024
bae7d6c
update snapshot
InsaneZein Feb 19, 2024
9959299
remove old redborder class
InsaneZein Feb 19, 2024
b8327d4
update snapshot again
InsaneZein Feb 19, 2024
3d000d5
add types to createuseStyles
InsaneZein Feb 20, 2024
8b7385c
revert leftborder default to danger
InsaneZein Feb 20, 2024
fb101c3
Merge branch 'main' of github.com:patternfly/react-component-groups i…
InsaneZein Feb 20, 2024
96c265e
clean up code
InsaneZein Feb 20, 2024
dc1ffa6
add OpenShift LogSnippet
InsaneZein Feb 8, 2024
1850983
fix layout; switch to pf variables
InsaneZein Feb 9, 2024
de4c55c
add test
InsaneZein Feb 9, 2024
7689bd2
pf variables and fix typos
InsaneZein Feb 13, 2024
558893c
fix snapshot
InsaneZein Feb 13, 2024
49a1255
wip: add leftBorderVariant
InsaneZein Feb 15, 2024
5bbc8f4
fix dynamic styling
InsaneZein Feb 19, 2024
1a34f9b
update snapshot
InsaneZein Feb 19, 2024
a2b1258
remove old redborder class
InsaneZein Feb 19, 2024
f6a1506
update snapshot again
InsaneZein Feb 19, 2024
bc7cc0f
add types to createuseStyles
InsaneZein Feb 20, 2024
b21ccdf
revert leftborder default to danger
InsaneZein Feb 20, 2024
9c8dbf8
clean up code
InsaneZein Feb 20, 2024
588d44f
Merge branch 'add-logsnippet' of github.com:patternfly/react-componen…
InsaneZein Feb 20, 2024
8f2074a
more cleanup
InsaneZein Feb 20, 2024
0d4e71c
Merge branch 'main' of github.com:patternfly/react-component-groups i…
InsaneZein Feb 20, 2024
ea38872
feat(logsnippet): add log snippet
InsaneZein Feb 20, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add test
  • Loading branch information
InsaneZein committed Feb 9, 2024
commit e63ddfa8715a684d666b5c8f9bcc9d2c2f3a9bed
9 changes: 9 additions & 0 deletions packages/module/src/LogSnippet/LogSnippet.test.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import React from 'react';
import { render } from '@testing-library/react';
import LogSnippet from './LogSnippet';

describe('LogSnippet component', () => {
it('should render LogSnippet component', () => {
expect(render(<LogSnippet message='A log snippet' logSnippet='console.log(hello world)'/>)).toMatchSnapshot();
});
});
136 changes: 136 additions & 0 deletions packages/module/src/LogSnippet/__snapshots__/LogSnippet.test.tsx.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`LogSnippet component should render LogSnippet component 1`] = `
{
"asFragment": [Function],
"baseElement": <body>
<div>
<div
class="pf-v5-l-flex pf-m-column logSnippet-0-2-1"
>
<div
class=""
>

<p
class="statusMessage-0-2-2"
>
A log snippet
</p>
</div>
<div
class=""
>
<div
class="pf-v5-c-code-block"
>
<div
class="pf-v5-c-code-block__content"
>
<pre
class="pf-v5-c-code-block__pre"
id="code-content"
>
<code
class="pf-v5-c-code-block__code"
>
console.log(hello world)
</code>
</pre>
</div>
</div>
</div>
</div>
</div>
</body>,
"container": <div>
<div
class="pf-v5-l-flex pf-m-column logSnippet-0-2-1"
>
<div
class=""
>

<p
class="statusMessage-0-2-2"
>
A log snippet
</p>
</div>
<div
class=""
>
<div
class="pf-v5-c-code-block"
>
<div
class="pf-v5-c-code-block__content"
>
<pre
class="pf-v5-c-code-block__pre"
id="code-content"
>
<code
class="pf-v5-c-code-block__code"
>
console.log(hello world)
</code>
</pre>
</div>
</div>
</div>
</div>
</div>,
"debug": [Function],
"findAllByAltText": [Function],
"findAllByDisplayValue": [Function],
"findAllByLabelText": [Function],
"findAllByPlaceholderText": [Function],
"findAllByRole": [Function],
"findAllByTestId": [Function],
"findAllByText": [Function],
"findAllByTitle": [Function],
"findByAltText": [Function],
"findByDisplayValue": [Function],
"findByLabelText": [Function],
"findByPlaceholderText": [Function],
"findByRole": [Function],
"findByTestId": [Function],
"findByText": [Function],
"findByTitle": [Function],
"getAllByAltText": [Function],
"getAllByDisplayValue": [Function],
"getAllByLabelText": [Function],
"getAllByPlaceholderText": [Function],
"getAllByRole": [Function],
"getAllByTestId": [Function],
"getAllByText": [Function],
"getAllByTitle": [Function],
"getByAltText": [Function],
"getByDisplayValue": [Function],
"getByLabelText": [Function],
"getByPlaceholderText": [Function],
"getByRole": [Function],
"getByTestId": [Function],
"getByText": [Function],
"getByTitle": [Function],
"queryAllByAltText": [Function],
"queryAllByDisplayValue": [Function],
"queryAllByLabelText": [Function],
"queryAllByPlaceholderText": [Function],
"queryAllByRole": [Function],
"queryAllByTestId": [Function],
"queryAllByText": [Function],
"queryAllByTitle": [Function],
"queryByAltText": [Function],
"queryByDisplayValue": [Function],
"queryByLabelText": [Function],
"queryByPlaceholderText": [Function],
"queryByRole": [Function],
"queryByTestId": [Function],
"queryByText": [Function],
"queryByTitle": [Function],
"rerender": [Function],
"unmount": [Function],
}
`;