Skip to content

Commit 5e0484d

Browse files
authored
Reporter changes (#20)
* replacing own scripts with plugins * unit test and interface updates * missing type * update slack alert to contain get files method * deal with empty dirs * tsify slack-alert * update makefile and add tslint config * lint script correct
1 parent f0edd99 commit 5e0484d

File tree

12 files changed

+1111
-221
lines changed

12 files changed

+1111
-221
lines changed

e2e/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ generate-report:
3737
npx marge mochareports/*.json -f report-$$(date +'%Y%m%d-%H%M%S') -o mochareports
3838

3939
slack-alert:
40-
node scripts/slack/slack-alert.js
40+
npx ts-node scripts/slack/slack-alert.ts
4141

4242
docker-build:
4343
docker build . -t $(DOCKERIMGNAME)

e2e/cypress/support/commands.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import 'cypress-testing-library/add-commands';
44

55
declare global {
66
namespace Cypress {
7-
type Greeting = {
7+
interface Greeting {
88
greeting: string,
99
name: string
1010
}

e2e/cypress/support/pageObjects/login.page.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { loginIds } from '../dataTestIds/login.ids';
22

33
class LoginPage {
4-
visit() {
4+
public visit() {
55
cy.visit('/login');
66
cy.url().should('include', 'login')
77
}

e2e/cypress/support/step_definitions/examples/customParameterTypes.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Given, Then, When, defineParameterType } from "cypress-cucumber-preprocessor/steps";
1+
import { defineParameterType, Given, Then, When } from "cypress-cucumber-preprocessor/steps";
22

33
const notes = ["A", "B", "C", "D", "E", "F", "G"];
44

e2e/cypress/support/step_definitions/examples/docString.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Given, Then, When } from "cypress-cucumber-preprocessor/steps";
22

33
let code = "";
4-
let variableToVerify = ""; // we are assigning this through eval
4+
const variableToVerify = ""; // we are assigning this through eval
55

66
When("I use DocString for code like this:", (dataString: string) => {
77
code = dataString;

e2e/cypress/support/step_definitions/examples/tags_implementation.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { Given, Then, When } from "cypress-cucumber-preprocessor/steps";
21
import { shouldProceedCurrentStep } from "cypress-cucumber-preprocessor/lib/tagsHelper";
2+
import { Given, Then, When } from "cypress-cucumber-preprocessor/steps";
33

44
let parsedTags: string;
55

e2e/package.json

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
"author": "Yousaf Nabi",
88
"license": "ISC",
99
"scripts": {
10+
"lint":"tslint --project .",
11+
"lint-fix":"tslint --project . --fix",
1012
"cypress:open": "cypress open",
1113
"cypress:run": "cypress run",
1214
"cypress:record": "cypress run --record",
@@ -18,10 +20,14 @@
1820
},
1921
"dependencies": {
2022
"@cypress/webpack-preprocessor": "^4.0.3",
21-
"@slack/client": "^5.0.0",
23+
"@slack/types": "^1.0.0",
24+
"@slack/webhook": "^5.0.0",
2225
"@types/node": "^10.12.11",
2326
"cypress": "^3.2.0",
2427
"cypress-failed-log": "^2.5.0",
28+
"husky": "^1.3.1",
29+
"lint-staged": "^8.1.5",
30+
"prettier": "^1.16.4",
2531
"mocha": "^5.2.0",
2632
"mocha-junit-reporter": "^1.21.0",
2733
"mocha-multi-reporters": "^1.1.7",
@@ -31,11 +37,13 @@
3137
"shelljs": "^0.8.3",
3238
"sonarqube-scanner": "^2.4.0",
3339
"ts-loader": "^5.3.3",
40+
"ts-node": "^8.0.3",
41+
"tslint": "^5.15.0",
42+
"tslint-config-prettier": "1.18.0",
43+
"tslint-no-focused-test": "^0.5.0",
3444
"typescript": "^3.4.1",
3545
"uuid": "^3.3.2",
36-
"webpack": "^4.29.6"
37-
},
38-
"devDependencies": {
46+
"webpack": "^4.29.6",
3947
"cypress-cucumber-preprocessor": "1.11.0",
4048
"cypress-testing-library": "2.4.0",
4149
"npm-run-all": "4.1.5",
@@ -44,5 +52,17 @@
4452
},
4553
"cypress-cucumber-preprocessor": {
4654
"nonGlobalStepDefinitions": false
55+
},
56+
"lint-staged": {
57+
"src/**/*.ts": [
58+
"prettier --write",
59+
"tslint --fix",
60+
"git add"
61+
]
62+
},
63+
"husky": {
64+
"hooks": {
65+
"pre-commit": "lint-staged"
66+
}
4767
}
4868
}

e2e/scripts/slack/slack-alert.js

Lines changed: 0 additions & 207 deletions
This file was deleted.

0 commit comments

Comments
 (0)