Skip to content

Commit

Permalink
Changed logging messages
Browse files Browse the repository at this point in the history
  • Loading branch information
cmerloglb committed Jun 24, 2022
1 parent b292c87 commit 0803647
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
Expand Up @@ -55,7 +55,7 @@ Feature: dApp connector anonymous wallet errors checking
And The user reject for signing is received

@dApp-1015
Scenario: dApp, anonymous wallet, unused adress, signing data, cancel signing
Scenario: dApp, anonymous wallet, unused address, signing data, cancel signing
And I request anonymous access to Yoroi
Then I should see the connector popup for connection
And I select the only wallet named shelley-simple-15 with 5.5 balance
Expand All @@ -71,7 +71,7 @@ Feature: dApp connector anonymous wallet errors checking
And The user reject for signing data is received

@dApp-1016
Scenario: dApp, anonymous wallet, used adress, signing data, cancel signing
Scenario: dApp, anonymous wallet, used address, signing data, cancel signing
And I request anonymous access to Yoroi
Then I should see the connector popup for connection
And I select the only wallet named shelley-simple-15 with 5.5 balance
Expand Down
8 changes: 5 additions & 3 deletions packages/yoroi-extension/features/mock-dApp-webpage/index.js
Expand Up @@ -200,12 +200,14 @@ export class MockDAppWebpage {
}

async requestUsedAddresses() {
this.logger.info(`MockDApp: Getting used addresses`);
await this.driver.executeScript(() => {
window.addressesPromise = window.api.getUsedAddresses({ page: 0, limit: 5 });
});
}

async requestUnusedAddresses() {
this.logger.info(`MockDApp: Getting unused addresses`);
await this.driver.executeScript(() => {
window.addressesPromise = window.api.getUnusedAddresses();
});
Expand Down Expand Up @@ -429,7 +431,7 @@ export class MockDAppWebpage {
.then(addrs => {
// eslint-disable-next-line promise/always-return
if (addrs.length === 0) {
callback({ success: false, errMsg: 'No unused addresses' });
callback({ success: false, errMsg: 'No addresses found' });
}
callback({ success: true, retValue: addrs });
})
Expand All @@ -446,10 +448,10 @@ export class MockDAppWebpage {
let address;
if (addresses && addresses.length > 0) {
address = addresses[0];
this.logger.info(`MockDApp: Using used address`);
this.logger.info(`MockDApp: Using the address ${address}`);
} else {
this.logger.error(`MockDApp: -> The error is received: No used or unused Addresses`);
throw new MockDAppWebpageError('No Unused Addresses');
throw new MockDAppWebpageError('There are no addresses to proceed');
}

address = this._addressToCbor(address);
Expand Down

0 comments on commit 0803647

Please sign in to comment.