mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-06 22:40:14 -05:00
parent
8bce7697f1
commit
ee55892c74
2 changed files with 23 additions and 2 deletions
|
@ -376,8 +376,6 @@ describe('Signup', () => {
|
||||||
tierId: singleTierProduct.id,
|
tierId: singleTierProduct.id,
|
||||||
cadence: 'year'
|
cadence: 'year'
|
||||||
});
|
});
|
||||||
const magicLink = await within(popupIframeDocument).findByText(/now check your email/i);
|
|
||||||
expect(magicLink).toBeInTheDocument();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
test('without name field on monthly plan', async () => {
|
test('without name field on monthly plan', async () => {
|
||||||
|
|
|
@ -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 = `
|
||||||
|
<div data-portal="signup/${paidTier.id}/monthly"> </div>
|
||||||
|
`;
|
||||||
|
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', () => {
|
describe('data-portal=account', () => {
|
||||||
test('opens Portal account home page', async () => {
|
test('opens Portal account home page', async () => {
|
||||||
document.body.innerHTML = `
|
document.body.innerHTML = `
|
||||||
|
|
Loading…
Reference in a new issue