Files
automatisch/packages/e2e-tests/tests/executions/display-execution.spec.js
Rıdvan Akca dace794167 feat: introduce playwright (#1194)
* feat: introduce playwright

* test: migrate apps folder to playwright (#1201)

* test: rewrite connections tests with playwright (#1203)

* test: rewrite executions tests with playwright (#1207)

* test: rewrite flow editor tests with playwright (#1212)

* test(flow-editor): rewrite tests using serial mode (#1218)

* test: update custom connection creation paths

* test: move login logic to page fixture

* test: remove cypress tests and deps

---------

Co-authored-by: Ali BARIN <ali.barin53@gmail.com>
2023-08-17 23:31:38 +02:00

38 lines
1.2 KiB
JavaScript

// @ts-check
const { test, expect } = require('../../fixtures/index');
test.describe('Executions page', () => {
test.beforeEach(async ({ page, executionsPage }) => {
await page.getByTestId('executions-page-drawer-link').click();
await page.getByTestId('execution-row').first().click();
await expect(page).toHaveURL(/\/executions\//);
});
test('displays data in by default', async ({ page, executionsPage }) => {
await expect(page.getByTestId('execution-step').last()).toBeVisible();
await expect(page.getByTestId('execution-step')).toHaveCount(2);
await executionsPage.screenshot({
path: 'Execution - data in.png',
});
});
test('displays data out', async ({ page, executionsPage }) => {
const executionStepCount = await page.getByTestId('execution-step').count();
for (let i = 0; i < executionStepCount; i++) {
await page.getByTestId('data-out-tab').nth(i).click();
await expect(page.getByTestId('data-out-panel').nth(i)).toBeVisible();
await executionsPage.screenshot({
path: `Execution - data out - ${i}.png`,
animations: 'disabled',
});
}
});
test('does not display error', async ({ page }) => {
await expect(page.getByTestId('error-tab')).toBeHidden();
});
});