diff --git a/appvalidator/specs/webapps.py b/appvalidator/specs/webapps.py index e695ea3..3023ed9 100644 --- a/appvalidator/specs/webapps.py +++ b/appvalidator/specs/webapps.py @@ -180,6 +180,9 @@ class WebappSpec(Spec): # version. sparse_nodes = copy.deepcopy(sparse_nodes) + if err.get_resource("packaged"): + self.SPEC["required_nodes"].append("launch_path") + # Allow the developer to avoid localizing their name. del sparse_nodes["developer"]["required_nodes"] sparse_nodes["developer"]["allowed_once_nodes"].append("name") diff --git a/tests/test_webapp.py b/tests/test_webapp.py index 9161ae1..b600bc8 100644 --- a/tests/test_webapp.py +++ b/tests/test_webapp.py @@ -327,6 +327,13 @@ class TestWebapps(TestCase): self.assert_failed(with_errors=True) self.assert_got_errid(("spec", "webapp", "iaf_bad_mrkt_protocol", )) + def test_launch_path_packaged(self): + """Test that the launch path is present in a packaged app.""" + del self.data["launch_path"] + self.resources.append(('packaged', True)) + self.analyze() + self.assert_failed(with_errors=True) + def test_launch_path_not_string(self): """Test that the launch path is a string.""" self.data["launch_path"] = [123]