-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Smoke tests: R and Python F1 help from console (#5416)
F1 help test for R and Python from console. ### QA Notes All smoke tests should pass.
- Loading branch information
1 parent
3b7693d
commit 3d0cc41
Showing
3 changed files
with
83 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
/*--------------------------------------------------------------------------------------------- | ||
* Copyright (C) 2024 Posit Software, PBC. All rights reserved. | ||
* Licensed under the Elastic License 2.0. See LICENSE.txt for license information. | ||
*--------------------------------------------------------------------------------------------*/ | ||
|
||
|
||
import { expect } from '@playwright/test'; | ||
import { Application, PositronPythonFixtures, PositronRFixtures } from '../../../../../automation'; | ||
import { setupAndStartApp } from '../../../test-runner/test-hooks'; | ||
import { join } from 'path'; | ||
|
||
|
||
describe('F1 Help #web #win', () => { | ||
setupAndStartApp(); | ||
|
||
describe('R F1 Help', () => { | ||
|
||
before(async function () { | ||
|
||
await PositronRFixtures.SetupFixtures(this.app as Application); | ||
}); | ||
|
||
it('R - Verifies basic F1 help functionality [C1018854]', async function () { | ||
|
||
const app = this.app as Application; | ||
|
||
await app.workbench.quickaccess.openFile(join(app.workspacePathOrFolder, 'workspaces', 'nyc-flights-data-r', 'flights-data-frame.r')); | ||
await app.workbench.quickaccess.runCommand('r.sourceCurrentFile'); | ||
|
||
await app.workbench.positronConsole.pasteCodeToConsole('colnames(df2)'); | ||
|
||
await app.workbench.positronConsole.doubleClickConsoleText('colnames'); | ||
|
||
await app.workbench.positronConsole.sendKeyboardKey('F1'); | ||
|
||
await expect(async () => { | ||
const helpFrame = await app.workbench.positronHelp.getHelpFrame(0); | ||
await expect(helpFrame.locator('body')).toContainText('Row and Column Names', { timeout: 30000 }); | ||
}).toPass({ timeout: 30000 }); | ||
|
||
}); | ||
}); | ||
}); | ||
|
||
describe('F1 Help #web #win #pr', () => { | ||
setupAndStartApp(); | ||
|
||
describe('Python F1 Help', () => { | ||
|
||
before(async function () { | ||
|
||
await PositronPythonFixtures.SetupFixtures(this.app as Application); | ||
}); | ||
|
||
it('Python - Verifies basic F1 help functionality [C1018854]', async function () { | ||
|
||
const app = this.app as Application; | ||
|
||
await app.workbench.quickaccess.openFile(join(app.workspacePathOrFolder, 'workspaces', 'nyc-flights-data-py', 'flights-data-frame.py')); | ||
await app.workbench.quickaccess.runCommand('python.execInConsole'); | ||
|
||
await app.workbench.positronConsole.pasteCodeToConsole('list(df.columns)'); | ||
|
||
await app.workbench.positronConsole.doubleClickConsoleText('list'); | ||
|
||
await app.workbench.positronConsole.sendKeyboardKey('F1'); | ||
|
||
await expect(async () => { | ||
const helpFrame = await app.workbench.positronHelp.getHelpFrame(0); | ||
await expect(helpFrame.locator('p').first()).toContainText('Built-in mutable sequence.', { timeout: 30000 }); | ||
}).toPass({ timeout: 30000 }); | ||
|
||
}); | ||
}); | ||
}); |