Skip to content
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

Problem working with unit testing #16

Open
ali-salavati opened this issue Dec 24, 2022 · 1 comment
Open

Problem working with unit testing #16

ali-salavati opened this issue Dec 24, 2022 · 1 comment

Comments

@ali-salavati
Copy link

ali-salavati commented Dec 24, 2022

I use dusk in Laravel for testing.
For example, in my vue file to get the date of birth:

<div class="mb-2 col-md-4 col-sm-6">
    <label>تاریخ تولد</label>
    <div class="input-group">
        <input type="text" id="dateOfBirth" class="form-control form-control-sm" autocomplete="off">
        <date-picker v-model="user.date_of_birth" display-format="jYYYY/jMM/jDD"
                convert-numbers custom-input="#dateOfBirth" format="YYYY-MM-DD"
                :max="maxDateOfBirth" view="year"></date-picker>
    </div>
</div>

To test it, I have written:

$browser
            ->press('#dateOfBirth')
            ->assertSourceHas('<div class="vpd-container">')
            ->press('.vpd-addon-list-item')
            ->pause(500)
            ->press('.vpd-addon-list-item')
            ->pause(500)
            ->press('.vpd-day')
            ->press('تایید')
            ->pause(500)
            ->assertDontSee('تایید')
            ;

This code automatically clicks the first year in the list, then the first month and then the first day. In my opinion, instead of using the .vpd-addon-list-item class, each item should have a unique ID, While there is no. That is, if I want to test a specific date and time, it is not possible.

@ali-salavati
Copy link
Author

خواهشا این مشکل رو برطرف کنید. کتابخانه‌تون با laravel dusk هماهنگ نیست و نمیشه تست‌های مناسب نوشت.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant