Skip to content

Commit

Permalink
run e2e without backend
Browse files Browse the repository at this point in the history
  • Loading branch information
NadeemYaseen committed Nov 6, 2024
1 parent 452861f commit eddca70
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/rpe_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ jobs:

- name: E2E Playwright tests on Linux latest & MacOS
if: ${{ matrix.os == 'ubuntu-latest' }}
run: npm run compile && xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- npx playwright test
run: npm run compile && xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- npx playwright test -- fle.test.js

- name: Run ESLint only on ubuntu-latest
if: ${{ matrix.os == 'ubuntu-latest' }}
Expand Down
28 changes: 14 additions & 14 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)
// 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 eddca70

Please sign in to comment.