Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions test/e2e/tests/quarto/quarto-python.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*---------------------------------------------------------------------------------------------
* Copyright (C) 2025 Posit Software, PBC. All rights reserved.
* Licensed under the Elastic License 2.0. See LICENSE.txt for license information.
*--------------------------------------------------------------------------------------------*/

import { join } from 'path';
import { test, tags } from '../_test.setup';
import { expect } from '@playwright/test';

test.use({
suiteId: __filename
});

// This test group aims to verify basic functionalities of Quarto for Python users
test.describe('Quarto - Python', { tag: [tags.WEB, tags.WIN, tags.QUARTO] }, () => {

test('Verify Quarto app can render correctly with Python script', async function ({ app, openFile, python }, testInfo) {

// This test verifies basic rendering of report in PDF after user clicks 'Preview'
await openFile(join('workspaces', 'quarto_python', 'report.qmd'));
await app.code.driver.page.locator('.positron-action-bar').getByRole('button', { name: 'Preview' }).click();

// Viewer tab is targeted by corresponding iframe. It is assumed that the report fully loads once title 'Example Report' appears
const title = app.workbench.viewer.getViewerFrame().frameLocator('iframe').getByText('Example Report');
await expect(title).toBeVisible({ timeout: 30000 });
});
});
Loading