@eclipse-che/che-e2e 7.39.0 → 7.40.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/pageobjects/ide/Editor.ts +25 -24
- package/tests/e2e_happy_path/DevWorkspaceHappyPath.spec.ts +3 -3
- package/tests/e2e_happy_path/HappyPath.spec.ts +3 -3
- package/tests/plugins/JavaPlugin.spec.ts +2 -2
- package/tests/plugins/PhpPlugin.spec.ts +2 -2
- package/tests/plugins/PythonPlugin.spec.ts +2 -2
- package/tests/plugins/TypescriptPlugin.spec.ts +2 -2
- package/tests/plugins/VscodeShellcheckPlugin.spec.ts +4 -4
- package/tests/plugins/VscodeValePlugin.spec.ts +1 -1
- package/tests/plugins/VscodeXmlPlugin.spec.ts +2 -2
- package/tests/plugins/VscodeYamlPlugin.spec.ts +2 -2
- package/testsLibrary/LanguageServerTests.ts +2 -2
- package/utils/DriverHelper.ts +10 -10
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eclipse-che/che-e2e",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.40.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"@types/node": "11.13.4",
|
|
38
38
|
"@types/rimraf": "2.0.2",
|
|
39
39
|
"@types/selenium-webdriver": "3.0.16",
|
|
40
|
-
"axios": "0.21.
|
|
40
|
+
"axios": "0.21.2",
|
|
41
41
|
"chai": "4.2.0",
|
|
42
42
|
"chromedriver": "95.0.0",
|
|
43
43
|
"mocha": "7.1.1",
|
|
@@ -325,38 +325,38 @@ export class Editor {
|
|
|
325
325
|
await this.performKeyCombination(editorTabTitle, text);
|
|
326
326
|
}
|
|
327
327
|
|
|
328
|
-
async waitErrorInLine(lineNumber: number, timeout: number = TimeoutConstants.TS_ERROR_HIGHLIGHTING_TIMEOUT) {
|
|
328
|
+
async waitErrorInLine(lineNumber: number, fileName: string, timeout: number = TimeoutConstants.TS_ERROR_HIGHLIGHTING_TIMEOUT) {
|
|
329
329
|
Logger.debug(`Editor.waitErrorInLine line: "${lineNumber}"`);
|
|
330
330
|
|
|
331
|
-
const errorInLineLocator: By = await this.getErrorInLineLocator(lineNumber);
|
|
331
|
+
const errorInLineLocator: By = await this.getErrorInLineLocator(lineNumber, fileName);
|
|
332
332
|
await this.driverHelper.waitVisibility(errorInLineLocator, timeout);
|
|
333
333
|
}
|
|
334
334
|
|
|
335
|
-
async waitErrorInLineDisappearance(lineNumber: number, timeout: number = TimeoutConstants.TS_ERROR_HIGHLIGHTING_TIMEOUT) {
|
|
335
|
+
async waitErrorInLineDisappearance(lineNumber: number, fileName: string, timeout: number = TimeoutConstants.TS_ERROR_HIGHLIGHTING_TIMEOUT) {
|
|
336
336
|
Logger.debug(`Editor.waitErrorInLineDisappearance line: "${lineNumber}"`);
|
|
337
337
|
|
|
338
|
-
const errorInLineLocator: By = await this.getErrorInLineLocator(lineNumber);
|
|
338
|
+
const errorInLineLocator: By = await this.getErrorInLineLocator(lineNumber, fileName);
|
|
339
339
|
await this.driverHelper.waitDisappearanceWithTimeout(errorInLineLocator, timeout);
|
|
340
340
|
}
|
|
341
341
|
|
|
342
|
-
async waitWarningInLine(lineNumber: number, timeout: number = TimeoutConstants.TS_ERROR_HIGHLIGHTING_TIMEOUT) {
|
|
342
|
+
async waitWarningInLine(lineNumber: number, fileName: string, timeout: number = TimeoutConstants.TS_ERROR_HIGHLIGHTING_TIMEOUT) {
|
|
343
343
|
Logger.debug(`Editor.waitWarningInLine line: "${lineNumber}"`);
|
|
344
344
|
|
|
345
|
-
const warningInLineLocator: By = await this.getWarningInLineLocator(lineNumber);
|
|
345
|
+
const warningInLineLocator: By = await this.getWarningInLineLocator(lineNumber, fileName);
|
|
346
346
|
await this.driverHelper.waitVisibility(warningInLineLocator, timeout);
|
|
347
347
|
}
|
|
348
348
|
|
|
349
|
-
async waitInfoInLine(lineNumber: number, timeout: number = TimeoutConstants.TS_ERROR_HIGHLIGHTING_TIMEOUT) {
|
|
349
|
+
async waitInfoInLine(lineNumber: number, fileName: string, timeout: number = TimeoutConstants.TS_ERROR_HIGHLIGHTING_TIMEOUT) {
|
|
350
350
|
Logger.debug(`Editor.waitInfoInLine line: "${lineNumber}"`);
|
|
351
351
|
|
|
352
|
-
const infoInLineLocator: By = await this.getInfoInLineLocator(lineNumber);
|
|
352
|
+
const infoInLineLocator: By = await this.getInfoInLineLocator(lineNumber, fileName);
|
|
353
353
|
await this.driverHelper.waitVisibility(infoInLineLocator, timeout);
|
|
354
354
|
}
|
|
355
355
|
|
|
356
|
-
async waitWarningInLineDisappearance(lineNumber: number, timeout: number = TimeoutConstants.TS_ERROR_HIGHLIGHTING_TIMEOUT) {
|
|
356
|
+
async waitWarningInLineDisappearance(lineNumber: number, fileName: string, timeout: number = TimeoutConstants.TS_ERROR_HIGHLIGHTING_TIMEOUT) {
|
|
357
357
|
Logger.debug(`Editor.waitWarningInLineDisappearance line: "${lineNumber}"`);
|
|
358
358
|
|
|
359
|
-
const warningInLineLocator: By = await this.getWarningInLineLocator(lineNumber);
|
|
359
|
+
const warningInLineLocator: By = await this.getWarningInLineLocator(lineNumber, fileName);
|
|
360
360
|
await this.driverHelper.waitDisappearanceWithTimeout(warningInLineLocator, timeout);
|
|
361
361
|
}
|
|
362
362
|
|
|
@@ -405,10 +405,11 @@ export class Editor {
|
|
|
405
405
|
}
|
|
406
406
|
}
|
|
407
407
|
|
|
408
|
-
async getLineYCoordinates(lineNumber: number): Promise<number> {
|
|
408
|
+
async getLineYCoordinates(lineNumber: number, fileName: string): Promise<number> {
|
|
409
409
|
Logger.debug(`Editor.getLineYCoordinates line: "${lineNumber}"`);
|
|
410
410
|
|
|
411
|
-
const lineNumberLocator: By = By.xpath(`//div[contains(@
|
|
411
|
+
const lineNumberLocator: By = By.xpath(`//div[contains(@data-uri, '${fileName}')]` +
|
|
412
|
+
`//div[contains(@class, 'line-numbers') and text()='${lineNumber}']` +
|
|
412
413
|
`//parent::div[contains(@style, 'position')]`);
|
|
413
414
|
let elementStyleValue: string = await this.driverHelper.waitAndGetElementAttribute(lineNumberLocator, 'style', TimeoutConstants.TS_SELENIUM_CLICK_ON_VISIBLE_ITEM);
|
|
414
415
|
|
|
@@ -422,10 +423,10 @@ export class Editor {
|
|
|
422
423
|
return lineYCoordinate;
|
|
423
424
|
}
|
|
424
425
|
|
|
425
|
-
async clickOnLineAndChar(line: number, char: number) {
|
|
426
|
+
async clickOnLineAndChar(line: number, char: number, fileName: string) {
|
|
426
427
|
Logger.debug(`Editor.clickOnLineAndChar line: "${line}" char: "${char}"`);
|
|
427
428
|
|
|
428
|
-
const yPosition: number = await this.getLineYCoordinates(line) + Editor.ADDITIONAL_SHIFTING_TO_Y;
|
|
429
|
+
const yPosition: number = await this.getLineYCoordinates(line, fileName) + Editor.ADDITIONAL_SHIFTING_TO_Y;
|
|
429
430
|
const xPosition: number = char + Editor.ADDITIONAL_SHIFTING_TO_X;
|
|
430
431
|
|
|
431
432
|
new ActionSequence(this.driverHelper.getDriver()).
|
|
@@ -434,10 +435,10 @@ export class Editor {
|
|
|
434
435
|
perform();
|
|
435
436
|
}
|
|
436
437
|
|
|
437
|
-
async goToDefinitionWithMouseClicking(line: number, char: number) {
|
|
438
|
+
async goToDefinitionWithMouseClicking(line: number, char: number, fileName: string) {
|
|
438
439
|
Logger.debug(`Editor.goToDefinitionWithMouseClicking line: "${line}" char: "${char}"`);
|
|
439
440
|
|
|
440
|
-
const yPosition: number = await this.getLineYCoordinates(line) + Editor.ADDITIONAL_SHIFTING_TO_Y;
|
|
441
|
+
const yPosition: number = await this.getLineYCoordinates(line, fileName) + Editor.ADDITIONAL_SHIFTING_TO_Y;
|
|
441
442
|
|
|
442
443
|
new ActionSequence(this.driverHelper.getDriver()).
|
|
443
444
|
keyDown(Key.CONTROL).
|
|
@@ -447,10 +448,10 @@ export class Editor {
|
|
|
447
448
|
perform();
|
|
448
449
|
}
|
|
449
450
|
|
|
450
|
-
async mouseRightButtonClick(line: number, char: number) {
|
|
451
|
+
async mouseRightButtonClick(line: number, char: number, fileName: string) {
|
|
451
452
|
Logger.debug(`Editor.mouseRightButtonClick line: "${line}" char: "${char}"`);
|
|
452
453
|
|
|
453
|
-
const yPosition: number = await this.getLineYCoordinates(line) + Editor.ADDITIONAL_SHIFTING_TO_Y;
|
|
454
|
+
const yPosition: number = await this.getLineYCoordinates(line, fileName) + Editor.ADDITIONAL_SHIFTING_TO_Y;
|
|
454
455
|
|
|
455
456
|
new ActionSequence(this.driverHelper.getDriver()).
|
|
456
457
|
mouseMove({ x: char + Editor.ADDITIONAL_SHIFTING_TO_X, y: yPosition }).
|
|
@@ -503,20 +504,20 @@ export class Editor {
|
|
|
503
504
|
return `//li[contains(@class, 'p-TabBar-tab')]//div[text()='${tabTitle}']`;
|
|
504
505
|
}
|
|
505
506
|
|
|
506
|
-
private async getErrorInLineLocator(lineNumber: number): Promise<By> {
|
|
507
|
-
const lineYCoordinates: number = await this.getLineYCoordinates(lineNumber);
|
|
507
|
+
private async getErrorInLineLocator(lineNumber: number, fileName: string): Promise<By> {
|
|
508
|
+
const lineYCoordinates: number = await this.getLineYCoordinates(lineNumber, fileName);
|
|
508
509
|
|
|
509
510
|
return By.xpath(`//div[contains(@style, 'top:${lineYCoordinates}px')]//div[contains(@class, 'squiggly-error')]`);
|
|
510
511
|
}
|
|
511
512
|
|
|
512
|
-
private async getWarningInLineLocator(lineNumber: number): Promise<By> {
|
|
513
|
-
const lineYCoordinates: number = await this.getLineYCoordinates(lineNumber);
|
|
513
|
+
private async getWarningInLineLocator(lineNumber: number, fileName: string): Promise<By> {
|
|
514
|
+
const lineYCoordinates: number = await this.getLineYCoordinates(lineNumber, fileName);
|
|
514
515
|
|
|
515
516
|
return By.xpath(`//div[contains(@style, 'top:${lineYCoordinates}px')]//div[contains(@class, 'squiggly-warning')]`);
|
|
516
517
|
}
|
|
517
518
|
|
|
518
|
-
private async getInfoInLineLocator(lineNumber: number): Promise<By> {
|
|
519
|
-
const lineYCoordinates: number = await this.getLineYCoordinates(lineNumber);
|
|
519
|
+
private async getInfoInLineLocator(lineNumber: number, fileName: string): Promise<By> {
|
|
520
|
+
const lineYCoordinates: number = await this.getLineYCoordinates(lineNumber, fileName);
|
|
520
521
|
|
|
521
522
|
return By.xpath(`//div[contains(@style, 'top:${lineYCoordinates}px')]//div[contains(@class, 'squiggly-info')]`);
|
|
522
523
|
}
|
|
@@ -109,16 +109,16 @@ suite('Workspace creation via factory url', async () => {
|
|
|
109
109
|
await editor.type(javaFileName, textForErrorDisplaying, 30);
|
|
110
110
|
|
|
111
111
|
try {
|
|
112
|
-
await editor.waitErrorInLine(30, TimeoutConstants.TS_ERROR_HIGHLIGHTING_TIMEOUT);
|
|
112
|
+
await editor.waitErrorInLine(30, javaFileName, TimeoutConstants.TS_ERROR_HIGHLIGHTING_TIMEOUT);
|
|
113
113
|
} catch (err) {
|
|
114
114
|
Logger.debug('Workaround for the https://github.com/eclipse/che/issues/18974.');
|
|
115
115
|
await browserTabsUtil.refreshPage();
|
|
116
116
|
await ide.waitAndSwitchToIdeFrame();
|
|
117
117
|
await ide.waitIde();
|
|
118
|
-
await editor.waitErrorInLine(30, TimeoutConstants.TS_ERROR_HIGHLIGHTING_TIMEOUT * 2);
|
|
118
|
+
await editor.waitErrorInLine(30, javaFileName, TimeoutConstants.TS_ERROR_HIGHLIGHTING_TIMEOUT * 2);
|
|
119
119
|
}
|
|
120
120
|
await editor.performKeyCombination(javaFileName, Key.chord(Key.BACK_SPACE));
|
|
121
|
-
await editor.waitErrorInLineDisappearance(30);
|
|
121
|
+
await editor.waitErrorInLineDisappearance(30, javaFileName);
|
|
122
122
|
});
|
|
123
123
|
|
|
124
124
|
test('Suggestion', async () => {
|
|
@@ -122,17 +122,17 @@ suite('Language server validation', async () => {
|
|
|
122
122
|
await editor.type(javaFileName, textForErrorDisplaying, 30);
|
|
123
123
|
|
|
124
124
|
try {
|
|
125
|
-
await editor.waitErrorInLine(30, TimeoutConstants.TS_ERROR_HIGHLIGHTING_TIMEOUT);
|
|
125
|
+
await editor.waitErrorInLine(30, javaFileName, TimeoutConstants.TS_ERROR_HIGHLIGHTING_TIMEOUT);
|
|
126
126
|
} catch (err) {
|
|
127
127
|
Logger.debug('Workaround for the https://github.com/eclipse/che/issues/18974.');
|
|
128
128
|
await browserTabsUtil.refreshPage();
|
|
129
129
|
await ide.waitAndSwitchToIdeFrame();
|
|
130
130
|
await ide.waitIde();
|
|
131
|
-
await editor.waitErrorInLine(30, TimeoutConstants.TS_ERROR_HIGHLIGHTING_TIMEOUT * 2);
|
|
131
|
+
await editor.waitErrorInLine(30, javaFileName, TimeoutConstants.TS_ERROR_HIGHLIGHTING_TIMEOUT * 2);
|
|
132
132
|
}
|
|
133
133
|
|
|
134
134
|
await editor.performKeyCombination(javaFileName, Key.chord(Key.BACK_SPACE));
|
|
135
|
-
await editor.waitErrorInLineDisappearance(30);
|
|
135
|
+
await editor.waitErrorInLineDisappearance(30, javaFileName);
|
|
136
136
|
});
|
|
137
137
|
|
|
138
138
|
test('Suggestion', async () => {
|
|
@@ -81,9 +81,9 @@ suite(`The 'JavaPlugin' test`, async () => {
|
|
|
81
81
|
test('Error highlighting', async () => {
|
|
82
82
|
const textForErrorDisplaying: string = '$';
|
|
83
83
|
await editor.type(tabTitle, textForErrorDisplaying, 10);
|
|
84
|
-
await editor.waitErrorInLine(10, TimeoutConstants.TS_ERROR_HIGHLIGHTING_TIMEOUT);
|
|
84
|
+
await editor.waitErrorInLine(10, tabTitle, TimeoutConstants.TS_ERROR_HIGHLIGHTING_TIMEOUT);
|
|
85
85
|
await editor.performKeyCombination(tabTitle, Key.chord(Key.BACK_SPACE));
|
|
86
|
-
await editor.waitErrorInLineDisappearance(10);
|
|
86
|
+
await editor.waitErrorInLineDisappearance(10, tabTitle);
|
|
87
87
|
});
|
|
88
88
|
|
|
89
89
|
test('Codenavigation', async () => {
|
|
@@ -77,9 +77,9 @@ suite(`The 'PhpPlugin' tests`, async () => {
|
|
|
77
77
|
test('Error highlighting', async () => {
|
|
78
78
|
const textForErrorDisplaying: string = '*';
|
|
79
79
|
await editor.type(tabTitle, textForErrorDisplaying, 13);
|
|
80
|
-
await editor.waitErrorInLine(13, TimeoutConstants.TS_ERROR_HIGHLIGHTING_TIMEOUT);
|
|
80
|
+
await editor.waitErrorInLine(13, tabTitle, TimeoutConstants.TS_ERROR_HIGHLIGHTING_TIMEOUT);
|
|
81
81
|
await editor.type(tabTitle, Key.chord(Key.DELETE), 13);
|
|
82
|
-
await editor.waitErrorInLineDisappearance(13);
|
|
82
|
+
await editor.waitErrorInLineDisappearance(13, tabTitle);
|
|
83
83
|
});
|
|
84
84
|
});
|
|
85
85
|
|
|
@@ -73,9 +73,9 @@ suite(`The 'PythonPlugin' test`, async () => {
|
|
|
73
73
|
test('Error highlighting', async () => {
|
|
74
74
|
const textForErrorDisplaying: string = 'err';
|
|
75
75
|
await editor.type(tabTitle, textForErrorDisplaying, 7);
|
|
76
|
-
await editor.waitErrorInLine(7, TimeoutConstants.TS_ERROR_HIGHLIGHTING_TIMEOUT);
|
|
76
|
+
await editor.waitErrorInLine(7, tabTitle, TimeoutConstants.TS_ERROR_HIGHLIGHTING_TIMEOUT);
|
|
77
77
|
await editor.performKeyCombination(tabTitle, Key.chord(Key.BACK_SPACE, Key.BACK_SPACE, Key.BACK_SPACE));
|
|
78
|
-
await editor.waitErrorInLineDisappearance(7);
|
|
78
|
+
await editor.waitErrorInLineDisappearance(7, tabTitle);
|
|
79
79
|
});
|
|
80
80
|
});
|
|
81
81
|
|
|
@@ -90,9 +90,9 @@ suite(`The 'TypescriptPlugin and Node-debug' tests`, async () => {
|
|
|
90
90
|
test('Error highlighting', async () => {
|
|
91
91
|
const textForErrorDisplaying: string = '//';
|
|
92
92
|
await editor.type(tabTitle, textForErrorDisplaying, 5);
|
|
93
|
-
await editor.waitErrorInLine(4, TimeoutConstants.TS_ERROR_HIGHLIGHTING_TIMEOUT);
|
|
93
|
+
await editor.waitErrorInLine(4, tabTitle, TimeoutConstants.TS_ERROR_HIGHLIGHTING_TIMEOUT);
|
|
94
94
|
await editor.type(tabTitle, Key.chord(Key.DELETE, Key.DELETE), 5);
|
|
95
|
-
await editor.waitErrorInLineDisappearance(4);
|
|
95
|
+
await editor.waitErrorInLineDisappearance(4, tabTitle);
|
|
96
96
|
});
|
|
97
97
|
|
|
98
98
|
test('Codenavigation', async () => {
|
|
@@ -72,16 +72,16 @@ suite(`The 'VscodeShellcheckPlugin' test`, async () => {
|
|
|
72
72
|
|
|
73
73
|
await projectTree.expandPathAndOpenFile(pathToFile, fileName);
|
|
74
74
|
await editor.type(fileName, errorText, 4);
|
|
75
|
-
await editor.waitErrorInLine(4);
|
|
75
|
+
await editor.waitErrorInLine(4, fileName);
|
|
76
76
|
});
|
|
77
77
|
|
|
78
78
|
test('Check errors highlighting disappearance', async () => {
|
|
79
79
|
await editor.type(fileName, Key.DELETE, 4);
|
|
80
|
-
await editor.waitErrorInLineDisappearance(4);
|
|
80
|
+
await editor.waitErrorInLineDisappearance(4, fileName);
|
|
81
81
|
});
|
|
82
82
|
|
|
83
83
|
test('Check warning highlighting', async () => {
|
|
84
|
-
await editor.waitWarningInLine(5);
|
|
84
|
+
await editor.waitWarningInLine(5, fileName);
|
|
85
85
|
});
|
|
86
86
|
|
|
87
87
|
test('Uncomment the 4-th row', async () => {
|
|
@@ -89,7 +89,7 @@ suite(`The 'VscodeShellcheckPlugin' test`, async () => {
|
|
|
89
89
|
});
|
|
90
90
|
|
|
91
91
|
test('Check warning highlighting disappearance', async () => {
|
|
92
|
-
await editor.waitWarningInLineDisappearance(5);
|
|
92
|
+
await editor.waitWarningInLineDisappearance(5, fileName);
|
|
93
93
|
});
|
|
94
94
|
});
|
|
95
95
|
|
|
@@ -64,7 +64,7 @@ suite('The "VscodeValePlugin" userstory', async () => {
|
|
|
64
64
|
suite('Check the "vale" plugin', async () => {
|
|
65
65
|
test('Check warning in the editor appearance', async () => {
|
|
66
66
|
await projectTree.expandPathAndOpenFile(pathToFile, docFileName);
|
|
67
|
-
await editor.waitInfoInLine(16);
|
|
67
|
+
await editor.waitInfoInLine(16,docFileName);
|
|
68
68
|
});
|
|
69
69
|
|
|
70
70
|
test('Open the "Problems" terminal tab', async () => {
|
|
@@ -69,12 +69,12 @@ suite('The "VscodeXmlPlugin" userstory', async () => {
|
|
|
69
69
|
await projectTree.expandPathAndOpenFile(pathToFile, xmlFileName);
|
|
70
70
|
|
|
71
71
|
await editor.type(xmlFileName, '\$\%\^\#', 16);
|
|
72
|
-
await editor.waitErrorInLine(16);
|
|
72
|
+
await editor.waitErrorInLine(16, xmlFileName);
|
|
73
73
|
});
|
|
74
74
|
|
|
75
75
|
test('Check error disappearance', async () => {
|
|
76
76
|
await editor.performKeyCombination(xmlFileName, Key.chord(Key.BACK_SPACE, Key.BACK_SPACE, Key.BACK_SPACE, Key.BACK_SPACE));
|
|
77
|
-
await editor.waitErrorInLineDisappearance(16);
|
|
77
|
+
await editor.waitErrorInLineDisappearance(16, xmlFileName);
|
|
78
78
|
});
|
|
79
79
|
|
|
80
80
|
test('Check auto-close tags', async () => {
|
|
@@ -77,12 +77,12 @@ suite('The "VscodeYamlPlugin" userstory', async () => {
|
|
|
77
77
|
await projectTree.expandPathAndOpenFile(pathToFile, yamlFileName);
|
|
78
78
|
|
|
79
79
|
await editor.type(yamlFileName, Key.SPACE, 19);
|
|
80
|
-
await editor.waitErrorInLine(19);
|
|
80
|
+
await editor.waitErrorInLine(19, yamlFileName);
|
|
81
81
|
});
|
|
82
82
|
|
|
83
83
|
test('Check error disappearance', async () => {
|
|
84
84
|
await editor.performKeyCombination(yamlFileName, Key.BACK_SPACE);
|
|
85
|
-
await editor.waitErrorInLineDisappearance(19);
|
|
85
|
+
await editor.waitErrorInLineDisappearance(19, yamlFileName);
|
|
86
86
|
});
|
|
87
87
|
|
|
88
88
|
test('To unformat the "yaml" file', async () => {
|
|
@@ -36,7 +36,7 @@ export class LanguageServerTests {
|
|
|
36
36
|
test('Error highlighting', async () => {
|
|
37
37
|
await this.editor.type(openedTab, textToWrite, line);
|
|
38
38
|
try {
|
|
39
|
-
await this.editor.waitErrorInLine(line);
|
|
39
|
+
await this.editor.waitErrorInLine(line, openedTab);
|
|
40
40
|
} catch (err) {
|
|
41
41
|
if (!(err instanceof error.TimeoutError)) {
|
|
42
42
|
throw err;
|
|
@@ -45,7 +45,7 @@ export class LanguageServerTests {
|
|
|
45
45
|
for (let i = 0; i < textToWrite.length; i++) {
|
|
46
46
|
await this.editor.performKeyCombination(openedTab, Key.BACK_SPACE);
|
|
47
47
|
}
|
|
48
|
-
await this.editor.waitErrorInLineDisappearance(line);
|
|
48
|
+
await this.editor.waitErrorInLineDisappearance(line, openedTab);
|
|
49
49
|
});
|
|
50
50
|
}
|
|
51
51
|
|
package/utils/DriverHelper.ts
CHANGED
|
@@ -109,7 +109,7 @@ export class DriverHelper {
|
|
|
109
109
|
try {
|
|
110
110
|
element = await this.driver.wait(until.elementLocated(elementLocator), polling);
|
|
111
111
|
} catch (err) {
|
|
112
|
-
if (i >= attempts) {
|
|
112
|
+
if (i >= attempts - 1) {
|
|
113
113
|
Logger.error(`DriverHelper.waitVisibility - failed with exception, out of attempts - ${err}`);
|
|
114
114
|
throw err;
|
|
115
115
|
}
|
|
@@ -269,7 +269,7 @@ export class DriverHelper {
|
|
|
269
269
|
try {
|
|
270
270
|
element = await this.waitVisibility(elementLocator, polling);
|
|
271
271
|
} catch (err) {
|
|
272
|
-
if (i >= attempts) {
|
|
272
|
+
if (i >= attempts - 1) {
|
|
273
273
|
Logger.error(`DriverHelper.waitAndClick - failed with exception, out of attempts - ${err}`);
|
|
274
274
|
throw err;
|
|
275
275
|
}
|
|
@@ -314,7 +314,7 @@ export class DriverHelper {
|
|
|
314
314
|
try {
|
|
315
315
|
element = await this.waitVisibility(elementLocator, polling);
|
|
316
316
|
} catch (err) {
|
|
317
|
-
if (i >= attempts) {
|
|
317
|
+
if (i >= attempts - 1) {
|
|
318
318
|
Logger.error(`DriverHelper.waitAndGetElementAttribute - failed with exception, out of attempts - ${err}`);
|
|
319
319
|
throw err;
|
|
320
320
|
}
|
|
@@ -357,7 +357,7 @@ export class DriverHelper {
|
|
|
357
357
|
try {
|
|
358
358
|
element = await this.waitVisibility(elementLocator, polling);
|
|
359
359
|
} catch (err) {
|
|
360
|
-
if (i >= attempts) {
|
|
360
|
+
if (i >= attempts - 1) {
|
|
361
361
|
Logger.error(`DriverHelper.waitAndGetCssValue - failed with exception, out of attempts - ${err}`);
|
|
362
362
|
throw err;
|
|
363
363
|
}
|
|
@@ -415,7 +415,7 @@ export class DriverHelper {
|
|
|
415
415
|
try {
|
|
416
416
|
element = await this.waitVisibility(elementLocator, polling);
|
|
417
417
|
} catch (err) {
|
|
418
|
-
if (i >= attempts) {
|
|
418
|
+
if (i >= attempts - 1) {
|
|
419
419
|
Logger.error(`DriverHelper.type - failed with exception, out of attempts - ${err}`);
|
|
420
420
|
throw err;
|
|
421
421
|
}
|
|
@@ -457,7 +457,7 @@ export class DriverHelper {
|
|
|
457
457
|
try {
|
|
458
458
|
element = await this.waitPresence(elementLocator, polling);
|
|
459
459
|
} catch (err) {
|
|
460
|
-
if (i >= attempts) {
|
|
460
|
+
if (i >= attempts - 1) {
|
|
461
461
|
Logger.error(`DriverHelper.typeToInvisible - failed with exception, out of attempts - ${err}`);
|
|
462
462
|
throw err;
|
|
463
463
|
}
|
|
@@ -499,7 +499,7 @@ export class DriverHelper {
|
|
|
499
499
|
try {
|
|
500
500
|
element = await this.waitVisibility(elementLocator, polling);
|
|
501
501
|
} catch (err) {
|
|
502
|
-
if (i >= attempts) {
|
|
502
|
+
if (i >= attempts - 1) {
|
|
503
503
|
Logger.error(`DriverHelper.clear - failed with exception, out of attempts - ${err}`);
|
|
504
504
|
throw err;
|
|
505
505
|
}
|
|
@@ -541,7 +541,7 @@ export class DriverHelper {
|
|
|
541
541
|
try {
|
|
542
542
|
element = await this.waitPresence(elementLocator, polling);
|
|
543
543
|
} catch (err) {
|
|
544
|
-
if (i >= attempts) {
|
|
544
|
+
if (i >= attempts - 1) {
|
|
545
545
|
Logger.error(`DriverHelper.clearInvisible - failed with exception, out of attempts - ${err}`);
|
|
546
546
|
throw err;
|
|
547
547
|
}
|
|
@@ -599,7 +599,7 @@ export class DriverHelper {
|
|
|
599
599
|
try {
|
|
600
600
|
element = await this.waitVisibility(elementLocator, polling);
|
|
601
601
|
} catch (err) {
|
|
602
|
-
if (i >= attempts) {
|
|
602
|
+
if (i >= attempts - 1) {
|
|
603
603
|
Logger.error(`DriverHelper.waitAndGetText - failed with exception, out of attempts - ${err}`);
|
|
604
604
|
throw err;
|
|
605
605
|
}
|
|
@@ -702,7 +702,7 @@ export class DriverHelper {
|
|
|
702
702
|
try {
|
|
703
703
|
element = await this.waitPresence(elementLocator, polling);
|
|
704
704
|
} catch (err) {
|
|
705
|
-
if (i >= attempts) {
|
|
705
|
+
if (i >= attempts - 1) {
|
|
706
706
|
Logger.error(`DriverHelper.scrollTo - failed with exception, out of attempts - ${err}`);
|
|
707
707
|
throw err;
|
|
708
708
|
}
|