embed bootstrap css
Generate check / check-changes (pull_request) Successful in 3s
Generate check / verify-generate (pull_request) Skipped
Quality / check-changes (pull_request) Successful in 3s
Quality / static-checks (pull_request) Successful in 20s
Quality / run-tests (pull_request) Successful in 53s
Generate check / check-changes (pull_request) Successful in 3s
Generate check / verify-generate (pull_request) Skipped
Quality / check-changes (pull_request) Successful in 3s
Quality / static-checks (pull_request) Successful in 20s
Quality / run-tests (pull_request) Successful in 53s
This commit is contained in:
1 parent
4384f28df9
commit
1b5a68d290
6 files changed
+36
-217
No files matched your search
@@ -77,9 +77,8 @@ func TestWriter_Render(t *testing.T) {
|
||||
`<meta charset="utf-8">`,
|
||||
`<meta name="viewport" content="width=device-width, initial-scale=1">`,
|
||||
`<title>Tax report</title>`,
|
||||
`https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css`,
|
||||
`integrity="`,
|
||||
`crossorigin="anonymous"`,
|
||||
`<style>`,
|
||||
`Bootstrap v5.3.3`,
|
||||
`<main class="container-fluid py-4">`,
|
||||
`<h1>Tax report</h1>`,
|
||||
`<div class="table-responsive">`,
|
||||
@@ -105,6 +104,15 @@ func TestWriter_Render(t *testing.T) {
|
||||
t.Errorf("expected raw <table> tag in output\nGot:\n%s", got)
|
||||
}
|
||||
|
||||
// The document must be fully self-contained: no external stylesheet
|
||||
// <link> and no CDN reference anywhere.
|
||||
if strings.Contains(got, "<link") {
|
||||
t.Errorf("expected no external stylesheet <link>; document must be self-contained\nGot:\n%s", got)
|
||||
}
|
||||
if strings.Contains(got, "cdn.jsdelivr.net") {
|
||||
t.Errorf("expected no CDN references; document must be self-contained\nGot:\n%s", got)
|
||||
}
|
||||
|
||||
// Generated timestamp must be valid RFC3339 UTC.
|
||||
startIdx := strings.Index(got, "Generated at ")
|
||||
if startIdx == -1 {
|
||||
|
||||
Reference in new issue
Block a user