import { expect } from 'chai'
import { defineSupportCode } from 'cucumber'

defineSupportCode(({ Given, When, Then }) => {
    Given('I visit {stringInDoubleQuotes}', (url) => browser.url(url))

    When('I click the clickable region', () => browser.click('#clickable'))

    Then('I should get the result: {int}', (num) => {
        const result = browser.getValue('#result')
        expect(result).to.be.equal(num.toString())
    })
})

import { expect } from 'chai'
import { defineSupportCode } from 'cucumber'

defineSupportCode(({ Given, When, Then }) => {
    Given('I visit {stringInDoubleQuotes}', (url) => browser.url(url))

    When('I click the clickable region', () => browser.click('#clickable'))

    Then('I should get the result: {int}', (num) => {
        browser.getValue('#result').then((value) => {
            expect(value).to.be.equal(num.toString())
        })
    })
})

Fix assert on pending promise
Fix assert on pending promise

Signed-off-by: Boris Osipov <645afb413bb7e3c44961d7745e6cef511fbf5bbe@gmail.com>
