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:
parent
28dba53f26
commit
5865bb576f
1 changed files with 5 additions and 10 deletions
|
@ -81,7 +81,7 @@ test.describe('Portal', () => {
|
||||||
await section.getByLabel('Staff 2FA').click();
|
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
|
// Navigate to settings
|
||||||
await sharedPage.goto('/ghost');
|
await sharedPage.goto('/ghost');
|
||||||
await sharedPage.locator('[data-test-nav="settings"]').click();
|
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.getByPlaceholder('At least 10 characters').fill('test123456');
|
||||||
await sharedPage.getByRole('button', {name: 'Create Account →'}).click();
|
await sharedPage.getByRole('button', {name: 'Create Account →'}).click();
|
||||||
await sharedPage.waitForLoadState('networkidle');
|
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 expect(sharedPage).toHaveURL(/\/ghost\/#\/.*/);
|
||||||
|
|
||||||
await sharedPage.locator('[data-test-nav="arrow-down"]').click();
|
await sharedPage.locator('[data-test-nav="arrow-down"]').click();
|
||||||
|
|
Loading…
Add table
Reference in a new issue