-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Test] Add test that revokes OAuth access from Dashboard (#22762)
- Loading branch information
1 parent
07ed023
commit f7a4289
Showing
4 changed files
with
77 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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 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 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,32 @@ | ||
/** ******************************************************************* | ||
* copyright (c) 2020-2024 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 { e2eContainer } from '../../configs/inversify.config'; | ||
import { CLASSES } from '../../configs/inversify.types'; | ||
import { LoginTests } from '../../tests-library/LoginTests'; | ||
import { UserPreferences } from '../../pageobjects/dashboard/UserPreferences'; | ||
import { FACTORY_TEST_CONSTANTS } from '../../constants/FACTORY_TEST_CONSTANTS'; | ||
|
||
suite('"Revoke OAuth" test', function (): void { | ||
const loginTests: LoginTests = e2eContainer.get(CLASSES.LoginTests); | ||
const userPreferences: UserPreferences = e2eContainer.get(CLASSES.UserPreferences); | ||
const gitService: string = FACTORY_TEST_CONSTANTS.TS_SELENIUM_FACTORY_GIT_PROVIDER || 'github'; | ||
|
||
suiteSetup('Login', async function (): Promise<void> { | ||
await loginTests.loginIntoChe(); | ||
}); | ||
|
||
test('Revoke OAuth test', async function (): Promise<void> { | ||
await userPreferences.openUserPreferencesPage(); | ||
await userPreferences.openGitServicesTab(); | ||
|
||
const selectedService: string = userPreferences.getServiceConfig(gitService); | ||
await userPreferences.revokeGitService(selectedService); | ||
}); | ||
}); |
This file contains 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