Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve post-onboarding: Remove the word "Paid" from the plugin #2672

Merged
Merged
6 changes: 3 additions & 3 deletions js/src/components/paid-ads/add-paid-campaign-button.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ import { getCreateCampaignUrl } from '.~/utils/urls';
import { recordGlaEvent } from '.~/utils/tracks';

/**
* "Add paid campaign" button is clicked.
* "Add campaign" button is clicked.
*
* @event gla_add_paid_campaign_clicked
* @property {string} context Indicate the place where the button is located.
* @property {string} href Indicate the destination where the users is directed to, e.g. `'/google/setup-ads'`.
*/

/**
* Renders an AppButton with the text "Add Paid Campaign".
* Renders an AppButton with the text "Add campaign".
* Clicking on the button will call `recordGlaEvent` and
* redirect to Setup MC or Create New Campaign depending on
* whether the users have completed ads setup or not.
Expand Down Expand Up @@ -68,7 +68,7 @@ const AddPaidCampaignButton = ( props ) => {

return (
<AppButton isSmall isSecondary onClick={ handleClick } { ...rest }>
{ children || __( 'Add paid campaign', 'google-listings-and-ads' ) }
{ children || __( 'Add campaign', 'google-listings-and-ads' ) }
</AppButton>
);
};
Expand Down
2 changes: 1 addition & 1 deletion js/src/components/paid-ads/ads-campaign/ads-campaign.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export default function AdsCampaign( {

let description = createInterpolateElement(
__(
'Paid Performance Max campaigns are automatically optimized for you by Google. <link>See what your ads will look like.</link>',
'Performance Max campaigns are automatically optimized for you by Google. <link>See what your ads will look like.</link>',
'google-listings-and-ads'
),
{
Expand Down
5 changes: 1 addition & 4 deletions js/src/components/paid-ads/asset-group/asset-group.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,7 @@
onClick={ handleLaunchClick }
>
{ isCreation
? __(
'Launch paid campaign',
'google-listings-and-ads'
)
? __( 'Create campaign', 'google-listings-and-ads' )

Check warning on line 166 in js/src/components/paid-ads/asset-group/asset-group.js

View check run for this annotation

Codecov / codecov/patch

js/src/components/paid-ads/asset-group/asset-group.js#L166

Added line #L166 was not covered by tests
: __( 'Save changes', 'google-listings-and-ads' ) }
</AppButton>
</StepContentActions>
Expand Down
2 changes: 1 addition & 1 deletion js/src/dashboard/campaign-creation-success-guide/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export default function CampaignCreationSuccessGuide( {
</div>
<GuidePageContent
title={ __(
`You've set up a paid Performance Max Campaign!`,
`You've set up a Performance Max Campaign!`,
'google-listings-and-ads'
) }
>
Expand Down
2 changes: 1 addition & 1 deletion js/src/dashboard/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jest.mock( '@woocommerce/navigation', () => {
jest.mock( '.~/utils/isWCTracksEnabled', () => jest.fn() );

const CAMPAIGN_CREATION_SUCCESS_GUIDE_TEXT =
"You've set up a paid Performance Max Campaign!";
"You've set up a Performance Max Campaign!";
const CES_PROMPT_TEXT = 'How easy was it to create a Google Ad campaign?';

jest.mock( '.~/components/customer-effort-score-prompt', () => () => (
Expand Down
8 changes: 4 additions & 4 deletions js/src/pages/create-paid-ads-campaign/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ const CreatePaidAdsCampaign = () => {
createNotice(
'success',
__(
'You’ve successfully created a paid campaign!',
'You’ve successfully created a campaign!',
'google-listings-and-ads'
)
);
Expand All @@ -125,7 +125,7 @@ const CreatePaidAdsCampaign = () => {
<>
<TopBar
title={ __(
'Create your paid campaign',
'Create your campaign',
'google-listings-and-ads'
) }
helpButton={ <HelpIconButton eventContext={ eventContext } /> }
Expand All @@ -144,13 +144,13 @@ const CreatePaidAdsCampaign = () => {
{
key: STEP.CAMPAIGN,
label: __(
'Create paid campaign',
'Create campaign',
'google-listings-and-ads'
),
content: (
<AdsCampaign
headerTitle={ __(
'Create your paid campaign',
'Create your campaign',
'google-listings-and-ads'
) }
context={ eventContext }
Expand Down
4 changes: 2 additions & 2 deletions js/src/pages/edit-paid-ads-campaign/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,15 +197,15 @@ const EditPaidAdsCampaign = () => {
{
key: STEP.CAMPAIGN,
label: __(
'Edit paid campaign',
'Edit campaign',
'google-listings-and-ads'
),
content: (
<AdsCampaign
campaign={ campaign }
context={ eventContext }
headerTitle={ __(
'Edit your paid campaign',
'Edit your campaign',
'google-listings-and-ads'
) }
continueButton={ ( formContext ) => (
Expand Down
2 changes: 1 addition & 1 deletion js/src/product-feed/submission-success-guide/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ const SubmissionSuccessGuide = () => {
action: 'create-paid-campaign',
} }
>
{ __( 'Create paid campaign', 'google-listings-and-ads' ) }
{ __( 'Create campaign', 'google-listings-and-ads' ) }
</AddPaidCampaignButton>
</>
);
Expand Down
2 changes: 1 addition & 1 deletion js/src/setup-ads/ads-stepper/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ const AdsStepper = () => {
},
{
key: '2',
label: __( 'Create your paid campaign', 'google-listings-and-ads' ),
label: __( 'Create your campaign', 'google-listings-and-ads' ),
content: <SetupPaidAds />,
onClick: handleStepClick,
},
Expand Down
2 changes: 1 addition & 1 deletion js/src/setup-ads/ads-stepper/setup-accounts/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const SetupAccounts = ( props ) => {
'google-listings-and-ads'
) }
description={ __(
'Connect your Google account and your Google Ads account to set up a paid Performance Max campaign.',
'Connect your Google account and your Google Ads account to set up a Performance Max campaign.',
'google-listings-and-ads'
) }
/>
Expand Down
4 changes: 2 additions & 2 deletions js/src/setup-ads/ads-stepper/setup-paid-ads.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,15 +94,15 @@ const SetupPaidAds = () => {
>
<AdsCampaign
headerTitle={ __(
'Create your paid campaign',
'Create your campaign',
'google-listings-and-ads'
) }
context="setup-ads"
continueButton={ ( formContext ) => (
<AppButton
isPrimary
text={ __(
'Launch paid campaign',
'Create campaign',
'google-listings-and-ads'
) }
disabled={
Expand Down
2 changes: 1 addition & 1 deletion js/src/setup-ads/top-bar/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const SetupAdsTopBar = () => {

return (
<TopBar
title={ __( 'Set up paid campaign', 'google-listings-and-ads' ) }
title={ __( 'Set up your campaign', 'google-listings-and-ads' ) }
helpButton={ <HelpIconButton eventContext="setup-ads" /> }
backHref={ getNewPath( {}, '/google/dashboard' ) }
onBackButtonClick={ handleBackButtonClick }
Expand Down
4 changes: 2 additions & 2 deletions src/Tracking/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ Do not edit it manually!
-->

### [`gla_add_paid_campaign_clicked`](../../js/src/components/paid-ads/add-paid-campaign-button.js#L15)
"Add paid campaign" button is clicked.
"Add campaign" button is clicked.
#### Properties
| name | type | description |
| ---- | ---- | ----------- |
Expand Down Expand Up @@ -546,7 +546,7 @@ Clicking on the "Scan for assets" button.
- [`exports`](../../js/src/components/paid-ads/asset-group/assets-loader.js#L96)

### [`gla_launch_paid_campaign_button_click`](../../js/src/utils/tracks.js#L167)
Triggered when the "Launch paid campaign" button is clicked to add a new paid campaign in the Google Ads setup flow.
Triggered when the "Create campaign" button is clicked to add a new paid campaign in the Google Ads setup flow.
joemcgill marked this conversation as resolved.
Show resolved Hide resolved
#### Properties
| name | type | description |
| ---- | ---- | ----------- |
Expand Down
22 changes: 11 additions & 11 deletions tests/e2e/specs/add-paid-campaigns/add-paid-campaigns.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ test.describe( 'Set up Ads account', () => {
await page.close();
} );

test( 'Dashboard page contains Add Paid campaign buttons', async () => {
test( 'Dashboard page contains Add campaign buttons', async () => {
//Add page campaign in the programs section.
await expect( dashboardPage.addPaidCampaignButton ).toBeEnabled();
} );
Expand All @@ -102,7 +102,7 @@ test.describe( 'Set up Ads account', () => {
).toBeVisible();
await expect(
page.getByText(
'Connect your Google account and your Google Ads account to set up a paid Performance Max campaign.'
'Connect your Google account and your Google Ads account to set up a Performance Max campaign.'
)
).toBeVisible();
} );
Expand All @@ -120,7 +120,7 @@ test.describe( 'Set up Ads account', () => {
} );
} );

test.describe( 'Add paid campaigns with no Ads account', async () => {
test.describe( 'Add campaigns with no Ads account', async () => {
test( 'Create an account should be visible', async () => {
const createAccountButton = page.getByRole( 'button', {
name: 'Create account',
Expand Down Expand Up @@ -230,7 +230,7 @@ test.describe( 'Set up Ads account', () => {
} );
} );

test.describe( 'Add paid campaigns with existing Ads accounts', () => {
test.describe( 'Add campaigns with existing Ads accounts', () => {
test.beforeAll( async () => {
await setupAdsAccounts.mockAdsAccountsResponse( ADS_ACCOUNTS );
//Disconnect the account from the previous test
Expand Down Expand Up @@ -280,13 +280,13 @@ test.describe( 'Set up Ads account', () => {
} );
} );

test.describe( 'Create your paid campaign', () => {
test.describe( 'Create your campaign', () => {
test( 'Continue to create paid ad campaign', async () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since other test descriptions are being updated, we can change this one as well.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in 4ac7c89

await setupAdsAccounts.clickContinue();
await page.waitForLoadState( LOAD_STATE.DOM_CONTENT_LOADED );
await expect(
page.getByRole( 'heading', {
name: 'Create your paid campaign',
name: 'Create your campaign',
} )
).toBeVisible();

Expand Down Expand Up @@ -351,7 +351,7 @@ test.describe( 'Set up Ads account', () => {
await setupBudgetPage.fillBudget( budget );

await expect(
setupBudgetPage.getLaunchPaidCampaignButton()
setupBudgetPage.getCreateCampaignButton()
).toBeDisabled();
} );

Expand All @@ -360,7 +360,7 @@ test.describe( 'Set up Ads account', () => {
await setupBudgetPage.fillBudget( budget );

await expect(
setupBudgetPage.getLaunchPaidCampaignButton()
setupBudgetPage.getCreateCampaignButton()
).toBeDisabled();
} );

Expand All @@ -381,7 +381,7 @@ test.describe( 'Set up Ads account', () => {
await setupBudgetPage.fillBudget( budget );

await expect(
setupBudgetPage.getLaunchPaidCampaignButton()
setupBudgetPage.getCreateCampaignButton()
).toBeEnabled();
} );

Expand All @@ -400,7 +400,7 @@ test.describe( 'Set up Ads account', () => {
[ 'US' ]
);

await setupBudgetPage.getLaunchPaidCampaignButton().click();
await setupBudgetPage.getCreateCampaignButton().click();

await campaignCreation;

Expand All @@ -415,7 +415,7 @@ test.describe( 'Set up Ads account', () => {

await expect(
page.getByRole( 'heading', {
name: "You've set up a paid Performance Max Campaign!",
name: "You've set up a Performance Max Campaign!",
} )
).toBeVisible();

Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/utils/pages/dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export default class DashboardPage extends MockRequests {
this.addPaidCampaignButton = this.page.locator(
'.gla-all-programs-table-card button',
{
hasText: 'Add paid campaign',
hasText: 'Add campaign',
}
);
}
Expand Down
8 changes: 4 additions & 4 deletions tests/e2e/utils/pages/setup-ads/setup-budget.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,13 @@ export default class SetupBudget extends MockRequests {
}

/**
* Get the Launch paid campaign button.
* Get the Create campaign button.
*
* @return {import('@playwright/test').Locator} Launch paid campaign button.
* @return {import('@playwright/test').Locator} Create campaign button.
*/
getLaunchPaidCampaignButton() {
getCreateCampaignButton() {
return this.page.getByRole( 'button', {
name: 'Launch paid campaign',
name: 'Create campaign',
exact: true,
} );
}
Expand Down