Skip to content
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

e2e tests: enable some web viewer tests #5977

Merged
merged 1 commit into from
Jan 13, 2025
Merged
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
21 changes: 15 additions & 6 deletions test/e2e/tests/viewer/viewer.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ test.describe('Viewer', { tag: [tags.VIEWER] }, () => {
await app.workbench.viewer.clearViewer();
});

test('Python - Verify Viewer functionality with webbrowser [C784887]', async function ({ app, page, logger, python }) {
test('Python - Verify Viewer functionality with webbrowser [C784887]', { tag: [tags.WEB] }, async function ({ app, page, logger, python }) {
logger.log('Sending code to console');
await app.workbench.console.pasteCodeToConsole(pythonScript);
await app.workbench.console.sendEnterKey();
const theDoc = app.workbench.viewer.getViewerLocator('head');
await theDoc.waitFor({ state: 'attached' });
});

test('Python - Verify Viewer functionality with great-tables [C784888]', async function ({ app, logger, python }) {
test('Python - Verify Viewer functionality with great-tables [C784888]', { tag: [tags.WEB] }, async function ({ app, logger, python }) {

// extra clean up - https://github.com/posit-dev/positron/issues/4604
// without this, on ubuntu, the Enter key send to the console
Expand All @@ -41,15 +41,22 @@ test.describe('Viewer', { tag: [tags.VIEWER] }, () => {
});


test('R - Verify Viewer functionality with modelsummary [C784889]', async function ({ app, logger, r }) {
test('R - Verify Viewer functionality with modelsummary [C784889]', { tag: [tags.WEB] }, async function ({ app, logger, r }) {
logger.log('Sending code to console');
await app.workbench.console.executeCode('R', rModelSummaryScript, '>');
const billDepthLocator = app.workbench.viewer.getViewerLocator('tr').filter({ hasText: 'bill_depth_mm' });
let billDepthLocator;
if (!app.web) {
billDepthLocator = app.workbench.viewer.getViewerLocator('tr').filter({ hasText: 'bill_depth_mm' });
} else {
billDepthLocator = app.workbench.viewer.viewerFrame.frameLocator('iframe').locator('tr').filter({ hasText: 'bill_depth_mm' });
}
await billDepthLocator.waitFor({ state: 'attached' });

});

test('R - Verify Viewer functionality with reactable [C784930]', async function ({ app, logger, r }) {
test('R - Verify Viewer functionality with reactable [C784930]', {
annotation: [{ type: 'web issue', description: 'https://github.com/posit-dev/positron/issues/5972' }]
}, async function ({ app, logger, r }) {

logger.log('Sending code to console');
await app.workbench.console.executeCode('R', rReactableScript, '>');
Expand All @@ -60,7 +67,9 @@ test.describe('Viewer', { tag: [tags.VIEWER] }, () => {

});

test('R - Verify Viewer functionality with reprex [C784931]', async function ({ app, logger, r }) {
test('R - Verify Viewer functionality with reprex [C784931]', {
annotation: [{ type: 'web issue', description: 'https://github.com/posit-dev/positron/issues/5975' }]
}, async function ({ app, logger, r }) {

logger.log('Sending code to console');
await app.workbench.console.executeCode('R', rReprexScript, '>');
Expand Down
Loading