mirror of
https://github.com/TrentSPalmer/hugo_themes_report.git
synced 2024-12-04 08:41:29 -08:00
add test_description.py
This commit is contained in:
parent
d9eca45945
commit
8cf060247c
33
test/test_description.py
Normal file
33
test/test_description.py
Normal file
@ -0,0 +1,33 @@
|
||||
from test.test_selenium import TestSelenium
|
||||
from unittest import TestCase
|
||||
|
||||
|
||||
class TestDescription(TestSelenium, TestCase):
|
||||
def setUp(self):
|
||||
super(TestDescription, self).setUp()
|
||||
self.plus_button = self.driver.find_element_by_id('plus-button')
|
||||
self.desc = self.driver.find_element_by_id('description')
|
||||
self.tp_ShowingColumns = "ShowingColumns: "
|
||||
self.tp_SortedBy = "; SortedBy: "
|
||||
self.tp_Minver = "; FilteredBy: MinHugoVersion="
|
||||
self.tp_Licenses = "; Licenses="
|
||||
self.tp_Tags = "; Tags="
|
||||
self.tp_Features = "; Features="
|
||||
self.columns = "theme, date, stars, commit"
|
||||
self.sorted_by = "date, stars, name, minVer, license"
|
||||
self.min_ver, self.licenses = "none", "none"
|
||||
self.tags, self.features = "none", "none"
|
||||
self.plus_button.click()
|
||||
|
||||
def coalesced_text_test(self):
|
||||
self.assertEqual(
|
||||
self.desc.text,
|
||||
f"{self.tp_ShowingColumns}{self.columns}"
|
||||
f"{self.tp_SortedBy}{self.sorted_by}"
|
||||
f"{self.tp_Minver}{self.min_ver}{self.tp_Licenses}{self.licenses}"
|
||||
f"{self.tp_Tags}{self.tags}{self.tp_Features}{self.features}")
|
||||
|
||||
|
||||
class TestDefaultDescription(TestDescription, TestCase):
|
||||
def test_default_desc(self):
|
||||
self.coalesced_text_test()
|
Loading…
Reference in New Issue
Block a user