@@ -8,7 +8,7 @@ import { after, before, describe, test } from 'node:test';
88import { createEntityId } from '../src/server/foundation/ids' ;
99import { createOpaqueToken , hmacDigest , randomBase64Url , sha256Base64Url } from '../src/server/identity/tokens' ;
1010import { canonicalJson } from '../src/server/publication/content' ;
11- import { dashboardResponse } from '../src/server/dashboard/html ' ;
11+ import { dashboardAssetResponse } from '../src/server/dashboard/response ' ;
1212import {
1313 decryptChunkedBackup ,
1414 encryptChunkedBackup ,
@@ -224,13 +224,19 @@ after(async () => {
224224} ) ;
225225
226226describe ( 'Orbit V6 Slice 5 dashboard and platform core' , { concurrency : false } , ( ) => {
227- test ( 'dashboard is no-store, nonce-protected and contains no credential material' , async ( ) => {
228- const response = dashboardResponse ( ) ;
227+ test ( 'dashboard asset is no-store, frame-protected and contains no credential material' , async ( ) => {
228+ const response = await dashboardAssetResponse (
229+ new Request ( 'https://orbit.example/dashboard' ) ,
230+ { fetch : async ( ) => new Response ( '<!doctype html><title>Orbit Sponsor Paneli</title><a href="/" aria-label="Equinox Orbit ana sayfa">Orbit</a><form action="/search"><input aria-label="Orbit\'te ara"></form><button>GitHub hesabımla devam et</button><span>Profil fotoğrafını değiştir</span><span>Görsel yetkisi</span>' ) } ,
231+ ) ;
229232 const html = await response . text ( ) ;
230233 assert . equal ( response . headers . get ( 'cache-control' ) , 'no-store' ) ;
231- assert . match ( response . headers . get ( 'content-security-policy' ) ?? '' , / s c r i p t - s r c ' n o n c e - / u) ;
234+ assert . match ( response . headers . get ( 'content-security-policy' ) ?? '' , / f r a m e - a n c e s t o r s ' n o n e ' / u) ;
232235 assert . match ( html , / O r b i t S p o n s o r P a n e l i / u) ;
233- assert . match ( html , / Y e n i h e s a p a v a t a r ı / u) ;
236+ assert . match ( html , / E q u i n o x O r b i t a n a s a y f a / u) ;
237+ assert . match ( html , / O r b i t ' t e a r a / u) ;
238+ assert . match ( html , / G i t H u b h e s a b ı m l a d e v a m e t / u) ;
239+ assert . match ( html , / P r o f i l f o t o ğ r a f ı n ı d e ğ i ş t i r / u) ;
234240 assert . match ( html , / G ö r s e l y e t k i s i / u) ;
235241 assert . doesNotMatch ( html , / o r b _ a g e n t _ v 1 _ / u) ;
236242 } ) ;
0 commit comments