From 86ef1d47e8eae316cdab0bed90118b93d881c46a Mon Sep 17 00:00:00 2001 From: Ozzie Isaacs Date: Mon, 30 Aug 2021 08:02:21 +0200 Subject: [PATCH] Bugfixes from testrun --- cps/helper.py | 2 +- cps/templates/config_edit.html | 2 +- cps/templates/user_table.html | 2 +- test/Calibre-Web TestSummary_Linux.html | 2424 +++++++++++------------ 4 files changed, 1213 insertions(+), 1217 deletions(-) diff --git a/cps/helper.py b/cps/helper.py index a78b7c21..f7b72a8d 100644 --- a/cps/helper.py +++ b/cps/helper.py @@ -234,7 +234,7 @@ def get_valid_filename(value, replace_whitespace=True): value = value[:-1]+u'_' value = value.replace("/", "_").replace(":", "_").strip('\0') if use_unidecode: - if config.config_unicode_filename: + if not config.config_unicode_filename: value = (unidecode.unidecode(value)) else: value = value.replace(u'§', u'SS') diff --git a/cps/templates/config_edit.html b/cps/templates/config_edit.html index bf9f03ee..e062fae5 100644 --- a/cps/templates/config_edit.html +++ b/cps/templates/config_edit.html @@ -8,7 +8,7 @@

{{title}}

-
+

diff --git a/cps/templates/user_table.html b/cps/templates/user_table.html index 9b44623b..1db9f5ac 100644 --- a/cps/templates/user_table.html +++ b/cps/templates/user_table.html @@ -178,7 +178,7 @@ {{ restrict_modal() }} {% endblock %} {% block js %} - + diff --git a/test/Calibre-Web TestSummary_Linux.html b/test/Calibre-Web TestSummary_Linux.html index 5175c380..6d30c17a 100644 --- a/test/Calibre-Web TestSummary_Linux.html +++ b/test/Calibre-Web TestSummary_Linux.html @@ -37,20 +37,20 @@
-

Start Time: 2021-08-27 20:45:00

+

Start Time: 2021-08-29 19:10:57

-

Stop Time: 2021-08-28 00:16:11

+

Stop Time: 2021-08-29 22:03:18

-

Duration: 2h 48 min

+

Duration: 2h 14 min

