Skip to content

Commit

Permalink
Hide sidebars as needed
Browse files Browse the repository at this point in the history
  • Loading branch information
jonvanausdeln committed Sep 27, 2024
1 parent 12e48a7 commit de856c2
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/smoke/src/areas/positron/dataexplorer/dataexplorer.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,10 @@ df2 = pd.DataFrame(data)`;
await app.code.driver.getLocator('.label-name:has-text("Data: df2")').innerText();
}).toPass();

// Need to make sure the data explorer is visible before we can interact with it
await app.workbench.positronSideBar.closeSecondarySideBar();
await app.workbench.quickaccess.runCommand('workbench.action.closePanel');
await app.workbench.quickaccess.runCommand('workbench.action.toggleSidebarVisibility');

await expect(async () => {
const tableData = await app.workbench.positronDataExplorer.getDataExplorerTableData();
Expand All @@ -114,6 +116,7 @@ df2 = pd.DataFrame(data)`;
}).toPass({ timeout: 60000 });

await app.workbench.quickaccess.runCommand('workbench.action.restorePanel');
await app.workbench.quickaccess.runCommand('workbench.action.toggleSidebarVisibility');

});
it('Python Pandas - Verifies data explorer column info functionality [C734263] #pr', async function () {
Expand Down Expand Up @@ -251,6 +254,7 @@ df2 = pd.DataFrame(data)`;
}).toPass({ timeout: 60000 });

});
//This tests rely on the previous test, so must be run together
it('Python Polars - Verifies basic data explorer column info functionality [C734264] #pr', async function () {

const app = this.app as Application;
Expand All @@ -263,6 +267,7 @@ df2 = pd.DataFrame(data)`;
expect(await app.workbench.positronDataExplorer.getColumnMissingPercent(6)).toBe('33%');

await app.workbench.positronLayouts.enterLayout('notebook');
await app.workbench.quickaccess.runCommand('workbench.action.toggleSidebarVisibility');

const col1ProfileInfo = await app.workbench.positronDataExplorer.getColumnProfileInfo(1);
expect(col1ProfileInfo).toStrictEqual({ 'Missing': '0', 'Min': '1.00', 'Median': '2.00', 'Mean': '2.00', 'Max': '3.00', 'SD': '1.00' });
Expand Down Expand Up @@ -369,6 +374,8 @@ df2 = pd.DataFrame(data)`;
}).toPass();

await app.workbench.positronSideBar.closeSecondarySideBar();
await app.workbench.quickaccess.runCommand('workbench.action.closePanel');
await app.workbench.quickaccess.runCommand('workbench.action.toggleSidebarVisibility');

await expect(async () => {
const tableData = await app.workbench.positronDataExplorer.getDataExplorerTableData();
Expand All @@ -379,6 +386,9 @@ df2 = pd.DataFrame(data)`;
expect(tableData.length).toBe(3);
}).toPass({ timeout: 60000 });

await app.workbench.quickaccess.runCommand('workbench.action.restorePanel');
await app.workbench.quickaccess.runCommand('workbench.action.toggleSidebarVisibility');


});
it('R - Verifies basic data explorer column info functionality [C734265] #pr', async function () {
Expand Down

0 comments on commit de856c2

Please sign in to comment.