0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-10 23:36:14 -05:00

Fixed browser tests (#19852)

no issue

- browser tests were failing due to the renaming of a button
This commit is contained in:
Sag 2024-03-13 12:54:19 +01:00 committed by GitHub
parent 9d9707e6f4
commit 59bbade630
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -96,10 +96,10 @@ const setupStripe = async (page, stripConnectIntegrationToken) => {
await expect(modal.getByRole('button', {name: 'Disconnect'})).toBeVisible(); await expect(modal.getByRole('button', {name: 'Disconnect'})).toBeVisible();
await modal.getByRole('button', {name: 'Close'}).click(); await modal.getByRole('button', {name: 'Close'}).click();
await page.getByRole('button', {name: '← Done'}).click(); await page.getByTestId('exit-settings').click();
}; };
// Setup Mailgun with fake data, for Ghost Admin to allow bulk sending // Setup Mailgun with fake data for Ghost Admin to allow bulk sending
const setupMailgun = async (page) => { const setupMailgun = async (page) => {
await page.locator('.gh-nav a[href="#/settings/"]').click(); await page.locator('.gh-nav a[href="#/settings/"]').click();
const section = page.getByTestId('mailgun'); const section = page.getByTestId('mailgun');
@ -110,7 +110,7 @@ const setupMailgun = async (page) => {
await section.getByRole('button', {name: 'Save'}).click(); await section.getByRole('button', {name: 'Save'}).click();
await section.getByText('Mailgun is set up').waitFor(); await section.getByText('Mailgun is set up').waitFor();
await page.getByRole('button', {name: '← Done'}).click(); await page.getByTestId('exit-settings').click();
}; };
/** /**
@ -127,7 +127,7 @@ const enableLabs = async (page) => {
await section.getByLabel('Webmentions').click(); await section.getByLabel('Webmentions').click();
await section.getByLabel('Tips & donations').click(); await section.getByLabel('Tips & donations').click();
await page.getByRole('button', {name: '← Done'}).click(); await page.getByTestId('exit-settings').click();
}; };
/** /**