Skip to content

Commit

Permalink
changes after review
Browse files Browse the repository at this point in the history
  • Loading branch information
pszkamruk-splunk committed Nov 30, 2023
1 parent 04c6fcb commit b0f5f0e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions ui_tests/pages/groups_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@


class GroupsPage:
def checkIfGroupsTableIsDisplayed(self):
def check_if_groups_table_is_displayed(self):
logger.info("Check if groups page is displayed")
groups_table_xpath = "//div[@data-test='sc4snmp:group-table']"
groups_container = driver.find_element(By.XPATH, groups_table_xpath)
Expand Down Expand Up @@ -181,21 +181,21 @@ def confirm_delete(self):

def set_device_port(self, port, edit=False):
logger.info(f"set device port: {port}")
self._set_group_filed("port", port, edit)
self._set_group_field("port", port, edit)

def set_community_string(self, community_string, edit=False):
logger.info(f"set device community string: {community_string}")
self._set_group_filed("community_string", community_string, edit)
self._set_group_field("community_string", community_string, edit)

def set_secret(self, secret, edit=False):
logger.info(f"set device secret: {secret}")
self._set_group_filed("secret", secret, edit)
self._set_group_field("secret", secret, edit)

def set_security_engine(self, security_engine, edit=False):
logger.info(f"set security engine: {security_engine}")
self._set_group_filed("security_engine", security_engine, edit)
self._set_group_field("security_engine", security_engine, edit)

def _set_group_filed(self, field_name, value, edit=False):
def _set_group_field(self, field_name, value, edit=False):
xpath = {
"port": "//div[@data-test='sc4snmp:form:port-input']//span//input",
"community_string": "//div[@data-test='sc4snmp:form:community-input']//span//input",
Expand Down
2 changes: 1 addition & 1 deletion ui_tests/tests/test_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def test_check_selected_tab_behaviour():
p_header.switch_to_groups()
url = driver.current_url
assert "/?tab=Groups" in url
assert p_groups.checkIfGroupsTableIsDisplayed()
assert p_groups.check_if_groups_table_is_displayed()
driver.refresh()
url = driver.current_url
assert "/?tab=Groups" in url
Expand Down

0 comments on commit b0f5f0e

Please sign in to comment.