Skip to content

Commit 40dad14

Browse files
Added RPE icon (#271)
* added RPE icon * added rpeicon.png file * Update restart.test.js * Update dsp.test.js * Update clocking.test.js * Update clocking.test.js * Update clocking.test.js * Update bcpu.test.js * Update clocking.test.js * Update dsp.test.js * Update restart.test.js * Update bcpu.test.js * Update clocking.test.js * Update dsp.test.js * Update restart.test.js --------- Co-authored-by: Shiva Ahir <[email protected]>
1 parent c758145 commit 40dad14

File tree

7 files changed

+22
-11
lines changed

7 files changed

+22
-11
lines changed

imgs/rpeicon.png

2 KB
Loading

main.js

+1
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,7 @@ const createWindow = () => {
267267
mainWindow = new BrowserWindow({
268268
width: 1400,
269269
height: 800,
270+
icon: `${__dirname}/imgs/rpeicon.png`,
270271
webPreferences: {
271272
preload: path.join(app.getAppPath(), 'preload.js'),
272273
nodeIntegration: true,

package.json

+5
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
"node_modules/**/*",
2929
"package.json",
3030
"cleanup.js",
31+
"imgs/*",
3132
"projectFile.js"
3233
],
3334
"directories": {
@@ -38,6 +39,10 @@
3839
"from": "backend/restapi_server.exe",
3940
"to": "./backend/restapi_server.exe"
4041
},
42+
{
43+
"from": "backend/etc/devices",
44+
"to": "./backend/etc/devices"
45+
},
4146
{
4247
"from": "backend/etc/device.xml",
4348
"to": "./backend/etc/device.xml"

tests/e2e/bcpu.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,4 @@ test('Launch Electron app, select device MPW1 Gemini, and click on BCPU block',
3535

3636
// Close the app
3737
await app.close();
38-
});
38+
});

tests/e2e/clocking.test.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,10 @@ test('Launch Electron app, select device, toggle ACPU power, click Clocking, Add
4141
await new Promise((resolve) => setTimeout(resolve, 1000)); // Wait for 1 second
4242

4343
// Clicking OK to submit the form
44-
const okButtonSelector = 'body > div:nth-child(3) > div > div.ant-modal-wrap > div > div:nth-child(1) > div > div.ant-modal-footer > button.ant-btn.css-dev-only-do-not-override-49qm.ant-btn-primary.ant-btn-color-primary.ant-btn-variant-solid > span';
45-
const okButton = await window.waitForSelector(okButtonSelector);
44+
const modalFooterSelector = 'body > div:nth-child(3) > div > div.ant-modal-wrap > div > div:nth-child(1) > div > div.ant-modal-footer';
45+
const okButton = await window.locator(`${modalFooterSelector} button.ant-btn-primary`);
4646
await okButton.click();
47+
4748

4849
// Closing the test
4950
await app.close();

tests/e2e/dsp.test.js

+10-6
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ test('Launch Electron app, add clocking source, navigate to DSP block, configure
3333
const portSignalInput = await window.waitForSelector(portSignalSelector);
3434
await portSignalInput.fill('test');
3535

36-
// Clicking OK to submit the clocking form
37-
const okButtonSelector = 'body > div:nth-child(3) > div > div.ant-modal-wrap > div > div:nth-child(1) > div > div.ant-modal-footer > button.ant-btn.css-dev-only-do-not-override-49qm.ant-btn-primary.ant-btn-color-primary.ant-btn-variant-solid > span';
38-
const okButton = await window.waitForSelector(okButtonSelector);
36+
// Clicking OK to submit the form
37+
const modalFooterSelector = 'body > div:nth-child(3) > div > div.ant-modal-wrap > div > div:nth-child(1) > div > div.ant-modal-footer';
38+
const okButton = await window.locator(`${modalFooterSelector} button.ant-btn-primary`);
3939
await okButton.click();
4040

4141
// Navigate to the DSP block
@@ -72,9 +72,13 @@ test('Launch Electron app, add clocking source, navigate to DSP block, configure
7272
const toggleRateInput = await window.waitForSelector(toggleRateSelector);
7373
await toggleRateInput.fill('50');
7474

75-
// Clicking OK to submit the DSP form
76-
const dspOkButtonSelector = 'body > div:nth-child(3) > div > div.ant-modal-wrap > div > div:nth-child(1) > div > div.ant-modal-footer > button.ant-btn.css-dev-only-do-not-override-49qm.ant-btn-primary.ant-btn-color-primary.ant-btn-variant-solid';
77-
const dspOkButton = await window.waitForSelector(dspOkButtonSelector);
75+
// Define the modal footer selector as the base context
76+
const dspModalFooterSelector = 'body > div:nth-child(3) > div > div.ant-modal-wrap > div > div:nth-child(1) > div > div.ant-modal-footer';
77+
78+
// Locate the OK button within the modal footer
79+
const dspOkButton = await window.locator(`${dspModalFooterSelector} button.ant-btn-primary`);
80+
81+
// Click the OK button
7882
await dspOkButton.click();
7983

8084
// Closing the test

tests/e2e/restart.test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ function isProcessRunning(pid) {
5252
}
5353
}
5454

55-
test('Launch and close Electron app 10 times, ensuring backend termination', async () => {
56-
for (let i = 0; i < 10; i++) {
55+
test('Launch and close Electron app 5 times, ensuring backend termination', async () => {
56+
for (let i = 0; i < 5; i++) {
5757
console.log(`Iteration ${i + 1}: Launching and closing Electron app.`);
5858

5959
// Launch the Electron app

0 commit comments

Comments
 (0)