Fixed pdf labels test

Squashed commit of the following:

commit 5a5ce83065be076623259c21ad4b6a7902236809
Author: naomi <naomi@happycatsin.space>
Date:   Fri Feb 4 07:38:59 2022 +0200

    mob next [ci-skip] [ci skip] [skip ci]
This commit is contained in:
naomi 2022-02-04 07:39:10 +02:00
parent 5f0c77c499
commit 265838b36b
3 changed files with 7 additions and 5 deletions

View File

@ -10,6 +10,7 @@ from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.common.action_chains import ActionChains
from typing import Tuple, List
@ -192,8 +193,9 @@ class SearchExportTester(BaseTester):
self.find_element_by_id(self.contact_selectall_id).click()
self.find_element_by_id(self.contact_dropdown_id).click()
self.wait_until_visible((By.XPATH, self.get_actions_dropdown_option_selector(option_label)))
contact_export_option = self.find_element(By.XPATH, self.get_actions_dropdown_option_selector(option_label))
contact_export_option.click()
option = self.find_element(By.XPATH, self.get_actions_dropdown_option_selector(option_label))
ActionChains(self.browser).move_to_element(option).perform()
option.click()
def download_export(self, data: dict) -> requests.Response:
"""

View File

@ -33,7 +33,7 @@ class TestSteeringCommitteePrintLabels(SearchExportTester):
self._wait_for_search_to_load()
result_no = self._get_contact_search_number()
self.debug("exporting results using the magic dropdown")
self._select_option_from_magic_dropdown(self.mail_label_option)
self._select_option_from_magic_dropdown_label("Mailing labels - print")
# By omitting the field, we are effectively disabling the do not mail filter
data = {
"_qf_default": "Label:submit",

View File

@ -32,8 +32,8 @@ if __name__ == "__main__":
arguments.user, arguments.passwd, arguments.dev, arguments.show_browser
)
#TestActivitiesTab(*cl_arg).test_all_hardcoded_contacts()
TestContactExport(*cl_arg).test_hardcoded_search_terms()
#TestSteeringCommitteePrintLabels(*cl_arg).test()
#TestContactExport(*cl_arg).test_hardcoded_search_terms()
TestSteeringCommitteePrintLabels(*cl_arg).test()
# Mailing list
# Load mailing list test and enter test data