Pagination for forms on main page (#9)

* Pagination for forms on main page

* Fix tests

Co-authored-by: Julien Nahum <jhumanj@MacBook-Pro-de-Julien.local>
This commit is contained in:
Chirag
2022-10-17 13:15:41 +05:30
committed by GitHub
parent 8f528155f5
commit bd7d20feb9
5 changed files with 35 additions and 18 deletions

View File

@@ -28,12 +28,10 @@ it('can fetch forms', function () {
$this->getJson(route('open.workspaces.forms.index', $workspace->id))
->assertSuccessful()
->assertJsonCount(1)
->assertJson(function (AssertableJson $json) use ($form) {
return $json->where('0.id', $form->id)
->whereType('0.title', 'string')
->whereType('0.properties', 'array');
});
->assertJsonCount(3)
->assertSuccessful()
->assertJsonPath('data.0.id', $form->id)
->assertJsonPath('data.0.title', $form->title);
});
it('can update a form', function () {
@@ -152,4 +150,4 @@ it('can create form with dark mode', function () {
->where('dark_mode', 'dark')
->etc();
});
});
});