Skip to content

Commit a83d91f

Browse files
committed
fixup! fixup! fixup! test: add option to choose target cluster for deployed environments e2e tests
1 parent 1590550 commit a83d91f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

packages/e2e/src/util/util.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,11 @@ export const normalizeTxBody = (body: Cardano.HydratedTxBody | Cardano.TxBody) =
9090
return dehydratedTx;
9191
};
9292

93+
// We do not afford to wait for 3 confirmations on real network as it is a too long wait.
94+
// In preview it happened more than 4 minutes required to have 3 confirmations,
95+
// making the test to fail for timeout waiting for the third confirmation.
96+
const defaultWaitConfirmation = env.NETWORK_SPEED === 'fast' ? 3 : 1;
97+
9398
export const txConfirmed = (
9499
{
95100
tip$,
@@ -99,7 +104,7 @@ export const txConfirmed = (
99104
}
100105
}: ObservableWallet,
101106
{ id }: Pick<Cardano.Tx, 'id'>,
102-
numConfirmations = 3
107+
numConfirmations = defaultWaitConfirmation
103108
) =>
104109
firstValueFromTimed(
105110
merge(

0 commit comments

Comments
 (0)