Skip to content

Commit

Permalink
Unskip Mini Cart i18n test (#45371)
Browse files Browse the repository at this point in the history
* Unskip Mini Cart i18n test

* Install language packs before each i18n-related test suite

* Delete translations.sh

* Add changelog

* Replace deprecated WP-CLI command

* Remove obsolete WP-CLI command
  • Loading branch information
nielslange authored and Konamiman committed Mar 13, 2024
1 parent 77ab6fe commit cc7b8e2
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 14 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,19 @@ const test = base.extend< { checkoutPageObject: CheckoutPage } >( {
test.describe( 'Shopper → Translations', () => {
test.beforeAll( async () => {
await cli(
`npm run wp-env run tests-cli -- wp language core activate nl_NL`
`npm run wp-env run tests-cli -- wp language core install nl_NL`
);
await cli(
`npm run wp-env run tests-cli -- wp site switch-language nl_NL`
);
await cli(
`npm run wp-env run tests-cli -- wp language plugin install woocommerce nl_NL`
);
} );

test.afterAll( async () => {
await cli(
`npm run wp-env run tests-cli -- wp language core activate en_US`
`npm run wp-env run tests-cli -- wp site switch-language en_US`
);
} );

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,23 @@ import { REGULAR_PRICED_PRODUCT_NAME } from '../checkout/constants';
test.describe( 'Shopper → Translations', () => {
test.beforeAll( async () => {
await cli(
`npm run wp-env run tests-cli -- wp language core activate nl_NL`
`npm run wp-env run tests-cli -- wp language core install nl_NL`
);
await cli(
`npm run wp-env run tests-cli -- wp site switch-language nl_NL`
);
await cli(
`npm run wp-env run tests-cli -- wp language plugin install woocommerce nl_NL`
);
} );

test.afterAll( async () => {
await cli(
`npm run wp-env run tests-cli -- wp language core activate en_US`
`npm run wp-env run tests-cli -- wp site switch-language en_US`
);
} );

// For more details: https://github.com/woocommerce/woocommerce/issues/45346
// eslint-disable-next-line playwright/no-skipped-test
test.skip( 'User can see translation in empty Mini-Cart', async ( {
test( 'User can see translation in empty Mini-Cart', async ( {
page,
frontendUtils,
miniCartUtils,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: dev

Improve stability of i18n-related e2e tests.

0 comments on commit cc7b8e2

Please sign in to comment.