[#10] Add E2E tests for article update#16
Merged
Conversation
…payload coverage - add full Article Update specification (happy, negative, edge scenarios) - introduce dedicated article-update fixture and editor/detail helper methods - add reusable SQLi and XSS payload factories plus escaped-content UI assertions - unify article create/update API route helper via ARTICLES.SAVE - refactor test article id generation to CompositeIdFactory.fromExecutionInfo - update article creation/read specs and test inventory coverage docs Refs: #10
There was a problem hiding this comment.
Pull request overview
Adds Playwright E2E coverage for the article update flow (including negative/security/edge scenarios) and refactors test data generation/mocking to support those new tests.
Changes:
- Added a comprehensive
article-update.spec.tssuite plus a dedicatedarticle-updatefixture. - Centralized execution-unique ids (
CompositeIdFactory.fromExecutionInfo) and moved test-article generation intoArticleFactory.generateTestArticle. - Introduced reusable SQLi/XSS payload factories and shared UI assertion utilities; updated article API URL/mocking to use a unified “save” endpoint.
Reviewed changes
Copilot reviewed 22 out of 25 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| e2e/tests/auth/fixtures/register.fixture.ts | Switch to execution-derived composite ids for unique users. |
| e2e/tests/auth/fixtures/login.fixture.ts | Switch to execution-derived composite ids for unique users. |
| e2e/tests/auth/fixtures/auth.fixture.ts | Uses execution-derived composite id for per-worker storageState filename. |
| e2e/tests/auth/auth.utility.ts | Uses execution-derived composite id when creating auth tokens. |
| e2e/tests/article/specifications/article-update.spec.ts | New E2E coverage for article update (happy/negative/security/edge). |
| e2e/tests/article/specifications/article-read.spec.ts | Uses ArticleFactory.generateTestArticle instead of utility method. |
| e2e/tests/article/specifications/article-creation.spec.ts | Updates security payloads + migrates mocks to mockArticleSave/API_URLS.ARTICLES.SAVE. |
| e2e/tests/article/pages/article-editor.page.ts | Adds update helpers and slug-aware editor URL expectations/navigation. |
| e2e/tests/article/pages/article-details.page.ts | Adds shared escaped-content assertions + broader XSS checks. |
| e2e/tests/article/fixtures/article-update.fixture.ts | New fixture wiring token/article/pages for update tests. |
| e2e/tests/article/fixtures/article-read.fixture.ts | Uses ArticleFactory.generateTestArticle. |
| e2e/tests/article/fixtures/article-creation.fixture.ts | Uses ArticleFactory.generateTestArticle. |
| e2e/tests/article/components/article-preview.component.ts | Adds escaped-content assertions via shared UI utility. |
| e2e/tests/article/components/article-form.component.ts | Allows partial fills + adds submit-twice and tag replacement helpers. |
| e2e/tests/article/article.utility.ts | Unifies create/update mocking under mockArticleSave and updates create endpoint to SAVE(). |
| e2e/tests/article/article.factory.ts | Adds generateTestArticle that produces execution-unique payloads. |
| e2e/shared/utilities/url-front.utility.ts | Makes ARTICLE_EDITOR URL regexp slug-aware. |
| e2e/shared/utilities/url-api.utility.ts | Replaces CREATION with slug-aware SAVE(...) URL generator. |
| e2e/shared/utilities/ui-utilities.ts | New helper for escaped-content visibility assertions. |
| e2e/shared/factories/xss-payload-factory.ts | New XSS payload generator(s) keyed by execution id. |
| e2e/shared/factories/sql-injection-payload.factory.ts | New SQLi payload generator(s) keyed by execution id. |
| e2e/shared/factories/composite-id.factory.ts | Adds fromExecutionInfo(...) and filters empty id segments. |
| e2e/shared/pages/home.page.ts | Fixes indentation in loading-indicator assertion. |
| docs/tests-inventories/0002_article-inventory.xlsx | Adds/updates test inventory documentation artifact. |
| docs/coverages.xlsx | Adds/updates coverage documentation artifact. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
added 3 commits
March 10, 2026 13:52
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.
What does this implement/fix? Explain your changes.
Does this close any currently open issues?
Any other comments?
None.
I'm not a dummy, so I've checked these