Skip to content
This repository was archived by the owner on Aug 1, 2021. It is now read-only.

Commit b58b1e8

Browse files
fix e2e tests
1 parent 521089d commit b58b1e8

7 files changed

Lines changed: 34 additions & 8 deletions

File tree

src/Frontend/Jp.AdminUI/.vscode/launch.json

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,18 @@
44
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
55
"version": "0.2.0",
66
"configurations": [
7-
7+
{
8+
"type": "node",
9+
"request": "launch",
10+
"name": "Launch Program",
11+
"program": "${workspaceFolder}/node_modules/protractor/bin/protractor",
12+
"args":["${workspaceFolder}/e2e/protractor.conf.js"],
13+
"preLaunchTask": "npm: e2e",
14+
"outFiles": [
15+
"${workspaceFolder}/dist/out-tsc/**/*.js"
16+
]
17+
},
18+
819
{
920
"type": "chrome",
1021
"request": "launch",
@@ -13,4 +24,4 @@
1324
"webRoot": "${workspaceFolder}"
1425
}
1526
]
16-
}
27+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
// See https://go.microsoft.com/fwlink/?LinkId=733558
3+
// for the documentation about the tasks.json format
4+
"version": "2.0.0",
5+
"tasks": [
6+
{
7+
"type": "npm",
8+
"script": "e2e",
9+
"problemMatcher": []
10+
}
11+
]
12+
}

src/Frontend/Jp.AdminUI/e2e/app.e2e-spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ describe("jpproject WebApp", function () {
1111

1212
it("should display sign-in page", () => {
1313
page.navigateTo();
14-
// expect(page.getParagraphText()).toEqual("SIGN IN TO CONTINUE.");
14+
expect(page.getButtonText()).toEqual("Login");
1515
expect(page.getUrl()).toContain("/login");
1616
});
1717
});

src/Frontend/Jp.AdminUI/e2e/app.po.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ import { browser, by, element } from "protractor";
22

33
export class JpProjectWebAppPage {
44
navigateTo() {
5-
return browser.get("/");
5+
return browser.get("http://localhost:4200/");
66
}
77

88
getUrl() {
99
return browser.getCurrentUrl();
1010
}
1111

12-
getParagraphText() {
13-
return element(by.css("login-container text-center py-2")).getText();
12+
getButtonText() {
13+
return element(by.css(".login-container .card-body .mt-3")).getText();
1414
}
1515
}

src/Frontend/Jp.AdminUI/e2e/protractor.conf.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
const { SpecReporter } = require('jasmine-spec-reporter');
55

66
exports.config = {
7-
allScriptsTimeout: 11000,
7+
allScriptsTimeout: 30000,
88
specs: [
99
'./*.e2e-spec.ts'
1010
],

src/Frontend/Jp.AdminUI/e2e/tsconfig.e2e.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
"extends": "../tsconfig.json",
33
"compilerOptions": {
44
"outDir": "../out-tsc/e2e",
5+
"mapRoot": "../out-tsc/e2e",
6+
"sourceMap": true,
57
"baseUrl": "./",
68
"module": "commonjs",
79
"target": "es5",

src/Frontend/Jp.AdminUI/tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"compilerOptions": {
44
"baseUrl": "./",
55
"outDir": "./dist/out-tsc",
6+
"mapRoot": "./dist/out-tsc",
67
"sourceMap": true,
78
"declaration": false,
89
"moduleResolution": "node",
@@ -31,4 +32,4 @@
3132
]
3233
}
3334
}
34-
}
35+
}

0 commit comments

Comments
 (0)