-
Notifications
You must be signed in to change notification settings - Fork 91
Description
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 aconsole.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 formapBy(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 useget(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(#536
we useassign(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 useisPresent(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.
- Simplify jquery handling #531 should allow us to import
jqueryas a regular npm module in node.js environments
Ceibo
seems it does no support node require. Needs some attention.
- allow it to be imported in node.js environments Commonjs support ceibo#21
Test
- 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