Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adapt test after updating Monaco editor #14523

Merged
merged 2 commits into from
Sep 12, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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