-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#9 #12
#9 #12
Conversation
cucumber.sh
Outdated
#!/usr/bin/env bash | ||
|
||
#Run server in background | ||
http-server ./test/demo-app -p 9000 > /dev/null & |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't it be ./node_modules/.bin/http-server ./test/demo-app -p 9000 > /dev/null &
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree. Fixed.
src/steps/then.js
Outdated
'use strict' | ||
|
||
const { defineSupportCode } = require('cucumber'); | ||
const { pageObject, getPageObject } = require('../helpers/objects.processor') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
;
is missing at the end of a line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets try to use no semicolons.
src/steps/then.js
Outdated
|
||
const { defineSupportCode } = require('cucumber'); | ||
const { pageObject, getPageObject } = require('../helpers/objects.processor') | ||
const { _r } = require('../helpers/utils') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
;
is missing at the end of a line
* The element should be present | ||
* @type {PageObject} | ||
*/ | ||
const locator = getPageObject(object) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
;
is missing at the end of a line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets try to use no semicolons.
src/steps/then.js
Outdated
}); | ||
|
||
}); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
;
is missing at the end of a line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets try to use no semicolons.
@@ -59,7 +62,7 @@ describe('getPageObject', () => { | |||
|
|||
expect(match).to.be.an('array') | |||
const strPageObject = match[1] | |||
const pageObjectVal = getPageObject.call(World, strPageObject) | |||
const pageObjectVal = getPageObject(strPageObject) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
;
is missing at the end of a line
@@ -89,7 +92,7 @@ describe('getDictionaryObject', () => { | |||
|
|||
expect(match).to.be.an('array') | |||
const strDictionaryObject = match[1] | |||
const dictionaryObjectVal = getDictionaryObject.call(World, strDictionaryObject) | |||
const dictionaryObjectVal = getDictionaryObject(strDictionaryObject) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
;
is missing at the end of a line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets try to use no semicolons.
|
||
global.pages = { | ||
main: require('./features/page_objects/main') | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
;
is missing at the end of a line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets try to use no semicolons.
value: '', | ||
regenerate: () => this.value === (new Date()).getTime(), | ||
getId: () => this.value | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
;
is missing at the end of a line
getId: () => this.value | ||
} | ||
|
||
global.objectsProcessor = { } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
;
is missing at the end of a line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets try to use no semicolons.
src/helpers/objects.processor.js
Outdated
@@ -70,8 +70,8 @@ function getPageObject(str) { | |||
const pageObjectGetterFunc = objectsProcessor.pageObjectGetter || pageObjectGetter | |||
const value = pageObjectGetterFunc(str) | |||
const idValue = value.replace(_r(regDynamicId, 'g'), id.getId()) | |||
const injection = 'not(ancestor-or-self::*[contains(@style,"visibility: hidden;") ' + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's not remove semicolons from CSS "visibility: hidden;"
test/mocha/objects.processor.spec.js
Outdated
|
||
describe('getPageObject', () => { | ||
const data = [ | ||
{ | ||
step: 'When I click object from main page', | ||
regExp: _r(`When I click ${pageObject}`), | ||
result: `//div[@id='${realId}' and not(ancestor-or-self::*[contains(@style,"visibility: hidden;") ` + | ||
'or contains(@style,"display: none;") or contains(@class,"x-hide-offsets")])]' | ||
result: `//div[@id='${realId}' and not(ancestor-or-self::*[contains(@style,"visibility: hidden") ` + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's not remove semicolons from CSS "visibility: hidden;"
@@ -9,7 +9,6 @@ node_modules | |||
.* | |||
!.travis.yml | |||
!.editorconfig | |||
!.eslintrc.json |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we will remove this line, then any changes to .eslintrc.json
will not be tracked by git - are we sure that it should not be tracked?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, except removing !.eslintrc.json
from .gitignore
- are we sure we want not to track it?
Also moved adding back semicolons to a separate issue
#9 implementing
Using if pageObjects model
Added one Then step
#10 implementing