Skip to content
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

Merged
merged 17 commits into from
Nov 28, 2017
Merged

#9 #12

merged 17 commits into from
Nov 28, 2017

Conversation

alexkrechik
Copy link
Member

@alexkrechik alexkrechik commented Nov 22, 2017

#9 implementing
Using if pageObjects model
Added one Then step
#10 implementing

cucumber.sh Outdated
#!/usr/bin/env bash

#Run server in background
http-server ./test/demo-app -p 9000 > /dev/null &
Copy link
Member

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 & ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree. Fixed.

'use strict'

const { defineSupportCode } = require('cucumber');
const { pageObject, getPageObject } = require('../helpers/objects.processor')
Copy link
Member

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

Copy link
Member Author

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.


const { defineSupportCode } = require('cucumber');
const { pageObject, getPageObject } = require('../helpers/objects.processor')
const { _r } = require('../helpers/utils')
Copy link
Member

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)
Copy link
Member

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

Copy link
Member Author

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.

});

});
}
Copy link
Member

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

Copy link
Member Author

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)
Copy link
Member

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)
Copy link
Member

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

Copy link
Member Author

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')
}
Copy link
Member

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

Copy link
Member Author

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
}
Copy link
Member

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 = { }
Copy link
Member

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

Copy link
Member Author

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.

@@ -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;") ' +
Copy link
Member

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;"


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") ` +
Copy link
Member

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
Copy link
Member

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?

Copy link
Member

@Marketionist Marketionist left a 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

@alexkrechik alexkrechik merged commit 785751f into master Nov 28, 2017
@alexkrechik alexkrechik deleted the #9 branch December 6, 2017 09:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants