Skip to content

Commit

Permalink
The "GitHubPullRequestPlugin" unexpectedly fails on the openshift-ci (#…
Browse files Browse the repository at this point in the history
…20434)

Signed-off-by: Ihor Okhrimenko <iokhrime@redhat.com>
  • Loading branch information
Ohrimenko1988 authored Sep 7, 2021
1 parent 709f25d commit 715d3d3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions tests/e2e/pageobjects/ide/QuickOpenContainer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ export class QuickOpenContainer {

public async type(text: string) {
Logger.debug(`QuickOpenContainer.type "${text}"`);
await this.driverHelper.enterValue(By.css('.quick-open-input input'), text);
await this.driverHelper.type(By.css('div.monaco-inputbox input.input'), text);
}

public async typeAndSelectSuggestion(text: string, suggestedText: string) {
Logger.debug('QuickOpenContainer.typeAndSelectSuggestion');

await this.driverHelper.type(By.css('div.monaco-inputbox input.input'), text);
await this.type(text);
// sometimes the UI dropdawn may closed unexpectedly for more stability add 500ms delay.
await this.driverHelper.wait(2000);
await this.clickOnContainerItem(suggestedText);
Expand Down
3 changes: 2 additions & 1 deletion tests/e2e/tests/plugins/GitHubPullRequestPlugin.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import { QuickOpenContainer } from '../../pageobjects/ide/QuickOpenContainer';
import { Editor } from '../../pageobjects/ide/Editor';
import CheReporter from '../../driver/CheReporter';
import { BrowserTabsUtil } from '../../utils/BrowserTabsUtil';
import { Key } from 'selenium-webdriver';

const ide: Ide = e2eContainer.get(CLASSES.Ide);
const projectTree: ProjectTree = e2eContainer.get(CLASSES.ProjectTree);
Expand Down Expand Up @@ -91,7 +92,7 @@ suite(`The 'GitHubPullRequestPlugin' test`, async () => {
test('Create new branch', async () => {
await topMenu.selectOption('View', 'Find Command...');
await quickOpenContainer.typeAndSelectSuggestion('branch', 'Git: Create Branch...');
await quickOpenContainer.typeAndSelectSuggestion(branchName, `Please provide a new branch name (Press 'Enter' to confirm or 'Escape' to cancel)`);
await quickOpenContainer.type(`${branchName}${Key.ENTER}`);

await projectTree.expandPathAndOpenFile('Spoon-Knife', changedFile);
await editor.type(changedFile, currentDate + '\n', 1);
Expand Down

0 comments on commit 715d3d3

Please sign in to comment.