fix: keep site banner off login page
Magent CI/CD / verify (push) Successful in 1m50s
Magent CI/CD / deploy-prod (push) Skipped
Magent CI/CD / deploy-beta (push) Successful in 56s

This commit is contained in:
2026-09-16 14:37:00 +12:00
parent d75f36c691
commit 05a540ecbb
3 changed files with 3 additions and 25 deletions
+2 -7
View File
@@ -117,13 +117,8 @@ const site = { login: { message: '', showJellyfinLogin: true, showLocalLogin: tr
assert.equal(await page.getByRole('button', { name: 'Sign in', exact: true }).count(), 0)
assert.equal(await page.getByRole('link', { name: 'Forgot password?' }).count(), 0)
assert.equal(await page.getByRole('link', { name: /Create an account/ }).count(), 0)
assert(await page.getByText('Maintenance tonight').isVisible())
assert.equal(await page.getByText('Maintenance tonight').count(), 0)
assert(await page.getByText('Sign-in help is available from the media team.').isVisible())
const customBannerStyle = await page.getByText('Maintenance tonight').evaluate((element) => ({
background: getComputedStyle(element).backgroundColor,
border: getComputedStyle(element).borderTopColor,
}))
assert.deepEqual(customBannerStyle, { background: 'rgb(36, 23, 47)', border: 'rgb(217, 70, 239)' })
options = structuredClone(site)
options.login.showLocalLogin = false
await openLogin()
@@ -131,7 +126,7 @@ const site = { login: { message: '', showJellyfinLogin: true, showLocalLogin: tr
await login()
await page.waitForURL(base + '/welcome')
assert((await context.cookies()).some((cookie) => cookie.name === 'magent_logged_in' && cookie.value === '1'))
console.log('PASS: both sign-in providers, disabled methods, error states, password visibility, redirect, login message and custom banner colours')
console.log('PASS: both sign-in providers, disabled methods, error states, password visibility, redirect, login-only message and hidden site banner')
options.banner = { enabled: true, message: 'Custom site banner', tone: 'warning', backgroundColor: '#24172f', borderColor: '#d946ef' }
await page.goto(base + '/admin/site')