Skip to content

Commit 5a51e67

Browse files
authored
Update bcpu.test.js
1 parent d08a556 commit 5a51e67

File tree

1 file changed

+44
-44
lines changed

1 file changed

+44
-44
lines changed

tests/e2e/bcpu.test.js

Lines changed: 44 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,44 @@
1-
const { _electron: electron } = require('playwright');
2-
const { test, expect } = require('@playwright/test');
3-
4-
test('Launch Electron app, select device MPW1 Gemini, and click on BCPU block', async () => {
5-
const app = await electron.launch({ args: ['main.js'], headless: false });
6-
7-
const window = await app.firstWindow();
8-
9-
// selecting MPW1 Gemini from device dropdown
10-
const deviceDropdown = await window.waitForSelector('#deviceId');
11-
await deviceDropdown.selectOption('MPW1');
12-
await window.waitForTimeout(2000); // wait for UI update
13-
14-
// click on the BCPU block
15-
const bcpuSelector = '#app > div > div.top-row-container > div.main-table-container.main-border > div.top-l2 > div.top-l2-col1 > div.top-l2-col1-row1 > div:nth-child(2) > div';
16-
await window.waitForSelector(bcpuSelector);
17-
await window.click(bcpuSelector);
18-
19-
// click on "Add" button
20-
const addButtonSelector = '#app > div > div.table-container.main-border > div > div.cpu-container > div.table-wrapper > button';
21-
await window.waitForSelector(addButtonSelector, { state: 'visible' });
22-
await window.click(addButtonSelector);
23-
24-
// click on "OK" button
25-
const okButtonSelector = 'button.ant-btn-primary';
26-
await window.waitForSelector(okButtonSelector, { state: 'visible' });
27-
await window.click(okButtonSelector);
28-
29-
// click on Peripherals tab
30-
const peripheralsTabSelector = '#app > div > div.top-row-container > div.main-table-container.main-border > div.top-l2 > div.top-l2-col1 > div:nth-child(3) > div > div:nth-child(2) > div:nth-child(2) > div.periph-internal-font-header';
31-
await window.waitForSelector(peripheralsTabSelector, { state: 'visible' });
32-
await window.click(peripheralsTabSelector);
33-
34-
// check SPI/QSPI block
35-
const spiQspiCheckSelector = '#\\30';
36-
await window.waitForSelector(spiQspiCheckSelector, { state: 'visible' });
37-
await window.click(spiQspiCheckSelector);
38-
39-
// waiting to observe result on UI
40-
await window.waitForTimeout(5000);
41-
42-
// closing RPE
43-
await app.close();
44-
});
1+
// const { _electron: electron } = require('playwright');
2+
// const { test, expect } = require('@playwright/test');
3+
4+
// test('Launch Electron app, select device MPW1 Gemini, and click on BCPU block', async () => {
5+
// const app = await electron.launch({ args: ['main.js'], headless: false });
6+
7+
// const window = await app.firstWindow();
8+
9+
// // selecting MPW1 Gemini from device dropdown
10+
// const deviceDropdown = await window.waitForSelector('#deviceId');
11+
// await deviceDropdown.selectOption('MPW1');
12+
// await window.waitForTimeout(2000); // wait for UI update
13+
14+
// // click on the BCPU block
15+
// const bcpuSelector = '#app > div > div.top-row-container > div.main-table-container.main-border > div.top-l2 > div.top-l2-col1 > div.top-l2-col1-row1 > div:nth-child(2) > div';
16+
// await window.waitForSelector(bcpuSelector);
17+
// await window.click(bcpuSelector);
18+
19+
// // click on "Add" button
20+
// const addButtonSelector = '#app > div > div.table-container.main-border > div > div.cpu-container > div.table-wrapper > button';
21+
// await window.waitForSelector(addButtonSelector, { state: 'visible' });
22+
// await window.click(addButtonSelector);
23+
24+
// // click on "OK" button
25+
// const okButtonSelector = 'button.ant-btn-primary';
26+
// await window.waitForSelector(okButtonSelector, { state: 'visible' });
27+
// await window.click(okButtonSelector);
28+
29+
// // click on Peripherals tab
30+
// const peripheralsTabSelector = '#app > div > div.top-row-container > div.main-table-container.main-border > div.top-l2 > div.top-l2-col1 > div:nth-child(3) > div > div:nth-child(2) > div:nth-child(2) > div.periph-internal-font-header';
31+
// await window.waitForSelector(peripheralsTabSelector, { state: 'visible' });
32+
// await window.click(peripheralsTabSelector);
33+
34+
// // check SPI/QSPI block
35+
// const spiQspiCheckSelector = '#\\30';
36+
// await window.waitForSelector(spiQspiCheckSelector, { state: 'visible' });
37+
// await window.click(spiQspiCheckSelector);
38+
39+
// // waiting to observe result on UI
40+
// await window.waitForTimeout(5000);
41+
42+
// // closing RPE
43+
// await app.close();
44+
// });

0 commit comments

Comments
 (0)