|
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 and click on FLE block', async () => { |
5 | | -// const app = await electron.launch({ args: ['main.js'] }); |
| 4 | + test('Launch Electron app and click on FLE block', async () => { |
| 5 | + const app = await electron.launch({ args: ['main.js'] }); |
6 | 6 |
|
7 | | -// const window = await app.firstWindow(); |
| 7 | + const window = await app.firstWindow(); |
8 | 8 |
|
9 | | -// // selecting the device (MPW1 Gemini) |
| 9 | + // selecting the device (MPW1 Gemini) |
10 | 10 | // const deviceDropdown = await window.waitForSelector('#deviceId'); |
11 | 11 | // await deviceDropdown.selectOption('MPW1'); |
12 | 12 | // await new Promise((resolve) => setTimeout(resolve, 2000)); |
13 | 13 |
|
14 | | -// const fleBlock = await window.waitForSelector('#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(2) > div'); |
15 | | -// await fleBlock.click(); |
| 14 | + const fleBlock = await window.waitForSelector('#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(2) > div'); |
| 15 | + await fleBlock.click(); |
16 | 16 |
|
17 | | -// const flePowerVisible = await window.isVisible('div.title-comp-total-text'); |
18 | | -// expect(flePowerVisible).toBeTruthy(); |
| 17 | + const flePowerVisible = await window.isVisible('div.title-comp-total-text'); |
| 18 | + expect(flePowerVisible).toBeTruthy(); |
19 | 19 |
|
20 | | -// console.log('FLE block clicked and verified.'); |
| 20 | + console.log('FLE block clicked and verified.'); |
21 | 21 |
|
22 | | -// await new Promise((resolve) => setTimeout(resolve, 5000)); |
| 22 | + await new Promise((resolve) => setTimeout(resolve, 5000)); |
23 | 23 |
|
24 | | -// await app.close(); |
25 | | -// }); |
| 24 | + await app.close(); |
| 25 | + }); |
0 commit comments