Skip to content
This repository was archived by the owner on Apr 13, 2021. It is now read-only.
This repository was archived by the owner on Apr 13, 2021. It is now read-only.

Not detecting diff #3

Open
Open

Description

@ijpatricio

Hello @mpociot

So I go to try it out, even with first example Dusk test.

$this->browse(function (Browser $browser) {
            $browser->visit('/')
                ->assertSee('Laravel')
                ->visualDiff('homepage');
        });

run it once, makes screenshot in VisualRegression/screenshots

image

Change welcome view, to LaravelX, run test again
screenshot changes, and test keeps green
image

I went further and...

Changed Laravel to Laravel {{ str_random(10) }}

and now test case

$this->browse(function (Browser $browser) {
            $browser->visit('/')
                ->assertSee('Laravel')
                ->visualDiff('homepage');

            $browser->visit('/')
                ->assertSee('Laravel')
                ->visualDiff('homepage');
        });

2 assertions green

screenshot
image

I was running the package from the fork, and on same commit as tagged 1.0.0

I had to lower version of laravel/dusk to install dev-dependencies, like the orchestra/test-dusk-workbench was in conflict and dusk test came red

image

Let me know if I missed from saying something, and if I can be of any help!

Activity

  1. ijpatricio commented on Aug 24, 2018

    @ijpatricio
    Author

    Daaam. I think I got it.

    On

    $process = new Process($fullCommand);
    $process->run();
    if ($process->isSuccessful()) {
    return rtrim($process->getOutput());
    }
    }

    I added

    else {
                abort(500, 'process of comparison not successful');
            }

    and so it's from here, i guess. but weird because it shoul throw some exception here, right?

  2. ijpatricio commented on Aug 24, 2018

    @ijpatricio
    Author

    image

  3. ijpatricio commented on Aug 24, 2018

    @ijpatricio
    Author

    Sorry for the spam.

    npm install -g pngjs
    

    dis the trick, it's working as supposed!!

    @mpociot would you like a PR to abort when that process does not go well??

    And now I can continue with what we talked about :)

  4. ijpatricio commented on Aug 24, 2018

    @ijpatricio
    Author

    So all this was because a missing dependency pngjs, that weirdly wasn't installed, as it is a nested dependency from pixelmatch.

    Even so I think is very handy to know when the external node process doesn't go well.
    Instructs us right away of that. If not, it just keeps getting green.

    Submitted #4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions