Skip to content

[#10] Add E2E tests for article update#16

Merged
idembele70 merged 4 commits into
mainfrom
feature/issue-10/e2e-test-for-article-update
Mar 10, 2026
Merged

[#10] Add E2E tests for article update#16
idembele70 merged 4 commits into
mainfrom
feature/issue-10/e2e-test-for-article-update

Conversation

@idembele70
Copy link
Copy Markdown
Owner

@idembele70 idembele70 commented Mar 9, 2026

What does this implement/fix? Explain your changes.

  • Add E2E tests for article update feature

Does this close any currently open issues?

Any other comments?

None.

I'm not a dummy, so I've checked these

  • I've made changes requested by Copilot.
  • I made a self-review
  • I updated test-inventory.xlsx
  • I updated coverages.xlsx
  • I updated features.xlsx

…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
@idembele70 idembele70 linked an issue Mar 9, 2026 that may be closed by this pull request
@idembele70 idembele70 added the enhancement New feature or request label Mar 9, 2026
@idembele70 idembele70 self-assigned this Mar 9, 2026
@idembele70 idembele70 requested a review from Copilot March 9, 2026 20:13
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.ts suite plus a dedicated article-update fixture.
  • Centralized execution-unique ids (CompositeIdFactory.fromExecutionInfo) and moved test-article generation into ArticleFactory.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.

Comment thread tests/features/article/pages/article-editor.page.ts
Comment thread e2e/tests/article/specifications/article-update.spec.ts Outdated
Comment thread e2e/tests/article/specifications/article-update.spec.ts Outdated
Comment thread e2e/tests/article/specifications/article-update.spec.ts Outdated
@idembele70 idembele70 changed the title [#10]Add E2E tests for article update [#10] Add E2E tests for article update Mar 10, 2026
@idembele70 idembele70 merged commit c637886 into main Mar 10, 2026
21 checks passed
@idembele70 idembele70 deleted the feature/issue-10/e2e-test-for-article-update branch March 10, 2026 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

e2e test for article update

2 participants