* Revert copy for index.js and tasks.js

* Update changelog

* Update test

* Update tests

* Update tests again

* Lint
This commit is contained in:
Ilyas Foo 2021-05-21 09:13:40 +08:00 committed by GitHub
parent 0276445f65
commit 154071c1bc
10 changed files with 17 additions and 21 deletions

View File

@ -67,7 +67,7 @@ const getPageTitle = ( defaultTitle ) => {
// If it's the task list then render a title based on which task the user is on.
return (
{
payments: __( 'Choose payment methods', 'woocommerce-admin' ),
payments: __( 'Set up payments', 'woocommerce-admin' ),
tax: __( 'Add tax rates', 'woocommerce-admin' ),
appearance: __( 'Personalize your store', 'woocommerce-admin' ),
products: __( 'Add products', 'woocommerce-admin' ),

View File

@ -86,9 +86,7 @@ describe( 'Header', () => {
queryByTestId( 'header-back-button' )
).not.toBeEmptyDOMElement();
expect(
queryByText( 'Choose payment methods' )
).not.toBeEmptyDOMElement();
expect( queryByText( 'Set up payments' ) ).not.toBeEmptyDOMElement();
} );
it( 'should render decoded breadcrumb name', () => {

View File

@ -203,10 +203,7 @@ const TaskDashboard = ( { userPreferences, query } ) => {
isComplete={ isTaskListComplete }
query={ query }
tasks={ setupTasks }
title={ __(
'Get ready to start selling',
'woocommerce-admin'
) }
title={ __( 'Finish setup', 'woocommerce-admin' ) }
trackedCompletedTasks={ trackedCompletedTasks || [] }
/>
) }

View File

@ -95,14 +95,14 @@ export function getAllTasks( {
).includes( 'woocommerce-payments' );
let purchaseAndInstallText = __(
'Add paid extensions to your store',
'Add paid extensions to my store',
'woocommerce-admin'
);
if ( uniqueItemsList.length === 1 ) {
const { name: itemName } = uniqueItemsList[ 0 ];
const purchaseAndInstallFormat = __(
'Add %s to your store',
'Add %s to my store',
'woocommerce-admin'
);
purchaseAndInstallText = sprintf( purchaseAndInstallFormat, itemName );
@ -138,7 +138,7 @@ export function getAllTasks( {
},
{
key: 'products',
title: __( 'Add products', 'woocommerce-admin' ),
title: __( 'Add my products', 'woocommerce-admin' ),
container: <Products />,
onClick: () => {
onTaskSelect( 'products' );
@ -195,7 +195,7 @@ export function getAllTasks( {
},
{
key: 'payments',
title: __( 'Choose payment methods', 'woocommerce-admin' ),
title: __( 'Set up payments', 'woocommerce-admin' ),
container: <Payments />,
completed: hasPaymentGateway,
onClick: () => {
@ -211,7 +211,7 @@ export function getAllTasks( {
},
{
key: 'tax',
title: __( 'Add tax rates', 'woocommerce-admin' ),
title: __( 'Set up tax', 'woocommerce-admin' ),
container: <Tax />,
onClick: () => {
onTaskSelect( 'tax' );
@ -224,7 +224,7 @@ export function getAllTasks( {
},
{
key: 'shipping',
title: __( 'Set up shipping costs', 'woocommerce-admin' ),
title: __( 'Set up shipping', 'woocommerce-admin' ),
container: <Shipping />,
onClick: () => {
if ( shippingZonesCount > 0 ) {
@ -246,7 +246,7 @@ export function getAllTasks( {
},
{
key: 'appearance',
title: __( 'Personalize your store', 'woocommerce-admin' ),
title: __( 'Personalize my store', 'woocommerce-admin' ),
container: <Appearance />,
onClick: () => {
onTaskSelect( 'appearance' );

View File

@ -39,7 +39,7 @@ jest.mock( '@wordpress/data', () => ( {
useDispatch: jest.fn(),
} ) );
const TASK_LIST_HEADING = 'Get ready to start selling';
const TASK_LIST_HEADING = 'Finish setup';
const EXTENDED_TASK_LIST_HEADING = 'Things to do next';
describe( 'TaskDashboard and TaskList', () => {
@ -144,7 +144,7 @@ describe( 'TaskDashboard and TaskList', () => {
type: 'extension',
};
it( 'renders the "Get ready to start selling" and "Things to do next" tasks lists', async () => {
it( 'renders the "Finish setup" and "Things to do next" tasks lists', async () => {
apiFetch.mockResolvedValue( {} );
getAllTasks.mockReturnValue( tasks );
const { container } = render( <TaskDashboard query={ {} } /> );

View File

@ -113,6 +113,7 @@ Release and roadmap notes are available on the [WooCommerce Developers Blog](htt
- Fix: Call existing filters for leaderboards in analytics. #6626
- Fix: Set target to blank for the external links #6999
- Tweak: Only fetch remote payment gateway recommendations when opted in #6964
- Tweak: Setup checklist copy revert. #7015
- Tweak: Store profiler - Changed MailPoet's title and description #6990
- Update: Task list component with new Experimental Task list. #6849
- Update: Experimental task list import to the experimental package. #6950

View File

@ -1,6 +1,6 @@
export const TaskTitles = {
storeDetails: 'Store details',
addPayments: 'Choose payment methods',
addPayments: 'Set up payments',
wooPayments:
'Set up WooCommerce PaymentsBy setting up, you are agreeing to the Terms of Service2 minutes',
addProducts: 'Add products',

View File

@ -19,7 +19,7 @@ export class PaymentsSetup extends BasePage {
url = 'wp-admin/admin.php?page=wc-admin&task=payments';
async isDisplayed() {
await waitForElementByText( 'h1', 'Choose payment methods' );
await waitForElementByText( 'h1', 'Set up payments' );
}
async closeHelpModal() {

View File

@ -27,7 +27,7 @@ export class WcHomescreen extends BasePage {
await page.waitForSelector(
'.woocommerce-task-card .woocommerce-task-list__item-title'
);
await waitForElementByText( 'p', 'Get ready to start selling' );
await waitForElementByText( 'p', 'Finish setup' );
const list = await this.page.$$eval(
'.woocommerce-task-card .woocommerce-task-list__item-title',
( items ) => items.map( ( item ) => item.textContent )

View File

@ -33,7 +33,7 @@ describe( 'Payment setup task', () => {
} );
it( 'Can visit the payment setup task from the homescreen if the setup wizard has been skipped', async () => {
await homeScreen.clickOnTaskList( 'Choose payment methods' );
await homeScreen.clickOnTaskList( 'Set up payments' );
await paymentsSetup.closeHelpModal();
await paymentsSetup.isDisplayed();
} );