diff --git a/web/__tests__/check-components-diff-coverage.test.ts b/web/__tests__/check-components-diff-coverage.test.ts index 690c7a512b..9ce8b30ceb 100644 --- a/web/__tests__/check-components-diff-coverage.test.ts +++ b/web/__tests__/check-components-diff-coverage.test.ts @@ -79,6 +79,23 @@ describe('check-components-diff-coverage helpers', () => { }) }) + it('should report the first changed line inside a multi-line uncovered statement', () => { + const entry = { + s: { 0: 0 }, + statementMap: { + 0: { start: { line: 10 }, end: { line: 14 } }, + }, + } + + const coverage = getChangedStatementCoverage(entry, new Set([13, 14])) + + expect(coverage).toEqual({ + covered: 0, + total: 1, + uncoveredLines: [13], + }) + }) + it('should fail changed lines when a source file has no coverage entry', () => { const coverage = getChangedStatementCoverage(undefined, new Set([42, 43])) @@ -118,6 +135,36 @@ describe('check-components-diff-coverage helpers', () => { }) }) + it('should report the first changed line inside a multi-line uncovered branch arm', () => { + const entry = { + b: { + 0: [0, 0], + }, + branchMap: { + 0: { + line: 30, + loc: { start: { line: 30 }, end: { line: 35 } }, + locations: [ + { start: { line: 31 }, end: { line: 34 } }, + { start: { line: 35 }, end: { line: 38 } }, + ], + type: 'if', + }, + }, + } + + const coverage = getChangedBranchCoverage(entry, new Set([33])) + + expect(coverage).toEqual({ + covered: 0, + total: 2, + uncoveredBranches: [ + { armIndex: 0, line: 33 }, + { armIndex: 1, line: 35 }, + ], + }) + }) + it('should ignore changed lines with valid pragma reasons and report invalid pragmas', () => { const sourceCode = [ 'const a = 1', diff --git a/web/app/components/billing/pricing/InstrumentSerif-Italic-Latin.woff2 b/web/app/components/billing/pricing/InstrumentSerif-Italic-Latin.woff2 new file mode 100644 index 0000000000..5d1fd32cb0 Binary files /dev/null and b/web/app/components/billing/pricing/InstrumentSerif-Italic-Latin.woff2 differ diff --git a/web/app/components/billing/pricing/header.module.css b/web/app/components/billing/pricing/header.module.css new file mode 100644 index 0000000000..fc05646d86 --- /dev/null +++ b/web/app/components/billing/pricing/header.module.css @@ -0,0 +1,24 @@ +.instrumentSerif { + font-family: "Instrument Serif", serif; + font-style: italic; +} + +@font-face { + font-family: "Instrument Serif"; + font-style: italic; + font-weight: 400; + font-display: swap; + src: url("./InstrumentSerif-Italic-Latin.woff2") format("woff2"); + unicode-range: + U+0000-00FF, + U+0100-024F, + U+0259, + U+0300-036F, + U+1E00-1EFF, + U+2010-205E, + U+20A0-20CF, + U+2113, + U+2212, + U+2C60-2C7F, + U+A720-A7FF; +} diff --git a/web/app/components/billing/pricing/header.tsx b/web/app/components/billing/pricing/header.tsx index e5107e5677..d0ffe100db 100644 --- a/web/app/components/billing/pricing/header.tsx +++ b/web/app/components/billing/pricing/header.tsx @@ -1,8 +1,9 @@ import * as React from 'react' import { useTranslation } from 'react-i18next' -import { DialogDescription, DialogTitle } from '@/app/components/base/ui/dialog' +import { cn } from '@/utils/classnames' import Button from '../../base/button' import DifyLogo from '../../base/logo/dify-logo' +import styles from './header.module.css' type HeaderProps = { onClose: () => void @@ -20,13 +21,18 @@ const Header = ({
- + {t('plansCommon.title.plans', { ns: 'billing' })} - + - +

{t('plansCommon.title.description', { ns: 'billing' })} - +