-
Notifications
You must be signed in to change notification settings - Fork 1
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
First working version #1
Conversation
README.md? |
import createDriver from '../../..'; | ||
|
||
test('Load example page', async t => { | ||
const { browser } = await initTestium().then(createDriver); |
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.
@EndangeredMassa This would be the interface the test framework integrations would be working against, e.g. testium-mocha
:
# Preparation
npm install --save-dev testium-driver-sync testium-core
# ~= testium-mocha
initTestium = require 'testium-core'
injectBrowser = (options) ->
-> # before hook using mocha's promise support
initTestium(options)
.then (testium) ->
driverType = testium.config.get('driverType', 'sync')
driverType = require("testium-driver-#{driverType}") if typeof driverType == 'string'
driverType testium
.then ({@browser}) => # injected browser
describe 'my feature', ->
before injectBrowser()
it 'loads a page', ->
@browser.navigateTo '/'
@khoomeister I think it's too early for that. This is just the plumbing and the actual interface is in flux. I'll copy the docs as I copy the actual implementations. E.g. all |
Now with the complete integration test suite from |
Now with |
Alright! Moved |
exports._getElementWithProperty = function _getElementWithProperty(selector, property) { | ||
var element = this._getElement(selector); | ||
return [ element, element.get(property) ]; | ||
}; |
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.
FWIW, this method seems weird and redundant, and makes the code harder to read. The consumers that use it refer to the element and its property value as result[0]
and result[1]
. You could destructure but I feel like you should just inline.
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.
Good point. Will switch to inlining. One of the things I should have questioned instead of blindly porting it 1:1.
No blockers |
Added the outstanding things to groupon/testium#171, releasing a 1.0 since the remaining points are all for internals. |
Just like testiumjs/testium-driver-wd#1 but for sync. Doing both in parallel to get a feeling for what works with both.