Skip to content

Testing instructions for critical flows

Ankit K Gupta edited this page Mar 29, 2024 · 15 revisions

Please follow the below instructions to execute/run cases mentioned in the critical flow.


Plugin Activation Without Errors

To verify that the plugin can be installed and activated without encountering any errors or issues.

Test Steps:

  1. Navigate to the Woo account or GitHub and download the plugin zip file.
  2. Log in to the WordPress Admin Dashboard.
  3. Install the plugin.
  4. After successful installation, click the "Activate" button to activate the plugin.
  5. Observe the activation process for any error messages or issues.
  6. Check the "Plugins" page to ensure that the newly installed plugin appears in the list of active plugins.

Expected Result:

The plugin should install and activate without any errors or difficulties. There should be no error messages displayed during installation or activation. The plugin should appear in the list of active plugins, and its functionality should work as intended in the store.


Verify dependent plugin 'Require' functionality when the core plugin 'WooCommerce' and 'Booking' is not active

This plugin is an extension of WooCommerce, plugin should check the active status of WooCommerce and Booking when activating. If required plugins are not active, the 'Activate' button should be disabled.

Test Steps:

  1. Go to the Plugins section of the WordPress dashboard.
  2. Deactivate WooCommerce or Booking if active.
  3. Try to activate this extension.

Expected Result-

  1. The Plugin 'Activate' button should be disabled, and the admin should not be able to activate the plugin.
  2. A notice 'This plugin cannot be activated because required plugins are missing or inactive.' below the plugin should appear.

Plugin Setup and Configuration Screen

Test Steps:

  1. Go to WordPress Admin > Bookings > Settings > Accommodation
  2. Enter the check-in and check-out times.
  3. Save Settings.

Expected Result-

  1. Check-in and check-out time fields should appear
  2. Admin should able to select time and save settings.

Screenshot 2023-08-31 at 6 16 52 PM


Can create an Accommodation product

Admin/Marchant can create an Accommodation Booking product.

Steps:

  1. Go to Dashboard > Products.
  2. Click Add New.
  3. Under Product Data, select Accommodation Product from the dropdown menu.
  4. Add the product title, description, and other required details.
  5. Add room rates.
  6. Publish the product.

Expected Results:

The product should be published successfully. The Check-in and Check-out labels should appear on the product page.


Verify Accommodation Time Setting - Check-in and Check-out.

Test Steps:

  1. Go to WordPress Admin > Bookings > Settings > Accommodation
  2. Enter the check-in and check-out times.
  3. Save Settings.
  4. Create an accommodation product

Expected result-

  1. Open the product in frontend and verify the Check-in and Check-out.
  2. Check-in and Check-out time should be same as set in plugin setting.
BE Setting FE
Screenshot 2023-08-31 at 7 33 50 PM Screenshot 2023-08-31 at 7 36 11 PM

Verify labels 'Select check-in' and 'Select check-out' works expected.

Test Steps -

  1. Create an accommodation booking product follow
  2. Open product

Expected Result -

  1. Customer can see the 'Select check-in' label before selecting the check-in date.
  2. After selecting the date for check-in, the customer sees label 'Select-out' label.

Screenshot 2023-08-31 at 8 35 23 PM

Screenshot 2023-08-31 at 8 35 01 PM


Verify Setting Minimum Nights Restriction - "Minimum number of nights allowed in a booking"

Test Steps:

  1. Log in to the Booking Accommodation Product Setting.
  2. Navigate to "Minimum number of nights allowed in a booking."
  3. Set the "Minimum number of nights allowed in a booking" to a specific value, e.g., 2 nights.
  4. Save the changes.
  5. Attempt to make a booking for 1 night.
  6. Record the system's response.
  7. Attempt to make a booking for the configured minimum number of nights, e.g., 2 nights.
  8. Record the system's response.

Expected Results:

For Step 5:

  1. The system should display an error message indicating that the booking cannot be made for 1 night due to the minimum night restriction.
  2. The booking should not be allowed to proceed for 1 night.
  3. Message should appear like 'The minimum duration is 2 nights

For Step 7:

  1. The system should allow the booking to proceed for the configured minimum number of nights (2 nights).
  2. No error message related to minimum nights should be displayed.

Verify Setting Maximum Nights Restriction "Maximum number of nights allowed in a booking"

Test Steps:

  1. Log in to the Booking Accommodation Product Setting
  2. Navigate to "Maximum number of nights allowed in a booking."
  3. Set the "Maximum number of nights allowed in a booking" to a specific value, e.g., 7 nights.
  4. Save the changes
  5. Attempt to make a booking for this property for 10 nights.
  6. Record the system's response.
  7. Attempt to make a booking configured a maximum number of nights, e.g., 7 nights.
  8. Record the system's response.

Expected Results:

For Step 5:

  1. The system should display an error message indicating that the booking cannot be made for 10 nights due to the maximum nights restriction. E.g. The maximum duration is 7 nights
  2. The booking should not be allowed to proceed for 10 nights.

For Step 7:

  1. The system should allow the booking to proceed for the configured maximum number of nights (7 nights).
  2. No error message related to maximum nights should be displayed.

Verify Calendar DisplayMode - Display Calendar on Click

Test Steps:

Access the Booking Form on the frontend. Ensure that the booking setting is configured to "Display Calendar on Click." Click on the date/month fields

Expected Result:

  1. When the setting is configured to "Display Calendar on Click," the calendar should not be visible initially upon page load.
  2. Upon clicking, the calendar should open and become visible to the shopper in the frontend.

Verify Calendar Display Mode Setting - Always Visible

Test Steps:

  1. Access the Booking Form on the front end.
  2. Observe the calendar's behavior upon page load.

Expected Result:

The calendar should appear and be visible when the booking form page loads in the frontend.


Verify Accommodation Booking Creation with Confirmation Setting

Test Steps:

  1. Create an Accommodation Booking product.
  2. Fill in all the required details in the booking fields.
  3. Check the setting checkbox 'Requires confirmation?'
  4. Save all settings.

Expected Result:

  1. The Accommodation booking product should be successfully created with the 'Requires confirmation?' setting enabled.
  2. When viewing the booking product in the frontend, there should be a 'Check Availability' button displayed below the calendar.

Verify Accommodation Booking Process for Slot Requiring Confirmation

Test Steps:

As a shopper, attempt to accommodation book a slot that requires confirmation.

Expected Result:

  1. The shopper should be able to select and book the slot that requires confirmation.
  2. The checkout page should clearly display that the booking is 'Subject to confirmation' and provide a 'Request Confirmation' button.
  3. Email to admin contains a confirmation link
  4. Upon confirmation, customer is emailed a second time. The text includes a link to pay for the booking
  5. Link takes customer to page requesting credit card details
  6. Upon payment, the booking is marked paid in the admin

Check for "Can be cancelled" Setting

After selecting the option “Can be cancelled?“, two fields appear that allow you to choose how many Minutes/Hours/Days/Months prior to the start date customers can cancel a booking.

Steps:

  1. Check the box for "Can be canceled" + Value + Duration Month(s) / Day(s) / Hours(s) / Minute(s) + before check-in
  2. Book the product
  3. Go to My booking listing on the My Account page
  4. Try to cancel the booking.

Expected Result -

Users should be able to cancel accommodation within a defined period by Admin.


To verify the maximum room availability setting.

Test Steps:

  1. Navigate to the WooCommerce Accommodation Booking product settings.
  2. Find the "Availability" setting for the selected accommodation product.
  3. Select the "Number of Rooms Available" field.
  4. Enter a number into the available field (e.g., 2).
  5. Save the Setting
  6. Access the product on the front end.
  7. Book Rooms
  8. Add a room booking for a specific date range (e.g., 1 Jan to 3 Jan) to the cart.
  9. Try to book rooms for the same date range again.

Expected Results:

  1. The room booking for the specified date range should be successfully added to the cart.

  2. After completing the second booking attempt for the same date range, the room should appear as "Non-available."

Screenshot 2023-09-11 at 10 04 23 PM


Availability > Bookings Can Be Made Starting - Month/Week/Day - in the Future Setting

To verify that the "Bookings Can Be Made Starting" setting correctly defines when room bookings should become available for booking in the future.

Test Steps:

  1. Go to the availability setting.
  2. Input a positive number (e.g., 1) in the provided field.
  3. Select Month/Week/Day from the dropdown menu.
  4. Save the settings.

Expected Result:

  1. After completing step 4, the room should be available for booking starting from 1 month/week/day in the future.
  2. For example, if today is 1 July, the room should become available for booking from 1 August.

Availability > Booking Can Be Booked Till Setting

To verify that the "Booking Can Be Booked Till" setting correctly defines until when room bookings can be made in the future.

Test Steps:

  1. Go to the availability settings.
  2. Input a positive number (e.g., 1) in the provided field.
  3. Select Month/Week/Day from the dropdown menu.
  4. Save the settings.

Expected Result:

  1. After completing step 4, the room should be available for booking until 1 month/week/day in the future.
  2. For example, if today is 1 July, the room should be available for booking till 1 August.

Verify 'Rates' Setting for Accommodation Booking

Ensure that the 'Standard room rate' and 'Display Cost' fields are correctly saved and displayed on the front-end. Verify that the displayed prices are consistent with the values set during the test execution.

