@@ -74,8 +74,17 @@ export const reviewQuote = async (
7474 '[data-testid="exchange-rate-display-quote-rate"]' ,
7575 ) ;
7676 const summaryText = await summary . getText ( ) ;
77- assert . equal ( summaryText . includes ( options . swapFrom ) , true ) ;
78- assert . equal ( summaryText . includes ( options . swapTo ) , true ) ;
77+
78+ await driver . waitForSelector ( {
79+ testId : 'prepare-swap-page-swap-from' ,
80+ text : options . swapFrom ,
81+ } ) ;
82+
83+ await driver . waitForSelector ( {
84+ testId : 'prepare-swap-page-swap-to' ,
85+ text : options . swapTo ,
86+ } ) ;
87+
7988 const quote = summaryText . split ( `\n` ) ;
8089
8190 const elementSwapToAmount = await driver . findElement (
@@ -138,22 +147,20 @@ export const checkActivityTransaction = async (
138147 await driver . clickElement ( '[data-testid="account-overview__activity-tab"]' ) ;
139148 await driver . waitForSelector ( '.activity-list-item' ) ;
140149
141- const transactionList = await driver . findElements (
142- '[data-testid="activity-list-item-action"]' ,
143- ) ;
144- const transactionText = await transactionList [ options . index ] . getText ( ) ;
145- assert . equal (
146- transactionText ,
147- `Swap ${ options . swapFrom } to ${ options . swapTo } ` ,
148- 'Transaction not found' ,
149- ) ;
150+ await driver . waitForSelector ( {
151+ tag : 'p' ,
152+ text : `Swap ${ options . swapFrom } to ${ options . swapTo } ` ,
153+ } ) ;
150154
151155 await driver . findElement ( {
152156 css : '[data-testid="transaction-list-item-primary-currency"]' ,
153157 text : `-${ options . amount } ${ options . swapFrom } ` ,
154158 } ) ;
155159
156- await transactionList [ options . index ] . click ( ) ;
160+ await driver . clickElement ( {
161+ tag : 'p' ,
162+ text : `Swap ${ options . swapFrom } to ${ options . swapTo } ` ,
163+ } ) ;
157164 await driver . delay ( regularDelayMs ) ;
158165
159166 await driver . findElement ( {
0 commit comments