Skip to content
This repository has been archived by the owner on Dec 22, 2023. It is now read-only.

Commit

Permalink
Merge pull request #47 from redmedical/hotfix/1.2.1
Browse files Browse the repository at this point in the history
1.2.1 -> develop
  • Loading branch information
MichaRedM authored Sep 12, 2019
2 parents f0d0c08 + a50c168 commit f82e112
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 8 deletions.
4 changes: 2 additions & 2 deletions client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@redmedical/hvstr-client",
"version": "1.2.0",
"version": "1.2.1",
"main": "dist/index",
"types": "dist/index",
"scripts": {
Expand All @@ -9,7 +9,7 @@
"typedoc": "node node_modules/typedoc/bin/typedoc --out ../docs/api/client --module commonjs --mode file --target es6 --readme none --name \"hvstr-client API Documentation\" --tsconfig ./tsconfig.json --ignoreCompilerErrors ./src/"
},
"dependencies": {
"@redmedical/hvstr-utils": "1.2.0"
"@redmedical/hvstr-utils": "1.2.1"
},
"devDependencies": {
"tslint": "^5.16.0",
Expand Down
4 changes: 2 additions & 2 deletions core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@redmedical/hvstr-core",
"version": "1.2.0",
"version": "1.2.1",
"main": "dist/src/index",
"types": "dist/src/index",
"scripts": {
Expand All @@ -11,7 +11,7 @@
"coverage": "ts-node node_modules/nyc/bin/nyc.js npm rum test"
},
"dependencies": {
"@redmedical/hvstr-utils": "1.2.0",
"@redmedical/hvstr-utils": "1.2.1",
"lodash": "^4.17.14",
"mkdirp": "^0.5.1",
"protractor": "^5.4.2",
Expand Down
2 changes: 1 addition & 1 deletion core/src/lib/code-generation/custom-snippet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ export function initCustomSnippet(): CustomSnippets {
}
codeBuilder
.addImport('protractor', 'protractor/built/ptor')
.addLine('{')
.addLine(`if (await this.get${element.id}().isPresent()){`)
.increaseDepth()
.addLine(`const input = this.get${element.id}();`)
.addLine(`const value: string = await input.getAttribute('value');`)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ export class GeneratedPageObjectCodeGenerator {
.increaseDepth()
.addImport('ProtractorBrowser', 'protractor')
.addImport('browser', 'protractor', '_browser')
.addLine(`private browser: ProtractorBrowser = _browser`)
.addLine(`private customBrowser?: ProtractorBrowser,`)
.decreaseDepth()
.addLine(`) {`);
} else {
Expand All @@ -150,11 +150,23 @@ export class GeneratedPageObjectCodeGenerator {
codeBuilder
.increaseDepth();
childPageNames.forEach(childPageName => {
codeBuilder.addLine(`this.${Utils.firstCharToLowerCase(childPageName)} = new ${childPageName}();`);
if (this.options.enableCustomBrowser) {
codeBuilder.addLine(`this.${Utils.firstCharToLowerCase(childPageName)} = new ${childPageName}(customBrowser);`);
} else {
codeBuilder.addLine(`this.${Utils.firstCharToLowerCase(childPageName)} = new ${childPageName}();`);
}
});
codeBuilder
.decreaseDepth()
.addLine(`}`);
if (this.options.enableCustomBrowser) {
codeBuilder
.addLine(`protected get browser() {`)
.increaseDepth()
.addLine(`return this.customBrowser || _browser;`)
.decreaseDepth()
.addLine(`}`);
}
return this;
}

Expand Down
2 changes: 1 addition & 1 deletion utils/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@redmedical/hvstr-utils",
"version": "1.2.0",
"version": "1.2.1",
"main": "dist/index",
"types": "dist/index",
"scripts": {
Expand Down

0 comments on commit f82e112

Please sign in to comment.