From 936afe9d7d2703f717af57a8f3a30f80d973a0ad Mon Sep 17 00:00:00 2001 From: Arona Jones Date: Wed, 22 Dec 2021 14:59:02 +0000 Subject: [PATCH] Tests passing! Fixed not using region for item modal, and overflow error on paperwork with really long description. Looks junk but I'm not really bothered --- RIGS/templates/event_print_page.xml | 2 +- RIGS/tests/regions.py | 4 ++-- RIGS/tests/test_unit.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/RIGS/templates/event_print_page.xml b/RIGS/templates/event_print_page.xml index c038d10f..de8f0a0e 100644 --- a/RIGS/templates/event_print_page.xml +++ b/RIGS/templates/event_print_page.xml @@ -12,7 +12,7 @@ {{object.start_date|date:"D jS N Y"}} - + {{ object.description|default_if_none:""|markdown:"rml" }} diff --git a/RIGS/tests/regions.py b/RIGS/tests/regions.py index be7d9b7e..4ae75032 100644 --- a/RIGS/tests/regions.py +++ b/RIGS/tests/regions.py @@ -1,7 +1,7 @@ from pypom import Region from selenium.webdriver.common.by import By -from PyRIGS.tests.regions import TextBox, Modal +from PyRIGS.tests.regions import TextBox, Modal, SimpleMDETextArea class Header(Region): @@ -42,7 +42,7 @@ class ItemModal(Modal): form_items = { 'name': (TextBox, (By.ID, 'item_name')), - 'description': (TextBox, (By.ID, 'item_description')), + 'description': (SimpleMDETextArea, (By.ID, 'item_description')), 'quantity': (TextBox, (By.ID, 'item_quantity')), 'price': (TextBox, (By.ID, 'item_cost')) } diff --git a/RIGS/tests/test_unit.py b/RIGS/tests/test_unit.py index e6f3024a..c6f974a3 100644 --- a/RIGS/tests/test_unit.py +++ b/RIGS/tests/test_unit.py @@ -577,4 +577,4 @@ which you wish to be displayed literally, ex.: \`foo\`, \*bar\*, etc. def test_linebreaks(self): html = markdown_filter(self.markdown) - self.assertIn("Itemized lists
\nlook like", html) + self.assertIn("Itemized lists
\nlook like", html)