fix: login buttons remain visible until refresh after disabling authentication service (#31371)
parent
319f05ec79
commit
9a6e9b4e28
@ -0,0 +1,7 @@ |
||||
--- |
||||
'@rocket.chat/core-services': patch |
||||
'@rocket.chat/ddp-streamer': patch |
||||
'@rocket.chat/meteor': patch |
||||
--- |
||||
|
||||
Fixed an issue that caused login buttons to not be reactively removed from the login page when the related authentication service was disabled by an admin. |
||||
@ -0,0 +1,26 @@ |
||||
import { Registration } from './page-objects'; |
||||
import { setSettingValueById } from './utils/setSettingValueById'; |
||||
import { test, expect } from './utils/test'; |
||||
|
||||
test.describe('OAuth', () => { |
||||
let poRegistration: Registration; |
||||
|
||||
test.beforeEach(async ({ page }) => { |
||||
poRegistration = new Registration(page); |
||||
|
||||
await page.goto('/home'); |
||||
}); |
||||
|
||||
test('Login Page', async ({ api }) => { |
||||
await test.step('expect OAuth button to be visible', async () => { |
||||
await expect((await setSettingValueById(api, 'Accounts_OAuth_Google', true)).status()).toBe(200); |
||||
await expect(poRegistration.btnLoginWithGoogle).toBeVisible({ timeout: 10000 }); |
||||
}); |
||||
|
||||
await test.step('expect OAuth button to not be visible', async () => { |
||||
await expect((await setSettingValueById(api, 'Accounts_OAuth_Google', false)).status()).toBe(200); |
||||
|
||||
await expect(poRegistration.btnLoginWithGoogle).not.toBeVisible({ timeout: 10000 }); |
||||
}); |
||||
}); |
||||
}); |
||||
Loading…
Reference in new issue