[OPIK-6802] [FE] test: add Prompt Library smoke tests for text and chat prompts - #7034
Merged
Conversation
natagh23
marked this pull request as ready for review
June 11, 2026 17:07
natagh23
force-pushed
the
nata/OPIK-6802/prompts-library-tests
branch
from
June 12, 2026 09:18
6becbe7 to
dfc6a84
Compare
Comment on lines
+30
to
+34
| textPrompt: async ({ sdkClient, backendClient, project, testNamespace }, use, testInfo) => { | ||
| const name = `${testNamespace}-text-prompt`; | ||
| const created = await sdkClient.python.createTextPrompt({ | ||
| name, | ||
| prompt: TEXT_TEMPLATE, |
Contributor
There was a problem hiding this comment.
The textPrompt and chatPrompt fixtures duplicate the create → attach → use → backendClient.deletePrompt flow, should we extract a shared helper that takes the SDK payload/callback and handles the boilerplate?
Want Baz to fix this for you? Activate Fixer
Comment on lines
+13
to
+17
| const emptyStateBtn = this.page.getByRole('button', { name: 'Create a text prompt' }); | ||
| if (await emptyStateBtn.isVisible()) { | ||
| await emptyStateBtn.click(); | ||
| } else { | ||
| await this.page.getByRole('button', { name: 'Prompt' }).click(); |
Contributor
There was a problem hiding this comment.
createTextPromptViaUI and createChatPromptViaUI duplicate the empty-state/dropdown flow plus waitForURL, should we extract helpers like openPromptCreationMenu(promptType) and waitForPromptNavigation()?
Want Baz to fix this for you? Activate Fixer
AndreiCautisanu
approved these changes
Jun 12, 2026
aadereiko
approved these changes
Jun 12, 2026
jverre
pushed a commit
that referenced
this pull request
Jun 12, 2026
…at prompts (#7034) * add smoke tests for chat and text prompts (create via UI/SDK, edit, check new version) * baz comment fixes * fix prettier error
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.
Details
Adds end-to-end smoke tests for the Prompt Library covering both text and chat prompt types via two creation paths: SDK and UI.
data-testidattributes toPromptMessagesReadonly,VersionHistoryTimeline, andPromptTabfor stable selector targetingprompts.page.ts(list + create via UI) andprompt-detail.page.ts(view, edit, version history)prompt.fixture.ts— seeds SDK prompts and registers cleanup for UI-created promptsChange checklist
Issues
AI-WATERMARK
AI-WATERMARK: yes
Testing
Tests:
tests_end_to_end/e2e/tests/prompts/prompt-library-smoke.spec.ts4 scenarios:
Documentation
N/A