Test Steps:

  1. Navigate to the product editing page.
  2. Locate the 'Standard room rate' setting.
  3. Enter the value "200" in the 'Standard room rate' field.
  4. Locate the 'Display Cost' setting.
  5. Enter the value "250" in the 'Display Cost' field.
  6. Save the product changes.
  7. Navigate to the front-end booking page for the same product.

Expected Results:

  1. On the front-end booking page, verify that:
  • The price label under 'From xx per night' above the calendar displays the value set in the 'Display Cost' field, which should be "250".
  1. On the front-end booking page, verify that:
  • The per-day room cost should be displayed, and it should match the value set under 'Standard room rate', which should be "200".

Screenshot 2023-09-12 at 1 23 37 PM

Screenshot 2023-09-12 at 1 24 25 PM


Verify 'Rates' Setting for Accommodation Booking with Range Types with Range Type 'Range of certain night'.

Test Steps:

  1. Navigate to the product editing page.
  2. Locate the 'Standard room rate' setting.
  3. Enter the value "200" in the 'Standard room rate' field.
  4. Locate the 'Display Cost' setting.
  5. Enter the value "250" in the 'Display Cost' field.
  6. Configure the Range Type as "Range of certain night."
  7. Define a range for certain nights from date picker.
  8. Save the product changes.
  9. Navigate to the front-end booking page for the same product.

Expected Results:

  • On the front-end booking page, verify that: The price label under 'From xx per night' above the calendar displays the value set in the 'Display Cost' field, which should be "250."
  • On the front-end booking page, verify that: The per-day room cost should be displayed, and it should match the value set under 'Standard room rate', which should be "200."
  • Verify that the range specified for certain nights is correctly applied, and the price for the specified number of nights is calculated correctly.

Screenshot 2023-09-12 at 1 43 54 PM

Screenshot 2023-09-12 at 1 44 13 PM


Verify 'Rates' Setting for Accommodation Booking with Range Types with Range Type 'Range of months'.

Navigate back to the product editing page. Change the Range Type to "Range of months." Define a range for a certain number of months (e.g., September and October to 600). Save the product changes. Navigate to the front-end booking page for the same product.

Expected Results (Monthly Range):

  • Verify that the range specified for a certain number of months is correctly applied, and the price for the specified number of months is calculated correctly.
  • For example- Rooms from the month of September and October should have cost 600.
  • Rooms except Sep, and Oct should have cost from 'Standard Room Rate' or any other range type if specified.

Verify Booking Details Check-In and Check-Out Date and Time Display.

Test Steps:

  1. Navigate to the cart page where the selected accommodation booking is displayed.
  2. Locate and verify the check-in date and time displayed in the cart.
  3. Locate and verify the check-out date and time displayed in the cart.
  4. Proceed to the checkout page.
  5. Locate and verify the check-in date and time displayed on the checkout page.
  6. Locate and verify the check-out date and time displayed on the checkout page.
  7. Complete the booking by providing necessary information and confirming the booking.
  8. Verify the thank you page for the booking confirmation.
  9. Locate and verify the check-in date and time displayed on the thank you page.
  10. Locate and verify the check-out date and time displayed on the thank you page.

Expected Results:

On the cart page, verify that:

  • The check-in date and time are displayed correctly according to the user's selection.
  • The check-out date and time are displayed correctly according to the user's selection.

On the checkout page, verify that:

  • The check-in date and time are displayed correctly, matching the cart page.
  • The check-out date and time are displayed correctly, matching the cart page.

On the thank you page, verify that:

  • The check-in date and time are displayed correctly, matching the checkout page.
  • The check-out date and time are displayed correctly, matching the checkout page.

Verify Accommodation Booking Details in Confirmation Emails

Test Steps:

  1. Complete a booking for accommodation products.
  2. Verify that the booking process is successful and a confirmation email is sent to the customer.
  3. Access the customer's email inbox and open the confirmation email.

Expected Results:

For Customer's and Admin's Confirmation Email:

In the confirmation email, verify that:

  • The check-in date and time match the booking details.
  • The check-out date and time match the booking details.
  • The total cost of the booking matches the booking details.

Use Case: Verify Accommodation Booking Product Availability on Bookings Calendar Block.

Test Steps:

  1. Create an accommodation product for some days (e.g. 7 days).
  2. Add the Booking Calendar block to a page and select the above accommodation product.
  3. Make a booking for the accommodation product.
  4. Open the Booking Calendar block page in FE
  5. Check the availability of the product.

Expected Result:

  • When viewing the Booking Calendar block, the days that have already been booked for the accommodation product should be marked as unavailable.
  • The booked days should not be selectable for further bookings.
  • Customers should not be able to book the already booked days, and a clear indication should be provided that these days are unavailable for booking.

Clone this wiki locally