Skip to content

Commit 385fd3d

Browse files
authored
e2e test - Quarto Python test (#7694)
- This test group (Quarto - Python) aims to verify basic functionalities of Quarto for Python users - This test verifies basic rendering of report in PDF after user clicks 'Preview' - Viewer tab is targeted by corresponding iframe. It is assumed that the report fully loads once title 'Example Report' appears ### QA Notes @:quarto @:web @:win
1 parent b8883c1 commit 385fd3d

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/*---------------------------------------------------------------------------------------------
2+
* Copyright (C) 2025 Posit Software, PBC. All rights reserved.
3+
* Licensed under the Elastic License 2.0. See LICENSE.txt for license information.
4+
*--------------------------------------------------------------------------------------------*/
5+
6+
import { join } from 'path';
7+
import { test, tags } from '../_test.setup';
8+
import { expect } from '@playwright/test';
9+
10+
test.use({
11+
suiteId: __filename
12+
});
13+
14+
// This test group aims to verify basic functionalities of Quarto for Python users
15+
test.describe('Quarto - Python', { tag: [tags.WEB, tags.WIN, tags.QUARTO] }, () => {
16+
17+
test('Verify Quarto app can render correctly with Python script', async function ({ app, openFile, python }, testInfo) {
18+
19+
// This test verifies basic rendering of report in PDF after user clicks 'Preview'
20+
await openFile(join('workspaces', 'quarto_python', 'report.qmd'));
21+
await app.code.driver.page.locator('.positron-action-bar').getByRole('button', { name: 'Preview' }).click();
22+
23+
// Viewer tab is targeted by corresponding iframe. It is assumed that the report fully loads once title 'Example Report' appears
24+
const title = app.workbench.viewer.getViewerFrame().frameLocator('iframe').getByText('Example Report');
25+
await expect(title).toBeVisible({ timeout: 30000 });
26+
});
27+
});

0 commit comments

Comments
 (0)