From d944cb0afe5a3518779a46a33d4381896af36b95 Mon Sep 17 00:00:00 2001 From: AIAMarketing Date: Fri, 30 Oct 2026 15:36:55 -0700 Subject: [PATCH] test(portal): exercise live-style report buttons and orange markers --- www/tools/service-portal-browser.mjs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/www/tools/service-portal-browser.mjs b/www/tools/service-portal-browser.mjs index baad504..599573e 100644 --- a/www/tools/service-portal-browser.mjs +++ b/www/tools/service-portal-browser.mjs @@ -70,7 +70,7 @@ try { const duration = 30 * 86400000; const staffCode = randomBytes(24).toString('hex'); const managementCode = randomBytes(24).toString('hex'); - const styledFixture = '

Synthetic Directory

Operational reports

Synthetic report

Fixture directory
RoleContact
Fixture roleFixture email

Second fixture report

Unsafe destination
'; + const styledFixture = '

Synthetic Directory

Operational reports

Synthetic report

Fixture directory
RoleContact
Fixture roleFixture email

Second fixture report

Operations Monthly Lineup Report - PM

Unsafe destination
'; const payload = { alg: portalAlgorithm, streams: [ await encryptPortalStream('fixture-staff', '

Synthetic Staff

Staff fixture only

Synthetic resource' + styledFixture, staffCode), await encryptPortalStream('fixture-management', '

Synthetic Management

Management fixture only

' + styledFixture, managementCode), @@ -333,12 +333,16 @@ try { assert.equal(await input.inputValue(), ''); const checkPresentation = async () => { const content = p.locator('[data-portal-content]'); - assert.equal(await content.locator('.portal-resource-button').count(), 2); - assert.equal(await content.locator('[style], [onclick], .arbitrary-legacy-class, iframe, form, input').count(), 0); + assert.equal(await content.locator('.portal-resource-button').count(), 3); + assert.equal(await content.locator('[style], [onclick], .arbitrary-legacy-class, .unrecognized-report-legacy, iframe, form, input').count(), 0); assert.equal(await content.locator('a[href^="javascript:"]').count(), 0); assert.equal(await content.locator('th[scope="col"]').count(), 2); const button = content.locator('.portal-resource-button').first(); assert.equal(await button.evaluate(e => getComputedStyle(e).backgroundColor), 'rgb(255, 189, 89)'); + const legacyReport = content.getByRole('link', { name: 'Operations Monthly Lineup Report - PM' }); + assert.equal(await legacyReport.getAttribute('class'), 'portal-resource-button'); + assert.equal(await legacyReport.evaluate(e => getComputedStyle(e).backgroundColor), 'rgb(255, 189, 89)'); + assert.equal(await content.locator('li').first().evaluate(e => getComputedStyle(e, '::marker').color), 'rgb(255, 189, 89)'); assert.equal(await content.locator('h2').first().evaluate(e => getComputedStyle(e).color), 'rgb(37, 64, 128)'); assert.ok(await content.locator('h2').first().evaluate(e => parseFloat(getComputedStyle(e).fontSize) >= 28)); assert.equal(await content.locator('.portal-contact-link').evaluate(e => getComputedStyle(e).color), 'rgb(169, 70, 0)');