Skip to content

Commit

Permalink
see if auctioneer175 exists after different contexts
Browse files Browse the repository at this point in the history
  • Loading branch information
rabi-siddique committed Sep 19, 2024
1 parent 2c72dcf commit ba77ceb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
7 changes: 7 additions & 0 deletions test/e2e/specs/liquidation.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
{
Expand Down Expand Up @@ -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' });
Expand Down
5 changes: 3 additions & 2 deletions test/e2e/support.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)}`);
Expand All @@ -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');

Expand Down

0 comments on commit ba77ceb

Please sign in to comment.