diff --git a/tests/bdd/core/test_NAS_T0985.py b/tests/bdd/core/test_NAS_T0985.py index 0f8452aa6cf..701a1aefcf3 100644 --- a/tests/bdd/core/test_NAS_T0985.py +++ b/tests/bdd/core/test_NAS_T0985.py @@ -21,8 +21,8 @@ @scenario('features/NAS-T985.feature', 'Create a pool call tank') -def test_create_a_pool_call_tank_with_2_disk(driver): - """Create a pool call tank with 2 disk.""" +def test_create_a_pool_call_tank(driver): + """Create a pool call tank.""" @given('the browser is open, the FreeNAS URL and logged in') @@ -96,9 +96,9 @@ def when_the_pool_manager_appears_enter_the_tank_for_pool_name(driver): @then('click ada1 checkbox, press the right arrow under Data VDevs') def click_ada1_checkbox_press_the_right_arrow_under_data_vdevs(driver): """click ada1 checkbox, press the right arrow under Data VDevs.""" - assert wait_on_element(driver, 7, '//mat-checkbox[@id="pool-manager__disks-ada1"]', 'clickable') - assert wait_on_element(driver, 7, '//mat-checkbox[@id="pool-manager__disks-ada2"]', 'clickable') - driver.find_element_by_xpath('//mat-checkbox[@id="pool-manager__disks-ada1"]').click() + assert wait_on_element(driver, 7, '//mat-checkbox[@id="pool-manager__disks-da1"]', 'clickable') + assert wait_on_element(driver, 7, '//mat-checkbox[@id="pool-manager__disks-da2"]', 'clickable') + driver.find_element_by_xpath('//mat-checkbox[@id="pool-manager__disks-da1"]').click() assert wait_on_element(driver, 7, '//button[@id="vdev__add-button"]', 'clickable') driver.find_element_by_xpath('//button[@id="vdev__add-button"]').click() assert wait_on_element(driver, 7, '//mat-checkbox[@id="pool-manager__force-submit-checkbox"]', 'clickable') diff --git a/tests/bdd/core/test_NAS_T1001.py b/tests/bdd/core/test_NAS_T1001.py index 02b60e15861..b85136815d6 100644 --- a/tests/bdd/core/test_NAS_T1001.py +++ b/tests/bdd/core/test_NAS_T1001.py @@ -66,35 +66,36 @@ def when_the_disks_page_appears_click_name_to_sort_in_alphabetical_order(driver) """when the Disks page appears, click name to sort in alphabetical order.""" assert wait_on_element(driver, 7, '//div[contains(.,"Disks")]') assert wait_on_element(driver, 7, '//span[contains(.,"Name")]') - ada0 = '' - while ada0 != 'ada0': + disk0 = driver.find_element_by_xpath('(//datatable-body-cell[2]/div/div)[1]').text + if disk0 != 'da0': driver.find_element_by_xpath('//span[contains(.,"Name")]').click() - ada0 = driver.find_element_by_xpath('(//datatable-body-cell[2]/div/div)[1]').text + disk0 = driver.find_element_by_xpath('(//datatable-body-cell[2]/div/div)[1]').text + assert disk0 == 'da0' @then('when all disks appear in alphabetical order, click on the ada3 disk arrow') def when_all_disks_appear_in_alphabetical_order_click_on_the_ada3_disk_arrow(driver): """when all disks appear in alphabetical order, click on the ada3 disk arrow.""" # Verify disk are sorted - disk_list = {1: 'ada0', 2: 'ada1', 3: 'ada2', 4: 'ada3'} + disk_list = {1: 'da0', 2: 'da1', 3: 'da2', 4: 'da3', 5: 'da4'} for num in list(disk_list.keys()): disk = driver.find_element_by_xpath(f'(//datatable-body-cell[2]/div/div)[{num}]').text assert disk == disk_list[num] - assert wait_on_element(driver, 7, '//a[@ix-auto="expander__ada3"]') - driver.find_element_by_xpath('//a[@ix-auto="expander__ada3"]').click() + assert wait_on_element(driver, 7, '//a[@ix-auto="expander__da3"]') + driver.find_element_by_xpath('//a[@ix-auto="expander__da3"]').click() @then('click the WIPE button') def click_the_wipe_button(driver): """click the WIPE button.""" - assert wait_on_element(driver, 7, '//button[@ix-auto="button__WIPE_ada3_ada3"]') - driver.find_element_by_xpath('//button[@ix-auto="button__WIPE_ada3_ada3"]').click() + assert wait_on_element(driver, 7, '//button[@ix-auto="button__WIPE_da3_da3"]') + driver.find_element_by_xpath('//button[@ix-auto="button__WIPE_da3_da3"]').click() @then('The Wipe Disk ada3 widget should appear') def the_wipe_disk_ada3_widget_should_appear(driver): """The Wipe Disk ada3 widget should appear.""" - assert wait_on_element(driver, 7, '//h1[contains(.,"Wipe Disk ada3")]') + assert wait_on_element(driver, 7, '//h1[contains(.,"Wipe Disk da3")]') @then('select the Quick Method and click WIPE') @@ -110,7 +111,7 @@ def select_the_quick_method_and_click_wipe(driver): @then('check to confirm, and click continue') def check_to_confirm_and_click_continue(driver): """check to confirm, and click continue.""" - assert wait_on_element(driver, 7, '//h1[contains(.,"Wipe Disk ada3")]') + assert wait_on_element(driver, 7, '//h1[contains(.,"Wipe Disk da3")]') driver.find_element_by_xpath('//mat-checkbox[@ix-auto="checkbox__CONFIRM"]').click() driver.find_element_by_xpath('//button[@ix-auto="button__CONTINUE"]').click() diff --git a/tests/bdd/core/test_NAS_T1002.py b/tests/bdd/core/test_NAS_T1002.py index 8c171cfee6c..676b042113d 100644 --- a/tests/bdd/core/test_NAS_T1002.py +++ b/tests/bdd/core/test_NAS_T1002.py @@ -92,8 +92,8 @@ def when_the_pool_manager_page_open_input_system_for_pool_name(driver): @then('click the checkbox next to ada3, and press the right arrow under data vdev, click create') def click_the_checkbox_next_to_ada3_and_press_the_right_arrow_under_data_vdev_click_create(driver): """click the checkbox next to ada3, and press the right arrow under data vdev, click create.""" - assert wait_on_element(driver, 7, '//mat-checkbox[@id="pool-manager__disks-ada3"]', 'clickable') - driver.find_element_by_xpath('//mat-checkbox[@id="pool-manager__disks-ada3"]').click() + assert wait_on_element(driver, 7, '//mat-checkbox[@id="pool-manager__disks-da3"]', 'clickable') + driver.find_element_by_xpath('//mat-checkbox[@id="pool-manager__disks-da3"]').click() assert wait_on_element(driver, 7, '//button[@id="vdev__add-button"]', 'clickable') driver.find_element_by_xpath('//button[@id="vdev__add-button"]').click() assert wait_on_element(driver, 7, '//mat-checkbox[@id="pool-manager__force-submit-checkbox"]', 'clickable') diff --git a/tests/bdd/core/test_NAS_T1080.py b/tests/bdd/core/test_NAS_T1080.py index 923a9b2efde..047e4ea639f 100644 --- a/tests/bdd/core/test_NAS_T1080.py +++ b/tests/bdd/core/test_NAS_T1080.py @@ -118,8 +118,8 @@ def click_on_the_encryption_checkbox_then_confirm(driver): @then('click the ada2 checkbox, press the right arrow under Data VDevs') def click_the_ada2_checkbox_press_the_right_arrow_under_data_vdevs(driver): """click the ada2 checkbox, press the right arrow under Data VDevs.""" - assert wait_on_element(driver, 5, '//mat-checkbox[@id="pool-manager__disks-ada2"]', 'clickable') - driver.find_element_by_xpath('//mat-checkbox[@id="pool-manager__disks-ada2"]').click() + assert wait_on_element(driver, 5, '//mat-checkbox[@id="pool-manager__disks-da2"]', 'clickable') + driver.find_element_by_xpath('//mat-checkbox[@id="pool-manager__disks-da2"]').click() assert wait_on_element(driver, 5, '//button[@id="vdev__add-button"]') driver.find_element_by_xpath('//button[@id="vdev__add-button"]').click() diff --git a/tests/bdd/core/test_NAS_T1085.py b/tests/bdd/core/test_NAS_T1085.py index f4be91cc9e8..4bfcdc6e9f5 100644 --- a/tests/bdd/core/test_NAS_T1085.py +++ b/tests/bdd/core/test_NAS_T1085.py @@ -99,8 +99,8 @@ def click_on_the_encryption_checkbox_then_confirm(driver): @then('click the ada2 checkbox, press the right arrow under Data VDevs') def click_the_ada2_checkbox_press_the_right_arrow_under_data_vdevs(driver): """click the ada2 checkbox, press the right arrow under Data VDevs.""" - assert wait_on_element(driver, 5, '//mat-checkbox[@id="pool-manager__disks-ada2"]', 'clickable') - driver.find_element_by_xpath('//mat-checkbox[@id="pool-manager__disks-ada2"]').click() + assert wait_on_element(driver, 5, '//mat-checkbox[@id="pool-manager__disks-da2"]', 'clickable') + driver.find_element_by_xpath('//mat-checkbox[@id="pool-manager__disks-da2"]').click() assert wait_on_element(driver, 5, '//button[@id="vdev__add-button"]') driver.find_element_by_xpath('//button[@id="vdev__add-button"]').click() diff --git a/tests/bdd/ha-bhyve02/test_NAS_T0904.py b/tests/bdd/ha-bhyve02/test_NAS_T0904.py index b9e37fa2808..6583f88f95e 100644 --- a/tests/bdd/ha-bhyve02/test_NAS_T0904.py +++ b/tests/bdd/ha-bhyve02/test_NAS_T0904.py @@ -72,11 +72,7 @@ def the_service_page_should_open(driver): @then('press on configure(pencil) SSH') def press_on_configure_ssh(driver): """press on configure(pencil) SSH.""" - assert wait_on_element(driver, 5, '//button[@ix-auto="button__S3_Actions"]') - # Scroll to SSH service - element = driver.find_element_by_xpath('//button[@ix-auto="button__S3_Actions"]') - driver.execute_script("arguments[0].scrollIntoView();", element) - time.sleep(1) + assert wait_on_element(driver, 5, '//button[@ix-auto="button__SSH_Actions"]', 'clickable') driver.find_element_by_xpath('//button[@ix-auto="button__SSH_Actions"]').click() @@ -107,11 +103,6 @@ def click_save(driver): def click_start_automatically_ssh_checkbox_and_enable_the_ssh_service(driver): """click Start Automatically SSH checkbox and enable the SSH service.""" assert wait_on_element(driver, 5, '//services') - assert wait_on_element(driver, 5, '//button[@ix-auto="button__S3_Actions"]') - # Scroll to SSH service - element = driver.find_element_by_xpath('//button[@ix-auto="button__S3_Actions"]') - driver.execute_script("arguments[0].scrollIntoView();", element) - time.sleep(1) assert wait_on_element(driver, 5, '//mat-checkbox[@ix-auto="checkbox__SSH_Start Automatically"]', 'clickable') value_exist = attribute_value_exist(driver, '//mat-checkbox[@ix-auto="checkbox__SSH_Start Automatically"]', 'class', 'mat-checkbox-checked') if not value_exist: