Create comprehensive UI and API contracts for E2E testing and integration#7
Draft
Create comprehensive UI and API contracts for E2E testing and integration#7
Conversation
Co-authored-by: DeepExtrema <175066046+DeepExtrema@users.noreply.github.com>
Co-authored-by: DeepExtrema <175066046+DeepExtrema@users.noreply.github.com>
Co-authored-by: DeepExtrema <175066046+DeepExtrema@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Create contracts for UI test IDs and API schema
Create comprehensive UI and API contracts for E2E testing and integration
Oct 13, 2025
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.
Overview
This PR implements the A2 Contracts Author task, creating comprehensive contracts for the Deepline Multi-Agent Data Scientist system without modifying any existing UI code. The contracts provide a single source of truth for UI test automation and API integration.
What's Changed
1. UI Test IDs Contract (
contracts/ui-test-ids.json)Created a JSON Schema-based contract documenting all UI screens and critical elements with designated
data-testidattributes:{ "screens": { "ConsolePanel": { "elements": [ { "id": "console-prompt", "description": "Console input field for natural language prompts", "selector": "[data-testid='console-prompt']", "required": true } ] } } }2. API Schema Contract (
contracts/api-schema.yaml)Created an OpenAPI 3.0.3 specification documenting all REST API endpoints across the microservices architecture:
Key endpoints covered:
/workflows/start,/datasets/upload,/runs/{run_id}/status/load_data,/basic_info,/statistical_summary,/create_visualization/executewith data quality and feature engineering actions/class_imbalance,/baseline_sanity,/experiment_tracking3. Selector Adoption Report (
reports/selector-adoption.md)Created a detailed implementation roadmap showing exactly where to add
data-testidattributes:Example:
4. Contract Validation Script (
scripts/validate-contracts.js)Created a CI-friendly Node.js validation script that ensures contract integrity:
5. Comprehensive Documentation (
contracts/README.md)Created detailed documentation with usage examples for all stakeholders:
Key Features
✅ Contract-only approach - No UI modifications as required
✅ All deliverables provided - ui-test-ids.json, api-schema.yaml, selector-adoption.md, validation script
✅ Validation passing - All 10 checks pass successfully
✅ Well-documented - Comprehensive README with examples
✅ CI-ready - Validation script ready for pipeline integration
Validation Results
Integration Examples
For QA Engineers (E2E Testing)
For Backend Developers (API Clients)
# Generate TypeScript client from OpenAPI schema openapi-generator-cli generate \ -i contracts/api-schema.yaml \ -g typescript-axios \ -o client/typescriptFor CI/CD Integration
Next Steps
data-testidattributes followingreports/selector-adoption.mdui-test-ids.jsoncontractapi-schema.yamlFiles Added
contracts/ui-test-ids.json(10 KB)contracts/api-schema.yaml(25 KB)contracts/README.md(7 KB)reports/selector-adoption.md(17 KB)scripts/validate-contracts.js(10 KB)Total: 69 KB of contract documentation
Testing
The validation script has been tested and passes all checks:
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.