How with http-tests make tests on ajax event with form opened?

46 views Asked by At

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!

0

There are 0 answers