Add E2E tests#3
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a new tests/e2e suite intended to be run by the CI E2E job, including a simple HTML UI mock page and a Python pytest module that simulates a pipeline run and (optionally) runs a Playwright check against the mock UI.
Changes:
- Add a minimal static HTML page to serve as a Playwright target for UI E2E checks.
- Add a pytest module that starts local mock HTTP servers, writes a
result.jsonoutput artifact, and runs an optional Playwright-based assertion.
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 7 comments.
| File | Description |
|---|---|
| tests/e2e/e2e/ui_mock.html | Adds a static UI mock page used by Playwright tests. |
| tests/e2e/e2e/test_full_pipeline.py | Adds pytest-based E2E tests for pipeline flow and optional Playwright UI validation. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+1
to
+7
| import os | ||
| import json | ||
| import threading | ||
| import http.server | ||
| import socketserver | ||
| import shutil | ||
| import time |
Comment on lines
+54
to
+59
| def test_pipeline_flow(tmp_path): | ||
| # start mocks | ||
| llm = start_mock_server(9001) | ||
| smtp = start_mock_server(9002) | ||
| try: | ||
| res = simulate_pipeline() |
Comment on lines
+11
to
+14
| TEST_ROOT = Path(__file__).resolve().parent | ||
| REPO_ROOT = TEST_ROOT.parents[2] | ||
| OUTPUT_DIR = REPO_ROOT / "data" / "e2e-outputs" | ||
|
|
Comment on lines
+43
to
+47
| try: | ||
| shutil.copy2(p, dest) | ||
| files.append(p.name) | ||
| except Exception: | ||
| pass |
| assert res["status"]=="ok" | ||
| out = OUTPUT_DIR/"result.json" | ||
| assert out.exists() | ||
| data = json.load(open(out)) |
| assert "files" in data | ||
| finally: | ||
| llm.shutdown() | ||
| smtp.shutdown() |
| with sync_playwright() as p: | ||
| browser = p.chromium.launch(headless=True) | ||
| page = browser.new_page() | ||
| page.goto(f"file://{ui}") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds tests/e2e used by CI E2E job.