-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #929 from madfish-solutions/TW-815-Add-contact-Pos…
…itive TW-815: [e2e] Add contact positive
- Loading branch information
Showing
26 changed files
with
169 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
Feature: Address book | ||
@address_book | ||
Scenario: As a user, I'd like to add contact | ||
Given I have imported an existing account | ||
|
||
And I press Account Icon on the Header page | ||
And I am on the AccountsDropdown page | ||
And I press Settings Button on the Account Drop-down page | ||
|
||
And I am on the Settings page | ||
And I press Address Book Button on the Settings page | ||
|
||
And I am on the AddressBook page | ||
And I enter contactPublicKey into Address Input on the Address Book page | ||
And I enter shortRandomContent into Name Input on the Address Book page | ||
And I press Add Contact Button on the Address Book page | ||
|
||
Then I check if added contact is added and displayed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { AddressBookSelectors } from 'src/app/templates/AddressBook/AddressBook.selectors'; | ||
|
||
import { Page } from 'e2e/src/classes/page.class'; | ||
import { createPageElement, findElement } from 'e2e/src/utils/search.utils'; | ||
import { VERY_SHORT_TIMEOUT } from 'e2e/src/utils/timing.utils'; | ||
|
||
export class AddressBookPage extends Page { | ||
addressInput = createPageElement(AddressBookSelectors.addressInput); | ||
nameInput = createPageElement(AddressBookSelectors.nameInput); | ||
addContactButton = createPageElement(AddressBookSelectors.addContactButton); | ||
contactItem = createPageElement(AddressBookSelectors.contactItem); | ||
deleteContactButton = createPageElement(AddressBookSelectors.deleteContactButton); | ||
contactOwnLabelText = createPageElement(AddressBookSelectors.contactOwnLabelText); | ||
|
||
async isVisible() { | ||
await this.addressInput.waitForDisplayed(); | ||
await this.nameInput.waitForDisplayed(); | ||
await this.addContactButton.waitForDisplayed(); | ||
await this.contactItem.waitForDisplayed(); | ||
await this.contactOwnLabelText.waitForDisplayed(); | ||
} | ||
|
||
isContactAdded(hash: string) { | ||
return findElement( | ||
AddressBookSelectors.contactItem, | ||
{ hash }, | ||
VERY_SHORT_TIMEOUT, | ||
`The contact with address: '${hash}' not found` | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { Given } from '@cucumber/cucumber'; | ||
import { expect } from 'chai'; | ||
|
||
import { Pages } from 'e2e/src/page-objects'; | ||
import { envVars } from 'e2e/src/utils/env.utils'; | ||
import { MEDIUM_TIMEOUT } from 'e2e/src/utils/timing.utils'; | ||
|
||
Given(/I check if added contact is added and displayed/, { timeout: MEDIUM_TIMEOUT }, async () => { | ||
// Checking if added contact is displaying 'Current contacts' list | ||
await Pages.AddressBook.isContactAdded(envVars.CONTACT_ADDRESS_PUBLIC_KEY_HASH); | ||
|
||
// Checking if added contact is displayed in the 'Recipient' drop-down on the Send Page | ||
await Pages.Header.templeLogoButton.click(); | ||
await Pages.Home.isVisible(); | ||
await Pages.Home.SendButton.click(); | ||
await Pages.Send.isVisible(); | ||
await Pages.Send.recipientInput.click(); | ||
await Pages.Send.contactItemButton.waitForDisplayed(); | ||
|
||
const contactHashValue = await Pages.Send.contactHashValue.getText(); | ||
expect(contactHashValue).eql(envVars.CONTACT_ADDRESS_PUBLIC_KEY_HASH_SHORT_FORM); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
src/app/pages/NewWallet/setWalletPassword/SetWalletPassword.selectors.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
export enum AddressBookSelectors { | ||
addressInput = 'Address Book/Address Input', | ||
nameInput = 'Address Book/Name Input', | ||
addContactButton = 'Address Book/Add Contact Button' | ||
addContactButton = 'Address Book/Add Contact Button', | ||
contactItem = 'Address Book/Contact Item', | ||
deleteContactButton = 'Address Book/Delete Contact Button', | ||
contactOwnLabelText = 'Address Book/Contact Own Label Text' | ||
} |
Oops, something went wrong.