Skip to content

Commit

Permalink
remove retry
Browse files Browse the repository at this point in the history
  • Loading branch information
hdiniz committed Nov 7, 2024
1 parent 34a7cdf commit 2ee3d0f
Showing 1 changed file with 17 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,23 +44,23 @@ function contributeWithNewUsBankAccount({ name } = {}) {
}

function waitOrderStatus(status = 'PAID') {
cy.retryChain(
() =>
cy.get('@collective').then(col => {
cy.visit(`${col.slug}/orders`);
return cy.contains('Financial contribution to'); // orders loaded
}),
() => {
const text = cy.$$(`[data-cy='order-status-msg']`).text().toUpperCase();
if (!text.match(status)) {
throw new Error(`Order did not transition to ${status} before timeout, current value: ${text}.`);
}
},
{
maxAttempts: 2,
wait: 6000,
},
);
// cy.retryChain(
// () =>
// cy.get('@collective').then(col => {
// cy.visit(`${col.slug}/orders`);
// return cy.contains('Financial contribution to'); // orders loaded
// }),
// () => {
// const text = cy.$$(`[data-cy='order-status-msg']`).text().toUpperCase();
// if (!text.match(status)) {
// throw new Error(`Order did not transition to ${status} before timeout, current value: ${text}.`);
// }
// },
// {
// maxAttempts: 2,
// wait: 6000,
// },
// );

cy.get(`[data-cy='order-status-msg']`).should($el => {
const text = $el.text().toUpperCase();
Expand Down

0 comments on commit 2ee3d0f

Please sign in to comment.