Skip to content

Commit

Permalink
Try to improve error message by isolating tableData variables
Browse files Browse the repository at this point in the history
  • Loading branch information
dfalbel committed Sep 10, 2024
1 parent 5888388 commit 6b5c206
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,8 @@ df2 = pd.DataFrame(data)`;

await app.workbench.positronLayouts.enterLayout('notebook');

let tableData;
await expect(async () => {
tableData = await app.workbench.positronDataExplorer.getDataExplorerTableData();
const tableData = await app.workbench.positronDataExplorer.getDataExplorerTableData();
expect(tableData.length).toBe(11);
}).toPass({ timeout: 60000 });

Expand All @@ -182,7 +181,7 @@ df2 = pd.DataFrame(data)`;
await app.code.driver.getLocator('.label-name:has-text("Data: df")').click();

await expect(async () => {
tableData = await app.workbench.positronDataExplorer.getDataExplorerTableData();
const tableData = await app.workbench.positronDataExplorer.getDataExplorerTableData();
expect(tableData.length).toBe(12);
}).toPass({ timeout: 60000 });

Expand All @@ -193,7 +192,7 @@ df2 = pd.DataFrame(data)`;
await app.workbench.positronDataExplorer.selectColumnMenuItem(1, 'Sort Descending');

await expect(async () => {
tableData = await app.workbench.positronDataExplorer.getDataExplorerTableData();
const tableData = await app.workbench.positronDataExplorer.getDataExplorerTableData();
expect(tableData[0]).toStrictEqual({ 'Year': '2025' });
expect(tableData.length).toBe(12);
}).toPass({ timeout: 60000 });
Expand Down

0 comments on commit 6b5c206

Please sign in to comment.