Skip to content

Commit

Permalink
Update fle.test.js
Browse files Browse the repository at this point in the history
  • Loading branch information
shivaahir158 authored Nov 6, 2024
1 parent a86c7ff commit 452861f
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions tests/e2e/fle.test.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
const { _electron: electron } = require('playwright');
const { test, expect } = require('@playwright/test');
// const { _electron: electron } = require('playwright');
// const { test, expect } = require('@playwright/test');

test('Launch Electron app and click on FLE block', async () => {
const app = await electron.launch({ args: ['main.js'] });
// test('Launch Electron app and click on FLE block', async () => {
// const app = await electron.launch({ args: ['main.js'] });

const window = await app.firstWindow();
// const window = await app.firstWindow();

// selecting the device (MPW1 Gemini)
const deviceDropdown = await window.waitForSelector('#deviceId');
await deviceDropdown.selectOption('MPW1');
await new Promise((resolve) => setTimeout(resolve, 2000));
// // selecting the device (MPW1 Gemini)
// const deviceDropdown = await window.waitForSelector('#deviceId');
// await deviceDropdown.selectOption('MPW1');
// await new Promise((resolve) => setTimeout(resolve, 2000));

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');
await fleBlock.click();
// 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');
// await fleBlock.click();

const flePowerVisible = await window.isVisible('div.title-comp-total-text');
expect(flePowerVisible).toBeTruthy();
// const flePowerVisible = await window.isVisible('div.title-comp-total-text');
// expect(flePowerVisible).toBeTruthy();

console.log('FLE block clicked and verified.');
// console.log('FLE block clicked and verified.');

await new Promise((resolve) => setTimeout(resolve, 5000));
// await new Promise((resolve) => setTimeout(resolve, 5000));

await app.close();
});
// await app.close();
// });

0 comments on commit 452861f

Please sign in to comment.