Tests fail locally
driesvints opened this issue · 0 comments
driesvints commented
For some reason we get different results for tests between CI and local and also between me and @joedixon.
I get failing tests:
Details
$ pest -p ~/Herd/laravel.io
.................................................................................................⨯⨯⨯⨯⨯.
................⨯..........................................⨯⨯..........................................
..................⨯⨯⨯⨯⨯...⨯.......⨯....................................................................
.......
───────────────────────────────────────────────────────────────────────────────────────────────────────
FAILED Tests\Feature\EditorTest > participants are rendered when mention… PropertyNotFoundException
Property [$id] not found on component: [editor]
at vendor/livewire/livewire/src/Component.php:105
101▕
102▕ $value = $finish($value);
103▕
104▕ if ($value === 'noneset') {
➜ 105▕ throw new PropertyNotFoundException($property, $this->getName());
106▕ }
107▕
108▕ return $value;
109▕ }
+1 vendor frames
2 storage/framework/views/5da22ccabdea997913d22905686ff03a.php:9
+12 vendor frames
15 storage/framework/views/bb70d971983aa7c5fa4addda676dfb33.php:7
───────────────────────────────────────────────────────────────────────────────────────────────────────
FAILED Tests\Feature\EditorTest > users are returned when a query is mad… PropertyNotFoundException
Property [$id] not found on component: [editor]
at vendor/livewire/livewire/src/Component.php:105
101▕
102▕ $value = $finish($value);
103▕
104▕ if ($value === 'noneset') {
➜ 105▕ throw new PropertyNotFoundException($property, $this->getName());
106▕ }
107▕
108▕ return $value;
109▕ }
+1 vendor frames
2 storage/framework/views/5da22ccabdea997913d22905686ff03a.php:9
+12 vendor frames
15 storage/framework/views/bb70d971983aa7c5fa4addda676dfb33.php:7
───────────────────────────────────────────────────────────────────────────────────────────────────────
FAILED Tests\Feature\EditorTest > participants are prioritised over user… PropertyNotFoundException
Property [$id] not found on component: [editor]
at vendor/livewire/livewire/src/Component.php:105
101▕
102▕ $value = $finish($value);
103▕
104▕ if ($value === 'noneset') {
➜ 105▕ throw new PropertyNotFoundException($property, $this->getName());
106▕ }
107▕
108▕ return $value;
109▕ }
+1 vendor frames
2 storage/framework/views/5da22ccabdea997913d22905686ff03a.php:9
+12 vendor frames
15 storage/framework/views/bb70d971983aa7c5fa4addda676dfb33.php:7
───────────────────────────────────────────────────────────────────────────────────────────────────────
FAILED Tests\Feature\EditorTest > users are not queried when hasMentions… PropertyNotFoundException
Property [$id] not found on component: [editor]
at vendor/livewire/livewire/src/Component.php:105
101▕
102▕ $value = $finish($value);
103▕
104▕ if ($value === 'noneset') {
➜ 105▕ throw new PropertyNotFoundException($property, $this->getName());
106▕ }
107▕
108▕ return $value;
109▕ }
+1 vendor frames
2 storage/framework/views/5da22ccabdea997913d22905686ff03a.php:9
+12 vendor frames
15 storage/framework/views/bb70d971983aa7c5fa4addda676dfb33.php:7
───────────────────────────────────────────────────────────────────────────────────────────────────────
FAILED Tests\Feature\EditorTest > no users are returned when query retur… PropertyNotFoundException
Property [$id] not found on component: [editor]
at vendor/livewire/livewire/src/Component.php:105
101▕
102▕ $value = $finish($value);
103▕
104▕ if ($value === 'noneset') {
➜ 105▕ throw new PropertyNotFoundException($property, $this->getName());
106▕ }
107▕
108▕ return $value;
109▕ }
+1 vendor frames
2 storage/framework/views/5da22ccabdea997913d22905686ff03a.php:9
+12 vendor frames
15 storage/framework/views/bb70d971983aa7c5fa4addda676dfb33.php:7
───────────────────────────────────────────────────────────────────────────────────────────────────────
FAILED Tests\Feature\ReplyTest > users can edit a reply PropertyNotFoundException
Property [$id] not found on component: [editor]
at vendor/livewire/livewire/src/Component.php:105
101▕
102▕ $value = $finish($value);
103▕
104▕ if ($value === 'noneset') {
➜ 105▕ throw new PropertyNotFoundException($property, $this->getName());
106▕ }
107▕
108▕ return $value;
109▕ }
+1 vendor frames
2 storage/framework/views/5da22ccabdea997913d22905686ff03a.php:9
+12 vendor frames
15 storage/framework/views/ab839f4865515efa4af03c4aa793008d.php:20
───────────────────────────────────────────────────────────────────────────────────────────────────────
FAILED Tests\Feature\ReplyTest > users cannot edit a reply they do not ow… InvalidArgumentException
No hint path defined for [__components].
at vendor/laravel/framework/src/Illuminate/View/FileViewFinder.php:112
108▕ throw new InvalidArgumentException("View [{$name}] has an invalid name.");
109▕ }
110▕
111▕ if (! isset($this->hints[$segments[0]])) {
➜ 112▕ throw new InvalidArgumentException("No hint path defined for [{$segments[0]}].");
113▕ }
114▕
115▕ return $segments;
116▕ }
+31 vendor frames
32 tests/Feature/ReplyTest.php:71
───────────────────────────────────────────────────────────────────────────────────────────────────────
FAILED Tests\Feature\ReplyTest > users cannot edit a reply with a fake m… PropertyNotFoundException
Property [$id] not found on component: [editor]
at vendor/livewire/livewire/src/Component.php:105
101▕
102▕ $value = $finish($value);
103▕
104▕ if ($value === 'noneset') {
➜ 105▕ throw new PropertyNotFoundException($property, $this->getName());
106▕ }
107▕
108▕ return $value;
109▕ }
+1 vendor frames
2 storage/framework/views/5da22ccabdea997913d22905686ff03a.php:9
+12 vendor frames
15 storage/framework/views/ab839f4865515efa4af03c4aa793008d.php:20
───────────────────────────────────────────────────────────────────────────────────────────────────────
FAILED Tests\Feature\ModeratorTest > moderators can edit any thread HttpException
A request to [http://localhost/forum/dolores-ipsa-consectetur-dolorem-sint-dolor-sapiente-veniam/edit] failed. Received status code [500].
at vendor/laravel/browser-kit-testing/src/Concerns/InteractsWithPages.php:226
222▕ } catch (PHPUnitException $e) {
223▕ $message = $message ?: "A request to [{$uri}] failed. Received status code [{$status}].";
224▕
225▕ if (isset($this->response->exception)) {
➜ 226▕ throw new HttpException($message, 0, $this->response->exception);
227▕ }
228▕
229▕ throw new HttpException($message);
230▕ }
+4 vendor frames
5 storage/framework/views/5da22ccabdea997913d22905686ff03a.php:9
+12 vendor frames
18 storage/framework/views/bf508ac30d25c2b372650c5bdd4f6310.php:208
───────────────────────────────────────────────────────────────────────────────────────────────────────
FAILED Tests\Feature\ReplyTest > edit reply component is present on the page HttpException
A request to [http://localhost/forum/the-first-thread] failed. Received status code [500].
at vendor/laravel/browser-kit-testing/src/Concerns/InteractsWithPages.php:226
222▕ } catch (PHPUnitException $e) {
223▕ $message = $message ?: "A request to [{$uri}] failed. Received status code [{$status}].";
224▕
225▕ if (isset($this->response->exception)) {
➜ 226▕ throw new HttpException($message, 0, $this->response->exception);
227▕ }
228▕
229▕ throw new HttpException($message);
230▕ }
+4 vendor frames
5 storage/framework/views/5da22ccabdea997913d22905686ff03a.php:9
+12 vendor frames
18 storage/framework/views/ab839f4865515efa4af03c4aa793008d.php:20
───────────────────────────────────────────────────────────────────────────────────────────────────────
FAILED Tests\Feature\ReplyTest > edit reply component is not present on the page whe… HttpException
A request to [http://localhost/forum/the-first-thread] failed. Received status code [500].
at vendor/laravel/browser-kit-testing/src/Concerns/InteractsWithPages.php:226
222▕ } catch (PHPUnitException $e) {
223▕ $message = $message ?: "A request to [{$uri}] failed. Received status code [{$status}].";
224▕
225▕ if (isset($this->response->exception)) {
➜ 226▕ throw new HttpException($message, 0, $this->response->exception);
227▕ }
228▕
229▕ throw new HttpException($message);
230▕ }
+4 vendor frames
5 storage/framework/views/5da22ccabdea997913d22905686ff03a.php:9
+12 vendor frames
18 storage/framework/views/2d20078717f228d35bd59d3190075596.php:234
───────────────────────────────────────────────────────────────────────────────────────────────────────
FAILED Tests\Feature\ReplyTest > users cannot delete a reply they do not own
Expected response status code [403] but received 500.
Failed asserting that 500 is identical to 403.
at vendor/laravel/browser-kit-testing/src/Concerns/MakesHttpRequests.php:749
745▕ * @return $this
746▕ */
747▕ public function assertResponseStatus($code)
748▕ {
➜ 749▕ $this->response->assertStatus($code);
750▕
751▕ return $this;
752▕ }
753▕
1 tests/HttpAssertions.php:11
2 tests/Feature/ReplyTest.php:82
───────────────────────────────────────────────────────────────────────────────────────────────────────
FAILED Tests\Feature\ReplyTest > verified users can see the reply input HttpException
A request to [http://localhost/forum/et-qui-odio-similique-aut-quam-rem-ut-aut] failed. Received status code [500].
at vendor/laravel/browser-kit-testing/src/Concerns/InteractsWithPages.php:226
222▕ } catch (PHPUnitException $e) {
223▕ $message = $message ?: "A request to [{$uri}] failed. Received status code [{$status}].";
224▕
225▕ if (isset($this->response->exception)) {
➜ 226▕ throw new HttpException($message, 0, $this->response->exception);
227▕ }
228▕
229▕ throw new HttpException($message);
230▕ }
+4 vendor frames
5 storage/framework/views/5da22ccabdea997913d22905686ff03a.php:9
+12 vendor frames
18 storage/framework/views/2d20078717f228d35bd59d3190075596.php:234
───────────────────────────────────────────────────────────────────────────────────────────────────────
FAILED Tests\Feature\SubscriptionsTest > users can manually subscribe to threads HttpException
A request to [http://localhost/forum/aut-voluptas-consectetur-cupiditate-et-quod] failed. Received status code [500].
at vendor/laravel/browser-kit-testing/src/Concerns/InteractsWithPages.php:226
222▕ } catch (PHPUnitException $e) {
223▕ $message = $message ?: "A request to [{$uri}] failed. Received status code [{$status}].";
224▕
225▕ if (isset($this->response->exception)) {
➜ 226▕ throw new HttpException($message, 0, $this->response->exception);
227▕ }
228▕
229▕ throw new HttpException($message);
230▕ }
+4 vendor frames
5 storage/framework/views/5da22ccabdea997913d22905686ff03a.php:9
+12 vendor frames
18 storage/framework/views/2d20078717f228d35bd59d3190075596.php:234
───────────────────────────────────────────────────────────────────────────────────────────────────────
FAILED Tests\Feature\SubscriptionsTest > users can unsubscribe from threads HttpException
A request to [http://localhost/forum/amet-est-provident-nulla-eveniet] failed. Received status code [500].
at vendor/laravel/browser-kit-testing/src/Concerns/InteractsWithPages.php:226
222▕ } catch (PHPUnitException $e) {
223▕ $message = $message ?: "A request to [{$uri}] failed. Received status code [{$status}].";
224▕
225▕ if (isset($this->response->exception)) {
➜ 226▕ throw new HttpException($message, 0, $this->response->exception);
227▕ }
228▕
229▕ throw new HttpException($message);
230▕ }
+4 vendor frames
5 storage/framework/views/5da22ccabdea997913d22905686ff03a.php:9
+12 vendor frames
18 storage/framework/views/2d20078717f228d35bd59d3190075596.php:234
Tests: 15 failed, 301 passed (757 assertions)
Duration: 13.59s
Parallel: 10 processes
@joedixon gets memory issues and needs to use php -d memory_limit=2048M ./vendor/bin/pest
We should investigate why this is and make sure tests run the same locally as on CI.