Skip to content

Commit

Permalink
Fix typo (#35232)
Browse files Browse the repository at this point in the history
* Fix typo

"Log out" is a verb
"logout" is a noun. 

This link should be an action. So it's the verb form.

* Add changelog file

* update E2E tests for text change

* update unit test for text change

---------

Co-authored-by: Ron Rennick <ron@ronandandrea.com>
Co-authored-by: Ron Rennick <ronald.rennick@automattic.com>
  • Loading branch information
3 people committed May 5, 2023
1 parent e7d6771 commit 6fdddd2
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 5 deletions.
4 changes: 4 additions & 0 deletions plugins/woocommerce/changelog/pr-35232
@@ -0,0 +1,4 @@
Significance: patch
Type: fix

fix logout vs log out typo
2 changes: 1 addition & 1 deletion plugins/woocommerce/includes/wc-account-functions.php
Expand Up @@ -102,7 +102,7 @@ function wc_get_account_menu_items() {
'edit-address' => _n( 'Address', 'Addresses', ( 1 + (int) wc_shipping_enabled() ), 'woocommerce' ),
'payment-methods' => __( 'Payment methods', 'woocommerce' ),
'edit-account' => __( 'Account details', 'woocommerce' ),
'customer-logout' => __( 'Logout', 'woocommerce' ),
'customer-logout' => __( 'Log out', 'woocommerce' ),
);

// Remove missing endpoints.
Expand Down
Expand Up @@ -169,7 +169,7 @@ test.describe( 'Shopper Checkout Create Account', () => {
await expect( page.locator( 'h1.entry-title' ) ).toContainText(
'My account'
);
await page.click( 'text=Logout' );
await page.click( 'text=Log out' );
// sign in as admin to confirm account creation
await page.fill( '#username', admin.username );
await page.fill( '#password', admin.password );
Expand Down
Expand Up @@ -78,7 +78,7 @@ test.describe( 'Shopper My Account Create Account', () => {
await expect( page.locator( 'h1.entry-title' ) ).toContainText(
'My account'
);
await expect( page.locator( 'text=Logout' ) ).toBeVisible();
await expect( page.locator( 'text=Log out' ).first() ).toBeVisible();

await page.goto( 'my-account/edit-account/' );
await expect( page.locator( '#account_email' ) ).toHaveValue(
Expand Down
Expand Up @@ -45,7 +45,7 @@ test.describe( 'My account page', () => {
page.locator(
'.woocommerce-MyAccount-navigation-link--customer-logout'
)
).toContainText( 'Logout' );
).toContainText( 'Log out' );
} );

for ( let i = 0; i < pages.length; i++ ) {
Expand Down
Expand Up @@ -52,7 +52,7 @@ public function test_wc_get_account_menu_items() {
'downloads' => 'Downloads',
'edit-address' => 'Addresses',
'edit-account' => 'Account details',
'customer-logout' => 'Logout',
'customer-logout' => 'Log out',
),
wc_get_account_menu_items()
);
Expand Down

0 comments on commit 6fdddd2

Please sign in to comment.