0

In laravel 6 / bootstrap 4 / jquery: 3.3.1 app I make http-tests with methods in https://laravel.com/docs/6.x/http-tests I need to make test on editor open event, which is triggered when operator clicks on button :

$.ajax({
    type: "GET",
    url: '/items/'+rowId+'/edit',
    data: {},
    success: function (data) {
        $("#h3_items_title_new").css("display", "none")
        $("#h3_items_title_edit").css("display", "block")
        $("#btn_item_cancel").css("display", "inline")

        $("#subject").val(data.item.subject)

        $("#created_at").val(data.item.created_at)
        $("#created_at").prop("readonly", true)
        $("#updated_at").val(data.item.updated_at)
        $("#updated_at").prop("readonly", true)

        $("#item_view_form").css("display", "none")
        $("#item_edit_form").css("display", "block")
            ...
    }
});

and item_edit_form block must be shown and item_view_form hidden. Can I make checks inside if item_edit_form block , say inputs are filled with valid values of the item? If yes, which methods have I to use ?

Thanks!

mstdmstd
  • 2,195
  • 17
  • 63
  • 140
  • 1
    Sounds like you want frontend testing https://laravel.com/docs/8.x/dusk#introduction – squareborg Oct 08 '20 at 06:54
  • Seems you are right. I have CRUD items where some data read/stored using ajax. I wonder how can I combine Dusk tests and PHPUnit tests simultaneously in 1 file? is it possible? – mstdmstd Oct 08 '20 at 15:08

0 Answers0