Skip to content

Differences between PhantomJS & Chrome #102

Open
@aral

Description

@aral

Results differ between PhantomJS and Chrome while testing Stripe iframe functionality with the local version of the page at http://indietech.org/summit

(Not a showstopper for us at the moment as we’re just going to use Chrome for this, but thought you’d like to know. I can only imagine they should both return the same result.) :)

With PhantomJS:

RUNNING TEST - "Stripe"
▶ OPEN http://localhost:8000/summit
▶ TYPE #name-1
▶ TYPE #email-1
✔ ENABLED Purchase tickets button is enabled.
▶ CLICK #purchase-tickets-button
▶ TOFRAME true
▶ WAITFORELEMENT
✘ EXISTS
0 EXPECTED: undefined
0 FOUND: false
0 MESSAGE: App view exists
▶ WAITFORELEMENT
✘ EXISTS
0 EXPECTED: undefined
0 FOUND: false
0 MESSAGE: Test Mode exists.
✘ TEST - "Stripe" FAILED

1/3 assertions passed. Elapsed Time: 1 min 26.7 sec


With Chrome (35.0.x)

UNNING TEST - "Stripe"
▶ OPEN http://localhost:8000/summit
▶ TYPE #name-1
▶ TYPE #email-1
✔ ENABLED Purchase tickets button is enabled.
▶ CLICK #purchase-tickets-button
▶ TOFRAME true
▶ WAITFORELEMENT
✔ EXISTS App view exists
▶ WAITFORELEMENT
✔ EXISTS Test Mode exists.
✔ 3 Assertions run
✔ TEST - "Stripe" SUCCEEDED


The test:

module.exports =
    'Stripe': (test) ->
        test
            .open('http://localhost:8000/summit')
            .type('#name-1', 'Aral Balkan')
            .type('#email-1', '[email protected]')
            .assert.enabled('#purchase-tickets-button', 'Purchase tickets button is enabled.')
            .click('#purchase-tickets-button')
            .toFrame('.stripe_checkout_app')
            .waitForElement('.appView', 1000)
            .assert.exists('.appView', 'App view exists')
            .waitForElement('.testMode', 1000)
            .assert.exists('.testMode', 'Test Mode exists.')
            .done()

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions