@@ -17,6 +17,7 @@ export const DELETE_QUOTE_ITEM = '@DELETE_QUOTE_ITEM';
17
17
export const ADD_QUOTE_COMMENT = '@ADD_QUOTE_COMMENT' ;
18
18
export const PERFORM_QUOTE_ACTION = '@PERFORM_QUOTE_ACTION' ;
19
19
export const STATUS_SUBMITTED = 'Submitted' ;
20
+ export const STATUS_ORDERED = 'Ordered' ;
20
21
export const STATUS_REQUESTED = 'Requested' ;
21
22
export const STATUS_CANCELED = 'Cancelled' ;
22
23
export const STATUS_DRAFT = 'Draft' ;
@@ -113,6 +114,21 @@ export function checkQuoteStatusInQuoteList(status: string) {
113
114
} ) ;
114
115
}
115
116
117
+ /**
118
+ * Open the first quote of a certain status in the quote list.
119
+ *
120
+ * @param status - Quote status
121
+ */
122
+ export function openQuoteInQuoteList ( status : string ) {
123
+ log (
124
+ 'Open the first quote of a certain status in the quote list' ,
125
+ openQuoteInQuoteList . name
126
+ ) ;
127
+ cy . get ( listComponentSelector ) . within ( ( ) => {
128
+ cy . get ( 'tr' ) . contains ( '.cx-status' , status ) . click ( ) ;
129
+ } ) ;
130
+ }
131
+
116
132
/**
117
133
* Verifies whether the quote overview page is displayed.
118
134
*/
@@ -1148,7 +1164,7 @@ function clickCancelQuoteBtn(editMode: boolean) {
1148
1164
*/
1149
1165
export function goToQuoteListPage ( ) : void {
1150
1166
log ( 'Go to the quote list page' , goToQuoteListPage . name ) ;
1151
- const location = `${ SHOP_NAME } /en/USD/my-account/quotes` ;
1167
+ const location = `${ Cypress . env ( 'BASE_SITE' ) } /en/USD/my-account/quotes` ;
1152
1168
cy . visit ( location ) . then ( ( ) => {
1153
1169
cy . location ( 'pathname' ) . should ( 'contain' , location ) ;
1154
1170
checkQuoteListDisplayed ( ) ;
@@ -1593,6 +1609,19 @@ export function createNewCart() {
1593
1609
cy . get ( '.CartPageTemplate' ) ;
1594
1610
} ) ;
1595
1611
}
1612
+ /**
1613
+ * Click on order detail link within a quote.
1614
+ */
1615
+ export function goToOrderDetail ( ) {
1616
+ log ( 'Click on order detail link within a quote' , goToOrderDetail . name ) ;
1617
+ cy . get ( '.cx-action-link' )
1618
+ . contains ( 'Order Detail' )
1619
+ . click ( )
1620
+ . then ( ( ) => {
1621
+ cy . url ( ) . should ( 'include' , `/my-account/order/` ) ;
1622
+ cy . get ( 'cx-order-overview' ) . should ( 'be.visible' ) ;
1623
+ } ) ;
1624
+ }
1596
1625
/**
1597
1626
* Verifies if the save active cart popup is shown.
1598
1627
*
0 commit comments