mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 04:49:35 +00:00
tests - try to make some tests more robust
This commit is contained in:
parent
8eedba6aed
commit
90443f7a8a
|
@ -740,16 +740,24 @@ suite('Async', () => {
|
|||
});
|
||||
|
||||
test('IntervalCounter', async () => {
|
||||
const counter = new async.IntervalCounter(1);
|
||||
let now = Date.now();
|
||||
|
||||
const counter = new async.IntervalCounter(5);
|
||||
|
||||
let ellapsed = Date.now() - now;
|
||||
if (ellapsed > 4) {
|
||||
return; // flaky (https://github.com/microsoft/vscode/issues/114028)
|
||||
}
|
||||
|
||||
assert.strictEqual(counter.increment(), 1);
|
||||
assert.strictEqual(counter.increment(), 2);
|
||||
assert.strictEqual(counter.increment(), 3);
|
||||
|
||||
const now = Date.now();
|
||||
await async.timeout(5);
|
||||
const ellapsed = Date.now() - now;
|
||||
if (ellapsed < 1) {
|
||||
return; // Firefox in Playwright seems to have a flaky timeout implementation (https://github.com/microsoft/vscode/issues/114028)
|
||||
now = Date.now();
|
||||
await async.timeout(10);
|
||||
ellapsed = Date.now() - now;
|
||||
if (ellapsed < 5) {
|
||||
return; // flaky (https://github.com/microsoft/vscode/issues/114028)
|
||||
}
|
||||
|
||||
assert.strictEqual(counter.increment(), 1);
|
||||
|
|
|
@ -65,17 +65,6 @@ export function setup(opts: minimist.ParsedArgs) {
|
|||
await app.workbench.problems.waitForProblemsView();
|
||||
});
|
||||
|
||||
it(`verifies that 'Tweet us feedback' pop-up appears when clicking on 'Feedback' icon`, async function () {
|
||||
const app = this.app as Application;
|
||||
|
||||
if (app.quality === Quality.Dev) {
|
||||
return this.skip();
|
||||
}
|
||||
|
||||
await app.workbench.statusbar.clickOn(StatusBarElement.FEEDBACK_ICON);
|
||||
await app.code.waitForElement('.feedback-form');
|
||||
});
|
||||
|
||||
it(`checks if 'Go to Line' works if called from the status bar`, async function () {
|
||||
const app = this.app as Application;
|
||||
|
||||
|
@ -99,5 +88,16 @@ export function setup(opts: minimist.ParsedArgs) {
|
|||
|
||||
await app.workbench.statusbar.waitForEOL('CRLF');
|
||||
});
|
||||
|
||||
it(`verifies that 'Tweet us feedback' pop-up appears when clicking on 'Feedback' icon`, async function () {
|
||||
const app = this.app as Application;
|
||||
|
||||
if (app.quality === Quality.Dev) {
|
||||
return this.skip();
|
||||
}
|
||||
|
||||
await app.workbench.statusbar.clickOn(StatusBarElement.FEEDBACK_ICON);
|
||||
await app.code.waitForElement('.feedback-form');
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue