mirror of
https://github.com/bunkerity/bunkerweb
synced 2026-05-24 09:28:37 +00:00
update tests
* wait 5 seconds after unban fon ban-page test * fix bad logic on is-no-match for global-config-page test
This commit is contained in:
parent
30d5904067
commit
4cba247f49
2 changed files with 3 additions and 3 deletions
|
|
@ -100,11 +100,11 @@ try:
|
|||
DRIVER.execute_script("arguments[0].click()", delete_ban_checkbox)
|
||||
|
||||
unban_button = safe_get_element(DRIVER, By.XPATH, "//button[@data-unban-btn='']")
|
||||
assert isinstance(delete_ban_button, WebElement), "Delete button is not WebElement"
|
||||
assert isinstance(unban_button, WebElement), "Delete button is not WebElement"
|
||||
|
||||
DRIVER.execute_script("arguments[0].click()", unban_button)
|
||||
|
||||
access_page(DRIVER, "/html/body/aside[1]/div[1]/div[3]/ul/li[9]/a", "bans")
|
||||
refresh = safe_get_element(DRIVER, By.XPATH, "//button[@data-unban-btn='']", 5)
|
||||
|
||||
try:
|
||||
entries = safe_get_element(DRIVER, By.XPATH, "//ul[@data-bans-list='']/li", multiple=True, error=True)
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ try:
|
|||
sleep(0.1)
|
||||
|
||||
# Check that the no matching element is shown and other card hide
|
||||
is_no_match = DRIVER.execute_script('return document.querySelector("[data-global-config-nomatch]").classList.contains("hidden")')
|
||||
is_no_match = DRIVER.execute_script('return !document.querySelector("[data-global-config-nomatch]").classList.contains("hidden")')
|
||||
if not is_no_match:
|
||||
log_error(f"Filter keyword with value {keyword_no_match} shouldn't match something.")
|
||||
exit(1)
|
||||
|
|
|
|||
Loading…
Reference in a new issue