Skip to content

Commit 4717336

Browse files
committed
Merge branch 'main' into chore/php-support-drop
# Conflicts: # .github/workflows/run-feature-tests.yml
2 parents 4a2eaf4 + 01270ec commit 4717336

File tree

6 files changed

+14
-137
lines changed

6 files changed

+14
-137
lines changed
Lines changed: 0 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -1,80 +0,0 @@
1-
# Run only Features tests
2-
# TODO: Currently failing on ubuntu-latest and prefer-lowest
3-
# TODO: Find a way to output electron logs to the console
4-
name: run-feature-tests
5-
6-
on:
7-
workflow_dispatch:
8-
push:
9-
branches:
10-
- main
11-
pull_request:
12-
branches:
13-
- main
14-
15-
jobs:
16-
test:
17-
runs-on: ${{ matrix.os }}
18-
19-
strategy:
20-
fail-fast: false
21-
matrix:
22-
os: [
23-
windows-latest,
24-
macos-latest
25-
# ubuntu-latest,
26-
]
27-
php: [ 8.4, 8.3 ]
28-
laravel: [ '10.*', '11.*', '12.*' ]
29-
stability: [
30-
# prefer-lowest,
31-
prefer-stable
32-
]
33-
exclude:
34-
- laravel: 10.*
35-
php: 8.4
36-
37-
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}
38-
39-
steps:
40-
- name: Checkout code
41-
uses: actions/checkout@v4
42-
43-
- name: Use Node.js
44-
uses: actions/setup-node@v4
45-
with:
46-
node-version: 20.x
47-
48-
- name: Setup PHP
49-
uses: shivammathur/setup-php@v2
50-
with:
51-
php-version: ${{ matrix.php }}
52-
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo
53-
coverage: none
54-
55-
- name: Setup problem matchers
56-
run: |
57-
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
58-
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
59-
60-
- name: Install dependencies
61-
run: |
62-
composer require "laravel/framework:${{ matrix.laravel }}" --no-interaction --no-update
63-
composer update --${{ matrix.stability }} --no-interaction
64-
65-
- name: List Installed Dependencies
66-
run: composer show
67-
68-
- name: Show pest version
69-
run: vendor/bin/pest --version
70-
71-
- name: Execute tests on Linux
72-
if: "matrix.os == 'ubuntu-latest'"
73-
run: |
74-
xvfb-run -a vendor/bin/pest --group=feature
75-
env:
76-
DISPLAY: ":99"
77-
78-
- name: Execute tests on Windows or Mac
79-
if: "matrix.os == 'windows-latest' || matrix.os == 'macos-latest'"
80-
run: vendor/bin/pest --group=feature

.github/workflows/run-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,4 @@ jobs:
5959
run: vendor/bin/pest --version
6060

6161
- name: Execute tests
62-
run: vendor/bin/pest --exclude-group=feature
62+
run: vendor/bin/pest

resources/js/electron-plugin/dist/server/api/menuBar.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,28 @@ import { fileURLToPath } from 'url';
88
import { enable } from "@electron/remote/main/index.js";
99
const router = express.Router();
1010
router.post("/label", (req, res) => {
11+
var _a;
1112
res.sendStatus(200);
1213
const { label } = req.body;
13-
state.tray.setTitle(label);
14+
(_a = state.tray) === null || _a === void 0 ? void 0 : _a.setTitle(label);
1415
});
1516
router.post("/tooltip", (req, res) => {
17+
var _a;
1618
res.sendStatus(200);
1719
const { tooltip } = req.body;
18-
state.tray.setToolTip(tooltip);
20+
(_a = state.tray) === null || _a === void 0 ? void 0 : _a.setToolTip(tooltip);
1921
});
2022
router.post("/icon", (req, res) => {
23+
var _a;
2124
res.sendStatus(200);
2225
const { icon } = req.body;
23-
state.tray.setImage(icon);
26+
(_a = state.tray) === null || _a === void 0 ? void 0 : _a.setImage(icon);
2427
});
2528
router.post("/context-menu", (req, res) => {
29+
var _a;
2630
res.sendStatus(200);
2731
const { contextMenu } = req.body;
28-
state.tray.setContextMenu(buildMenu(contextMenu));
32+
(_a = state.tray) === null || _a === void 0 ? void 0 : _a.setContextMenu(buildMenu(contextMenu));
2933
});
3034
router.post("/show", (req, res) => {
3135
res.sendStatus(200);

resources/js/electron-plugin/src/server/api/menuBar.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,31 +14,31 @@ router.post("/label", (req, res) => {
1414

1515
const { label } = req.body;
1616

17-
state.tray.setTitle(label);
17+
state.tray?.setTitle(label);
1818
});
1919

2020
router.post("/tooltip", (req, res) => {
2121
res.sendStatus(200);
2222

2323
const { tooltip } = req.body;
2424

25-
state.tray.setToolTip(tooltip);
25+
state.tray?.setToolTip(tooltip);
2626
});
2727

2828
router.post("/icon", (req, res) => {
2929
res.sendStatus(200);
3030

3131
const { icon } = req.body;
3232

33-
state.tray.setImage(icon);
33+
state.tray?.setImage(icon);
3434
});
3535

3636
router.post("/context-menu", (req, res) => {
3737
res.sendStatus(200);
3838

3939
const { contextMenu } = req.body;
4040

41-
state.tray.setContextMenu(buildMenu(contextMenu));
41+
state.tray?.setContextMenu(buildMenu(contextMenu));
4242
});
4343

4444
router.post("/show", (req, res) => {

src/Traits/CopiesToBuildDirectory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ public function copyToBuildDirectory(): bool
111111
} catch (Throwable $e) {
112112
warning('[WARNING] '.$e->getMessage());
113113
}
114-
114+
115115
if (PHP_OS_FAMILY !== 'Windows') {
116116
$perms = fileperms($item->getPathname());
117117
if ($perms !== false) {

tests/Feature/BootingTest.php

Lines changed: 0 additions & 47 deletions
This file was deleted.

0 commit comments

Comments
 (0)