@@ -34,10 +34,14 @@ class CheckoutPage extends MagewireUtils {
3434 this . showDiscountFormButton = this . page . getByRole ( 'button' , { name : UIReference . checkout . openDiscountFormLabel } ) ;
3535 this . placeOrderButton = this . page . getByRole ( 'button' , { name : UIReference . checkout . placeOrderButtonLabel } ) ;
3636 this . continueShoppingButton = this . page . getByRole ( 'link' , { name : UIReference . checkout . continueShoppingLabel } ) ;
37- this . subtotalElement = page . getByText ( 'Subtotal $' ) ;
38- this . shippingElement = page . getByText ( 'Shipping & Handling (Flat Rate - Fixed) $' ) ;
39- this . taxElement = page . getByText ( 'Tax $' ) ;
40- this . grandTotalElement = page . getByText ( 'Grand Total $' ) ;
37+ // this.subtotalElement = page.getByText('Subtotal $');
38+ this . subtotalElement = page . getByText ( `${ UIReference . financial . subTotal } ${ UIReference . general . genericPriceSymbol } ` ) ;
39+ // this.shippingElement = page.getByText('Shipping & Handling (Flat Rate - Fixed) $');
40+ this . shippingElement = page . getByText ( `${ UIReference . checkout . shippingPriceText } ${ UIReference . general . genericPriceSymbol } ` ) ;
41+ // this.taxElement = page.getByText('Tax $');
42+ this . taxElement = page . getByText ( `${ UIReference . checkout . taxPriceText } ${ UIReference . general . genericPriceSymbol } ` ) ;
43+ // this.grandTotalElement = page.getByText('Grand Total $');
44+ this . grandTotalElement = page . getByText ( `${ UIReference . financial . grandTotal } ${ UIReference . general . genericPriceSymbol } ` ) ;
4145 this . paymentMethodOptionCreditCard = this . page . getByLabel ( UIReference . checkout . paymentOptionCreditCardLabel ) ;
4246 this . paymentMethodOptionPaypal = this . page . getByLabel ( UIReference . checkout . paymentOptionPaypalLabel ) ;
4347 this . creditCardNumberField = this . page . getByLabel ( UIReference . checkout . creditCardNumberLabel ) ;
@@ -218,7 +222,7 @@ class CheckoutPage extends MagewireUtils {
218222 // await this.page.getByLabel('Country').selectOption('US');
219223 const country = faker . helpers . arrayElement ( inputValues . addressCountries ) ;
220224 const countrySelectorField = this . page . getByLabel ( UIReference . newAddress . countryLabel ) ;
221- const stateInputField = this . page . getByRole ( 'textbox' , { name : 'State/Province' } ) ;
225+ const stateInputField = this . page . getByRole ( 'textbox' , { name : UIReference . newAddress . provinceSelectLabel } ) ;
222226 const stateSelectorField = stateInputField . filter ( { hasText : UIReference . newAddress . provinceSelectFilterLabel } ) ;
223227
224228
0 commit comments