Source:
public void shouldLoginToGitHubAndImportProject() throws Exception { currentProjectName = "AngularJS"; initRepoForFirstTest(); initRepoForSecondTest(); initRepoForThirdTest(); ide.open(ws); String ideWin = seleniumWebDriver.getWindowHandle(); menu.runCommand( TestMenuCommandsConstants.Workspace.WORKSPACE, TestMenuCommandsConstants.Workspace.IMPORT_PROJECT); importProject.waitMainForm(); importProject.selectGitHubSourceItem(); importProject.clickLoadRepoBtn(); loginToGitHub(); askDialog.clickOkBtn(); askDialog.waitFormToClose(); seleniumWebDriverHelper.switchToNextWindow(ideWin); gitHub.waitAuthorizationPageOpened(); gitHub.typeLogin(gitHubUsername); gitHub.typePass(gitHubPassword); gitHub.clickOnSignInButton(); gitHub.waitAuthorizeBtn(); gitHub.clickOnAuthorizeBtn(); seleniumWebDriver.switchTo().window(ideWin); loader.waitOnClosed(); importProject.selectItemInAccountList( gitHubClientService.getName(gitHubUsername, gitHubPassword)); importProject.closeWithIcon(); menu.runCommand( TestMenuCommandsConstants.Workspace.WORKSPACE, TestMenuCommandsConstants.Workspace.IMPORT_PROJECT); importProject.waitMainForm(); importProject.selectGitHubSourceItem(); importProject.clickLoadRepoBtn(); importProject.selectItemInAccountList( gitHubClientService.getName(gitHubUsername, gitHubPassword)); importProject.selectProjectByName(currentProjectName); importProject.clickImportBtn(); if (isMultiuser) { keycloakFederatedIdentitiesPage.open(); assertEquals(keycloakFederatedIdentitiesPage.getGitHubIdentityFieldValue(), gitHubUsername); } projectWizard.clickSaveButton(); projectExplorer.waitItem(currentProjectName); }

Target:
public void shouldLoginToGitHubAndImportProject() throws Exception { currentProjectName = "AngularJS"; initRepoForKeepDirectoryTest(); initRepoForImportBranchTest(); initRepoForMultiModuleTest(); ide.open(ws); String ideWin = seleniumWebDriver.getWindowHandle(); menu.runCommand(WORKSPACE, IMPORT_PROJECT); importProject.waitMainForm(); importProject.selectGitHubSourceItem(); importProject.clickLoadRepoBtn(); askDialog.waitFormToOpen(25); askDialog.clickOkBtn(); askDialog.waitFormToClose(); seleniumWebDriverHelper.switchToNextWindow(ideWin); gitHub.waitAuthorizationPageOpened(); gitHub.typeLogin(gitHubUsername); gitHub.typePass(gitHubPassword); gitHub.clickOnSignInButton(); gitHub.waitAuthorizeBtn(); gitHub.clickOnAuthorizeBtn(); seleniumWebDriver.switchTo().window(ideWin); loader.waitOnClosed(); importProject.selectItemInAccountList( gitHubClientService.getName(gitHubUsername, gitHubPassword)); importProject.closeWithIcon(); menu.runCommand(WORKSPACE, IMPORT_PROJECT); importProject.waitMainForm(); importProject.selectGitHubSourceItem(); importProject.clickLoadRepoBtn(); importProject.selectItemInAccountList( gitHubClientService.getName(gitHubUsername, gitHubPassword)); importProject.selectProjectByName(currentProjectName); importProject.clickImportBtn(); projectWizard.waitCreateProjectWizardForm(); projectWizard.clickSaveButton(); projectWizard.waitCreateProjectWizardFormIsClosed(); projectExplorer.waitItem(currentProjectName); if (isMultiuser) { keycloakFederatedIdentitiesPage.open(); assertEquals(keycloakFederatedIdentitiesPage.getGitHubIdentityFieldValue(), gitHubUsername); ide.open(ws); } }