Skip to content

Commit

Permalink
Wait for dialog actions window in Collabora tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sunetfreitag committed Feb 7, 2025
1 parent b1a3371 commit 18466cd
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions test_collabora_selenium.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,8 +315,8 @@ def test_markup_text(self):
# wait.until(EC.presence_of_element_located((By.CLASS_NAME, 'icon-filetype-text'))).click()
wait.until(EC.element_to_be_clickable((By.XPATH, "//*[contains(@class, 'action-button__text') and text()='New text file']"))).click()
time.sleep(g_clickWait)
# Starting with Nextcloud 28, we have to rename the file
wait.until(EC.presence_of_element_located((By.XPATH, "//*[contains(text(), 'New document')]")))
self.logger.info(f'Wait for dialog actions window')
wait.until(EC.presence_of_element_located((By.XPATH, "//*[contains(@class, 'dialog__actions')]")))
self.logger.info(f'Renaming the file we just created to {g_filename}.md')
time.sleep(g_clickWait)
ActionChains(self.driver).key_down(Keys.CONTROL).send_keys('a').key_up(Keys.CONTROL).perform()
Expand Down Expand Up @@ -470,8 +470,8 @@ def test_collabora_document(self):
self.logger.info(f'Click on new document')
wait.until(EC.element_to_be_clickable((By.XPATH, "//*[contains(@class, 'action-button__text') and text()='New document']"))).click()
time.sleep(g_clickWait)
# Starting with Nextcloud 28, we have to rename the file
wait.until(EC.presence_of_element_located((By.XPATH, "//*[contains(text(), 'New document')]")))
self.logger.info(f'Wait for dialog actions window')
wait.until(EC.presence_of_element_located((By.XPATH, "//*[contains(@class, 'dialog__actions')]")))
self.logger.info(f'Renaming the file we just created to {g_filename}.odt')
time.sleep(g_clickWait)
ActionChains(self.driver).key_down(Keys.CONTROL).send_keys('a').key_up(Keys.CONTROL).perform()
Expand Down Expand Up @@ -641,8 +641,8 @@ def test_collabora_spreadsheet(self):
# wait.until(EC.presence_of_element_located((By.CLASS_NAME, 'icon-filetype-spreadsheet'))).click()
wait.until(EC.element_to_be_clickable((By.XPATH, "//*[contains(@class, 'action-button__text') and text()='New spreadsheet']"))).click()
time.sleep(g_clickWait)
# Starting with Nextcloud 28, we have to rename the file
wait.until(EC.presence_of_element_located((By.XPATH, "//*[contains(text(), 'New document')]")))
self.logger.info(f'Wait for dialog actions window')
wait.until(EC.presence_of_element_located((By.XPATH, "//*[contains(@class, 'dialog__actions')]")))
self.logger.info(f'Renaming the file we just created to {g_filename}.ods')
time.sleep(g_clickWait)
ActionChains(self.driver).key_down(Keys.CONTROL).send_keys('a').key_up(Keys.CONTROL).perform()
Expand Down Expand Up @@ -812,8 +812,8 @@ def test_collabora_presentation(self):
time.sleep(g_clickWait)
wait.until(EC.element_to_be_clickable((By.XPATH, "//*[contains(@class, 'action-button__text') and text()='New presentation']"))).click()
time.sleep(g_clickWait)
# Starting with Nextcloud 28, we have to rename the file
wait.until(EC.presence_of_element_located((By.XPATH, "//*[contains(text(), 'New document')]")))
self.logger.info(f'Wait for dialog actions window')
wait.until(EC.presence_of_element_located((By.XPATH, "//*[contains(@class, 'dialog__actions')]")))
self.logger.info(f'Renaming the file we just created to {g_filename}.odp')
time.sleep(g_clickWait)
ActionChains(self.driver).key_down(Keys.CONTROL).send_keys('a').key_up(Keys.CONTROL).perform()
Expand Down

0 comments on commit 18466cd

Please # to comment.