You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With adapters we should be able to configure page object interactions per different environments. However, there are still some blockers to make page objects work cross-env. The goal of the ticket is to build a path forward for page objects to work in node, and probably other envs like different FWs etc.
@ember/*
There are some of ember packages we do currently depend on, and they don't have standalone packages published.
"@ember/application/deprecations" - Reimplement deprecate #542
At the end, it's just a console.warn( wrapped with a convenience method, providing a package name, until version and some other contextual info. I think, we should develop our own in-house util for that.
"@ember/object" - extract alias utils from "helpers" #510
We only use get( for alias. We could provide our own version of the get(. However, until you don't use alias, it should not fail, so this is a low priority IMO.
"@ember/polyfills" - use object spread over the Ember assign( #536
we use assign( accross the board. I believe, it should be enough to just replace it with an object destruction syntax.
"@ember/utils" - get rid of ember isPresent( #532
We use isPresent( in few places. Seems like it should be re-implemented on our side.
"jquery" VS "-jquery"
-jquery is a synthetic module (#1, #2), which is only needed to ensure we use the same instance of jQuery, in case if an app depends on jQuery events. However, when ec-page-object tries to import it in node env, it fails, cause there is no EmberCli build process envolved, and -jquery is not liseted in the package.json.
I think we should isolate -jquery imports in the ember adapters, and use jquery for the rest of the places. So it stays resolvable for node, until Ember specific adapters are used.
A node.js test needed. It should serve a dummy page, page.visit((via a custom Adapter for node.js), and do a smoke test of the page object. Node test #538
With adapters we should be able to configure page object interactions per different environments. However, there are still some blockers to make page objects work cross-env. The goal of the ticket is to build a path forward for page objects to work in node, and probably other envs like different FWs etc.
@ember/*
There are some of ember packages we do currently depend on, and they don't have standalone packages published.
"@ember/application/deprecations" - Reimplement deprecate #542
At the end, it's just a
console.warn(wrapped with a convenience method, providing a package name, until version and some other contextual info. I think, we should develop our own in-house util for that."@ember/array" - v2: Drop using of EmberArray in favour of native array #523, remove legacy collection #526
This is currently used for collections, which can be mostly replaced by native array, but we should also provide implementations for
mapBy(andfilterBy(."@ember/debug"
assert(- replace withthrow? get rid of ember assert #527warn(- is going to be removed with the legacy collection removal. remove legacy collection #526"@ember/object" - extract alias utils from "helpers" #510
We only use
get(foralias. We could provide our own version of theget(. However, until you don't usealias, it should not fail, so this is a low priority IMO."@ember/polyfills" - use object spread over the Ember
assign(#536we use
assign(accross the board. I believe, it should be enough to just replace it with an object destruction syntax."@ember/utils" - get rid of ember
isPresent(#532We use
isPresent(in few places. Seems like it should be re-implemented on our side."jquery" VS "-jquery"
-jqueryis a synthetic module (#1, #2), which is only needed to ensure we use the same instance of jQuery, in case if an app depends on jQuery events. However, when ec-page-object tries to import it in node env, it fails, cause there is no EmberCli build process envolved, and-jqueryis not liseted in the package.json.I think we should isolate
-jqueryimports in the ember adapters, and usejqueryfor the rest of the places. So it stays resolvable for node, until Ember specific adapters are used.jqueryas a regular npm module in node.js environmentsCeibo
seems it does no support node
require. Needs some attention.Test
page.visit((via a custom Adapter for node.js), and do a smoke test of the page object. Node test #538