Skip to content

e2e test - Quarto Python test #7697

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
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