test(intern-21): E2E upload → convert → preview (#359) - #396
Open
CodingMinh wants to merge 4 commits into
Open
Conversation
Co-authored-by: Cursor <cursoragent@cursor.com>
3 tasks
On case-insensitive volumes, citationFootnotes.ts collided with CitationFootnotes.tsx and broke mock-mode Playwright login. Add INTERN-359 evidence doc and drop arbitrary sleep in intern upload spec. Co-authored-by: Cursor <cursoragent@cursor.com>
This reverts commit db13058.
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.
Summary
web/e2e/intern-upload-convert.spec.tscho happy path upload → convert → preview (intern-21 / Closes [intern-21] E2E test basics: Playwright web conversion flow #359)..txtvà upload xong, Then UI hiện tiến trình/chuyển đổi, job thành công, document xuất hiện trong bảng, preview markdown hiện nội dung mock.page.route('**/api/v1/uploads')vì client gửi quaXMLHttpRequest(không qua fetch-mock) — replay qua in-page mock giốngupload.spec.ts.Page object / locators
Repo này không dùng class-based POM; dùng helpers chung trong
web/e2e/support.ts(login,openEmployeeHandbook,succeedUploadJob,advanceDocument) + Playwright locators:getByRole(progressbar, table, button)getByLabel(file input)getByTestId('document-preview-markdown')Assertions
expect(...).toBeVisible()— progress bar, trạng thái "Đang chuyển đổi", message "Đã chuyển đổi sang Markdown…"expect(...).toContainText('Mock preview content for version')— preview markdown (mock không trả bytes file upload thật)sleep()— chỉexpect(..., { timeout })pollingTest plan
pnpm --dir web exec playwright test e2e/intern-upload-convert.spec.tspnpm --dir web e2e— 39 passed (mock suite)Made with Cursor