Solution: Update an Order
Review the solution for writing a test to update a work order.
We'll cover the following...
Challenge solution
Let's review the code for the challenge exercise.
Order details page object
The solution for the orderDetails.page.js
is provided below:
Press + to interact
import Page from './page'class OrderDetailsPage extends Page {async navigateToEditOrder() {await $('button=Edit').click()}/*** Selects a specific order detail* @param {*} field ex. Name, Email, Phone, Category, Description* @param {*} content the visible text in the field*/orderDetail(field, content) {return $(`h5=${field}: ${content}`)}}export default new OrderDetailsPage()
Let's explain the code above:
In line 6, we select a
button
element with the ...
Access this course and 1400+ top-rated courses and projects.