@@ -0,0 +1,24 @@
|
||||
"""UI-контракт /components."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import unittest
|
||||
|
||||
from tests.helpers.zootech_test_helpers import STATIC
|
||||
|
||||
|
||||
class ComponentsUiContractTests(unittest.TestCase):
|
||||
def setUp(self) -> None:
|
||||
self.html = (STATIC / "components.html").read_text(encoding="utf-8")
|
||||
|
||||
def test_fetches_components_api(self) -> None:
|
||||
self.assertIn("fetch('/api/components'", self.html)
|
||||
self.assertIn("/api/components/feed-types", self.html)
|
||||
self.assertIn("loadFeedTypes", self.html)
|
||||
|
||||
def test_has_component_list_markup(self) -> None:
|
||||
self.assertIn('id="componentsList"', self.html)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
Reference in New Issue
Block a user