Skip to content

Commit

Permalink
test with logs
Browse files Browse the repository at this point in the history
  • Loading branch information
shwet2407 committed Sep 30, 2024
1 parent 03baa5f commit 517e27a
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 28 deletions.
42 changes: 21 additions & 21 deletions .github/workflows/skip_pr_workflow.yaml
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
name: Skip Test
# name: Skip Test

on:
pull_request:
branches:
- main
paths:
- 'lerna.json'
push:
branches:
- main
paths:
- 'lerna.json'
# on:
# pull_request:
# branches:
# - main
# paths:
# - 'lerna.json'
# push:
# branches:
# - main
# paths:
# - 'lerna.json'

jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- run: echo "Test execution not required. Passing status check"
release-alpha-version:
uses: ./.github/workflows/skip_publish.yaml
e2e-test:
uses: ./.github/workflows/skip_e2e.yaml
# jobs:
# build-and-test:
# runs-on: ubuntu-latest
# steps:
# - run: echo "Test execution not required. Passing status check"
# release-alpha-version:
# uses: ./.github/workflows/skip_publish.yaml
# e2e-test:
# uses: ./.github/workflows/skip_e2e.yaml
2 changes: 1 addition & 1 deletion .github/workflows/~reusable_e2e_by_OS.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ jobs:
uses: actions/upload-artifact@v3
if: always()
with:
name: Ubuntu-screenshots
name: ${{ inputs.OS }}-screenshots
path: packages/flex-plugin-e2e-tests/screenshots

notify-failure:
Expand Down
1 change: 0 additions & 1 deletion packages/flex-plugin-e2e-tests/src/tests/step006.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ const testSuite: TestSuite = async ({ scenario, config, secrets, environment }:

const onError = async (e: any) => {
await Browser.app.takeScreenshot(environment.cwd);
throw e;
};

const onFinally = async () => {
Expand Down
1 change: 0 additions & 1 deletion packages/flex-plugin-e2e-tests/src/tests/step010.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ const testSuite: TestSuite = async ({ scenario, config, secrets, environment }:

const onError = async (e: any) => {
await Browser.app.takeScreenshot(environment.cwd);
throw e;
};

const onFinally = async () => {
Expand Down
1 change: 0 additions & 1 deletion packages/flex-plugin-e2e-tests/src/tests/step011.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ const testSuite: TestSuite = async ({ scenario, config, secrets, environment }:

const onError = async (e: any) => {
await Browser.app.takeScreenshot(environment.cwd);
throw e;
};

const onFinally = async () => {
Expand Down
1 change: 0 additions & 1 deletion packages/flex-plugin-e2e-tests/src/tests/step012.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ const testSuite: TestSuite = async ({ scenario, config, secrets, environment }:

const onError = async (e: any) => {
await Browser.app.takeScreenshot(environment.cwd);
throw e;
};

const onFinally = async () => {
Expand Down
1 change: 0 additions & 1 deletion packages/flex-plugin-e2e-tests/src/tests/step013.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ const testSuite: TestSuite = async ({ scenario, config, secrets, environment }:

const onError = async (e: any) => {
await Browser.app.takeScreenshot(environment.cwd);
throw e;
};

const onFinally = async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ export class TwilioConsole extends Base {
);

// Log in Flex via service login
logger.info('Logging in Flex via service login on first load');
await this.goto({ baseUrl: this._baseUrl, path });
} else {
throw new Error('Unable to fetch CSRF token to login to Twilio Console');
Expand Down
2 changes: 1 addition & 1 deletion packages/flex-plugin-e2e-tests/src/utils/spawn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,8 @@ export const retryOnError = async (
} catch (error) {
logger.info('Shwet', error);
if (attempts === maxRetries) {
await onFinally(); // cleanup
await onError(error); // Handle error if all retries fail
await onFinally(); // cleanup
throw new Error(`Operation failed after ${maxRetries} retries`);
} else {
logger.info(`Attempt ${attempts} failed. Retrying...`);
Expand Down

0 comments on commit 517e27a

Please sign in to comment.