Skip to content

Commit

Permalink
UI test: open lib file before moving it.
Browse files Browse the repository at this point in the history
  • Loading branch information
toinehartman committed Dec 16, 2024
1 parent 28539c7 commit a65e980
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions rascal-vscode-extension/src/test/vscode-suite/ide.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,11 +196,13 @@ describe('IDE', function () {
const workspace = await explorer.getContent().getSection("test (Workspace)");
await workspace.expand();
await ide.openModule(TestWorkspace.libFile);
const libFileInTree = await driver.wait(async() => workspace.findItem("Lib.rsc"), Delays.normal, "Cannot find Lib.rsc");
const libFolderInTree = await driver.wait(async() => workspace.findItem("lib"), Delays.normal, "Cannot find lib folder");
const libFileInTree = await driver.wait(async() => workspace.findItem("Lib.rsc"), Delays.extremelySlow, "Cannot find Lib.rsc");
const libFolderInTree = await driver.wait(async() => workspace.findItem("lib"), Delays.extremelySlow, "Cannot find lib folder");

// Open the lib file before moving it, so we have the editor ready to inspect afterwards
const libFile = await ide.openModule(TestWorkspace.libFile);
await driver.actions().dragAndDrop(libFileInTree!, libFolderInTree).perform();

const libFile = await ide.openModule(path.join(newDir, "Lib.rsc"));
await driver.wait(async() => {
const text = await libFile.getText();
return text.indexOf("module lib::Lib") !== -1;
Expand Down

0 comments on commit a65e980

Please sign in to comment.