FocusriteGroup / juce-end-to-end

Library to assist with end-to-end testing of JUCE desktop applications
Apache License 2.0
88 stars 10 forks source link

Linux support #177

Open Barabas5532 opened 1 year ago

Barabas5532 commented 1 year ago

Will this project ever support Linux?

I have managed to get a basic demo running. The provided example also works, but some of the accessibility tests fail.

Test logs ``` $ APP_PATH=cmake-build/example/app/e2e-example-app_artefacts/e2e-example-app npm run test-example > @focusritegroup/juce-end-to-end@0.0.19 test-example > jest ./example/tests/** FAIL example/tests/accessibility.spec.ts ● Accessibility tests › Increment button is accessible expect(received).toEqual(expected) // deep equality - Expected - 2 + Received + 2 Object { "accessible": true, "description": "Increment button description", "display": "", - "handler": true, - "help": "Increment button tool tip", + "handler": false, + "help": "Increment button help text", "title": "Increment button title", } 18 | expect( 19 | await appConnection.getAccessibilityState('increment-button') > 20 | ).toEqual({ | ^ 21 | title: 'Increment button title', 22 | description: 'Increment button description', 23 | help: 'Increment button tool tip', at Object.toEqual (example/tests/accessibility.spec.ts:20:7) ● Accessibility tests › Enable button is enabled for accessibility but has no text expect(received).toBeTruthy() Received: false 37 | const state = await appConnection.getAccessibilityState('enable-button'); 38 | expect(state.accessible).toBeTruthy(); > 39 | expect(state.handler).toBeTruthy(); | ^ 40 | }); 41 | 42 | it('Slider is enabled for accessibility but has no text', async () => { at Object.toBeTruthy (example/tests/accessibility.spec.ts:39:27) ● Accessibility tests › Slider is enabled for accessibility but has no text expect(received).toBeTruthy() Received: false 43 | const state = await appConnection.getAccessibilityState('slider'); 44 | expect(state.accessible).toBeTruthy(); > 45 | expect(state.handler).toBeTruthy(); | ^ 46 | expect(parseFloat(state.display)).toEqual(0); 47 | }); 48 | at Object.toBeTruthy (example/tests/accessibility.spec.ts:45:27) ● Accessibility tests › Slider display changes with the value change expect(received).toEqual(expected) // deep equality Expected: 0 Received: NaN 50 | expect( 51 | parseFloat((await appConnection.getAccessibilityState('slider')).display) > 52 | ).toEqual(0); | ^ 53 | 54 | await appConnection.clickComponent('increment-button'); 55 | expect( at Object.toEqual (example/tests/accessibility.spec.ts:52:7) ● Accessibility tests › Increment button has accessibility parent expect(received).toEqual(expected) // deep equality Expected: "main-window" Received: "" 66 | expect( 67 | await appConnection.getAccessibilityParent('increment-button') > 68 | ).toEqual('main-window'); | ^ 69 | expect(await appConnection.getAccessibilityParent('enable-button')).toEqual( 70 | 'main-window' 71 | ); at Object.toEqual (example/tests/accessibility.spec.ts:68:7) ● Accessibility tests › Main window has multiple accessible children expect(received).toBeGreaterThan(expected) Expected: > 0 Received: 0 85 | 'main-window' 86 | ); > 87 | expect(children.length).toBeGreaterThan(0); | ^ 88 | expect(children).toContainEqual('increment-button'); 89 | expect(children).toContainEqual('enable-button'); 90 | expect(children).toContainEqual('slider'); at Object.toBeGreaterThan (example/tests/accessibility.spec.ts:87:29) PASS example/tests/counter-app.spec.ts Test Suites: 1 failed, 1 passed, 2 total Tests: 6 failed, 10 passed, 16 total Snapshots: 0 total Time: 0.655 s, estimated 1 s Ran all test suites matching /.\/example\/tests\/accessibility.spec.ts|.\/example\/tests\/app-path.ts|.\/example\/tests\/counter-app.spec.ts/i. ```
joe-noel-dev commented 1 year ago

There's no reason not to support Linux. We don't target Linux, so we haven't done the work to run in on CI etc.

It looks like JUCE's Accessibility doesn't support Linux, so we might have to disable some of the example tests until support is added.