0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-20 22:42:53 -05:00

Fixed invite test

Invited staff members no longer need to do a 2fa verification code on
the first sign-in
This commit is contained in:
Sam Lord 2024-11-26 12:04:53 +00:00
parent 28dba53f26
commit 5865bb576f

View file

@ -81,7 +81,7 @@ test.describe('Portal', () => {
await section.getByLabel('Staff 2FA').click();
});
test('New staff member can signup using an invite link with 2FA enabled', async ({sharedPage, verificationToken}) => {
test('New staff member can signup using an invite link with 2FA enabled', async ({sharedPage}) => {
// Navigate to settings
await sharedPage.goto('/ghost');
await sharedPage.locator('[data-test-nav="settings"]').click();
@ -140,12 +140,7 @@ test.describe('Portal', () => {
await sharedPage.getByPlaceholder('At least 10 characters').fill('test123456');
await sharedPage.getByRole('button', {name: 'Create Account →'}).click();
await sharedPage.waitForLoadState('networkidle');
const verificationCode = await verificationToken.getToken();
//Enter verification code for 2FA
await sharedPage.locator('[data-test-input="token"]').fill(verificationCode);
await sharedPage.locator('[data-test-button="verify"]').click();
await sharedPage.waitForLoadState('networkidle');
await expect(sharedPage).toHaveURL(/\/ghost\/#\/.*/);
await sharedPage.locator('[data-test-nav="arrow-down"]').click();