From ba77cebced15d867dc865f0d7a495ba65822c607 Mon Sep 17 00:00:00 2001 From: rabi-siddique Date: Thu, 19 Sep 2024 12:02:29 +0500 Subject: [PATCH] see if auctioneer175 exists after different contexts --- test/e2e/specs/liquidation.spec.js | 7 +++++++ test/e2e/support.js | 5 +++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/test/e2e/specs/liquidation.spec.js b/test/e2e/specs/liquidation.spec.js index 429320ea..99a50310 100644 --- a/test/e2e/specs/liquidation.spec.js +++ b/test/e2e/specs/liquidation.spec.js @@ -310,6 +310,9 @@ describe('Wallet App Test Cases', () => { }); context('Creating vaults and changing ATOM price', () => { + it('should pause the old auctioneer', () => { + cy.pauseOldAuctioneer(); + }); it( 'should connect with the wallet', { @@ -380,6 +383,10 @@ describe('Wallet App Test Cases', () => { }); context('Place bids and make all vaults enter liquidation', () => { + it('should pause the old auctioneer', () => { + cy.pauseOldAuctioneer(); + }); + it('should create a vault minting 400 ISTs and giving 80 ATOMs as collateral', () => { cy.skipWhen(AGORIC_NET !== networks.LOCAL); cy.createVault({ wantMinted: 400, giveCollateral: 80, userKey: 'gov1' }); diff --git a/test/e2e/support.js b/test/e2e/support.js index 8ba2986d..78ec993e 100644 --- a/test/e2e/support.js +++ b/test/e2e/support.js @@ -121,7 +121,7 @@ Cypress.Commands.add('pauseOldAuctioneer', () => { cy.exec( `agoric follow ${netConfig} -lF :published.agoricNames.instance -o text`, ).then(async ({ stdout }) => { - cy.wait(1 * 60 * 1000); + cy.wait(2 * 60 * 1000); const byName = Object.fromEntries(fromCapData(JSON.parse(stdout))); cy.expect(byName).to.have.property('auctioneer'); cy.task('info', `Object is: ${JSON.stringify(byName)}`); @@ -145,7 +145,8 @@ Cypress.Commands.add('pauseOldAuctioneer', () => { agopsOpts, ).then(({ stdout }) => { const offerSpec = JSON.parse(stdout); - cy.expect(offerSpec.slots[0]).to.equal(auctioneer.getSlot()); + cy.task('info', `offerSpec is: ${JSON.stringify(offerSpec)}`); + // cy.expect(offerSpec.slots[0]).to.equal(auctioneer.getSlot()); offerSpec.slots[0] = oldAuctioneer.getSlot(); cy.writeFile(changeFile, JSON.stringify(offerSpec), 'utf8');