Skip to content

Commit 570d288

Browse files
committed
Revert "Artificially fail tests to test reporting."
This reverts commit 622cea0.
1 parent 49528ab commit 570d288

2 files changed

Lines changed: 26 additions & 8 deletions

File tree

.github/workflows/build.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
strategy:
5151
matrix:
5252
os: [ubicloud-standard-4, windows-latest, macos-latest]
53-
fail-fast: false
53+
fail-fast: true
5454
env:
5555
CODE_VERSION: "1.100.0"
5656
runs-on: ${{ matrix.os }}
@@ -96,7 +96,7 @@ jobs:
9696
DELAY_FACTOR: 10
9797
RASCAL_LSP_DEV_DEPLOY: true
9898
_JAVA_OPTIONS: '-Xmx5G'
99-
run: npx extest setup-and-run out/test/vscode-suite/dsl.test.js --storage uitests
99+
run: npx extest setup-and-run out/test/vscode-suite/*.test.js --storage uitests
100100

101101
- name: "UI test (mac)"
102102
shell: bash
@@ -106,7 +106,7 @@ jobs:
106106
DELAY_FACTOR: 15
107107
RASCAL_LSP_DEV_DEPLOY: true
108108
_JAVA_OPTIONS: '-Xmx5G'
109-
run: npx extest setup-and-run out/test/vscode-suite/dsl.test.js --storage uitests
109+
run: npx extest setup-and-run out/test/vscode-suite/*.test.js --storage uitests
110110

111111
- name: "UI test (ubuntu)"
112112
shell: bash
@@ -118,7 +118,7 @@ jobs:
118118
_JAVA_OPTIONS: '-Xmx5G' # we have 16gb of memory, make sure LSP, REPL & DSL-LSP can start
119119
run: |
120120
sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0 # workaround for issue with Ubuntu 24.04 https://github.com/redhat-developer/vscode-extension-tester/blob/main/KNOWN_ISSUES.md#openresources-not-working-with-apparmor-2404
121-
xvfb-run --auto-servernum --server-args='-screen 0 1920x1080x24' npx extest setup-and-run out/test/vscode-suite/dsl.test.js --storage uitests
121+
xvfb-run --auto-servernum --server-args='-screen 0 1920x1080x24' npx extest setup-and-run out/test/vscode-suite/*.test.js --storage uitests
122122
123123
- name: Upload Screenshots
124124
uses: actions/upload-artifact@v7

rascal-vscode-extension/src/test/vscode-suite/dsl.test.ts

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ import { expect } from 'chai';
3232
import * as fs from 'fs/promises';
3333
import { Suite } from 'mocha';
3434
import * as path from 'path/posix';
35-
import { fail } from 'assert';
3635

3736
function parameterizedDescribe(body: (this: Suite, errorRecovery: boolean) => void) {
3837
describe('DSL', function() { body.apply(this, [false]); });
@@ -104,9 +103,28 @@ parameterizedDescribe(function (errorRecovery: boolean) {
104103
await protectedFiles.restore();
105104
});
106105

107-
it.only("has highlighting and parse errors", async function () {
108-
fail("Artificial failure");
109-
});
106+
it("has highlighting and parse errors", async function () {
107+
await ignoreFails(new Workbench().getEditorView().closeAllEditors());
108+
const editor = await ide.openModule(TestWorkspace.picoFile);
109+
const isPicoLoading = ide.statusContains("Pico");
110+
// we might miss this event, but we wait for it to show up
111+
await ignoreFails(driver.wait(isPicoLoading, Delays.normal, "Pico parser generator should have started"));
112+
// now wait for the Pico parser generator to disappear
113+
await driver.wait(async () => !(await isPicoLoading()), Delays.verySlow, "Pico parser generator should have finished", 100);
114+
await ide.hasSyntaxHighlighting(editor, Delays.slow);
115+
console.log("We got syntax highlighting");
116+
try {
117+
await editor.setTextAtLine(10, "b := ;");
118+
await ide.hasErrorSquiggly(editor, Delays.slow);
119+
} catch (e) {
120+
console.log(`Failed to trigger parse error: ${e}`);
121+
if (e instanceof Error) {
122+
console.log(e.stack);
123+
}
124+
} finally {
125+
await ide.revertOpenChanges();
126+
}
127+
}).retries(2);
110128

111129
it("has highlighting and parse errors for second extension", async function () {
112130
const editor = await ide.openModule(TestWorkspace.picoNewFile);

0 commit comments

Comments
 (0)