GithubHelp home page GithubHelp logo

nova-dusk-suite's Introduction

Nova Dusk Test Suite

This is the Laravel Dusk testing suite for Laravel Nova.

nova-dusk-suite's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nova-dusk-suite's Issues

Laravel nova cannot handle tab selector

I have a problem like this:
I want to call the selector tab in the laravel dusk component, this is a screenshot of the image I mean https://imgur.com/EvSTND9
I have tried various things like copy selector, xpath selector, and many ways but still failed. following my source code

$browser->click('Izin Penilaian KJPP')
 ->pause(3000)
 ->clickLink('Tambahkan Izin Penilaian KJPP');

Unable to test Nova

In different runs of tests I have different results:
image

Maybe should use waitFor or something else instead pauses?

When testing filters on index components, test fail before reloading

I'm trying to test filters on index components. I'm using the Index page and IndexComponent from this repository in order to achieve this.

My test looks like this:

$see = create('App\Match', ['league' => Leagues::ATP]);
$dontSee = create('App\Match', ['league' => Leagues::WTA]);

$this->browse(function (Browser $browser) use ($see, $dontSee) {
    $browser->visit(new Index('matches')
        ->within(new IndexComponent('matches'), function (Browser $browser) use ($see, $dontSee) {
            $browser->applyFilters('league', $see->league);
            $browser->assertSeeResource($see->id);
            $browser->assertDontSeeResource($dontSee->id);
        });
});

The first error I got was:

Facebook\WebDriver\Exception\NoSuchElementException: no such element: Unable to locate element: {"method":"css selector","selector":"body [dusk="jogos-index-component"] [dusk="filter-selector"]"}

Added an waitFor('@filter-selector') on the beginning of IndexComponent's applyFilters method.

Then I got another error:

Facebook\WebDriver\Exception\NoSuchElementException: no such element: Unable to locate element: {"method":"css selector","selector":"body [dusk="jogos-index-component"] [dusk="1-row"]"}

It seems the assertion is being made even before the initial resources list is rendered, but I can't realize what I should wait for. Since Nova will now show loading indicators for the resource table when fetching new records on version 2.0.4, tried adding these to the end of applyFilters method without success:

$browser->waitUntilVue('loading', false)
$browser->waitUntilVue('$parent.loading', false)

Maintained?

Is this maintained? Is it needed with Nova 3.9.x or can you test with Dusk directly?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.