0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2024-12-30 22:34:01 -05:00

Updated Portal browser test to be less dependent on exact copy (#21935)

no issue

- this Portal browser test was relying on a 1-1 text match with text
generated in Portal
- this makes changing copy in Portal difficult, as publishing a new
version of Portal with copy changes can break browser tests
This commit is contained in:
Sag 2024-12-20 04:53:21 +08:00 committed by GitHub
parent cff841d1c7
commit b6e1c11505
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -51,7 +51,7 @@ test.describe('Site Settings', () => {
const portalFrame = sharedPage.frameLocator('#ghost-portal-root div iframe');
// Check sign up is disabled and a message is shown
await expect(portalFrame.locator('.gh-portal-invite-only-notification')).toHaveText('This site is invite-only, contact the owner for access.');
await expect(portalFrame.locator('.gh-portal-section')).toHaveText(/contact the owner for access/);
// Check free trial message is not shown for invite only
await expect(portalFrame.locator('.gh-portal-free-trial-notification')).not.toBeVisible();