Skip to content

Commit

Permalink
prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
usmanmani1122 committed Sep 10, 2024
1 parent 71a96d2 commit 266b099
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions tests/e2e/support.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,15 @@ Cypress.Commands.add(
SUCCESSFUL: 1002,
};

const getStatus = (txHash) =>
const getStatus = txHash =>
cy
.request({
method: 'GET',
url: `https://${Cypress.env('AGORIC_NET')}.faucet.agoric.net/api/transaction-status/${txHash}`,
url: `https://${Cypress.env(
'AGORIC_NET'
)}.faucet.agoric.net/api/transaction-status/${txHash}`,
})
.then((resp) => {
.then(resp => {
const { transactionStatus } = resp.body;
if (transactionStatus === TRANSACTION_STATUS.NOT_FOUND)
// eslint-disable-next-line cypress/no-unnecessary-waiting
Expand All @@ -34,9 +36,10 @@ Cypress.Commands.add(
headers: FACUET_HEADERS,
method: 'POST',
url: `https://${Cypress.env('AGORIC_NET')}.faucet.agoric.net/go`,
}).then((resp) =>
getStatus(/\/transaction-status\/(.*)/.exec(resp.headers.location)[1]),
)
.then((status) => expect(status).to.eq(TRANSACTION_STATUS.SUCCESSFUL));
})
.then(resp =>
getStatus(/\/transaction-status\/(.*)/.exec(resp.headers.location)[1])
)
.then(status => expect(status).to.eq(TRANSACTION_STATUS.SUCCESSFUL));
}
);

0 comments on commit 266b099

Please sign in to comment.