@cucumber/html-formatter 21.10.0 → 21.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.css +14 -13
- package/dist/main.js +1 -1
- package/dist/package.json +11 -11
- package/dist/src/main.d.ts +2 -2
- package/dist/src/main.d.ts.map +1 -1
- package/dist/src/main.js +7 -6
- package/dist/src/main.js.map +1 -1
- package/dist/src/styles.scss +54 -0
- package/dist/test/acceptance.js +1 -1
- package/dist/test/acceptance.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +11 -11
- package/src/main.tsx +20 -13
- package/src/styles.scss +54 -0
- package/test/acceptance.ts +1 -1
package/src/main.tsx
CHANGED
|
@@ -1,27 +1,34 @@
|
|
|
1
1
|
import './styles.scss'
|
|
2
2
|
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
3
|
+
import { Envelope } from '@cucumber/messages'
|
|
4
|
+
import {
|
|
5
|
+
EnvelopesProvider,
|
|
6
|
+
ExecutionSummary,
|
|
7
|
+
FilteredDocuments,
|
|
8
|
+
SearchBar,
|
|
9
|
+
UrlSearchProvider,
|
|
10
|
+
} from '@cucumber/react-components'
|
|
5
11
|
import React from 'react'
|
|
6
12
|
import { createRoot } from 'react-dom/client'
|
|
7
13
|
|
|
8
|
-
const { CucumberReact } = components
|
|
9
|
-
const { FilteredResults, EnvelopesWrapper, SearchWrapper } = components.app
|
|
10
|
-
|
|
11
14
|
declare global {
|
|
12
15
|
interface Window {
|
|
13
|
-
CUCUMBER_MESSAGES:
|
|
16
|
+
CUCUMBER_MESSAGES: Envelope[]
|
|
14
17
|
}
|
|
15
18
|
}
|
|
16
19
|
|
|
17
20
|
const root = createRoot(document.getElementById('content') as HTMLElement)
|
|
18
21
|
|
|
19
22
|
root.render(
|
|
20
|
-
<
|
|
21
|
-
<
|
|
22
|
-
<
|
|
23
|
-
<
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
<EnvelopesProvider envelopes={window.CUCUMBER_MESSAGES}>
|
|
24
|
+
<UrlSearchProvider>
|
|
25
|
+
<div id="report" className="html-formatter">
|
|
26
|
+
<div className="html-formatter__header">
|
|
27
|
+
<ExecutionSummary />
|
|
28
|
+
<SearchBar />
|
|
29
|
+
</div>
|
|
30
|
+
<FilteredDocuments />
|
|
31
|
+
</div>
|
|
32
|
+
</UrlSearchProvider>
|
|
33
|
+
</EnvelopesProvider>
|
|
27
34
|
)
|
package/src/styles.scss
CHANGED
|
@@ -1,10 +1,64 @@
|
|
|
1
|
+
$sansFamily:
|
|
2
|
+
'Inter var',
|
|
3
|
+
ui-sans-serif,
|
|
4
|
+
system-ui,
|
|
5
|
+
-apple-system,
|
|
6
|
+
BlinkMacSystemFont,
|
|
7
|
+
'Segoe UI',
|
|
8
|
+
Roboto,
|
|
9
|
+
'Helvetica Neue',
|
|
10
|
+
Arial,
|
|
11
|
+
'Noto Sans',
|
|
12
|
+
sans-serif,
|
|
13
|
+
'Apple Color Emoji',
|
|
14
|
+
'Segoe UI Emoji',
|
|
15
|
+
'Segoe UI Symbol',
|
|
16
|
+
'Noto Color Emoji';
|
|
17
|
+
$monoFamily:
|
|
18
|
+
ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono',
|
|
19
|
+
'Courier New', monospace;
|
|
20
|
+
|
|
21
|
+
:root {
|
|
22
|
+
background-color: white;
|
|
23
|
+
color: #222;
|
|
24
|
+
}
|
|
25
|
+
|
|
1
26
|
body {
|
|
27
|
+
font-family: $sansFamily;
|
|
2
28
|
padding: 0;
|
|
3
29
|
margin: 0;
|
|
4
30
|
}
|
|
5
31
|
|
|
32
|
+
pre,
|
|
33
|
+
code {
|
|
34
|
+
font-family: $monoFamily;
|
|
35
|
+
}
|
|
36
|
+
|
|
6
37
|
.html-formatter {
|
|
7
38
|
max-width: 1600px;
|
|
8
39
|
min-height: 100vh;
|
|
9
40
|
margin: 0 auto;
|
|
41
|
+
|
|
42
|
+
&__header {
|
|
43
|
+
margin-bottom: 1.5rem;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
@media all and (prefers-color-scheme: dark) {
|
|
48
|
+
:root {
|
|
49
|
+
background-color: #1d1d26;
|
|
50
|
+
color: #c9c9d1;
|
|
51
|
+
--cucumber-anchor-color: #4caaee;
|
|
52
|
+
--cucumber-keyword-color: #d89077;
|
|
53
|
+
--cucumber-parameter-color: #4caaee;
|
|
54
|
+
--cucumber-tag-color: #85a658;
|
|
55
|
+
--cucumber-docstring-color: #66a565;
|
|
56
|
+
--cucumber-error-background-color: #cf6679;
|
|
57
|
+
--cucumber-error-text-color: #222;
|
|
58
|
+
--cucumber-code-background-color: #282a36;
|
|
59
|
+
--cucumber-code-text-color: #f8f8f2;
|
|
60
|
+
--cucumber-panel-background-color: #282a36;
|
|
61
|
+
--cucumber-panel-accent-color: #313442;
|
|
62
|
+
--cucumber-panel-text-color: #f8f8f2;
|
|
63
|
+
}
|
|
10
64
|
}
|
package/test/acceptance.ts
CHANGED
|
@@ -16,7 +16,7 @@ async function canRenderHtml(html: string): Promise<boolean> {
|
|
|
16
16
|
const page = await browser.newPage()
|
|
17
17
|
await page.setContent(html)
|
|
18
18
|
const dynamicHTML = await page.evaluate(() => {
|
|
19
|
-
const content = document.
|
|
19
|
+
const content = document.getElementById('report')
|
|
20
20
|
return content && content.innerHTML
|
|
21
21
|
})
|
|
22
22
|
await browser.close()
|