0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-06 22:40:14 -05:00

Updated browser tests to use class names from Source theme (#18459)

no issue

- After updating the default theme to be Source instead of Casper, the
browser tests broke because they depended on the class names in Casper,
which have changed
- This fixes that by updating the classes to be compatible with the
Source theme
This commit is contained in:
Chris Raible 2023-10-03 13:03:57 -07:00 committed by GitHub
parent be209cdcf7
commit f9edbc22f0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View file

@ -305,7 +305,7 @@ test.describe('Admin', () => {
await page.goto(link);
// click the paid-only post
await page.locator('.post-card-image-link[href="/sell/"]').click();
await page.locator('.gh-card-link[href="/sell/"]').click();
// check for content CTA and expect it to be zero
await expect(page.locator('.gh-post-upgrade-cta')).toHaveCount(0);

View file

@ -53,7 +53,7 @@ test.describe('Site Settings', () => {
// check the site is publicly accessible
await frontendPage.goto('/');
await expect(frontendPage.locator('.site-title')).toHaveText('The Local Test');
await expect(frontendPage.locator('.gh-navigation-brand')).toHaveText('The Local Test');
});
});
});

View file

@ -55,7 +55,7 @@ const checkPostPublished = async (page, {slug, title, body}) => {
expect(response.status()).toBe(200);
// Check if the title and body are present on this page
await expect(page.locator('.gh-canvas .article-title')).toHaveText(title);
await expect(page.locator('.gh-article-title')).toHaveText(title);
await expect(page.locator('.gh-content.gh-canvas > p')).toHaveText(body);
};