-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[Test] Add test that revokes OAuth access from Dashboard #22762
Conversation
@SkorikSergey: do you have successful RevokeOauth.spec.ts test run to review? |
Yes, checked with GitHub service. |
227657d
to
ebfad7f
Compare
ebfad7f
to
02c74bb
Compare
c6d66af
to
1fa7c9f
Compare
@@ -14,14 +14,25 @@ import { By } from 'selenium-webdriver'; | |||
import { DriverHelper } from '../../utils/DriverHelper'; | |||
import { Logger } from '../../utils/Logger'; | |||
|
|||
enum GitServices { | |||
GITHUB = 'github', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMHO we can avoid duplication if use FACTORY_TEST_CONSTANTS > GitProviderType https://github.com/eclipse/che/blob/07ed023e6d80e46c9a1759d7ff25a77d4e9ab535/tests/e2e/constants/FACTORY_TEST_CONSTANTS.ts#L12-L18
|
||
getServiceConfig(service: string): string { | ||
const gitService: { [key: string]: string } = { | ||
[GitServices.GITHUB]: 'GitHub', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comment in https://github.com/eclipse/che/pull/22762/files#r1452432608
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks commonly good to merge, with a small room for improvement commented earlier.
What does this PR do?
This test automate revoke OAuth access from User Preferences page.
Screenshot/screencast of this PR
What issues does this PR fix or reference?
https://issues.redhat.com/browse/CRW-4841
How to test this PR?
PR Checklist
▼ UserPreferences.openUserPreferencesPage ‣ DriverHelper.waitAndClick - By(xpath, //header//button/span[text()!=""]//parent::button) ‣ DriverHelper.waitVisibility - By(xpath, //header//button/span[text()!=""]//parent::button) ‣ DriverHelper.waitVisibility - element is located and is visible. ‣ DriverHelper.waitAndClick - By(xpath, //button[text()="User Preferences"]) ‣ DriverHelper.waitVisibility - By(xpath, //button[text()="User Preferences"]) ‣ DriverHelper.waitVisibility - element is located and is visible. ‣ DriverHelper.waitVisibility - By(xpath, //h1[text()="User Preferences"]) ‣ DriverHelper.waitVisibility - element is located and is visible. ▼ UserPreferences.openGitServicesTab ‣ DriverHelper.waitAndClick - By(xpath, //button[text()="Git Services"]) ‣ DriverHelper.waitVisibility - By(xpath, //button[text()="Git Services"]) ‣ DriverHelper.waitVisibility - element is located and is visible. ▼ UserPreferences.revokeGitService ▼ UserPreferences.selectListItem - of the 'GitHub' list item ‣ DriverHelper.waitAndClick - By(xpath, //tr[td[text()='GitHub']]//input) ‣ DriverHelper.waitVisibility - By(xpath, //tr[td[text()='GitHub']]//input) ‣ DriverHelper.waitVisibility - element is located and is visible. ‣ DriverHelper.waitAndClick - By(xpath, //button[text()="Revoke"]) ‣ DriverHelper.waitVisibility - By(xpath, //button[text()="Revoke"]) ‣ DriverHelper.waitVisibility - element is located and is visible. ‣ DriverHelper.waitVisibility - By(xpath, //span[text()="Revoke Git Services"]) ‣ DriverHelper.waitVisibility - element is located and is visible. ‣ DriverHelper.waitAndClick - By(xpath, //input[@data-testid="warning-info-checkbox"]) ‣ DriverHelper.waitVisibility - By(xpath, //input[@data-testid="warning-info-checkbox"]) ‣ DriverHelper.waitVisibility - element is located and is visible. ‣ DriverHelper.waitAndClick - By(xpath, //button[@data-testid="revoke-button" and not(@disabled)]) ‣ DriverHelper.waitVisibility - By(xpath, //button[@data-testid="revoke-button" and not(@disabled)]) ‣ DriverHelper.waitVisibility - element is located and is visible. ‣ DriverHelper.waitDisappearance - By(xpath, //tr[td[text()='GitHub']]//input) ‣ DriverHelper.waitDisappearanceBoolean - By(xpath, //tr[td[text()='GitHub']]//input) ‣ DriverHelper.isVisible - By(xpath, //tr[td[text()='GitHub']]//input) ‣ DriverHelper.wait - (1000 milliseconds) ‣ DriverHelper.isVisible - By(xpath, //tr[td[text()='GitHub']]//input) ✔ Revoke OAuth test
As the author of this Pull Request I made sure that:
What issues does this PR fix or reference
andHow to test this PR
completedReviewers
Reviewers, please comment how you tested the PR when approving it.