Open danDanV1 opened 5 years ago
@garris do you think this is something that would belong in master or do you expect this type of functionality to exist in the consumer's space?
https://github.com/edeis53/ember-backstop/commit/2ca1b8265c1c0a8ffaf722cf409780e24cace065
scenario.scrollToSelector uses scrollIntoView() under the hood, and sometimes you need use the options supported by scrollIntoView()
scenario.scrollToSelector
scrollIntoView()
eg.
element.scrollIntoView({ block: "end", inline: "end" });
Implementation
const options = { scenario: { scrollToSelector: "#myid", scrollIntoViewOptions: { block: "end", inline: "end" } } } await backstop(assert, options);
It's a pity that in the scenario option in backstopjs itself is called scrollToSelector because it's not calling window.scrollTo.
scrollToSelector
window.scrollTo
Something like this would have clearer semantics:
{ scenario: { scrollIntoView: { selector: "#myid", options: { block: "end", inline: "end" } } } }
but that'd be a breaking change in the scenario settings...
@garris do you think this is something that would belong in master or do you expect this type of functionality to exist in the consumer's space?
https://github.com/edeis53/ember-backstop/commit/2ca1b8265c1c0a8ffaf722cf409780e24cace065
scenario.scrollToSelector
usesscrollIntoView()
under the hood, and sometimes you need use the options supported byscrollIntoView()
eg.
Implementation
It's a pity that in the scenario option in backstopjs itself is called
scrollToSelector
because it's not callingwindow.scrollTo
.Something like this would have clearer semantics:
but that'd be a breaking change in the scenario settings...