Skip to content
This repository has been archived by the owner on Apr 7, 2022. It is now read-only.

[1LP][RFR] - Service Dialog test #9995

Merged

Conversation

dgaikwad
Copy link
Contributor

@dgaikwad dgaikwad commented Mar 18, 2020

Adding new test - Test to check Load values on init option in service dialog when Dynamix box enable

Purpose or Intent

PRT Run

{{pytest: cfme/tests/services/test_dialog_element_in_catalog.py::test_catalog_load_values_on_init --long-running -v}}

@dgaikwad dgaikwad force-pushed the test_catalog_load_values_on_init branch from a53d11a to fb4aade Compare March 18, 2020 09:53
@dgaikwad dgaikwad changed the title [WIPTEST] - Service Dialog test [RFR] - Service Dialog test Mar 18, 2020
assert view.element_information.dynamic_chkbox.is_enabled
view.options.click()
assert view.options.load_values_on_init.is_enabled
request.addfinalizer(dialog.delete_if_exists)

Copy link
Member

Choose a reason for hiding this comment

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

Put request.addfinalizer(dialog.delete_if_exists) above the assert. If assert gets failed then it will not work.

}
}
dialog, element = create_dialog(appliance, element_data)
view = appliance.browser.create_view(EditElementView)
Copy link
Member

Choose a reason for hiding this comment

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

can we make create_dialog - fixture if it is setup.

box_desc="my box desc")
element = box.elements.create(element_data=[element_data])
return sd, element

Copy link
Member

Choose a reason for hiding this comment

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

Instead of this function. please check if you can use this fixture in this file: https://github.com/ManageIQ/integration_tests/pull/9995/files#diff-faeac2d3d489ac01e0ebae6983c9c3cbR36

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually I do not want to pass same input to create_dialog so kept it as a function instead of fixture

Copy link
Member

Choose a reason for hiding this comment

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

  • you are already passing input dialog, element = create_dialog(appliance, element_data).
  • Also, for now, I can see this function used for this test case only, Want to know use of label=None argument here? or we can directly provide sd = service_dialog.create(label=fauxfactory.gen_alphanumeric(15, start="label_"), description="my dialog")

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have updated the function signature now

@ganeshhubale ganeshhubale added the test-automation To be applied on PR's which are automating existing manual cases label Mar 18, 2020
@ganeshhubale ganeshhubale changed the title [RFR] - Service Dialog test [WIPTEST] - Service Dialog test Mar 18, 2020
@dgaikwad dgaikwad force-pushed the test_catalog_load_values_on_init branch from fb4aade to 100d0b5 Compare March 18, 2020 12:12
@dgaikwad dgaikwad changed the title [WIPTEST] - Service Dialog test [RFR] - Service Dialog test Mar 18, 2020
Copy link
Member

@ganeshhubale ganeshhubale left a comment

Choose a reason for hiding this comment

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

@dgaikwad Some more questions. Please have a look :)

cfme/tests/services/test_dialog_element_in_catalog.py Outdated Show resolved Hide resolved
box_desc="my box desc")
element = box.elements.create(element_data=[element_data])
return sd, element

Copy link
Member

Choose a reason for hiding this comment

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

  • you are already passing input dialog, element = create_dialog(appliance, element_data).
  • Also, for now, I can see this function used for this test case only, Want to know use of label=None argument here? or we can directly provide sd = service_dialog.create(label=fauxfactory.gen_alphanumeric(15, start="label_"), description="my dialog")

@ganeshhubale ganeshhubale changed the title [RFR] - Service Dialog test [WIPTEST] - Service Dialog test Mar 18, 2020
@dgaikwad dgaikwad force-pushed the test_catalog_load_values_on_init branch from 100d0b5 to aaafd6a Compare March 18, 2020 14:16
@dgaikwad dgaikwad changed the title [WIPTEST] - Service Dialog test [RFR] - Service Dialog test Mar 18, 2020
@dgaikwad dgaikwad requested a review from ganeshhubale March 18, 2020 14:39
@john-dupuy
Copy link
Contributor

@ganeshhubale can we move this to 1LP?

Copy link
Member

@ganeshhubale ganeshhubale left a comment

Choose a reason for hiding this comment

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

Need to update this PR with tier marker :)
Thanks @john-dupuy I will move it to 1LP once done with that suggestion

@ganeshhubale ganeshhubale changed the title [RFR] - Service Dialog test [WIPTEST] - Service Dialog test Mar 24, 2020
@dgaikwad dgaikwad force-pushed the test_catalog_load_values_on_init branch from aaafd6a to b720ed2 Compare March 24, 2020 06:29
@dgaikwad
Copy link
Contributor Author

@ganeshhubale required changes are done, please review PR.

