2026-02-11 14:42:38 -05:00
|
|
|
from selenium.webdriver.common.by import By
|
|
|
|
|
from .base import FunctionalTest
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class JasmineTest(FunctionalTest):
|
|
|
|
|
def test_jasmine_specs_pass(self):
|
|
|
|
|
self.browser.get(self.live_server_url + "/static/tests/SpecRunner.html")
|
|
|
|
|
|
|
|
|
|
def check_results():
|
|
|
|
|
result = self.browser.find_element(By.CSS_SELECTOR, ".jasmine-overall-result")
|
2026-03-29 23:39:03 -04:00
|
|
|
if "0 failures" not in result.text:
|
|
|
|
|
failures = self.browser.find_elements(
|
|
|
|
|
By.CSS_SELECTOR, ".jasmine-failed .jasmine-description"
|
|
|
|
|
)
|
|
|
|
|
detail = "\n".join(f.text for f in failures) if failures else "(no detail)"
|
|
|
|
|
self.fail(f"{result.text}\nFailing specs:\n{detail}")
|
|
|
|
|
|
2026-02-11 14:42:38 -05:00
|
|
|
self.wait_for(check_results)
|