@@ -403,289 +403,45 @@ - TestEbookConvertCalibre - 11 - 2 - 2 - 7 + _FailedTest + 1 + 0 + 0 + 1 0 - Detail + Detail - + -
TestEbookConvertCalibre - test_convert_deactivate
- - PASS - - - - - - -
TestEbookConvertCalibre - test_convert_email
+
_FailedTest - test_ebook_convert
- ERROR + ERROR
-
Traceback (most recent call last):
-  File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.8/site-packages/selenium/webdriver/remote/switch_to.py", line 82, in frame
-    frame_reference = self._driver.find_element(By.ID, frame_reference)
-  File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 976, in find_element
-    return self.execute(Command.FIND_ELEMENT, {
-  File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
-    self.error_handler.check_response(response)
-  File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.8/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
-    raise exception_class(message, screen, stacktrace)
-selenium.common.exceptions.NoSuchElementException: Message: Unable to locate element: [id="description_ifr"]
-
-
-During handling of the above exception, another exception occurred:
-
-Traceback (most recent call last):
-  File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.8/site-packages/selenium/webdriver/remote/switch_to.py", line 85, in frame
-    frame_reference = self._driver.find_element(By.NAME, frame_reference)
-  File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 976, in find_element
-    return self.execute(Command.FIND_ELEMENT, {
-  File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
-    self.error_handler.check_response(response)
-  File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.8/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
-    raise exception_class(message, screen, stacktrace)
-selenium.common.exceptions.NoSuchElementException: Message: Unable to locate element: [name="description_ifr"]
-
-
-During handling of the above exception, another exception occurred:
-
-Traceback (most recent call last):
   File "/home/ozzie/Development/calibre-web-test/test/test_edit_additional_books.py", line 673, in test_xss_comment_edit
-    self.edit_book(1, content={'description': ''})
-  File "/home/ozzie/Development/calibre-web-test/test/helper_ui.py", line 1608, in edit_book
-    cls.driver.switch_to.frame("description_ifr")
-  File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.8/site-packages/selenium/webdriver/remote/switch_to.py", line 87, in frame
-    raise NoSuchFrameException(frame_reference)
-selenium.common.exceptions.NoSuchFrameException: Message: description_ifr
+ self.check_element_on_page((By.ID, "edit_book")).click() +AttributeError: 'bool' object has no attribute 'click'
@@ -1235,10 +819,8 @@ selenium.common.exceptions.NoSuchFrameException: Message: description_ifr
Traceback (most recent call last):
-  File "/home/ozzie/Development/calibre-web-test/test/test_edit_additional_books.py", line 687, in test_xss_custom_comment_edit
-    self.edit_book(1, custom_content={'Custom Comment 人物': ''})
-  File "/home/ozzie/Development/calibre-web-test/test/helper_ui.py", line 1634, in edit_book
-    submit.click()
+  File "/home/ozzie/Development/calibre-web-test/test/test_edit_additional_books.py", line 691, in test_xss_custom_comment_edit
+    self.check_element_on_page((By.ID, "edit_book")).click()
 AttributeError: 'bool' object has no attribute 'click'
@@ -1253,8 +835,8 @@ AttributeError: 'bool' object has no attribute 'click' TestEditBooks 35 - 33 - 1 + 32 + 2 0 1 @@ -1273,11 +855,31 @@ AttributeError: 'bool' object has no attribute 'click' - +
TestEditBooks - test_edit_author
- PASS + +
+ FAIL +
+ + + + @@ -1291,32 +893,11 @@ AttributeError: 'bool' object has no attribute 'click' - +
TestEditBooks - test_edit_comments
- -
- FAIL -
- - - - + PASS @@ -1447,11 +1028,31 @@ AssertionError: '' != 'bogomirä 人物' - +
TestEditBooks - test_edit_title
- PASS + +
+ FAIL +
+ + + + @@ -1726,8 +1327,8 @@ AssertionError: '' != 'bogomirä 人物' TestEditBooksOnGdrive 20 - 19 - 1 + 18 + 2 0 0 @@ -1746,11 +1347,31 @@ AssertionError: '' != 'bogomirä 人物' - +
TestEditBooksOnGdrive - test_edit_author
- PASS + +
+ FAIL +
+ + + + @@ -1764,32 +1385,11 @@ AssertionError: '' != 'bogomirä 人物' - +
TestEditBooksOnGdrive - test_edit_comments
- -
- FAIL -
- - - - + PASS @@ -1893,11 +1493,31 @@ AssertionError: '' != 'bogomirä 人物' - +
TestEditBooksOnGdrive - test_edit_title
- PASS + +
+ FAIL +
+ + + + @@ -1939,12 +1559,12 @@ AssertionError: '' != 'bogomirä 人物' - + TestSTARTTLS 3 - 1 + 3 + 0 0 - 2 0 Detail @@ -1953,60 +1573,20 @@ AssertionError: '' != 'bogomirä 人物' - +
TestSTARTTLS - test_STARTTLS
- -
- ERROR -
- - - - + PASS - +
TestSTARTTLS - test_STARTTLS_SSL_setup_error
- -
- ERROR -
- - - - + PASS @@ -2021,12 +1601,12 @@ IndexError: list index out of range - + TestSSL 6 - 1 + 6 + 0 0 - 5 0 Detail @@ -2035,60 +1615,20 @@ IndexError: list index out of range - +
TestSSL - test_SSL_None_setup_error
- -
- ERROR -
- - - - + PASS - +
TestSSL - test_SSL_STARTTLS_setup_error
- -
- ERROR -
- - - - + PASS @@ -2102,159 +1642,29 @@ IndexError: list index out of range - +
TestSSL - test_SSL_non_admin_user
- -
- ERROR -
- - - - + PASS - +
TestSSL - test_SSL_only
- -
- ERROR -
- - - - + PASS - +
TestSSL - test_email_limit
- -
- ERROR -
- - - - - - - - - - - _ErrorHolder - 1 - 0 - 0 - 1 - 0 - - Detail - - - - - - - -
tearDownClass (test_email_ssl)
- - -
- ERROR -
- - - - + PASS @@ -2268,13 +1678,13 @@ selenium.common.exceptions.NoSuchElementException: Message: Unable to locate ele 0 0 - Detail + Detail - +
TestBookDatabase - test_invalid_book_path
@@ -2292,13 +1702,13 @@ selenium.common.exceptions.NoSuchElementException: Message: Unable to locate ele 0 0 - Detail + Detail - +
TestErrorReadColumn - test_invalid_custom_column
@@ -2316,25 +1726,25 @@ selenium.common.exceptions.NoSuchElementException: Message: Unable to locate ele 0 2 - Detail + Detail - +
TestFilePicker - test_filepicker_all_file
- SKIP + SKIP
-