Skip to content

Functional Testing with Laravel4 Module and Stripe #1221

Closed
@bretterer

Description

@bretterer

I have run into an issue when testing a registration form in Laravel that is using stripe. My form input field is as follows

<div class="form-group">
    {{ Form::label( 'credit-card', 'Credit Card Number', ['class'=>'col-sm-3 control-label'] ) }}
    <div class="col-sm-7">
        {{ Form::text( null, null, ['class'=>'form-control card-number', "data-stripe"=>"number", 'placeholder'=>'Card Number' ]) }}
    </div>
</div>

The issue I believe is when I am running

$I->fillField('input[data-stripe=number]','4242424242424242');

which causes me to get a InvalidArgumentException: Malformed field path "" response from my test. I am sure this is because the textfield does not have a name attribute. It does not use a name attribute because i use stripe.js to pass a token and do not want the input field to be sent. I have confirmed this is the case by only changing my Form::text to have a name attribute. Once that is there, everything works as expected.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions