Skip to content

Commit

Permalink
Adds temporary fix in dapp due to synpress issue
Browse files Browse the repository at this point in the history
Signed-off-by: Konstantina Blazhukova <[email protected]>
  • Loading branch information
Konstantina Blazhukova authored and konstantinabl committed Jul 5, 2023
1 parent c9c08a7 commit 411488a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions dapp-example/tests/e2e/specs/index.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ describe('Test Core Hedera User Scenarios', function() {

// deploy the contract
cy.get('#btnDeployContract').should('not.be.disabled').click();

//Adding cy.wait аs temporary fix due to issue in synpress library https://github.com/Synthetixio/synpress/issues/795
cy.wait(10000);
cy.confirmMetamaskTransaction();

// test a view call
Expand All @@ -44,6 +47,7 @@ describe('Test Core Hedera User Scenarios', function() {
// test a update call
cy.get('#updateGreetingText').type('updated_text');
cy.get('#btnUpdateGreeting').should('not.be.disabled').click();
cy.wait(10000);
cy.confirmMetamaskTransaction();
cy.waitUntil(() => cy.get('#contractUpdateMsg').should('have.text', ' Updated text: updated_text '));

Expand All @@ -59,6 +63,7 @@ describe('Test Core Hedera User Scenarios', function() {
cy.get('#htsReceiverAddressField').type(hollowAccount1.address);
cy.get('#htsTokenAmountField').clear().type(1000).trigger('change');
cy.get('#htsTokenTransferBtn').should('not.be.disabled').click();
cy.wait(10000);
cy.confirmMetamaskTransaction();

cy.waitUntil(() => cy.get('#htsTokenMsg').should('have.text', ' Done '));
Expand All @@ -68,6 +73,7 @@ describe('Test Core Hedera User Scenarios', function() {
cy.get('#sendHbarsToField').clear().type(hollowAccount1.address);
cy.get('#sendHbarsAmountField').clear().type('10000000000000000').trigger('change');
cy.get('#sendHbarsBtn').should('not.be.disabled').click();
cy.wait(10000);
cy.confirmMetamaskTransaction();

cy.waitUntil(() => cy.get('#sendHbarMsg').should('have.text', ' Done '));
Expand All @@ -78,6 +84,7 @@ describe('Test Core Hedera User Scenarios', function() {
cy.get('#sendHbarsToField').clear().type(hollowAccount1.address);
cy.get('#sendHbarsAmountField').clear().type('60000000000000000000').trigger('change');
cy.get('#sendHbarsBtn').should('not.be.disabled').click();
cy.wait(10000);
cy.confirmMetamaskTransaction();

cy.waitUntil(() => cy.get('#sendHbarMsg').should('have.text', ' Done '));
Expand All @@ -87,6 +94,7 @@ describe('Test Core Hedera User Scenarios', function() {
it('Create hollow account 2 via HBARs transfer transaction in contract', { retries: retries }, function() {
cy.get('#hollowAccountAddressField').clear().type(hollowAccount2.address);
cy.get('#activateHollowAccountBtn').should('not.be.disabled').click();
cy.wait(10000)
cy.confirmMetamaskTransaction();

cy.waitUntil(() => cy.get('#activateHollowAccountMsg').should('have.text', ' Done '));
Expand Down Expand Up @@ -127,6 +135,7 @@ describe('Test Core Hedera User Scenarios', function() {
cy.get('#sendHbarsToField').clear().type(randomHollowAccountAddress);
cy.get('#sendHbarsAmountField').clear().type('10000000000000000').trigger('change');
cy.get('#sendHbarsBtn').should('not.be.disabled').click();
cy.wait(10000);
cy.confirmMetamaskTransaction();

cy.waitUntil(() => cy.get('#sendHbarMsg').should('have.text', ' Done '));
Expand All @@ -137,6 +146,7 @@ describe('Test Core Hedera User Scenarios', function() {
console.log(`Associate with ${bootstrapInfo.HTS_SECOND_ADDRESS}`);
cy.get('#htsTokenAssociateAddressField').clear().type(bootstrapInfo.HTS_SECOND_ADDRESS).trigger('change');
cy.get('#htsTokenAssociateBtn').should('not.be.disabled').click();
cy.wait(10000);
cy.confirmMetamaskTransaction();

cy.waitUntil(() => cy.get('#htsTokenAssociateMsg').should('have.text', ' Done '));
Expand Down

0 comments on commit 411488a

Please sign in to comment.