mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-29 05:42:32 +03:00
755e031017
closes https://github.com/TryGhost/Team/issues/2338 If a site has the Free tier hidden from the Portal, and subsequently the Stripe connection is disconnected, this produces a dead-end state where no new members can sign up and the Free tier cannot be reactivated again in Portal settings as its hidden. This change - - enables free tier toggle to be always shown on site irrespective of Stripe connection
26 lines
1.1 KiB
JavaScript
26 lines
1.1 KiB
JavaScript
const {expect, test} = require('@playwright/test');
|
|
const {disconnectStripe, setupStripe, generateStripeIntegrationToken} = require('../utils');
|
|
|
|
test.describe('Membership Settings', () => {
|
|
test.describe('Portal settings', () => {
|
|
test('Shows free tier toggle when stripe is disconnected', async ({page}) => {
|
|
await page.goto('/ghost');
|
|
// Disconnect stripe
|
|
await disconnectStripe(page);
|
|
|
|
// Open Portal settings
|
|
await page.goto('/ghost');
|
|
await page.locator('.gh-nav a[href="#/settings/"]').click();
|
|
await page.locator('.gh-setting-group').filter({hasText: 'Membership'}).click();
|
|
await page.locator('[data-test-toggle="portal-settings"]').click();
|
|
// Check free tier toggle is visible
|
|
await expect(page.locator('label').filter({hasText: 'Free'}).first()).toBeVisible();
|
|
|
|
// Reconnect Stripe for other tests
|
|
const stripeToken = await generateStripeIntegrationToken();
|
|
await page.goto('/ghost');
|
|
await setupStripe(page, stripeToken);
|
|
});
|
|
});
|
|
});
|