Code Monkey home page Code Monkey logo

Comments (6)

jcergolj avatar jcergolj commented on September 23, 2024

Hi thanks for the kind words. Could you uninstall the package and install it again and let me know if error persists? If it does do let let me know and I'll take a look next week.

from laravel-view-test-assertions.

gluis avatar gluis commented on September 23, 2024

Hi!
I uninstalled it, ran tests, then re-installed it and the error does persist, unfortunately:

  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:148
      Illuminate\Testing\TestResponse::__call("assertFormHasTextInput")

Let me know if there's something else you'd like me to try.

from laravel-view-test-assertions.

jcergolj avatar jcergolj commented on September 23, 2024

Hi gluis, thanks for getting back to me. I've just published a new major release with improved form handeling. Please use the newest 2.1 release and hopefully, the error will go away.

BTW I encountered the same error when working with the 1.0 version.

from laravel-view-test-assertions.

gluis avatar gluis commented on September 23, 2024

Hey jcergolj, thanks for the note and update!

I just installed 2.2 and it looks like there might be a typo now (based on the error thrown) and now the assertFormHasText throws a different error:

Typo?

Using:
->assertViewHasForm('post')

Error:

1) Tests\Feature\UserControllerTest::system_user_can_see_create_user_form
From element does not exists.

We've all typed 'from' for 'form' at least a million times, I'm sure! :-D

New error

1) Tests\Feature\SupportingDataControllerTest::editor_can_see_edit_form_for_manufacturer
ErrorException: Undefined property: Illuminate\Http\Response::$form

Thanks for being so responsive!

UPDATE: I tried 2.1 and 2.0, and those both have the typo. I haven't delved into the code (no time at the moment).

from laravel-view-test-assertions.

jcergolj avatar jcergolj commented on September 23, 2024

Hi gluis, actually in 2.x version the first method attribute is now form's selector. Please see the docs. Thanks.

from laravel-view-test-assertions.

gluis avatar gluis commented on September 23, 2024

Sounds good! Thanks!

from laravel-view-test-assertions.

Related Issues (4)

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.