Skip to content

Commit

Permalink
TPv2 Update Angular and make compilation stricter (#6391)
Browse files Browse the repository at this point in the history
* Fix broken jasmine-core peer dependency

* update Angular to 12

* Update Angular to version 13

* alphabetize compiler options, stop emitting decorator metadata

* Update lib to ES2020, now targeting ES2017

* Update gitignore for new Angular cache location

* Update engine restriction, stop using deprecated ng build option

* More strict compilation, including for templates

* Fix compilation errors

* Squash warning about known commonJS dependency

* Fix tests

* Fix end-to-end tests

* make end-to-end tests compile more strict

* Update package-lock because somehow that didn't happen

* Update node typings to match required Node version
  • Loading branch information
ocket8888 authored Dec 17, 2021
1 parent 85461aa commit 95189ff
Show file tree
Hide file tree
Showing 26 changed files with 21,064 additions and 28,933 deletions.
3 changes: 1 addition & 2 deletions experimental/traffic-portal/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@

# compiled output
/dist
/tmp
/out-tsc
/.angular
# Only exists if Bazel was run
/bazel-out

Expand Down
3 changes: 3 additions & 0 deletions experimental/traffic-portal/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"allowedCommonJsDependencies": [
"chart.js"
],
"outputPath": "dist/traffic-portal/browser",
"index": "src/index.html",
"main": "src/main.ts",
Expand Down
12 changes: 8 additions & 4 deletions experimental/traffic-portal/e2e/src/app.e2e-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,20 @@ describe("workspace-project App", () => {
});

it("should allow login", async done => {
await page.usernameInput.sendKeys("admin");
await page.passwordInput.sendKeys("twelve12");
// TODO: put this in a config somewhere
await Promise.all([
page.usernameInput.sendKeys("admin"),
page.passwordInput.sendKeys("twelve12")
]);
await page.loginButton.click();
const loggedInURL = `${browser.baseUrl}core`;
try {
await browser.wait(until.urlIs(browser.baseUrl), 1000);
await browser.wait(until.urlIs(loggedInURL), 1000);
} catch(e) {
done.fail(`page did not navigate after login: ${e}`);
return;
}
expect(browser.getCurrentUrl()).toBe(browser.baseUrl);
expect(browser.getCurrentUrl()).toBe(loggedInURL);
done();
});

Expand Down
8 changes: 7 additions & 1 deletion experimental/traffic-portal/e2e/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/e2e",
"allowUnreachableCode": false,
"allowUnusedLabels": false,
"module": "commonjs",
"noImplicitReturns": true,
"noImplicitOverride": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"outDir": "../out-tsc/e2e",
"strict": true,
"target": "es2018",
"types": [
Expand Down
Loading

0 comments on commit 95189ff

Please sign in to comment.