Skip to content
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] Update RevokeOauth test to work correctly with github service status after revoking #22829

Merged
merged 1 commit into from
Feb 20, 2024

Conversation

SkorikSergey
Copy link
Contributor

@SkorikSergey SkorikSergey commented Feb 19, 2024

What does this PR do?

Previously github service after revoking was deleted from Services list(and Oauth secret from openshift-devspaces namespace also). For now it is only revoking OAuth from github.com and github service still in list.
We need to update RevokeOauth test to wait not github service is disappeared but that its Autorization status is false.

What issues does this PR fix or reference?

https://issues.redhat.com/browse/CRW-5756

How to test this PR?

RevokeOauth test logs

            ‣ DriverHelper.waitDisappearance - By(css selector, .main-page-loader)
            ‣ DriverHelper.waitDisappearanceBoolean - By(css selector, .main-page-loader)
            ‣ DriverHelper.isVisible - By(css selector, .main-page-loader)
            ‣ DriverHelper.wait - (1000 milliseconds)
            ‣ DriverHelper.isVisible - By(css selector, .main-page-loader)
            ‣ DriverHelper.wait - (1000 milliseconds)
            ‣ DriverHelper.isVisible - By(css selector, .main-page-loader)
            ‣ DriverHelper.wait - (1000 milliseconds)
            ‣ DriverHelper.isVisible - By(css selector, .main-page-loader)
            ‣ DriverHelper.wait - (1000 milliseconds)
          ▼ 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.waitAttributeValue - By(xpath, //tr[td[text()='GitHub']]//input)
            ‣ DriverHelper.waitAndGetElementAttribute - By(xpath, //tr[td[text()='GitHub']]//input) attribute: 'disabled'
            ‣ DriverHelper.waitVisibility - By(xpath, //tr[td[text()='GitHub']]//input)
            ‣ DriverHelper.waitVisibility - element is located and is visible.
            ‣ DriverHelper.waitAndGetElementAttribute - By(xpath, //tr[td[text()='GitHub']]//input) attribute: 'disabled'
            ‣ DriverHelper.waitVisibility - By(xpath, //tr[td[text()='GitHub']]//input)
            ‣ DriverHelper.waitVisibility - element is located and is visible.
            ‣ DriverHelper.waitAndGetElementAttribute - By(xpath, //tr[td[text()='GitHub']]//input) attribute: 'disabled'
            ‣ DriverHelper.waitVisibility - By(xpath, //tr[td[text()='GitHub']]//input)
            ‣ DriverHelper.waitVisibility - element is located and is visible.
    ✔ Revoke OAuth test

Reviewers

Reviewers, please comment how you tested the PR when approving it.

@SkorikSergey SkorikSergey added status/in-progress This issue has been taken by an engineer and is under active development. kind/task Internal things, technical debt, and to-do tasks to be performed. area/qe labels Feb 19, 2024
@SkorikSergey SkorikSergey self-assigned this Feb 19, 2024
@SkorikSergey SkorikSergey marked this pull request as ready for review February 19, 2024 13:52
@che-bot che-bot added the target/branch Indicates that a PR will be merged into a branch other than master. label Feb 19, 2024
@SkorikSergey SkorikSergey added status/code-review This issue has a pull request posted for it and is awaiting code review completion by the community. and removed status/in-progress This issue has been taken by an engineer and is under active development. labels Feb 20, 2024
Copy link
Contributor

@dmytro-ndp dmytro-ndp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to merge

@SkorikSergey SkorikSergey merged commit 7b8dde4 into main Feb 20, 2024
5 checks passed
@SkorikSergey SkorikSergey deleted the updateRevokeOauthTest branch February 20, 2024 09:47
@che-bot che-bot removed the status/code-review This issue has a pull request posted for it and is awaiting code review completion by the community. label Feb 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/qe kind/task Internal things, technical debt, and to-do tasks to be performed. target/branch Indicates that a PR will be merged into a branch other than master.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants