Updated copy of the add offer link in the settings group (#19323)

This commit is contained in:
Sodbileg Gansukh 2023-12-12 12:28:53 +07:00 committed by GitHub
parent 742a743a6b
commit c932e9d60e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -62,7 +62,7 @@ const Offers: React.FC<{ keywords: string[] }> = ({keywords}) => {
return (
<TopLevelGroup
customButtons={<Button color='green' disabled={!checkStripeEnabled(settings, config)} label={allOffers.length > 0 ? 'Manage offers' : 'Add offers'} link linkWithPadding onClick={allOffers.length > 0 ? openOfferListModal : openAddModal}/>}
customButtons={<Button color='green' disabled={!checkStripeEnabled(settings, config)} label={allOffers.length > 0 ? 'Manage offers' : 'Add offer'} link linkWithPadding onClick={allOffers.length > 0 ? openOfferListModal : openAddModal}/>}
description={<>Create discounts & coupons to boost new subscriptions. {allOffers.length === 0 && <a className='text-green' href="https://ghost.org/help/offers" rel="noopener noreferrer" target="_blank">Learn more</a>}</>}
keywords={keywords}
navid='offers'

View File

@ -14,7 +14,7 @@ test.describe('Offers Modal', () => {
}});
await page.goto('/');
const section = page.getByTestId('offers');
await section.getByRole('button', {name: 'Add offers'}).click();
await section.getByRole('button', {name: 'Add offer'}).click();
const addModal = page.getByTestId('add-offer-modal');
await expect(addModal).toBeVisible();
});