diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 982ca66a2a..761d8e3e87 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -217,6 +217,15 @@ jobs: run: | .github/setup-ldap.sh + - name: Setup node + if: ${{ matrix.SLOWTESTS != 1 }} + uses: actions/setup-node@v3 + with: + node-version: 16 + - name: Setup node dependencies + if: ${{ matrix.SLOWTESTS != 1 }} + run: npm ci + - name: Setup SPHINX run: | .github/setup-sphinx.sh @@ -342,6 +351,13 @@ jobs: run: | .github/setup-database.sh $DB $MYISAM + - name: Setup node + uses: actions/setup-node@v3 + with: + node-version: 16 + - name: Setup node dependencies + run: npm ci + - name: Run unit tests env: DB: ${{steps.database-type.outputs.db}} @@ -447,6 +463,13 @@ jobs: run: | .github/setup-database.sh $DB $MYISAM + - name: Setup node + uses: actions/setup-node@v3 + with: + node-version: 16 + - name: Setup node dependencies + run: npm ci + - name: Run unit tests env: DB: ${{steps.database-type.outputs.db}} @@ -555,6 +578,14 @@ jobs: psql -c 'create database phpbb_tests;' -U postgres Set-MpPreference -ExclusionPath "${env:PGDATA}" # Exclude PGDATA directory from Windows Defender Set-MpPreference -DisableRealtimeMonitoring $true + + - name: Setup node + uses: actions/setup-node@v3 + with: + node-version: 16 + - name: Setup node dependencies + run: npm ci + - name: Run unit tests if: ${{ matrix.type == 'unit' }} run: | diff --git a/tests/notification/fixtures/webpush_notification.type.post.xml b/tests/notification/fixtures/webpush_notification.type.post.xml index 7654ed30aa..9d3d72d531 100644 --- a/tests/notification/fixtures/webpush_notification.type.post.xml +++ b/tests/notification/fixtures/webpush_notification.type.post.xml @@ -1,5 +1,7 @@ + +
forum_iduser_id diff --git a/tests/notification/notification_method_webpush_test.php b/tests/notification/notification_method_webpush_test.php index 90e1d14deb..f0e1f1cb50 100644 --- a/tests/notification/notification_method_webpush_test.php +++ b/tests/notification/notification_method_webpush_test.php @@ -61,6 +61,10 @@ class notification_method_webpush_test extends phpbb_tests_notification_base $process = new \Symfony\Component\Process\Process(['node_modules/.bin/web-push-testing', '--port', '9012', 'start']); $process->run(); + if (!$process->isSuccessful()) + { + self::fail('Starting web push testing service failed: ' . $process->getErrorOutput()); + } } protected static function stop_webpush_testing(): void @@ -384,7 +388,7 @@ class notification_method_webpush_test extends phpbb_tests_notification_base } catch (\GuzzleHttp\Exception\GuzzleException $exception) { - $this->fail('Failed getting subscription from web-push-testing client'); + $this->fail('Failed getting subscription from web-push-testing client: ' . $exception->getMessage()); } $subscription_return = \phpbb\json\sanitizer::decode((string) $response->getBody());