Merge pull request #31731 from woocommerce/fix/31715
Fix failing Smoke Test Daily workflow
This commit is contained in:
commit
e87b700482
|
@ -146,9 +146,9 @@ jobs:
|
||||||
WC_E2E_SCREENSHOTS: 1
|
WC_E2E_SCREENSHOTS: 1
|
||||||
E2E_SLACK_TOKEN: ${{ secrets.SMOKE_TEST_SLACK_TOKEN }}
|
E2E_SLACK_TOKEN: ${{ secrets.SMOKE_TEST_SLACK_TOKEN }}
|
||||||
E2E_SLACK_CHANNEL: ${{ secrets.RELEASE_TEST_SLACK_CHANNEL }}
|
E2E_SLACK_CHANNEL: ${{ secrets.RELEASE_TEST_SLACK_CHANNEL }}
|
||||||
GITHUB_REPOSITORY: ${{ matrix.private && secrets[matrix.repo] || matrix.repo }}
|
PLUGIN_REPOSITORY: ${{ matrix.private && secrets[matrix.repo] || matrix.repo }}
|
||||||
PLUGIN_NAME: ${{ matrix.plugin }}
|
PLUGIN_NAME: ${{ matrix.plugin }}
|
||||||
GITHUB_TOKEN: ${{ secrets.E2E_GH_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.E2E_GH_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
pnpx wc-e2e test:e2e tests/e2e/specs/smoke-tests/upload-plugin.js
|
pnpx wc-e2e test:e2e tests/e2e/specs/smoke-tests/upload-plugin.js
|
||||||
pnpm nx test-e2e woocommerce
|
pnpx wc-e2e test:e2e
|
||||||
|
|
|
@ -170,9 +170,9 @@ jobs:
|
||||||
WC_E2E_SCREENSHOTS: 1
|
WC_E2E_SCREENSHOTS: 1
|
||||||
E2E_SLACK_TOKEN: ${{ secrets.SMOKE_TEST_SLACK_TOKEN }}
|
E2E_SLACK_TOKEN: ${{ secrets.SMOKE_TEST_SLACK_TOKEN }}
|
||||||
E2E_SLACK_CHANNEL: ${{ secrets.RELEASE_TEST_SLACK_CHANNEL }}
|
E2E_SLACK_CHANNEL: ${{ secrets.RELEASE_TEST_SLACK_CHANNEL }}
|
||||||
GITHUB_REPOSITORY: ${{ matrix.private && secrets[matrix.repo] || matrix.repo }}
|
PLUGIN_REPOSITORY: ${{ matrix.private && secrets[matrix.repo] || matrix.repo }}
|
||||||
PLUGIN_NAME: ${{ matrix.plugin }}
|
PLUGIN_NAME: ${{ matrix.plugin }}
|
||||||
GITHUB_TOKEN: ${{ secrets.E2E_GH_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.E2E_GH_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
pnpx wc-e2e test:e2e tests/e2e/specs/smoke-tests/upload-plugin.js
|
pnpx wc-e2e test:e2e tests/e2e/specs/smoke-tests/upload-plugin.js
|
||||||
pnpm nx test-e2e woocommerce
|
pnpx wc-e2e test:e2e
|
||||||
|
|
|
@ -13,30 +13,36 @@ const {
|
||||||
beforeAll,
|
beforeAll,
|
||||||
} = require( '@jest/globals' );
|
} = require( '@jest/globals' );
|
||||||
|
|
||||||
const { GITHUB_REPOSITORY, PLUGIN_NAME, GITHUB_TOKEN } = process.env;
|
const { GITHUB_REPOSITORY, PLUGIN_NAME, GITHUB_TOKEN, PLUGIN_REPOSITORY } = process.env;
|
||||||
|
|
||||||
|
// allows us to upload plugins from different repositories.
|
||||||
|
const pluginName = PLUGIN_NAME ? PLUGIN_NAME : 'WooCommerce';
|
||||||
|
const repository = PLUGIN_REPOSITORY ? PLUGIN_REPOSITORY : GITHUB_REPOSITORY;
|
||||||
|
|
||||||
let zipUrl;
|
let zipUrl;
|
||||||
let pluginPath;
|
let pluginPath;
|
||||||
|
|
||||||
utils.describeIf( GITHUB_REPOSITORY )( 'Upload and activate plugin', () => {
|
utils.describeIf( repository )(
|
||||||
beforeAll( async () => {
|
`Upload and activate ${ pluginName } from ${ repository }`,
|
||||||
zipUrl = await getLatestReleaseZipUrl( GITHUB_REPOSITORY, GITHUB_TOKEN );
|
() => {
|
||||||
|
beforeAll( async () => {
|
||||||
|
zipUrl = await getLatestReleaseZipUrl( repository, GITHUB_TOKEN );
|
||||||
|
|
||||||
pluginPath = await getRemotePluginZip( zipUrl, GITHUB_TOKEN );
|
pluginPath = await getRemotePluginZip( zipUrl, GITHUB_TOKEN );
|
||||||
|
|
||||||
await merchant.login();
|
await merchant.login();
|
||||||
});
|
} );
|
||||||
|
|
||||||
afterAll( async () => {
|
afterAll( async () => {
|
||||||
await merchant.logout();
|
await merchant.logout();
|
||||||
});
|
} );
|
||||||
|
|
||||||
it( 'can upload and activate the provided plugin', async () => {
|
it( 'can upload and activate the provided plugin', async () => {
|
||||||
await merchant.uploadAndActivatePlugin( pluginPath, PLUGIN_NAME );
|
await merchant.uploadAndActivatePlugin( pluginPath, PLUGIN_NAME );
|
||||||
});
|
} );
|
||||||
|
|
||||||
it( 'can remove downloaded plugin zip', async () => {
|
it( 'can remove downloaded plugin zip', async () => {
|
||||||
await deleteDownloadedPluginFiles();
|
await deleteDownloadedPluginFiles();
|
||||||
} );
|
} );
|
||||||
|
}
|
||||||
});
|
);
|
||||||
|
|
Loading…
Reference in New Issue