Skip to content

Improve the structure of GraphQL tests for Catalog Module #29918

@yaroslavGoncharuk

Description

@yaroslavGoncharuk

Summary (*)

Catalog Module covers a significant number of use-cases and has a lot of GraphQL tests.
However, the structure of test files is unclear and makes navigation through it hard.

Examples (*)

GraphQL tests for Catalog module

Proposed solution

  1. Create two sub-folders in Catalog folder: Product and Category
  2. Move all product-related tests to created Product sub-folder
  3. Move existed CategoriesQuery folder to created Category folder
  4. Create two additional sub-folders in Category folder: GategoryQuery and CategoryListQuery
  5. Move category() query related tests to CategoryQuery sub-folder
  6. Move categoryList() query related tests to CategoryListQuery sub-folder
  7. Rename Options (Catalog/Options) folder to CustomizableOptions
  8. Move CustomizableOptions folder to Product folder
  9. Rename file MediaGalleryTest.php to ProductMediaGalleryTest.php
  10. Rename file UrlRewritesTest.php to ProductUrlRewritesTest.php
  11. Leave StoreConfigTest.php file in Catalog folder
  12. Leave ExceptionFormatterDefaultModeTest.php file in Catalog folder

Expected Files Tree Example:

dev/tests/api-functional/testsuite/Magento/GraphQl/Catalog/

  • Category/
    • CategoriesQuery/
      • categories() query related tests
      • ...Test.php
    • CategoryListQuery/
      • categoryList() query related tests
      • ...Test.php
    • CategoryQuery/
      • category() query related tests
      • ...Test.php
  • Product/
    • ProductViewTest.php
    • ProductPriceTest.php
    • VirtualProductTest.php
    • ...Test.php
    • CustomizableOptions/
      • Uid/CustomizableOptionsUidTest.php

Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.

  • Severity: S0 - Affects critical data or functionality and leaves users with no workaround.
  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.

Metadata

Metadata

Assignees

Labels

Issue: Format is validGate 1 Passed. Automatic verification of issue format passedMageconf_Contribution_DayPAPPartners acceleration programPriority: P4No current plan to fix. Fixing can be deferred as a logical part of more important work.Progress: PR in progressProject: GraphQLSeverity: S4Affects aesthetics, professional look and feel, “quality” or “usability”.Triage: Dev.ExperienceIssue related to Developer Experience and needs help with Triage to Confirm or Reject itfeature request

Type

No type

Projects

Status

Pull Request in Progress

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions