tests: test_spa: assure that selected version is stable release
authorPetr Štetiar <ynezz@true.cz>
Thu, 8 Oct 2020 07:20:07 +0000 (09:20 +0200)
committerPetr Štetiar <ynezz@true.cz>
Thu, 8 Oct 2020 07:20:07 +0000 (09:20 +0200)
We don't want users to use snapshots as default.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
tests/test_spa.py

index 5a2cecb85d19feed0a29aa5814f0831c342de5b2..62958db3869ebc15fada612cf59fd64ced6f7dbf 100644 (file)
@@ -16,6 +16,10 @@ def test_spa():
     driver.get("http://localhost:8000")
     assert "OpenWrt Firmware Selector" in driver.title
 
+    versions = Select(driver.find_element_by_id("versions"))
+    selected_version = versions.first_selected_option.get_attribute("value")
+    assert "snapshot" not in selected_version.lower()
+
     model = driver.find_element_by_id("models")
     model.clear()
     model.send_keys("a7 v5")