Analyse: Portal-Texte, Verantwortlichen-Vorschau und Bestätigungen nach geprüftem Wortlaut
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
ddb91a9950
commit
3bac4093af
8 files changed
+253
-25
No files matched your search
@@ -1,8 +1,8 @@
|
||||
import { test } from 'node:test'
|
||||
import assert from 'node:assert/strict'
|
||||
import { readFileSync } from 'node:fs'
|
||||
import { contrastOk } from '../analytics/client/core.js'
|
||||
import { bannerColor, chartModel, countryName, flagEmoji, niceMax, shortDay, barRows, refLabel } from '../public/analyse-view.js'
|
||||
import { contrastOk, BANNER_TEXT } from '../analytics/client/core.js'
|
||||
import { BANNER_PREVIEW_TEXT, controllerLines, bannerColor, chartModel, countryName, flagEmoji, niceMax, shortDay, barRows, refLabel } from '../public/analyse-view.js'
|
||||
|
||||
test('contrast und bannerColor stimmen mit core.js ueberein', () => {
|
||||
for (const c of ['#000000', '#ffffff', '#1d4ed8', '#047857', '#b91c1c', '#7c3aed', '#c2410c', '#ffcc00', '#9d3dfe', 'x', '#12']) {
|
||||
@@ -57,3 +57,13 @@ test('Portal: Analyse-Ansicht ist verdrahtet', () => {
|
||||
const fn = readFileSync(new URL('../public/funktionen.js', import.meta.url), 'utf8')
|
||||
assert.doesNotMatch(fn.slice(fn.indexOf('Analyse ---')), /\bconfirm\(/)
|
||||
})
|
||||
|
||||
test('Portal-Vorschau: Banner-Text ist der des Clients', () => {
|
||||
assert.equal(BANNER_PREVIEW_TEXT, BANNER_TEXT)
|
||||
})
|
||||
|
||||
test('controllerLines: Firma, Anschrift falls vorhanden, E-Mail', () => {
|
||||
assert.deepEqual(controllerLines({ company: 'Muster GmbH', address: 'Weg 1, 12345 Ort', email: 'info@muster.de' }), ['Muster GmbH', 'Weg 1, 12345 Ort', 'info@muster.de'])
|
||||
assert.deepEqual(controllerLines({ company: 'Muster GmbH', address: '', email: 'info@muster.de' }), ['Muster GmbH', 'info@muster.de'])
|
||||
assert.deepEqual(controllerLines(undefined), [])
|
||||
})
|
||||
Reference in new issue
Block a user