|
1 | | -const { _electron: electron } = require('playwright'); |
2 | | -const { test, expect } = require('@playwright/test'); |
| 1 | +// const { _electron: electron } = require('playwright'); |
| 2 | +// const { test, expect } = require('@playwright/test'); |
3 | 3 |
|
4 | | -test('Launch Electron app, add clocking source, navigate to DSP block, configure DSP, and submit form', async () => { |
5 | | - const app = await electron.launch({ args: ['main.js'] }); |
6 | | - const window = await app.firstWindow(); |
| 4 | +// test('Launch Electron app, add clocking source, navigate to DSP block, configure DSP, and submit form', async () => { |
| 5 | +// const app = await electron.launch({ args: ['main.js'] }); |
| 6 | +// const window = await app.firstWindow(); |
7 | 7 |
|
8 | | - // Select the device (MPW1 Gemini) |
9 | | - await window.selectOption('#deviceId', 'MPW1'); |
| 8 | +// // Select the device (MPW1 Gemini) |
| 9 | +// await window.selectOption('#deviceId', 'MPW1'); |
10 | 10 |
|
11 | | - // Select Clocking block and click Add |
12 | | - await window.click('#app > div > div.top-row-container > div.main-table-container.main-border > div.top-l2 > div.top-l2-col2 > div.top-l2-col2-elem > div > div:nth-child(2) > div:nth-child(1) > div'); |
13 | | - await window.click('#app > div > div.table-container.main-border > div > div.power-and-table-wrapper > div.table-wrapper > button'); |
| 11 | +// // Select Clocking block and click Add |
| 12 | +// await window.click('#app > div > div.top-row-container > div.main-table-container.main-border > div.top-l2 > div.top-l2-col2 > div.top-l2-col2-elem > div > div:nth-child(2) > div:nth-child(1) > div'); |
| 13 | +// await window.click('#app > div > div.table-container.main-border > div > div.power-and-table-wrapper > div.table-wrapper > button'); |
14 | 14 |
|
15 | | - // Fill and submit Clocking form |
16 | | - await window.fill('body > div:nth-child(3) > div > div.ant-modal-wrap > div > div:nth-child(1) > div > div.ant-modal-body > div > form > div:nth-child(2) > input[type=text]', 'test'); |
17 | | - await window.fill('body > div:nth-child(3) > div > div.ant-modal-wrap > div > div:nth-child(1) > div > div.ant-modal-body > div > form > div:nth-child(3) > input[type=text]', 'test'); |
18 | | - await window.click('body > div:nth-child(3) > div > div.ant-modal-wrap > div > div:nth-child(1) > div > div.ant-modal-footer > button.ant-btn-primary'); |
| 15 | +// // Fill and submit Clocking form |
| 16 | +// await window.fill('body > div:nth-child(3) > div > div.ant-modal-wrap > div > div:nth-child(1) > div > div.ant-modal-body > div > form > div:nth-child(2) > input[type=text]', 'test'); |
| 17 | +// await window.fill('body > div:nth-child(3) > div > div.ant-modal-wrap > div > div:nth-child(1) > div > div.ant-modal-body > div > form > div:nth-child(3) > input[type=text]', 'test'); |
| 18 | +// await window.click('body > div:nth-child(3) > div > div.ant-modal-wrap > div > div:nth-child(1) > div > div.ant-modal-footer > button.ant-btn-primary'); |
19 | 19 |
|
20 | | - // Navigate to DSP block and click Add |
21 | | - await window.click('#app > div > div.top-row-container > div.main-table-container.main-border > div.top-l2 > div.top-l2-col2 > div.top-l2-col2-elem > div > div:nth-child(3) > div:nth-child(2) > div'); |
22 | | - await window.click('#app > div > div.table-container.main-border > div > div.power-and-table-wrapper > div.table-wrapper > button'); |
| 20 | +// // Navigate to DSP block and click Add |
| 21 | +// await window.click('#app > div > div.top-row-container > div.main-table-container.main-border > div.top-l2 > div.top-l2-col2 > div.top-l2-col2-elem > div > div:nth-child(3) > div:nth-child(2) > div'); |
| 22 | +// await window.click('#app > div > div.table-container.main-border > div > div.power-and-table-wrapper > div.table-wrapper > button'); |
23 | 23 |
|
24 | | - // Fill and submit DSP form |
25 | | - await Promise.all([ |
26 | | - window.fill('body > div:nth-child(3) > div > div.ant-modal-wrap > div > div:nth-child(1) > div > div.ant-modal-body > div > form > div:nth-child(1) > input[type=text]', 'test'), |
27 | | - window.fill('body > div:nth-child(3) > div > div.ant-modal-wrap > div > div:nth-child(1) > div > div.ant-modal-body > div > form > div:nth-child(2) > input[type=number]', '32'), |
28 | | - window.fill('body > div:nth-child(3) > div > div.ant-modal-wrap > div > div:nth-child(1) > div > div.ant-modal-body > div > form > div:nth-child(4) > input[type=number]', '64'), |
29 | | - window.fill('body > div:nth-child(3) > div > div.ant-modal-wrap > div > div:nth-child(1) > div > div.ant-modal-body > div > form > div:nth-child(5) > input[type=number]', '64'), |
30 | | - window.fill('body > div:nth-child(3) > div > div.ant-modal-wrap > div > div:nth-child(1) > div > div.ant-modal-body > div > form > div:nth-child(8) > input[type=number]', '50') |
31 | | - ]); |
32 | | - await window.click('body > div:nth-child(3) > div > div.ant-modal-wrap > div > div:nth-child(1) > div > div.ant-modal-footer > button.ant-btn-primary'); |
| 24 | +// // Fill and submit DSP form |
| 25 | +// await Promise.all([ |
| 26 | +// window.fill('body > div:nth-child(3) > div > div.ant-modal-wrap > div > div:nth-child(1) > div > div.ant-modal-body > div > form > div:nth-child(1) > input[type=text]', 'test'), |
| 27 | +// window.fill('body > div:nth-child(3) > div > div.ant-modal-wrap > div > div:nth-child(1) > div > div.ant-modal-body > div > form > div:nth-child(2) > input[type=number]', '32'), |
| 28 | +// window.fill('body > div:nth-child(3) > div > div.ant-modal-wrap > div > div:nth-child(1) > div > div.ant-modal-body > div > form > div:nth-child(4) > input[type=number]', '64'), |
| 29 | +// window.fill('body > div:nth-child(3) > div > div.ant-modal-wrap > div > div:nth-child(1) > div > div.ant-modal-body > div > form > div:nth-child(5) > input[type=number]', '64'), |
| 30 | +// window.fill('body > div:nth-child(3) > div > div.ant-modal-wrap > div > div:nth-child(1) > div > div.ant-modal-body > div > form > div:nth-child(8) > input[type=number]', '50') |
| 31 | +// ]); |
| 32 | +// await window.click('body > div:nth-child(3) > div > div.ant-modal-wrap > div > div:nth-child(1) > div > div.ant-modal-footer > button.ant-btn-primary'); |
33 | 33 |
|
34 | | - // Close the test |
35 | | - await app.close(); |
36 | | -}); |
| 34 | +// // Close the test |
| 35 | +// await app.close(); |
| 36 | +// }); |
0 commit comments