-
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 branch 'TW-716-baner-subscrition' of github.com:madfish-solutio…
…ns/templewallet-extension into TW-716-baner-subscrition
- Loading branch information
Showing
32 changed files
with
410 additions
and
48 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
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,147 @@ | ||
Feature: Swap | ||
@dev | ||
Scenario: As a user, i'd like to swap assets | ||
Given I have imported an existing account | ||
And I press Swap Button on the Home page | ||
|
||
And I am on the Swap page | ||
# 1.Swap TEZ -> kUSD (TEZ -> FA2) | ||
And I enter amount_0_005 into Asset Input on the Swap Form (From) Input page | ||
And I press Asset Drop-down Button on the Swap Form (To) Input page | ||
And I enter uUSD into Search Input on the Swap Form (To) Input page | ||
And I select uUSD token in the token drop-down list on the Swap page | ||
And I click on animated Swap button on the Swap page | ||
|
||
And I am on the InternalConfirmation page | ||
And I press Confirm Button on the Internal Confirmation page | ||
|
||
And I am on the OperationStatusAlert page | ||
And I'm waiting for 'success ✓' operation status | ||
|
||
And I am on the Swap page | ||
# 2.Swap TEZ -> kUSD (TEZ -> FA1.2) | ||
And I press Asset Drop-down Button on the Swap Form (To) Input page | ||
And I clear Search Input value on the Swap Form (To) Input page | ||
And I enter kUSD into Search Input on the Swap Form (To) Input page | ||
And I select kUSD token in the token drop-down list on the Swap page | ||
And I click on animated Swap button on the Swap page | ||
|
||
And I am on the InternalConfirmation page | ||
And I press Confirm Button on the Internal Confirmation page | ||
|
||
And I am on the OperationStatusAlert page | ||
And I'm waiting for 'success ✓' operation status | ||
|
||
And I am on the Swap page | ||
# 3.Swap kUSD -> TEZ (FA1.2 -> TEZ) | ||
And I press Swap Places Button on the Swap Form page | ||
And I enter amount_0_005 into Asset Input on the Swap Form (From) Input page | ||
And I click on animated Swap button on the Swap page | ||
|
||
And I am on the InternalConfirmation page | ||
And I press Confirm Button on the Internal Confirmation page | ||
|
||
And I am on the OperationStatusAlert page | ||
And I'm waiting for 'success ✓' operation status | ||
|
||
|
||
And I am on the Swap page | ||
# 4.Swap uUSD -> TEZ (FA2 -> TEZ) | ||
And I press Asset Drop-down Button on the Swap Form (From) Input page | ||
And I enter uUSD into Search Input on the Swap Form (From) Input page | ||
And I select uUSD token in the token drop-down list on the Swap page | ||
And I click on animated Swap button on the Swap page | ||
|
||
And I am on the InternalConfirmation page | ||
And I press Confirm Button on the Internal Confirmation page | ||
|
||
And I am on the OperationStatusAlert page | ||
And I'm waiting for 'success ✓' operation status | ||
|
||
|
||
And I am on the Swap page | ||
# 5.Swap uUSD -> WTZ (FA2 -> FA1.2) | ||
And I press Asset Drop-down Button on the Swap Form (To) Input page | ||
And I enter WTZ into Search Input on the Swap Form (To) Input page | ||
And I select WTZ token in the token drop-down list on the Swap page | ||
And I click on animated Swap button on the Swap page | ||
|
||
And I am on the InternalConfirmation page | ||
And I press Confirm Button on the Internal Confirmation page | ||
|
||
And I am on the OperationStatusAlert page | ||
And I'm waiting for 'success ✓' operation status | ||
|
||
|
||
And I am on the Swap page | ||
# 6.Swap WTZ -> uUSD (FA1.2 -> FA2) | ||
And I press Swap Places Button on the Swap Form page | ||
And I enter amount_0_005 into Asset Input on the Swap Form (From) Input page | ||
And I click on animated Swap button on the Swap page | ||
|
||
And I am on the InternalConfirmation page | ||
And I press Confirm Button on the Internal Confirmation page | ||
|
||
And I am on the OperationStatusAlert page | ||
And I'm waiting for 'success ✓' operation status | ||
|
||
|
||
And I am on the Swap page | ||
# 7.Swap WTZ -> kUSD (FA1.2 -> FA1.2) | ||
And I press Asset Drop-down Button on the Swap Form (To) Input page | ||
And I enter kUSD into Search Input on the Swap Form (To) Input page | ||
And I select kUSD token in the token drop-down list on the Swap page | ||
And I click on animated Swap button on the Swap page | ||
|
||
And I am on the InternalConfirmation page | ||
And I press Confirm Button on the Internal Confirmation page | ||
|
||
And I am on the OperationStatusAlert page | ||
And I'm waiting for 'success ✓' operation status | ||
|
||
|
||
And I am on the Swap page | ||
# 8.Swap kUSD -> WTZ (FA1.2 -> FA1.2) | ||
And I press Swap Places Button on the Swap Form page | ||
And I enter amount_0_005 into Asset Input on the Swap Form (From) Input page | ||
And I click on animated Swap button on the Swap page | ||
|
||
And I am on the InternalConfirmation page | ||
And I press Confirm Button on the Internal Confirmation page | ||
|
||
And I am on the OperationStatusAlert page | ||
And I'm waiting for 'success ✓' operation status | ||
|
||
|
||
And I am on the Swap page | ||
# 9.Swap wUSDT -> uUSD (FA2 -> FA2) | ||
And I press Asset Drop-down Button on the Swap Form (From) Input page | ||
And I enter wUSDT into Search Input on the Swap Form (From) Input page | ||
And I select wUSDT token in the token drop-down list on the Swap page | ||
And I clear Asset Input value on the Swap Form (From) Input page | ||
And I enter amount_0_03 into Asset Input on the Swap Form (From) Input page | ||
And I press Asset Drop-down Button on the Swap Form (To) Input page | ||
And I enter uUSD into Search Input on the Swap Form (To) Input page | ||
And I select uUSD token in the token drop-down list on the Swap page | ||
And I click on animated Swap button on the Swap page | ||
|
||
And I am on the InternalConfirmation page | ||
And I press Confirm Button on the Internal Confirmation page | ||
|
||
And I am on the OperationStatusAlert page | ||
And I'm waiting for 'success ✓' operation status | ||
|
||
|
||
And I am on the Swap page | ||
# 10.Swap wUSDT -> uUSD (FA2 -> FA2) | ||
And I press Swap Places Button on the Swap Form page | ||
And I enter amount_0_03 into Asset Input on the Swap Form (From) Input page | ||
And I click on animated Swap button on the Swap page | ||
|
||
And I am on the InternalConfirmation page | ||
And I press Confirm Button on the Internal Confirmation page | ||
|
||
And I am on the OperationStatusAlert page | ||
And I'm waiting for 'success ✓' operation status | ||
|
||
Then I am on the Swap page |
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,16 @@ | ||
import { NewsletterOverlaySelectors } from 'src/app/layouts/PageLayout/NewsletterOverlay/NewsletterOverlay.selectors'; | ||
|
||
import { Page } from '../../classes/page.class'; | ||
import { createPageElement } from '../../utils/search.utils'; | ||
|
||
export class NewsletterModalPage extends Page { | ||
closeButton = createPageElement(NewsletterOverlaySelectors.closeButton); | ||
emailInput = createPageElement(NewsletterOverlaySelectors.emailInput); | ||
subscribeButton = createPageElement(NewsletterOverlaySelectors.subscribeButton); | ||
|
||
async isVisible() { | ||
await this.closeButton.waitForDisplayed(); | ||
await this.emailInput.waitForDisplayed(); | ||
await this.subscribeButton.waitForDisplayed(); | ||
} | ||
} |
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,20 @@ | ||
import { OnRampOverlaySelectors } from 'src/app/layouts/PageLayout/OnRampOverlay/OnRampOverlay.selectors'; | ||
|
||
import { Page } from '../../classes/page.class'; | ||
import { createPageElement } from '../../utils/search.utils'; | ||
|
||
export class OnRumModalPage extends Page { | ||
closeButton = createPageElement(OnRampOverlaySelectors.closeButton); | ||
fiftyDollarButton = createPageElement(OnRampOverlaySelectors.fiftyDollarButton); | ||
oneHundredDollarButton = createPageElement(OnRampOverlaySelectors.oneHundredDollarButton); | ||
twoHundredDollarButton = createPageElement(OnRampOverlaySelectors.twoHundredDollarButton); | ||
customAmountButton = createPageElement(OnRampOverlaySelectors.customAmountButton); | ||
|
||
async isVisible() { | ||
await this.closeButton.waitForDisplayed(); | ||
await this.fiftyDollarButton.waitForDisplayed(); | ||
await this.oneHundredDollarButton.waitForDisplayed(); | ||
await this.twoHundredDollarButton.waitForDisplayed(); | ||
await this.customAmountButton.waitForDisplayed(); | ||
} | ||
} |
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,47 @@ | ||
import retry from 'async-retry'; | ||
import { | ||
SwapFormFromInputSelectors, | ||
SwapFormSelectors, | ||
SwapFormToInputSelectors | ||
} from 'src/app/templates/SwapForm/SwapForm.selectors'; | ||
import { AssetsMenuSelectors } from 'src/app/templates/SwapForm/SwapFormInput/AssetsMenu/selectors'; | ||
|
||
import { sleep } from 'e2e/src/utils/timing.utils'; | ||
|
||
import { Page } from '../../classes/page.class'; | ||
import { createPageElement, findElement } from '../../utils/search.utils'; | ||
|
||
export class SwapPage extends Page { | ||
swapPlacesButton = createPageElement(SwapFormSelectors.swapPlacesButton); | ||
swapButton = createPageElement(SwapFormSelectors.swapButton); | ||
|
||
assetInputFrom = createPageElement(SwapFormFromInputSelectors.assetInput); | ||
assetItemFrom = createPageElement(SwapFormFromInputSelectors.assetDropDownButton); | ||
searchInputFrom = createPageElement(SwapFormFromInputSelectors.searchInput); | ||
|
||
assetInputTo = createPageElement(SwapFormToInputSelectors.assetInput); | ||
assetItemTo = createPageElement(SwapFormToInputSelectors.assetDropDownButton); | ||
searchInputTo = createPageElement(SwapFormToInputSelectors.searchInput); | ||
|
||
async isVisible() { | ||
await this.swapPlacesButton.waitForDisplayed(); | ||
await this.swapButton.waitForDisplayed(); | ||
await this.assetInputFrom.waitForDisplayed(); | ||
await this.assetItemFrom.waitForDisplayed(); | ||
await this.assetInputTo.waitForDisplayed(); | ||
await this.assetItemTo.waitForDisplayed(); | ||
} | ||
|
||
async selectAsset(slug: string) { | ||
// Retrying here, because sometimes element reference is lost between | ||
// finding it and clicking. Common for drop-down menus. | ||
await retry( | ||
async () => { | ||
const tokenItemElem = await findElement(AssetsMenuSelectors.assetsMenuAssetItem, { slug }); | ||
await sleep(1000); | ||
await tokenItemElem.click(); | ||
}, | ||
{ retries: 10 } | ||
); | ||
} | ||
} |
Oops, something went wrong.