-
Notifications
You must be signed in to change notification settings - Fork 62
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
feat: use bluebird instead q #155
Conversation
42afab8
to
93cc7bb
Compare
}; | ||
|
||
function emitBrowserEvent(emitter, browser, event) { | ||
return emitter.emitAndWait(event, browser.publicAPI, {browserId: browser.id}); | ||
const browserSession = Object.assign(browser.publicAPI, {browserId: browser.id}); |
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.
В текущей реализации passthrough-emitter
-а - https://github.com/gemini-testing/gemini-core/blob/3979b225ff19b10475ae96a1de879a4019e141ee/lib/passthrough-emitter/index.js
ожидается, что метод emitAndWait
будет вызываться с двумя аргументами. В данном случае SESSION_START
и SESSION_END
эмитится с 3 аргументами. Мое предложение объединть wd
и id
браузера в один объект. Сейчас я модифицирую wd
, т.к. у нас сейчас старая версия лодаша. В отдельном PR-е перееду на последнюю версию лодаша и тогда тут можно будет юзнуть так:
const browserSession = _.extend({browserId: browser.id}, browser.publicAPI);
Так же полистал по плагинам, третий аргумент юзают только stat-reporter
и url-decorator
.
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.
фигню какую-то написал, так работать не будет. Так как лодашовский extend
не добавит к новому объекту все методы инстанса webdriverio. Поэтому пока оставлю текущий вариант:
const browserSession = Object.assign(browser.publicAPI, {browserId: browser.id});
f5c823d
to
2c6d66a
Compare
lib/constants/runner-events.js
Outdated
let events = _.assign(getSyncEvents(), getAsyncEvents()); | ||
|
||
Object.defineProperty(events, 'getSync', {value: getSyncEvents, enumerable: false}); | ||
Object.defineProperty(events, 'getAsync', {value: getAsyncEvents, enumerable: false}); | ||
Object.defineProperty(events, 'getAll', {value: getAllEvents, enumerable: false}); |
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.
давай тогда здесь просто get
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.
давай
57c80a3
to
de252cb
Compare
de252cb
to
dd27d14
Compare
надо рибейзить |
@DudaGod Здесь кажется проще новый PR создать, чем этот отрибейзить |
And also use 'AsyncEmitter', 'PassthroughEmitter', 'promiseUtils' from gemini-core. Instead of qemitter and q-promise-utils libraries