Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimise e2e v2 #1050

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 29 additions & 31 deletions .github/workflows/~reusable_e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,38 +69,37 @@ env:
NODE_OPTIONS: --max-old-space-size=8192

jobs:
node20-ubuntu:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: '20'
- name: Install project dependencies
run: npm ci
- name: Build packages
run: npm run build
- name: Run e2e tests - JS
run: |
cd packages/flex-plugin-e2e-tests
npm run start
env:
TS: 0
- name: Run e2e tests - TS
env:
TS: 1
run: |
cd packages/flex-plugin-e2e-tests
npm run start
- name: Upload Screenshots
uses: actions/upload-artifact@v3
if: always()
with:
name: Ubuntu-screenshots
path: packages/flex-plugin-e2e-tests/screenshots
# node20-ubuntu:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - uses: actions/setup-node@v3
# with:
# node-version: '20'
# - name: Install project dependencies
# run: npm ci
# - name: Build packages
# run: npm run build
# - name: Run e2e tests - JS
# run: |
# cd packages/flex-plugin-e2e-tests
# npm run start
# env:
# TS: 0
# - name: Run e2e tests - TS
# env:
# TS: 1
# run: |
# cd packages/flex-plugin-e2e-tests
# npm run start
# - name: Upload Screenshots
# uses: actions/upload-artifact@v3
# if: always()
# with:
# name: Ubuntu-screenshots
# path: packages/flex-plugin-e2e-tests/screenshots

node20-macos:
needs: node20-ubuntu
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -131,7 +130,6 @@ jobs:
path: packages/flex-plugin-e2e-tests/screenshots

node20-windows:
needs: [ node20-ubuntu, node20-macos ]
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
Expand Down
170 changes: 163 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 11 additions & 11 deletions packages/flex-plugin-e2e-tests/src/tests/step006.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ const testSuite: TestSuite = async ({ scenario, config, secrets, environment }:
await assertion.app.view.plugins.plugin.isVisible(plugin.componentText);

// Verify hot reload
await replaceInFile({
files: joinPath(plugin.dir, 'src', 'components', 'CustomTaskList', `CustomTaskList.${ext}`),
from: plugin.componentText,
to: tmpComponentText,
});
// await replaceInFile({
// files: joinPath(plugin.dir, 'src', 'components', 'CustomTaskList', `CustomTaskList.${ext}`),
// from: plugin.componentText,
// to: tmpComponentText,
// });

await assertion.app.view.plugins.plugin.isVisible(tmpComponentText);
// await assertion.app.view.plugins.plugin.isVisible(tmpComponentText);
} catch (e) {
await Browser.app.takeScreenshot(environment.cwd);
throw e;
Expand All @@ -44,11 +44,11 @@ const testSuite: TestSuite = async ({ scenario, config, secrets, environment }:
await killChildProcess(twilioCliResult.child, environment.operatingSystem);
}

await replaceInFile({
files: joinPath(plugin.dir, 'src', 'components', 'CustomTaskList', `CustomTaskList.${ext}`),
from: tmpComponentText,
to: plugin.componentText,
});
// await replaceInFile({
// files: joinPath(plugin.dir, 'src', 'components', 'CustomTaskList', `CustomTaskList.${ext}`),
// from: tmpComponentText,
// to: plugin.componentText,
// });
};
testSuite.description = 'Running {{twilio flex:plugins:start}}';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ describe('Commands/FlexPluginsDeploy', () => {
accountSid: 'AC00000000000000000000000000000',
environmentSid: 'ZE00000000000000000000000000000',
domainName: 'ruby-fox-123.twil.io',
CliVersion: '7.0.4',
CliVersion: '7.0.5',
isPublic: false,
nextVersion: '2.0.0',
pluginUrl: 'https://ruby-fox-123.twil.io/plugin-url',
Expand Down
Loading