Code Monkey home page Code Monkey logo

laravel-view-test-assertions's People

Contributors

alphaolomi avatar jcergolj avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

laravel-view-test-assertions's Issues

After latest update, tests with assertFormHasTextInput fail

First off, this is such a great and needed idea for laravel testing. Thanks for sharing!

Next, I don't know if the API has changed or not? I didn't see anything different in the README.

I updated some other libraries in the project and ran a composer update. I hadn't checked to see if the versions of laravel-view-test-assertions changed or not but I'm guessing it has since the latest version is marked 24 days old (v1.0).

Now, the same tests, using the same forms, produces a failed test using assertFormHasTextInput:

e.g.
->assertFormHasTextInput('name')

Form HTML:
<input wire:model="name" type="text" name="name" id="name" autofocus >

Failed test text:

  Form does not have text field named name.
  Failed asserting that an object is not empty.

  at vendor/jcergolj/laravel-view-test-assertions/src/ViewTestAssertions.php:271
    267▕             if ($value !== null && $type !== 'select') {
    268▕                 $filterable .='[value="'.$value.'"]';
    269▕             }
    270▕ 
  ➜ 271▕             Assert::assertNotEmpty($form->filter($filterable), $msg);
    272▕ 
    273▕             return $this;
    274▕         };
    275▕     }

      +3 vendor frames 
  4   tests/Feature/SupportingDataControllerTest.php:147
      Illuminate\Testing\TestResponse::__call("assertFormHasTextInput")

Using:
"jcergolj/laravel-view-test-assertions": "^1.0",

Let me know if any more information would be helpful.

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.