abalakh / airgun

Airgun moved to https://github.com/SatelliteQE/airgun
https://github.com/SatelliteQE/airgun
1 stars 2 forks source link

Register navigator to entities instead of views #4

Closed abalakh closed 6 years ago

abalakh commented 6 years ago

After discussion with @mfalesni turns out navigation steps should be registered against entities, not views. This also allows us to use nice shortcuts like self.navigate_to(self, 'New')

Test results ```python Testing started at 1:33 PM ... /Users/andrii/workspace/py3a/bin/python "/Applications/PyCharm CE.app/Contents/helpers/pydev/pydevd.py" --multiproc --qt-support=auto --client 127.0.0.1 --port 61690 --file "/Applications/PyCharm CE.app/Contents/helpers/pycharm/_jb_pytest_runner.py" --path /Users/andrii/workspace/robottelo/tests/foreman/ui_airgun/test_architecture.py -- -v -s pydev debugger: process 78979 is connecting Connected to pydev debugger (build 173.4301.16) Launching py.test with arguments -v -s /Users/andrii/workspace/robottelo/tests/foreman/ui_airgun/test_architecture.py in /Users/andrii/workspace/robottelo/tests/foreman/ui_airgun 2018-02-06 13:33:06 - conftest - DEBUG - Registering custom pytest_namespace ============================= test session starts ============================== platform darwin -- Python 3.6.4, pytest-3.3.2, py-1.5.2, pluggy-0.6.0 -- /Users/andrii/workspace/py3a/bin/python cachedir: ../../../.cache shared_function enabled - OFF - scope: - storage: file rootdir: /Users/andrii/workspace/robottelo, inifile: plugins: wait-for-1.0.9, xdist-1.22.0, services-1.2.1, mock-1.6.3, forked-0.2 collecting ... collected 2 items2018-02-06 13:33:06 - conftest - DEBUG - BZ deselect is disabled in settings test_architecture.py::test_positive_create[UunTq9eiEgNNMSeCbn9oGQ8uG4jEJIgNv5y4erDjpDUgorZ3PL4aEUtOrxbKflC4sApwqQiF] 2018-02-06 13:34:08 - robottelo - DEBUG - Finished Test: tests/foreman/ui_airgun/test_architecture.py/test_positive_create[UunTq9eiEgNNMSeCbn9oGQ8uG4jEJIgNv5y4erDjpDUgorZ3PL4aEUtOrxbKflC4sApwqQiF] test_architecture.py::test_positive_create_with_os 2018-02-06 13:34:26 - robottelo - DEBUG - Finished Test: tests/foreman/ui_airgun/test_architecture.py/test_positive_create_with_os ========================== 2 passed in 79.35 seconds ===========================2018-02-06 13:33:06 - robottelo - INFO - Entities cleaner disabled 2018-02-06 13:33:06 - robottelo - DEBUG - Started Test: tests/foreman/ui_airgun/test_architecture.py/test_positive_create[UunTq9eiEgNNMSeCbn9oGQ8uG4jEJIgNv5y4erDjpDUgorZ3PL4aEUtOrxbKflC4sApwqQiF] 2018-02-06 13:33:08 - widgetastic_null - INFO - Opening URL: 'https://host-8-241-176.host.centralci.eng.rdu2.redhat.com' NAVIGATE: Checking if already at NavigateToLogin NAVIGATE: Already at NavigateToLogin 2018-02-06 13:33:20 - widgetastic_null - INFO - [LoginView/username]: fill('admin') -> True (elapsed 237 ms) 2018-02-06 13:33:20 - widgetastic_null - INFO - [LoginView/password]: fill('changeme') -> True (elapsed 200 ms) 2018-02-06 13:33:20 - widgetastic_null - INFO - [LoginView]: fill({'username': 'admin', 'password': 'changeme'}) -> True (elapsed 439 ms) NAVIGATE: Checking if already at New NAVIGATE: I'm not at New NAVIGATE: Checking if already at All NAVIGATE: I'm not at All NAVIGATE: Heading to destination All NAVIGATE: Heading to destination New 2018-02-06 13:33:43 - widgetastic_null - INFO - [ArchitectureDetailsView/name]: fill('UunTq9eiEgNNMSeCbn9oGQ8uG4jEJIgNv5y4erDjpDUgorZ3PL4aEUtOrxbKflC4sApwqQiF') -> True (elapsed 10518 ms) 2018-02-06 13:33:43 - widgetastic_null - INFO - [ArchitectureDetailsView]: fill({'name': 'UunTq9eiEgNNMSeCbn9oGQ8uG4jEJIgNv5y4erDjpDUgorZ3PL4aEUtOrxbKflC4sApwqQiF'}) -> None (elapsed 10519 ms) NAVIGATE: Checking if already at All NAVIGATE: Already at All 2018-02-06 13:34:01 - widgetastic_null - INFO - [ArchitectureView/search_element/search_field]: fill('UunTq9eiEgNNMSeCbn9oGQ8uG4jEJIgNv5y4erDjpDUgorZ3PL4aEUtOrxbKflC4sApwqQiF') -> True (elapsed 11470 ms) 2018-02-06 13:34:01 - widgetastic_null - INFO - [ArchitectureView/search_element]: fill('UunTq9eiEgNNMSeCbn9oGQ8uG4jEJIgNv5y4erDjpDUgorZ3PL4aEUtOrxbKflC4sApwqQiF') -> None (elapsed 11471 ms) 2018-02-06 13:34:07 - widgetastic_null - INFO - [ArchitectureView/search_element/search_button]: click (elapsed 6129 ms) 2018-02-06 13:34:07 - widgetastic_null - INFO - [ArchitectureView/search_element]: read -> 'UunTq9eiEgNNMSeCbn9oGQ8uG4jEJIgNv5y4erDjpDUgorZ3PL4aEUtOrxbKflC4sApwqQiF' (elapsed 32 ms) PASSED [ 50%]2018-02-06 13:34:08 - robottelo - DEBUG - Started Test: tests/foreman/ui_airgun/test_architecture.py/test_positive_create_with_os 2018-02-06 13:34:08 - nailgun.client - DEBUG - Making HTTP POST request to https://host-8-241-176.host.centralci.eng.rdu2.redhat.com/api/v2/operatingsystems with options {'auth': ('admin', 'changeme'), 'verify': False, 'headers': {'content-type': 'application/json'}}, no params and data {"operatingsystem": {"major": "865", "name": "vIVaFzdsypTv"}}. 2018-02-06 13:34:08 - nailgun.client - DEBUG - Received HTTP 201 response: {"description":null,"major":"865","minor":"","family":null,"release_name":null,"password_hash":"SHA256","created_at":"2018-02-06 11:34:06 UTC","updated_at":"2018-02-06 11:34:06 UTC","id":13,"name":"vIVaFzdsypTv","title":"vIVaFzdsypTv 865","media":[],"architectures":[],"ptables":[],"config_templates":[],"provisioning_templates":[],"os_default_templates":[],"images":[],"parameters":[]} 2018-02-06 13:34:10 - widgetastic_null - INFO - Opening URL: 'https://host-8-241-176.host.centralci.eng.rdu2.redhat.com' NAVIGATE: Checking if already at NavigateToLogin NAVIGATE: Already at NavigateToLogin 2018-02-06 13:34:17 - widgetastic_null - INFO - [LoginView/username]: fill('admin') -> True (elapsed 228 ms) 2018-02-06 13:34:17 - widgetastic_null - INFO - [LoginView/password]: fill('changeme') -> True (elapsed 227 ms) 2018-02-06 13:34:17 - widgetastic_null - INFO - [LoginView]: fill({'username': 'admin', 'password': 'changeme'}) -> True (elapsed 456 ms) NAVIGATE: Checking if already at New NAVIGATE: I'm not at New NAVIGATE: Checking if already at All NAVIGATE: I'm not at All NAVIGATE: Heading to destination All NAVIGATE: Heading to destination New 2018-02-06 13:34:23 - widgetastic_null - INFO - [ArchitectureDetailsView/name]: fill('grAGznyTbq') -> True (elapsed 264 ms) 2018-02-06 13:34:23 - widgetastic_null - INFO - [ArchitectureDetailsView/os_element/filter]: fill('vIVaFzdsypTv') -> True (elapsed 268 ms) 2018-02-06 13:34:23 - widgetastic_null - INFO - [ArchitectureDetailsView]: fill({'name': 'grAGznyTbq', 'os_names': {'operation': 'Add', 'values': ['vIVaFzdsypTv']}}) -> None (elapsed 597 ms) NAVIGATE: Checking if already at All NAVIGATE: Already at All 2018-02-06 13:34:24 - widgetastic_null - INFO - [ArchitectureView/search_element/search_field]: fill('grAGznyTbq') -> True (elapsed 451 ms) 2018-02-06 13:34:24 - widgetastic_null - INFO - [ArchitectureView/search_element]: fill('grAGznyTbq') -> None (elapsed 452 ms) 2018-02-06 13:34:26 - widgetastic_null - INFO - [ArchitectureView/search_element/search_button]: click (elapsed 1192 ms) 2018-02-06 13:34:26 - widgetastic_null - INFO - [ArchitectureView/search_element]: read -> 'grAGznyTbq' (elapsed 34 ms) PASSED [100%] Process finished with exit code 0 ```