test: Add e2e-tests by maxreichmann · Pull Request #1355 · UI5/cli

@maxreichmann

Outsourced of Incremental Build PR #1267:

  • Add "e2e-tests" dir under "internal/"
  • Add tests for following community custom tasks:
    • ui5-tooling-transpile
    • ui5-task-zipper
    • ui5-tooling-modules
    • ui5-tooling-stringreplace
  • Add test for "ui5 --version"

All tests are currently passing (April 8th).

@maxreichmann

* Add "e2e-tests" dir under "internal/"
* Add tests for following community custom tasks:
- ui5-tooling-transpile
- ui5-task-zipper
- ui5-tooling-modules
- ui5-tooling-stringreplace
* Add test for "ui5 --version"

@maxreichmann

@UI5/ui5-team-cor-fnd These tests are not included in any CI pipeline yet. It's up for debate if we want to include them.

d3xter666

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's also an e2e test setup in packages/cli.
Can we leverage and consolidate the setup from there?
Or simply clean it up if it's redundant an too complex anymore?

test("ui5-tooling-transpile", async ({assert}) => {
const fixtureHelper = new FixtureHelper("application.a.ts");
await fixtureHelper.init();
process.env.UI5_DATA_DIR = `${fixtureHelper.dotUi5Path}`;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is manipulated globally and is not cleaned up.
A cleanup in before/after pahse is needed.

const fixtureHelper = new FixtureHelper("application.a.ts");
await fixtureHelper.init();
process.env.UI5_DATA_DIR = `${fixtureHelper.dotUi5Path}`;
process.chdir(fixtureHelper.tmpPath);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This changes the directory and is not reset later

@maxreichmann