Repository navigation
[Test] Fix up 'factory' E2E tests when use public repository #23617
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
Merged
Changes from 19 commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
bf09f3f
Fix up 'factory' E2E tests
artaleks9 ef57f7e
Merge branch 'main' of github.com:eclipse/che into che#22597
artaleks9 b434011
Update test scenario 'NoSetupRepoFactory'
artaleks9 6e72220
Fix up package.json
artaleks9 671a2f6
Merge branch 'main' of github.com:eclipse/che into che#22597
artaleks9 f9af7e3
Update 'RefusedOAuthFactory' E2E test
artaleks9 44e5b7b
Do formatting
artaleks9 13a1bc7
Fix up
artaleks9 2dbdc3c
Fix up: remove redundant step
artaleks9 796552c
Fix up
artaleks9 ff9ccb0
Create 'SourceControlModule' pageobject
artaleks9 be35281
Updates 'factory' components
artaleks9 d9a7653
Fix up
artaleks9 5d0edba
Create 'DialogBoxGitHubExtension' pageobject
artaleks9 f0e8d2d
Add comment to method
artaleks9 93ab60d
Fix up locator
artaleks9 603c2b9
Update 'factory' E2E tests
artaleks9 12e94e8
Fix up
artaleks9 e4972dd
Fix up method
artaleks9 61d567f
Rename pageobjects
artaleks9 f34f922
Update 'factory' tests
artaleks9 a3c9433
Fix merge conflicts
artaleks9 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| /** ******************************************************************* | ||
| * copyright (c) 2025 Red Hat, Inc. | ||
| * | ||
| * This program and the accompanying materials are made | ||
| * available under the terms of the Eclipse Public License 2.0 | ||
| * which is available at https://www.eclipse.org/legal/epl-2.0/ | ||
| * | ||
| * SPDX-License-Identifier: EPL-2.0 | ||
| **********************************************************************/ | ||
| import { inject, injectable } from 'inversify'; | ||
| import 'reflect-metadata'; | ||
| import { CLASSES } from '../../configs/inversify.types'; | ||
| import { DriverHelper } from '../../utils/DriverHelper'; | ||
| import { Logger } from '../../utils/Logger'; | ||
| import { By, ModalDialog } from 'monaco-page-objects'; | ||
| import { CheCodeLocatorLoader } from './CheCodeLocatorLoader'; | ||
|
|
||
| @injectable() | ||
| export class DialogBoxGitHubExtension { | ||
| private static readonly DIALOG_BOX_GITHUB_EXTENSION_LOCATOR: By = By.xpath( | ||
|
dmytro-ndp marked this conversation as resolved.
Resolved
|
||
| '//div[@class="dialog-message-detail" and contains(., "The extension \'GitHub\' wants to sign in using GitHub.")]' | ||
| ); | ||
|
|
||
| constructor( | ||
| @inject(CLASSES.DriverHelper) | ||
| private readonly driverHelper: DriverHelper, | ||
| @inject(CLASSES.CheCodeLocatorLoader) | ||
| private readonly cheCodeLocatorLoader: CheCodeLocatorLoader | ||
| ) {} | ||
|
|
||
| /** | ||
| * check if the dialog box with the message about the GitHub extension is visible. | ||
| * @returns Promise resolving to boolean. | ||
| */ | ||
| async isDialogBoxGitHubExtensionVisible(): Promise<boolean> { | ||
|
dmytro-ndp marked this conversation as resolved.
Resolved
|
||
| Logger.debug(); | ||
|
|
||
| const dialogBoxGitHubExtension: boolean = await this.driverHelper.waitVisibilityBoolean( | ||
|
dmytro-ndp marked this conversation as resolved.
Resolved
|
||
| DialogBoxGitHubExtension.DIALOG_BOX_GITHUB_EXTENSION_LOCATOR | ||
| ); | ||
|
|
||
| return dialogBoxGitHubExtension; | ||
| } | ||
|
|
||
| /** | ||
| * close the dialog box with the message about the GitHub extension. | ||
| */ | ||
| async closeDialogBoxGitHubExtension(): Promise<void> { | ||
|
dmytro-ndp marked this conversation as resolved.
Resolved
|
||
| Logger.debug(); | ||
|
|
||
| const modalDialog: ModalDialog = new ModalDialog(); | ||
| await modalDialog.close(); | ||
| await this.driverHelper.waitDisappearance(this.cheCodeLocatorLoader.webCheCodeLocators.Dialog.constructor); | ||
| Logger.debug('Dialog box with the message about the GitHub extension closed'); | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| /** ******************************************************************* | ||
| * copyright (c) 2025 Red Hat, Inc. | ||
| * | ||
| * This program and the accompanying materials are made | ||
| * available under the terms of the Eclipse Public License 2.0 | ||
| * which is available at https://www.eclipse.org/legal/epl-2.0/ | ||
| * | ||
| * SPDX-License-Identifier: EPL-2.0 | ||
| **********************************************************************/ | ||
| import { inject, injectable } from 'inversify'; | ||
| import 'reflect-metadata'; | ||
| import { CLASSES } from '../../configs/inversify.types'; | ||
| import { DriverHelper } from '../../utils/DriverHelper'; | ||
| import { Logger } from '../../utils/Logger'; | ||
| import { Key } from 'selenium-webdriver'; | ||
|
|
||
| @injectable() | ||
| export class SourceControlModule { | ||
|
dmytro-ndp marked this conversation as resolved.
Resolved
|
||
| constructor( | ||
| @inject(CLASSES.DriverHelper) | ||
| readonly driverHelper: DriverHelper | ||
| ) {} | ||
|
|
||
| /** | ||
| * type the commit message and press Ctrl+Enter to commit the changes. | ||
| * @param textCommit Text to commit. | ||
| */ | ||
| async typeCommitMessage(textCommit: string): Promise<void> { | ||
| Logger.debug(`Type commit text: "Commit ${textCommit}"`); | ||
|
|
||
| await this.driverHelper.getDriver().actions().sendKeys(textCommit).perform(); | ||
| Logger.debug('Press Enter to commit the changes'); | ||
| await this.driverHelper.getDriver().actions().keyDown(Key.CONTROL).sendKeys(Key.ENTER).keyUp(Key.CONTROL).perform(); | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.