Skip to content

Commit 090dc01

Browse files
committed
[red] Cover one-build Android integration
Signed-off-by: Viwat Vchirawongkwin <viwat.v@chula.ac.th>
1 parent f43abb6 commit 090dc01

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

‎tests/publication/test_ci_contract.py‎

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,32 @@ def test_android_avd_reclaims_runner_disk_for_its_required_storage(self) -> None
107107
android,
108108
)
109109

110+
def test_android_integration_builds_one_application_bundle(self) -> None:
111+
workflow = (REPO_ROOT / ".github" / "workflows" / "ci.yml").read_text(
112+
encoding="utf-8"
113+
)
114+
android_start = workflow.index(" android-webview:")
115+
build_start = workflow.index("\n build:", android_start)
116+
android = workflow[android_start:build_start]
117+
118+
self.assertIn("integration_test/android_smoke_test.dart", android)
119+
self.assertNotIn("integration_test/about_page_test.dart", android)
120+
self.assertNotIn("integration_test/blockly_webview_test.dart", android)
121+
122+
harness = (
123+
REPO_ROOT / "app" / "integration_test" / "android_smoke_test.dart"
124+
).read_text(encoding="utf-8")
125+
self.assertIn(
126+
"import 'about_page_test.dart' as about_page;",
127+
harness,
128+
)
129+
self.assertIn(
130+
"import 'blockly_webview_test.dart' as blockly_webview;",
131+
harness,
132+
)
133+
self.assertIn("about_page.main();", harness)
134+
self.assertIn("blockly_webview.main();", harness)
135+
110136
def test_workflow_has_no_adjacent_duplicate_shell_key(self) -> None:
111137
workflow = (REPO_ROOT / ".github" / "workflows" / "ci.yml").read_text(
112138
encoding="utf-8"

0 commit comments

Comments
 (0)