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 5491327
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ public CompletableFuture<ITuple> getModuleRenames(List<FileRename> fileRenames,
throw new RuntimeException(e.getMessage());
}
}, emptyResult, exec, false, client).get();
});
});
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
import java.util.stream.Collectors;
import java.util.stream.Stream;

import org.apache.logging.log4j.Level;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
Expand Down
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 5491327

Please sign in to comment.