dunglas / dunglas/ShopApiPlugin

Add a test suite

Open
#7 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
PHP
Stars
16
Forks
2
PR merge metrics
No merged PRs in 30d

Description

Use https://github.com/api-platform/core/pull/2608 to create a full test suite for the API Platform integration.
If some new helpers must be added (JSON schema assertion, PHP matcher one, utility to run the same test with different standards formats such as JSON-LD, HAL and JSON-API, add them to api-platform/core first).

Start by testing the most useful endpoints. I suggest to "think" about a typical SPA that will consume the API, and to add test to ensure that all necessary endpoints are working properly (eg. first the one to list categories, products, offer, then the one to add something to the cart, then the one to checkout, then the one to create and manage users, orders... and so on). Maybe can be this done in parallel to #8 (disable all endpoints by default, and re-enable them when usful for the hypotetical SPA, and tested).

Contributor guide

Open the contributing guide

Research direction

Start by reading API Platform pull request 2608 and the existing integration entry points, then identify the most useful SPA-facing endpoints. Define coverage for categories, products, offers, cart, checkout, users, and orders, including JSON-LD, HAL, and JSON-API formats. Done means the selected endpoints have a repeatable test suite and any required helpers are added to api-platform/core.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
api, testing
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.