diff --git a/ghost/portal/src/tests/SignupFlow.test.js b/ghost/portal/src/tests/SignupFlow.test.js index 3d592ffa70..7387e7721f 100644 --- a/ghost/portal/src/tests/SignupFlow.test.js +++ b/ghost/portal/src/tests/SignupFlow.test.js @@ -376,8 +376,6 @@ describe('Signup', () => { tierId: singleTierProduct.id, cadence: 'year' }); - const magicLink = await within(popupIframeDocument).findByText(/now check your email/i); - expect(magicLink).toBeInTheDocument(); }); test('without name field on monthly plan', async () => { diff --git a/ghost/portal/src/tests/data-attributes.test.js b/ghost/portal/src/tests/data-attributes.test.js index 2747eb032b..c5f6d2c1f1 100644 --- a/ghost/portal/src/tests/data-attributes.test.js +++ b/ghost/portal/src/tests/data-attributes.test.js @@ -386,6 +386,29 @@ describe('Portal Data attributes:', () => { }); }); + describe('data-portal=signup/:tierid/monthly', () => { + test('opens Portal signup page', async () => { + const siteData = FixturesSite.singleTier.basic; + const paidTier = siteData.products.find(p => p.type === 'paid'); + + document.body.innerHTML = ` +
+ `; + let { + popupFrame, triggerButtonFrame, ...utils + } = await setup({ + site: FixturesSite.singleTier.basic, + showPopup: false + }); + expect(popupFrame).not.toBeInTheDocument(); + expect(triggerButtonFrame).toBeInTheDocument(); + const portalElement = document.querySelector('[data-portal]'); + fireEvent.click(portalElement); + popupFrame = await utils.findByTitle(/portal-popup/i); + expect(popupFrame).toBeInTheDocument(); + }); + }); + describe('data-portal=account', () => { test('opens Portal account home page', async () => { document.body.innerHTML = `