25 lines
692 B
Python
25 lines
692 B
Python
"""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()
|