Skip to content

Commit

Permalink
Reenable rmarkdown render test once quarto cli is installed (#4754)
Browse files Browse the repository at this point in the history
Fixing RMarkdown render test with installation of the Quarto CLI.

Will also add a quarto test once this is resolved (in another PR).

Also some minor changes to shiny test for reliability.
Also re-adding a test skip which led to integration test failures.
Also skipping extra data explorer perf test in CI (we have coverage with
the one that pulls from AWS).

### QA Notes

All smoke tests should pass
  • Loading branch information
testlabauto authored Sep 19, 2024
1 parent 6f0875d commit 7441392
Show file tree
Hide file tree
Showing 6 changed files with 74 additions and 51 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/positron-full-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,13 @@ jobs:
role-to-assume: ${{ secrets.QA_AWS_RO_ROLE }}
aws-region: ${{ secrets.QA_AWS_REGION }}

- name: Install Quarto CLI
run: |
TEMP_DEB="$(mktemp)" &&
wget -O "$TEMP_DEB" 'https://github.com/quarto-dev/quarto-cli/releases/download/v1.5.57/quarto-1.5.57-linux-amd64.deb' &&
sudo dpkg -i "$TEMP_DEB"
rm -f "$TEMP_DEB"
- name: Cache node_modules, build, extensions, and remote
uses: ./.github/actions/cache-multi-paths

Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/positron-merge-to-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,13 @@ jobs:
role-to-assume: ${{ secrets.QA_AWS_RO_ROLE }}
aws-region: ${{ secrets.QA_AWS_REGION }}

- name: Install Quarto CLI
run: |
TEMP_DEB="$(mktemp)" &&
wget -O "$TEMP_DEB" 'https://github.com/quarto-dev/quarto-cli/releases/download/v1.5.57/quarto-1.5.57-linux-amd64.deb' &&
sudo dpkg -i "$TEMP_DEB"
rm -f "$TEMP_DEB"
- name: Cache node_modules, build, extensions, and remote
uses: ./.github/actions/cache-multi-paths

Expand Down
11 changes: 11 additions & 0 deletions extensions/positron-r/src/test/indentation.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,17 @@ suite('Indentation', () => {
// run, a failure is emitted. You can either commit the new output or discard
// it if that's a bug to fix.
test('Regenerate and check', async () => {
// ** TODO **
//
// This test currently causes the entire test suite to be unexpectedly
// terminated. It's disabled on CI until we can figure out why.
//
// We use the `POSITRON_BUILD_NUMBER` environment variable to detect if
// we are running on CI; this is always set by the CI environment.
if (env['POSITRON_BUILD_NUMBER']) {
return;
}

await init();

// There doesn't seem to be a method that resolves when a language is
Expand Down
8 changes: 2 additions & 6 deletions test/smoke/src/areas/positron/apps/shiny.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,7 @@ export function setup(logger: Logger) {

const headerLocator = app.workbench.positronViewer.getViewerLocator('h1');

const headerText = await headerLocator.innerText({ timeout: 30000 });

expect(headerText).toBe('Restaurant tipping');
await expect(headerLocator).toHaveText('Restaurant tipping', { timeout: 20000 });

await app.workbench.positronTerminal.sendKeysToTerminal('Control+C');

Expand Down Expand Up @@ -69,9 +67,7 @@ runExample("01_hello")`;

const headerLocator = app.workbench.positronViewer.getViewerLocator('h1');

const headerText = await headerLocator.innerText({ timeout: 30000 });

expect(headerText).toBe('Hello Shiny!');
await expect(headerLocator).toHaveText('Hello Shiny!', { timeout: 20000 });

await app.workbench.positronConsole.activeConsole.click();
await app.workbench.positronConsole.sendKeyboardKey('Control+C');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,37 +93,38 @@ export function setup(logger: Logger) {
}

});
}
} else {

it('Python - Verifies data explorer functionality with very large duplicated data dataframe [C807824]', async function () {
const app = this.app as Application;
await app.workbench.quickaccess.openFile(join(app.workspacePathOrFolder, 'workspaces', 'performance', 'multiplyParquet.py'));
it('Python - Verifies data explorer functionality with very large duplicated data dataframe [C807824]', async function () {
const app = this.app as Application;
await app.workbench.quickaccess.openFile(join(app.workspacePathOrFolder, 'workspaces', 'performance', 'multiplyParquet.py'));

await app.workbench.quickaccess.runCommand('python.execInConsole');
await app.workbench.quickaccess.runCommand('python.execInConsole');

const startTime = performance.now();
const startTime = performance.now();

logger.log('Opening data grid');
await expect(async () => {
await app.workbench.positronVariables.doubleClickVariableRow('df_large');
await app.code.driver.getLocator('.label-name:has-text("Data: df_large")').innerText();
}).toPass();
logger.log('Opening data grid');
await expect(async () => {
await app.workbench.positronVariables.doubleClickVariableRow('df_large');
await app.code.driver.getLocator('.label-name:has-text("Data: df_large")').innerText();
}).toPass();

await app.workbench.positronSideBar.closeSecondarySideBar();
await app.workbench.positronSideBar.closeSecondarySideBar();

// awaits table load completion
await app.workbench.positronDataExplorer.getDataExplorerTableData();
// awaits table load completion
await app.workbench.positronDataExplorer.getDataExplorerTableData();

const endTime = performance.now();
const endTime = performance.now();

const timeTaken = endTime - startTime;
const timeTaken = endTime - startTime;

if (timeTaken > 4500) {
fail(`Opening large duplicated parquet took ${timeTaken} milliseconds (pandas)`);
} else {
logger.log(`Opening large duplicated parquet took ${timeTaken} milliseconds (pandas)`);
}
});
if (timeTaken > 4500) {
fail(`Opening large duplicated parquet took ${timeTaken} milliseconds (pandas)`);
} else {
logger.log(`Opening large duplicated parquet took ${timeTaken} milliseconds (pandas)`);
}
});
}
});

describe('R Data Explorer (Very Large Data Frame)', () => {
Expand Down Expand Up @@ -173,37 +174,38 @@ export function setup(logger: Logger) {
logger.log(`Opening large unique parquet took ${timeTaken} milliseconds (R)`);
}
});
}
} else {

it('R - Verifies data explorer functionality with very large duplicated data dataframe [C807825]', async function () {
const app = this.app as Application;
await app.workbench.quickaccess.openFile(join(app.workspacePathOrFolder, 'workspaces', 'performance', 'multiplyParquet.r'));
it('R - Verifies data explorer functionality with very large duplicated data dataframe [C807825]', async function () {
const app = this.app as Application;
await app.workbench.quickaccess.openFile(join(app.workspacePathOrFolder, 'workspaces', 'performance', 'multiplyParquet.r'));

await app.workbench.quickaccess.runCommand('r.sourceCurrentFile');
await app.workbench.quickaccess.runCommand('r.sourceCurrentFile');

const startTime = performance.now();
const startTime = performance.now();

logger.log('Opening data grid');
await expect(async () => {
await app.workbench.positronVariables.doubleClickVariableRow('df3_large');
await app.code.driver.getLocator('.label-name:has-text("Data: df3_large")').innerText();
}).toPass();
logger.log('Opening data grid');
await expect(async () => {
await app.workbench.positronVariables.doubleClickVariableRow('df3_large');
await app.code.driver.getLocator('.label-name:has-text("Data: df3_large")').innerText();
}).toPass();

await app.workbench.positronSideBar.closeSecondarySideBar();
await app.workbench.positronSideBar.closeSecondarySideBar();

// awaits table load completion
await app.workbench.positronDataExplorer.getDataExplorerTableData();
// awaits table load completion
await app.workbench.positronDataExplorer.getDataExplorerTableData();

const endTime = performance.now();
const endTime = performance.now();

const timeTaken = endTime - startTime;
const timeTaken = endTime - startTime;

if (timeTaken > 10200) {
fail(`Opening large dupliacted parquet took ${timeTaken} milliseconds (R)`);
} else {
logger.log(`Opening large duplicated parquet took ${timeTaken} milliseconds (R)`);
}
});
if (timeTaken > 10200) {
fail(`Opening large dupliacted parquet took ${timeTaken} milliseconds (R)`);
} else {
logger.log(`Opening large duplicated parquet took ${timeTaken} milliseconds (R)`);
}
});
}
});
});
}
2 changes: 1 addition & 1 deletion test/smoke/src/areas/positron/rmarkdown/rmarkdown.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export function setup(logger: Logger) {

// test depends on the previous test
// skipping this test for now. need to determine what to do about the dialog that is appearing in CI
it.skip('Preview RMarkdown [C709147]', async function () {
it('Preview RMarkdown [C709147]', async function () {
const app = this.app as Application; //Get handle to application

// Preview
Expand Down

0 comments on commit 7441392

Please sign in to comment.