fix: keep site banner off login page
This commit is contained in:
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user