Skip to content

test: 🧪 Add tests for verifying API calls using pw-api-plugin #49

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

charlyautomatiza
Copy link
Owner

@charlyautomatiza charlyautomatiza commented Mar 4, 2025

This pull request includes several changes to the codebase, focusing on adding new functionality and improving test coverage. The most important changes include the addition of a new Booking interface, the introduction of new API tests, and the inclusion of a new plugin dependency in package.json.

New Functionality:

  • Added a new Booking interface in lib/booking.ts to define the structure of a booking object, including properties for booking ID, room ID, guest names, deposit status, and booking dates.

Test Enhancements:

  • Added new API tests in tests/api.booking.spec.ts for various GET requests related to booking, including fetching booking summaries, all bookings, and specific bookings by ID. These tests also include utility functions for authentication and validating booking details.
  • Introduced new API tests in tests/api.data.pwplugin.spec.ts using the pw-api-plugin for performing CRUD operations on a sample API. This includes tests for GET, HEAD, POST, PUT, PATCH, DELETE, and FETCH requests.

Dependency Updates:

  • Updated package.json to include the new pw-api-plugin dependency, which is used in the new API tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant