Skip to content

Commit 7d69691

Browse files
committed
fix tests
1 parent 5289404 commit 7d69691

File tree

3 files changed

+12
-7
lines changed

3 files changed

+12
-7
lines changed

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,13 @@ Its easy to get it set:
144144
* You can check the demo gantt that we use for testing features at: `http://127.0.0.1:8080/docs/demo.html`
145145
* Use `npm run watch` or do your change in `src` and restart this command refresh the changes.
146146

147-
For testing use `npm run test` with e2e tests.
147+
For testing:
148+
* Install global dependencies: `npm i -g webdriver-manager`
149+
* Install selenium webdriver: `npm run webdriver`, it will install something like node_modules/webdriver-manager/selenium/chromedriver_88.0.4324.96.zip
150+
* Use `npm run test` with e2e tests.
151+
* Or use `npm run watch:test` to keep watching the tests
152+
153+
148154

149155
Or help us donating...
150156

e2e/app.e2e-spec.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,11 @@ describe('ng-packaged App', () => {
1717
it('it should change language from pt to en', () => {
1818
page.navigateTo();
1919

20-
element(by.css('.gtaskheading.gresource')).getText()
20+
element(by.css('.gtaskheading.gres')).getText()
2121
.then(t=>{
2222
expect(t).toEqual('Resource');
23-
2423
element(by.cssContainingText('option', 'pt')).click();
25-
26-
return element(by.css('.gtaskheading.gresource')).getText()
24+
return element(by.css('.gtaskheading.gres')).getText()
2725
})
2826
.then(t=>{
2927
expect(t).toEqual('Responsável');

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"build": "tsc",
99
"watch:build": "onchange 'src/**' '*.*' -- npm run build",
1010
"watch": "onchange 'src/**' '*.ts' -- npm run dist",
11-
"watch:test": "onchange 'src/**/*.ts' '*.ts' -- npm run test",
11+
"watch:test": "onchange 'src/**/*.ts' '*.ts' 'e2e/**/*.ts' -- npm run test",
1212
"test": "npm start & node node_modules/.bin/protractor protractor.conf.js",
1313
"test-unit": "mocha -r ts-node/register test/**.ts",
1414
"webdriver": "./node_modules/protractor/bin/webdriver-manager update",
@@ -29,7 +29,8 @@
2929
},
3030
"homepage": "https://jsganttimproved.github.io/jsgantt-improved/docs/",
3131
"dependencies": {
32-
"@types/node": "^12.0.10"
32+
"@types/node": "^12.0.10",
33+
"webdriver-manager": "^12.1.8"
3334
},
3435
"devDependencies": {
3536
"@types/chai": "^4.1.5",

0 commit comments

Comments
 (0)