Skip to content

[Test]: Proof of concept: Integration tests for critical paths #279

@Frodigo

Description

@Frodigo

How the project can be improved?

The idea:

Cover primary features by integration tests: adding product to cart, cart experience, and checkout process. The advantage of integration tests is that they are cheaper to create and maintain than e2e tests. Still, they help cover a large amount of code because you are testing, for example, adding a product to a cart, and then you are sure that U.I., composable, and API-client works appropriately together. I recommend using jest and testing-library/vue.

The goal of this issue is check how we can create unit and integration tests, and provide everything for is needed to write tests for others.

What are the acceptance criteria?

  • there is a config for jest testing
  • testing-library/vue is installed as a dependency
  • there is one test scenario that shows how to tests should look like
  • there is a way to mock GraphQL operations using MSW
  • docs are updated

Additional information

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentationenhancementNew feature or request

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions