-
Notifications
You must be signed in to change notification settings - Fork 540
[Test] Web acceptance stability #4506
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
bekossy
wants to merge
14
commits into
main
Choose a base branch
from
test-/-web-acceptance-stability
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
85d05b6
refactor(tests): streamline invite member flow and remove unused code
bekossy 58e6bcb
feat(tests): add use API snippets tests for TypeScript integration
bekossy efe400d
Merge branch 'release/v0.100.9' into test-/-web-acceptance-stability
bekossy b0b48f1
fix(ci): bound curl health-check and add job timeout to wait-for-read…
bekossy 6d4e8be
fix(ci): cache Playwright browser in wait-for-readiness to avoid 17mi…
bekossy 9caa9c0
Merge branch 'release/v0.100.9' into test-/-web-acceptance-stability
bekossy 9e70931
fix(ci): drop --with-deps from wait-for-readiness playwright install
bekossy bfb21bf
Merge branch 'release/v0.100.9' into test-/-web-acceptance-stability
bekossy 8bb2e27
Merge branch 'release/v0.101.0' into test-/-web-acceptance-stability
bekossy c576690
Merge branch 'release/v0.101.1' into test-/-web-acceptance-stability
bekossy c262170
Merge branch 'release/v0.101.1' into test-/-web-acceptance-stability
bekossy e19c844
refactor: update locator for VariableCard textarea in observability a…
bekossy 3f1ff3d
Merge branch 'main' into test-/-web-acceptance-stability
bekossy 1ac50c1
refactor(tests): improve reliability and timeout settings in Playwrig…
bekossy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| import {test} from "@agenta/web-tests/tests/fixtures/base.fixture" | ||
| import useApiTests from "@agenta/oss/tests/playwright/10-use-api" | ||
|
|
||
| test.describe("Registry: use API snippets", useApiTests) |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| import useApiTests from "./acceptance/use-api" | ||
|
|
||
| export default useApiTests |
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
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
40 changes: 40 additions & 0 deletions
40
web/oss/tests/playwright/acceptance/features/use-api.feature
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| # Tests: use-api/use-api.spec.ts -> use-api/index.ts | ||
| # RTM IDs: WEB-ACC-USEAPI-001, WEB-ACC-USEAPI-002 | ||
| # Tags: @scope:deployment @coverage:light @path:happy @speed:fast | ||
| # | ||
| # Implementation notes: | ||
| # - Variant mode: navigate to /apps/{id}/variants, click "Use API" (primary button) | ||
| # → DeploymentsDrawer opens in mode="variant" rendering VariantUseApiContent | ||
| # → Fetch Prompt/Config snippet uses application_variant_ref (variant-keyed endpoint) | ||
| # → Invoke LLM snippet uses axios.post to the variant invocation URL | ||
| # - Deployment mode: navigate to /apps/{id}/variants?tab=deployments&selectedEnvName=development | ||
| # → click "Use API" (primary button in the deployments tab header) | ||
| # → DeploymentsDrawer opens in mode="deployment" rendering UseApiContent | ||
| # → Fetch Prompt/Config snippet uses environment_ref (environment-keyed endpoint) | ||
| # → Invoke LLM snippet uses axios.post to the environment invocation URL | ||
| # - Both tests assert TypeScript tab only (Python and cURL are separate language concerns). | ||
|
|
||
| Feature: Registry Use API — TypeScript snippets | ||
| As a user | ||
| I want to view TypeScript code snippets for calling my app via API | ||
| So that I can integrate Agenta into my TypeScript project | ||
|
|
||
| Background: | ||
| Given the user is authenticated | ||
| And a completion app with at least one variant exists | ||
|
|
||
| @light @happy @scope:deployment @speed:fast | ||
| Scenario: Variant TypeScript snippet shows application_variant_ref in Fetch section | ||
| Given the user is on the Variants registry page | ||
| When the user opens the Use API drawer | ||
| And the user selects the TypeScript tab | ||
| Then the Fetch Prompt/Config section displays the variant TypeScript snippet | ||
| And the Invoke LLM section displays a TypeScript axios snippet | ||
|
|
||
| @light @happy @scope:deployment @speed:fast | ||
| Scenario: Deployment TypeScript snippet shows environment_ref in Fetch section | ||
| Given the user is on the Deployments registry page for the Development environment | ||
| When the user opens the Use API drawer | ||
| And the user selects the TypeScript tab | ||
| Then the Fetch Prompt/Config section displays the deployment TypeScript snippet | ||
| And the Invoke LLM section displays a TypeScript axios snippet |
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make the email input timeout consistent in both code paths.
The email input visibility check uses a 20-second timeout inside the retry loop (line 70) but only a 10-second timeout in the fallback path (line 75). This inconsistency could cause the fallback to fail prematurely if the modal opens on the second attempt but the email input takes 11-19 seconds to render.
🔧 Proposed fix to unify timeout
📝 Committable suggestion