Skip to content

Commit

Permalink
Merge pull request #188 from Agoric/rs-fix-local-e2e-tests
Browse files Browse the repository at this point in the history
URL changes in e2e tests to make it work locally
  • Loading branch information
rabi-siddique committed Aug 28, 2024
2 parents ab2d8b9 + 14d454c commit 4ab9ece
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
14 changes: 7 additions & 7 deletions test/e2e/specs/test.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ describe('Wallet App Test Cases', { execTimeout: DEFAULT_EXEC_TIMEOUT }, () => {
});
});
it(`should open the web wallet URL successfully`, () => {
cy.visit(`${userConfig.webwalletURL}`);
cy.visit('/');

cy.acceptAccess().then((taskCompleted) => {
expect(taskCompleted).to.be.true;
});
});

it('should setup web wallet successfully', () => {
cy.visit(`${userConfig.webwalletURL}wallet/`);
cy.visit('/wallet/');

cy.get('input[type="checkbox"]').check();
cy.contains('Proceed').click();
Expand Down Expand Up @@ -75,7 +75,7 @@ describe('Wallet App Test Cases', { execTimeout: DEFAULT_EXEC_TIMEOUT }, () => {
cy.provisionFromFaucet(address, 'client');
});

cy.visit(`${userConfig.webwalletURL}wallet/`);
cy.visit('/wallet/');
cy.get('span').contains('ATOM').should('exist');
cy.get('span').contains('BLD').should('exist');
});
Expand Down Expand Up @@ -130,7 +130,7 @@ describe('Wallet App Test Cases', { execTimeout: DEFAULT_EXEC_TIMEOUT }, () => {
});

it('should see an offer placed in the previous test case', () => {
cy.visit(`${userConfig.webwalletURL}wallet/`);
cy.visit('/wallet/');

cy.contains('Offer').should('be.visible');
cy.contains('Give Bid').should('be.visible');
Expand All @@ -141,7 +141,7 @@ describe('Wallet App Test Cases', { execTimeout: DEFAULT_EXEC_TIMEOUT }, () => {

it('should cancel the bid by discount and verify IST balance', () => {
cy.getTokenAmount('IST').then((initialTokenValue) => {
cy.visit(`${userConfig.webwalletURL}wallet/`);
cy.visit('/wallet/');
cy.contains('Exit').click();
cy.acceptAccess().then((taskCompleted) => {
expect(taskCompleted).to.be.true;
Expand Down Expand Up @@ -174,7 +174,7 @@ describe('Wallet App Test Cases', { execTimeout: DEFAULT_EXEC_TIMEOUT }, () => {
);

it('should see an offer placed in the previous test case', () => {
cy.visit(`${userConfig.webwalletURL}wallet/`);
cy.visit('/wallet/');
cy.contains('Offer').should('be.visible');
cy.contains('Give Bid').should('be.visible');
cy.contains('1.00 IST').should('be.visible');
Expand All @@ -184,7 +184,7 @@ describe('Wallet App Test Cases', { execTimeout: DEFAULT_EXEC_TIMEOUT }, () => {

it('should cancel the bid by price and verify IST balance', () => {
cy.getTokenAmount('IST').then((initialTokenValue) => {
cy.visit(`${userConfig.webwalletURL}wallet/`);
cy.visit('/wallet/');
cy.contains('Exit').click();
cy.acceptAccess().then((taskCompleted) => {
expect(taskCompleted).to.be.true;
Expand Down
3 changes: 0 additions & 3 deletions test/e2e/test.utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,12 @@ export const config = {
userKeyName: 'user1',
userWalletAddress: accountAddresses.user1,
userWalletMnemonic: mnemonics.user1,
// UNTIL https://github.com/Agoric/wallet-app/issues/184
webwalletURL: 'https://wallet.agoric.app/',
COMMAND_TIMEOUT: 2 * 60 * 1000,
},
testnet: {
userKeyName: 'user2',
userWalletAddress: accountAddresses.user2,
userWalletMnemonic: mnemonics.user2,
webwalletURL: '/',
COMMAND_TIMEOUT: 2 * 60 * 1000,
},
};

0 comments on commit 4ab9ece

Please sign in to comment.