Skip to content

Commit

Permalink
Adapt test after updating Monaco editor (#14523)
Browse files Browse the repository at this point in the history
* adapt test after updating Monaco editor
  • Loading branch information
musienko-maxim authored Sep 12, 2019
1 parent ac7a404 commit 501e2e5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion e2e/pageobjects/ide/Editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ export class Editor {
}

private getSuggestionLineXpathLocator(suggestionText: string): By {
return By.xpath(`//div[@widgetid='editor.widget.suggestWidget']//div[@aria-label='${suggestionText}, suggestion, has details']`);
return By.xpath(`//div[@widgetid='editor.widget.suggestWidget']//span[@class='monaco-highlighted-label' and contains(.,'${suggestionText}')]`);
}

private getTabXpathLocator(tabTitle: string): string {
Expand Down
2 changes: 1 addition & 1 deletion e2e/pageobjects/ide/QuickOpenContainer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export class QuickOpenContainer {
constructor(@inject(CLASSES.DriverHelper) private readonly driverHelper: DriverHelper) { }

public async waitContainer(timeout: number = TestConstants.TS_SELENIUM_DEFAULT_TIMEOUT) {
const monacoQuickOpenContainerLocator: By = By.xpath('//div[@class=\'monaco-quick-open-widget\' and @aria-hidden=\'false\']');
const monacoQuickOpenContainerLocator: By = By.xpath('//div[@class=\'monaco-quick-open-widget\']');
await this.driverHelper.waitVisibility(monacoQuickOpenContainerLocator, timeout);
}

Expand Down
4 changes: 3 additions & 1 deletion e2e/tests/e2e_happy_path/HappyPath.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@ suite('Language server validation', async () => {
await editor.waitSuggestion(javaFileName, 'run(Class<?> primarySource, String... args) : ConfigurableApplicationContext');
});

test('Codenavigation', async () => {
// it's skipped because of issue https://github.com/eclipse/che/issues/14520
test.skip('Codenavigation', async () => {
await editor.moveCursorToLineAndChar(javaFileName, 32, 17);
await editor.performKeyCombination(javaFileName, Key.chord(Key.CONTROL, Key.F12));
await editor.waitEditorAvailable(codeNavigationClassName);
Expand Down Expand Up @@ -288,6 +289,7 @@ async function runTask(task: string) {
await quickOpenContainer.clickOnContainerItem(task);
await quickOpenContainer.clickOnContainerItem('Continue without scanning the task output');
}

// sometimes under high loading the first click can be failed
async function isureClickOnDebugMenu() {
try { await topMenu.selectOption('Debug', 'Open Configurations'); } catch (e) {
Expand Down

0 comments on commit 501e2e5

Please sign in to comment.