Add GUI automation test case for verifying CSR geneartion buttons
Added test case:
- Verify Generate CSR Certificate Button
Change-Id: I452a0bedd2e609891ddf0b8ca5aaf4ea631f4b58
Signed-off-by: manashsarma <manashsarma@in.ibm.com>
diff --git a/gui/gui_test/access_control/test_obmc_gui_certificate.robot b/gui/gui_test/access_control/test_obmc_gui_certificate.robot
index f5e9a75..40e62b6 100644
--- a/gui/gui_test/access_control/test_obmc_gui_certificate.robot
+++ b/gui/gui_test/access_control/test_obmc_gui_certificate.robot
@@ -11,8 +11,23 @@
*** Variables ***
-${xpath_certificate_heading} //h1[text()="SSL certificates"]
-${xpath_add_certificate_button} //button[contains(text(),"Add new certificate")]
+${xpath_certificate_heading} //h1[text()="SSL certificates"]
+${xpath_add_certificate_button} //button[contains(text(),"Add new certificate")]
+${xpath_generate_csr_button} //*[@data-test-id='sslCertificates-button-generateCsr']
+${xpath_generate_csr_heading} //h5[contains(text(), "Generate a Certificate Signing Request")]
+${xpath_select_certificate_type} //*[@data-test-id='modalGenerateCsr-select-certificateType']
+${xpath_select_country} //*[@data-test-id='modalGenerateCsr-select-country']
+${xpath_input_state} //*[@data-test-id='modalGenerateCsr-input-state']
+${xpath_input_city} //*[@data-test-id='modalGenerateCsr-input-city']
+${xpath_input_company_name} //*[@data-test-id='modalGenerateCsr-input-companyName']
+${xpath_input_company_unit} //*[@data-test-id='modalGenerateCsr-input-companyUnit']
+${xpath_input_common_name} //*[@data-test-id='modalGenerateCsr-input-commonName']
+${xpath_input_challenge_password} //*[@data-test-id='modalGenerateCsr-input-challengePassword']
+${xpath_input_contact_person} //*[@data-test-id='modalGenerateCsr-input-contactPerson']
+${xpath_input_email_address} //*[@data-test-id='modalGenerateCsr-input-emailAddress']
+${xpath_generate_csr_submit} //*[@data-test-id='modalGenerateCsr-button-ok']
+${xpath_input_alternate_name} //input[@id='alternate-name']
+${xpath_select_algorithm_button} //*[@data-test-id='modalGenerateCsr-select-keyPairAlgorithm']
*** Test Cases ***
@@ -38,6 +53,26 @@
Page Should Contain Element ${xpath_add_certificate_button}
+Verify Generate CSR Certificate Button
+ [Documentation] Verify existence of all the fields of CSR generation.
+ [Tags] Verify_Generate_CSR_Certificate_Button
+
+ Page Should Contain Element ${xpath_generate_csr_button}
+ Click Element ${xpath_generate_csr_button}
+ Wait Until Page Contains Element ${xpath_generate_csr_heading}
+ Page Should Contain Element ${xpath_select_certificate_type}
+ Page Should Contain Element ${xpath_select_country}
+ Page Should Contain Element ${xpath_input_state}
+ Page Should Contain Element ${xpath_input_city}
+ Page Should Contain Element ${xpath_input_company_name}
+ Page Should Contain Element ${xpath_input_common_name}
+ Page Should Contain Element ${xpath_input_challenge_password}
+ Page Should Contain Element ${xpath_input_contact_person}
+ Page Should Contain Element ${xpath_input_email_address}
+ Page Should Contain Element ${xpath_input_alternate_name}
+ Page Should Contain Element ${xpath_select_algorithm_button}
+ Page Should Contain Element ${xpath_generate_csr_submit}
+
*** Keywords ***