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

subscription page search field ui selector update #1702

Merged

Conversation

vijaysawant
Copy link
Contributor

Problem Statement

  • Test case test_positive_access_with_non_admin_user_with_manifest was failing due to Error
    TypeError: 'NoneType' object is not subscriptable
  • Class variable search_field from airgun view SubscriptionSearch need to be updated

Solution

Update search_field with expected locator.

Robottelo PR

SatelliteQE/robottelo#17382

@vijaysawant
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/ui/test_subscription.py -k 'test_positive_access_with_non_admin_user_with_manifest'
robottelo: 17382

Copy link
Contributor

@sambible sambible 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. Could potentially use 'aria-label' as a (possibly) more durable locator, but I don't feel strongly about this.

Copy link
Contributor

@sambible sambible left a comment

Choose a reason for hiding this comment

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

Upon further review, the actual solution to this problem is to change from using "SearchableViewMixin" and having the custom search logic to simply using PF4SearchableViewMixin.

This will also make test changes not necessary, at least in the case of one of the tests you are changing.

@vijaysawant
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/ui/test_subscription.py -k 'test_positive_access_with_non_admin_user_with_manifest'

@Satellite-QE
Copy link
Contributor

PRT Result

Build Number: 477
Build Status: SUCCESS
PRT Comment: pytest tests/foreman/ui/test_subscription.py -k test_positive_access_with_non_admin_user_with_manifest --external-logging
Test Result : ========== 1 passed, 7 deselected, 16 warnings in 3652.52s (1:00:52) ===========

@Satellite-QE Satellite-QE added the PRT-Passed Indicates that latest PRT run is passed for the PR label Jan 20, 2025
@vijaysawant vijaysawant requested a review from sambible January 21, 2025 06:14
@vijaysawant
Copy link
Contributor Author

vijaysawant commented Jan 21, 2025

Local test execution result :

============================= test session starts ==============================
collecting ... 2025-01-21 13:34:32 - robottelo.collection - INFO - Processing test items to add testimony token markers
collected 8 items / 7 deselected / 1 selected

tests/foreman/ui/test_subscription.py::test_positive_access_with_non_admin_user_with_manifest 

=========== 1 passed, 7 deselected, 3 warnings in 124.06s (0:02:04) ============
PASSED
Process finished with exit code 0

@vijaysawant vijaysawant force-pushed the subscription-page-search-box-fix branch from 3d579b2 to 719fb6b Compare January 22, 2025 06:58
@shweta83
Copy link
Contributor

trigger: test-robottelo
pytest: tests/foreman/ui/test_subscription.py -k 'test_positive_access_with_non_admin_user_with_manifest'

@Satellite-QE
Copy link
Contributor

PRT Result

Build Number: 478
Build Status: UNSTABLE
PRT Comment: pytest tests/foreman/ui/test_subscription.py -k test_positive_access_with_non_admin_user_with_manifest --external-logging
Test Result : =========== 1 failed, 7 deselected, 16 warnings in 635.30s (0:10:35) ===========

@Satellite-QE Satellite-QE added PRT-Failed Indicates that latest PRT run is failed for the PR and removed PRT-Passed Indicates that latest PRT run is passed for the PR labels Jan 22, 2025
@vijaysawant
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/ui/test_subscription.py -k 'test_positive_access_with_non_admin_user_with_manifest'
robottelo: 17382

@vijaysawant
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/ui/test_subscription.py -k 'test_positive_access_with_non_admin_user_with_manifest'

@Satellite-QE
Copy link
Contributor

PRT Result

Build Number: 482
Build Status: SUCCESS
PRT Comment: pytest tests/foreman/ui/test_subscription.py -k test_positive_access_with_non_admin_user_with_manifest --external-logging
Test Result : =========== 1 passed, 7 deselected, 16 warnings in 643.41s (0:10:43) ===========

@Satellite-QE Satellite-QE added PRT-Passed Indicates that latest PRT run is passed for the PR and removed PRT-Failed Indicates that latest PRT run is failed for the PR labels Jan 22, 2025
@Satellite-QE
Copy link
Contributor

PRT Result

Build Number: 9952
Build Status: SUCCESS
PRT Comment: pytest tests/foreman/ui/test_subscription.py -k test_positive_access_with_non_admin_user_with_manifest --external-logging
Test Result: =========== 1 passed, 7 deselected, 16 warnings in 670.81s (0:11:10) ===========

@vijaysawant vijaysawant force-pushed the subscription-page-search-box-fix branch from b8ce6f8 to 92d85b8 Compare January 22, 2025 16:49
@Satellite-QE
Copy link
Contributor

PRT Result

Build Number: 9956
Build Status: UNSTABLE
PRT Comment: pytest tests/foreman/ui/test_subscription.py -k test_positive_access_with_non_admin_user_with_manifest --external-logging
Test Result: =========== 1 failed, 7 deselected, 16 warnings in 683.86s (0:11:23) ===========

Copy link
Contributor

@sambible sambible left a comment

Choose a reason for hiding this comment

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

Approving, based on local run results from vijay and myself. We can revisit if this ends up continuing to not pass in CI.

@@ -27,7 +27,7 @@ class SubscriptionSearch(Search):
search_button = Button('Search')
Copy link
Contributor

Choose a reason for hiding this comment

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

We can just remove this as well as SubscriptionSearchableViewMixin, since we aren't using either anymore.

airgun/views/subscription.py Show resolved Hide resolved
@vijaysawant
Copy link
Contributor Author

============================= test session starts ==============================
collecting ... 2025-01-22 22:08:38 - robottelo.collection - INFO - Processing test items to add testimony token markers
collected 8 items / 7 deselected / 1 selected

tests/foreman/ui/test_subscription.py::test_positive_access_with_non_admin_user_with_manifest 

================= 1 passed, 7 deselected in 219.96s (0:03:39) ==================
PASSED
Process finished with exit code 0

@sambible sambible merged commit 4441e8d into SatelliteQE:master Jan 22, 2025
7 of 8 checks passed
github-actions bot pushed a commit that referenced this pull request Jan 22, 2025
* subscription page search field ui selector update

* implemented PF4 related comments

* use SearchableViewMixinPF4 instead of SubscriptionSearchableViewMixin in class SearchableViewMixinPF4

(cherry picked from commit 4441e8d)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.16.z CherryPick PR needs CherryPick to previous branches PRT-Passed Indicates that latest PRT run is passed for the PR Stream
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants