From 5918b252a813288745e914020dfd91598d3830b8 Mon Sep 17 00:00:00 2001 From: Dennis Elsinga Date: Fri, 26 Apr 2024 13:26:33 +0200 Subject: [PATCH] refactor: Improve the ordering of table records in test --- stubs/Resource/Page/Index/Table/Column/Sort.stub | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stubs/Resource/Page/Index/Table/Column/Sort.stub b/stubs/Resource/Page/Index/Table/Column/Sort.stub index eeafe151..ce1acb0c 100644 --- a/stubs/Resource/Page/Index/Table/Column/Sort.stub +++ b/stubs/Resource/Page/Index/Table/Column/Sort.stub @@ -1,9 +1,9 @@ it({{ DESCRIPTION }}, function (string $column) { - $records = {{ MODEL_SINGULAR_NAME }}::factory(3)->create(); + {{ MODEL_SINGULAR_NAME }}::factory(3)->create(); livewire({{ RESOURCE_LIST_CLASS }}) ->sortTable($column){{ LOAD_TABLE_METHOD_IF_DEFERRED }} - ->assertCanSeeTableRecords({{ MODEL_SINGULAR_NAME }}::orderBy($column, 'asc')->get(), inOrder: true) + ->assertCanSeeTableRecords({{ MODEL_SINGULAR_NAME }}::orderBy($column)->get(), inOrder: true) ->sortTable($column, 'desc'){{ LOAD_TABLE_METHOD_IF_DEFERRED }} ->assertCanSeeTableRecords({{ MODEL_SINGULAR_NAME }}::orderBy($column, 'desc')->get(), inOrder: true); })->with({{ RESOURCE_TABLE_SORTABLE_COLUMNS }}){{ RESOLVED_GROUP_METHOD }};