Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mariohmol committed Feb 9, 2021
1 parent 5289404 commit 7d69691
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,13 @@ Its easy to get it set:
* You can check the demo gantt that we use for testing features at: `http://127.0.0.1:8080/docs/demo.html`
* Use `npm run watch` or do your change in `src` and restart this command refresh the changes.

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



Or help us donating...

Expand Down
6 changes: 2 additions & 4 deletions e2e/app.e2e-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,11 @@ describe('ng-packaged App', () => {
it('it should change language from pt to en', () => {
page.navigateTo();

element(by.css('.gtaskheading.gresource')).getText()
element(by.css('.gtaskheading.gres')).getText()
.then(t=>{
expect(t).toEqual('Resource');

element(by.cssContainingText('option', 'pt')).click();

return element(by.css('.gtaskheading.gresource')).getText()
return element(by.css('.gtaskheading.gres')).getText()
})
.then(t=>{
expect(t).toEqual('Responsável');
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"build": "tsc",
"watch:build": "onchange 'src/**' '*.*' -- npm run build",
"watch": "onchange 'src/**' '*.ts' -- npm run dist",
"watch:test": "onchange 'src/**/*.ts' '*.ts' -- npm run test",
"watch:test": "onchange 'src/**/*.ts' '*.ts' 'e2e/**/*.ts' -- npm run test",
"test": "npm start & node node_modules/.bin/protractor protractor.conf.js",
"test-unit": "mocha -r ts-node/register test/**.ts",
"webdriver": "./node_modules/protractor/bin/webdriver-manager update",
Expand All @@ -29,7 +29,8 @@
},
"homepage": "https://jsganttimproved.github.io/jsgantt-improved/docs/",
"dependencies": {
"@types/node": "^12.0.10"
"@types/node": "^12.0.10",
"webdriver-manager": "^12.1.8"
},
"devDependencies": {
"@types/chai": "^4.1.5",
Expand Down

0 comments on commit 7d69691

Please sign in to comment.