Skip to content

Commit

Permalink
Added RPE icon (#271)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
NadeemYaseen and shivaahir158 authored Nov 21, 2024
1 parent c758145 commit 40dad14
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 11 deletions.
Binary file added imgs/rpeicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,7 @@ const createWindow = () => {
mainWindow = new BrowserWindow({
width: 1400,
height: 800,
icon: `${__dirname}/imgs/rpeicon.png`,
webPreferences: {
preload: path.join(app.getAppPath(), 'preload.js'),
nodeIntegration: true,
Expand Down
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"node_modules/**/*",
"package.json",
"cleanup.js",
"imgs/*",
"projectFile.js"
],
"directories": {
Expand All @@ -38,6 +39,10 @@
"from": "backend/restapi_server.exe",
"to": "./backend/restapi_server.exe"
},
{
"from": "backend/etc/devices",
"to": "./backend/etc/devices"
},
{
"from": "backend/etc/device.xml",
"to": "./backend/etc/device.xml"
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/bcpu.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ test('Launch Electron app, select device MPW1 Gemini, and click on BCPU block',

// Close the app
await app.close();
});
});
5 changes: 3 additions & 2 deletions tests/e2e/clocking.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,10 @@ test('Launch Electron app, select device, toggle ACPU power, click Clocking, Add
await new Promise((resolve) => setTimeout(resolve, 1000)); // Wait for 1 second

// Clicking OK to submit the form
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';
const okButton = await window.waitForSelector(okButtonSelector);
const modalFooterSelector = 'body > div:nth-child(3) > div > div.ant-modal-wrap > div > div:nth-child(1) > div > div.ant-modal-footer';
const okButton = await window.locator(`${modalFooterSelector} button.ant-btn-primary`);
await okButton.click();


// Closing the test
await app.close();
Expand Down
16 changes: 10 additions & 6 deletions tests/e2e/dsp.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ test('Launch Electron app, add clocking source, navigate to DSP block, configure
const portSignalInput = await window.waitForSelector(portSignalSelector);
await portSignalInput.fill('test');

// Clicking OK to submit the clocking form
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';
const okButton = await window.waitForSelector(okButtonSelector);
// Clicking OK to submit the form
const modalFooterSelector = 'body > div:nth-child(3) > div > div.ant-modal-wrap > div > div:nth-child(1) > div > div.ant-modal-footer';
const okButton = await window.locator(`${modalFooterSelector} button.ant-btn-primary`);
await okButton.click();

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

// Clicking OK to submit the DSP form
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';
const dspOkButton = await window.waitForSelector(dspOkButtonSelector);
// Define the modal footer selector as the base context
const dspModalFooterSelector = 'body > div:nth-child(3) > div > div.ant-modal-wrap > div > div:nth-child(1) > div > div.ant-modal-footer';

// Locate the OK button within the modal footer
const dspOkButton = await window.locator(`${dspModalFooterSelector} button.ant-btn-primary`);

// Click the OK button
await dspOkButton.click();

// Closing the test
Expand Down
4 changes: 2 additions & 2 deletions tests/e2e/restart.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ function isProcessRunning(pid) {
}
}

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

// Launch the Electron app
Expand Down

0 comments on commit 40dad14

Please sign in to comment.