-
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
Added waitForPageToLoad function #57
Changes from 1 commit
e0113a3
2cad97b
15b4188
13ab29a
377ee6f
5e3c0e9
e323c9b
5d262b4
2942a0b
fa124c4
0828574
7cb8cd9
9bb36e3
7a127c2
c0d1f18
81bbe4e
46c7cc9
d1fed7e
21ce939
475207b
bfdd711
32073a5
ad08727
09d9d3b
fd00403
0e4594a
c535e88
032f67e
8fe45b3
a6d411a
07437d0
493fab5
d551cbd
9b9cbff
e53491e
d0b0266
f906ad9
297edb9
96bfce4
3883fac
352a59b
821262f
c6f9593
61bc704
069847e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -64,7 +64,7 @@ function pageObjectGetter (str) { | |
function getPageObject (str) { | ||
const pageObjectGetterFunc = stepsConfig.objectsProcessor.pageObjectGetter || pageObjectGetter; | ||
const value = pageObjectGetterFunc(str); | ||
const idValue = value.replace(_r(regDynamicId, 'g'), stepsConfig.id.getId()); | ||
const idValue = value.replace(_r(regDynamicId, 'g'), stepsConfig.id.id); | ||
const injection = `not(ancestor-or-self::*[contains(@style,"visibility: hidden;") | ||
or contains(@style,"display: none") or contains(@class,"x-hide-offsets")])`; | ||
const injectedValue = injectInto(idValue, injection); | ||
|
@@ -99,7 +99,7 @@ function dictionaryGetter (str) { | |
function getDictionaryObject (str) { | ||
const dictionaryGetterFunc = stepsConfig.objectsProcessor.dictionaryGetter || dictionaryGetter; | ||
const value = dictionaryGetterFunc(str); | ||
const idValue = value.replace(_r(regDynamicId, 'g'), stepsConfig.id.getId()); | ||
const idValue = value.replace(_r(regDynamicId, 'g'), stepsConfig.id.id); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
||
return idValue; | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,10 +18,14 @@ module.exports = function ({ | |
idGenerator = defaultIdGenerator, // <() => <string|number>> - function, that will return new generated id. | ||
objectsProcessor = {} // objectsProcessor childs could be previded here - see objects.processor.js for more details. | ||
}) { | ||
const id = { | ||
value: defaultIdValue || idGenerator.call(this), | ||
getId: () => this.value, | ||
regenerate: () => { | ||
const Id = class { | ||
constructor () { | ||
this.value = defaultIdValue || idGenerator.call(this); | ||
} | ||
get id () { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
return this.value; | ||
} | ||
regenerate () { | ||
this.value = idGenerator.call(this); | ||
} | ||
}; | ||
|
@@ -30,7 +34,7 @@ module.exports = function ({ | |
loaderSelectors, | ||
finishedLoadingConditions: finishedLoadingConditions.bind(this, loaderSelectors), | ||
pages, | ||
id, | ||
id: new Id(), | ||
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.
stepsConfig.id.id
- sounds a bit strange - maybe it will be better to name itstepsConfig.id.idValue
?