@dgaikwad dgaikwad changed the title [WIPTEST] - Service Dialog test [RFR] - Service Dialog test Mar 24, 2020
@ganeshhubale ganeshhubale changed the title [RFR] - Service Dialog test [1LP][RFR] - Service Dialog test Mar 24, 2020
@dajoRH dajoRH changed the title [1LP][RFR] - Service Dialog test [1LP][WIP] - Service Dialog test Mar 24, 2020
@dajoRH dajoRH added the WIP label Mar 24, 2020
@dgaikwad dgaikwad force-pushed the test_catalog_load_values_on_init branch from b720ed2 to 454b361 Compare March 25, 2020 07:22
@dgaikwad dgaikwad changed the title [1LP][WIP] - Service Dialog test [1LP][WIPTEST] - Service Dialog test Mar 25, 2020
@dgaikwad dgaikwad changed the title [1LP][WIPTEST] - Service Dialog test [1LP][RFR] - Service Dialog test Mar 25, 2020
Copy link
Contributor

@digitronik digitronik left a comment

Choose a reason for hiding this comment

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

Nice PR.
@dgaikwad I found one fixture in same file which is creating dialog. Please check it is possible to use same with some modification.

@@ -88,6 +87,18 @@ def custom_categories(appliance):
category.delete_if_exists()


def create_dialog(appliance, element_data):
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

@dgaikwad dgaikwad Mar 31, 2020

Choose a reason for hiding this comment

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

Hello @digitronik , I have tried with fixture which you mentioned here but this fixture is test_required_dialog_elements test-case specific fixture so can not use as normal generic fixture. So now instead of using normal function I have created one generic fixture and automated testcase. from now new testcase also can use new implemented create_service_dialog fixture.

view.element.edit_element(element_data['element_information']['ele_label'])
assert view.element_information.dynamic_chkbox.is_enabled
view.options.click()
request.addfinalizer(dialog.delete_if_exists)
Copy link
Contributor

Choose a reason for hiding this comment

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

Best practice: Always put finalizer after step of creation. here I think your dialog creating at L804.

@digitronik digitronik self-assigned this Mar 25, 2020
@digitronik digitronik changed the title [1LP][RFR] - Service Dialog test [1LP][WIPTEST] - Service Dialog test Mar 25, 2020
@dgaikwad dgaikwad force-pushed the test_catalog_load_values_on_init branch 2 times, most recently from 66422ab to 9104c44 Compare March 26, 2020 09:00
@dajoRH
Copy link
Contributor

dajoRH commented Mar 26, 2020

I detected some fixture changes in commit 9104c441479ab3d4abf3cdc5d07d11ead7273e73

The local fixture service_dialog is used in the following files:

  • cfme/tests/services/test_dialog_element_in_catalog.py
    • catalog_item_local
    • test_required_dialog_elements
    • test_catalog_load_values_on_init

Please, consider creating a PRT run to make sure your fixture changes do not break existing usage 😃

@dgaikwad dgaikwad force-pushed the test_catalog_load_values_on_init branch 2 times, most recently from d6f20cf to 7377076 Compare March 31, 2020 07:51
@dgaikwad dgaikwad changed the title [1LP][WIPTEST] - Service Dialog test [1LP][RFR] - Service Dialog test Mar 31, 2020
Copy link
Contributor

@digitronik digitronik left a comment

Choose a reason for hiding this comment

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

Nice PR. One question please take look.

@@ -718,13 +746,18 @@ def test_load_values_on_init_option_service_dialog_element():
casecomponent: Services
initialEstimate: 1/16h
testSteps:
1. create a service dialog
1. create a service dialog with option dynamic to True
Copy link
Contributor

Choose a reason for hiding this comment

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

It looks like part of test steps not setup. If yes, I would try to create dynamic service dialog as part of test only.
Second thought if it setup; we already have one fixture service_dialog better try to modify that in state of creating new fixture.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

dialog creation is part of testcase so updated tc accordingly.

@dgaikwad dgaikwad changed the title [1LP][RFR] - Service Dialog test [1LP][WIPTEST] - Service Dialog test Mar 31, 2020
@dgaikwad dgaikwad force-pushed the test_catalog_load_values_on_init branch from 7377076 to 491bcf9 Compare March 31, 2020 09:10
@dgaikwad dgaikwad force-pushed the test_catalog_load_values_on_init branch from 491bcf9 to 247dc51 Compare March 31, 2020 09:11
@dgaikwad dgaikwad changed the title [1LP][WIPTEST] - Service Dialog test [1LP][RFR] - Service Dialog test Mar 31, 2020
Copy link
Contributor

@digitronik digitronik left a comment

Choose a reason for hiding this comment

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

LGTM

@digitronik digitronik merged commit 5460ce6 into ManageIQ:master Mar 31, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lint-ok test-automation To be applied on PR's which are automating existing manual cases
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants