Skip to content

Commit

Permalink
Fixed starting SMB service for all HA test
Browse files Browse the repository at this point in the history
  • Loading branch information
ericbsd committed Apr 23, 2024
1 parent 970b9a1 commit ff3ef4a
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 17 deletions.
5 changes: 0 additions & 5 deletions tests/bdd/ha-bhyve02/test_NAS_T0965.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,11 +151,6 @@ def the_service_page_should_open(driver):
def if_the_smb_service_is_not_started_start_the_service(driver):
"""If the SMB service is not started start the service."""
assert wait_on_element(driver, 7, '//services')
assert wait_on_element(driver, 7, '//button[@ix-auto="button__S3_Actions"]')
# Scroll to SMB 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, 7, '//div[@ix-auto="overlay__SMB_Running"]', 'clickable')
value_exist = attribute_value_exist(driver, '//mat-slide-toggle[@ix-auto="slider__SMB_Running"]', 'class', 'mat-checked')
if not value_exist:
Expand Down
7 changes: 1 addition & 6 deletions tests/bdd/ha-bhyve02/test_NAS_T0968.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,12 +149,7 @@ def the_service_page_should_open(driver):
def if_the_smb_service_is_not_started_start_the_service(driver):
"""If the SMB service is not started start the service."""
assert wait_on_element(driver, 7, '//services')
assert wait_on_element(driver, 7, '//button[@ix-auto="button__S3_Actions"]')
# Scroll to SMB service
element = driver.find_element_by_xpath('//button[@ix-auto="button__S3_Actions"]')
driver.execute_script("arguments[0].scrollIntoView();", element)
time.sleep(1)
driver.find_element_by_xpath('//div[@ix-auto="value__SMB"]')
assert wait_on_element(driver, 7, '//div[@ix-auto="overlay__SMB_Running"]', 'clickable')
value_exist = attribute_value_exist(driver, '//mat-slide-toggle[@ix-auto="slider__SMB_Running"]', 'class', 'mat-checked')
if not value_exist:
driver.find_element_by_xpath('//div[@ix-auto="overlay__SMB_Running"]').click()
Expand Down
7 changes: 1 addition & 6 deletions tests/bdd/ha-bhyve02/test_NAS_T0971.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,12 +149,7 @@ def the_service_page_should_open(driver):
def if_the_smb_service_is_not_started_start_the_service(driver):
"""If the SMB service is not started start the service."""
assert wait_on_element(driver, 7, '//services')
assert wait_on_element(driver, 7, '//button[@ix-auto="button__S3_Actions"]')
# Scroll to SMB service
element = driver.find_element_by_xpath('//button[@ix-auto="button__S3_Actions"]')
driver.execute_script("arguments[0].scrollIntoView();", element)
time.sleep(1)
driver.find_element_by_xpath('//div[@ix-auto="value__SMB"]')
assert wait_on_element(driver, 7, '//div[@ix-auto="overlay__SMB_Running"]', 'clickable')
value_exist = attribute_value_exist(driver, '//mat-slide-toggle[@ix-auto="slider__SMB_Running"]', 'class', 'mat-checked')
if not value_exist:
driver.find_element_by_xpath('//div[@ix-auto="overlay__SMB_Running"]').click()
Expand Down

0 comments on commit ff3ef4a

Please sign in to comment.