-
Notifications
You must be signed in to change notification settings - Fork 327
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
π©Ή [QAA-304] Adding check for operation history when adding an account #8168
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,14 +9,17 @@ export class PortfolioPage extends AppPage { | |
private swapEntryButton = this.page.getByTestId("swap-entry-button"); | ||
private stakeEntryButton = this.page.getByTestId("stake-entry-button"); | ||
private chart = this.page.getByTestId("chart-container"); | ||
private operationList = this.page.locator("id=operation-list"); | ||
private marketPerformanceWidget = this.page.getByTestId("market-performance-widget"); | ||
private swapButton = this.marketPerformanceWidget.getByRole("button", { name: "Swap" }); | ||
private buyButton = this.marketPerformanceWidget.getByRole("button", { name: "Buy" }); | ||
private assetAllocationTitle = this.page.getByText("Asset allocation"); | ||
private trendTitle = this.marketPerformanceWidget.getByText("1W trend"); | ||
private assetRowElements = this.page.locator("[data-testid^='asset-row-']"); | ||
private showAllButton = this.page.getByText("Show all"); | ||
private showMoreButton = this.page.getByText("Show more"); | ||
private assetRow = (asset: string) => this.page.getByTestId(`asset-row-${asset.toLowerCase()}`); | ||
private operationRows = this.page.locator("[data-testid^='operation-row-']"); | ||
|
||
@step("Open `Add account` modal") | ||
async openAddAccountModal() { | ||
|
@@ -81,9 +84,24 @@ export class PortfolioPage extends AppPage { | |
await assetRowLocator.click(); | ||
} | ||
|
||
@step("Scroll to operations") | ||
async scrollToOperations() { | ||
await this.page.waitForTimeout(500); | ||
const operationList = this.page.locator("id=operation-list"); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. might make sense to use this locator There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes, that's legacy code used for mocked test. I didn't touch it but I can do the update :) |
||
await operationList.scrollIntoViewIfNeeded(); | ||
} | ||
|
||
@step("check operation history") | ||
async opperationHistory() { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. could you rename method to something like |
||
await this.operationList.scrollIntoViewIfNeeded(); | ||
expect(await this.operationList).toBeVisible(); | ||
|
||
const numberOfOperationsBefore = await this.operationRows.count(); | ||
|
||
if (await this.showMoreButton.isVisible()) { | ||
await this.showMoreButton.click(); | ||
const numberOfOperationsAfter = await this.operationRows.count(); | ||
expect(numberOfOperationsAfter).toBeGreaterThan(numberOfOperationsBefore); | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ import { getDescription } from "../../utils/customJsonReporter"; | |
|
||
const currencies = [ | ||
{ currency: Currency.BTC, xrayTicket: "B2CQA-2499, B2CQA-2644, B2CQA-2672, B2CQA-786" }, | ||
{ currency: Currency.ETH, xrayTicket: "B2CQA-2503, B2CQA-2645, B2CQA-2673" }, | ||
{ currency: Currency.ETH, xrayTicket: "B2CQA-2503, B2CQA-929, B2CQA-2645, B2CQA-2673" }, | ||
{ currency: Currency.ETC, xrayTicket: "B2CQA-2502, B2CQA-2646, B2CQA-2674" }, | ||
{ currency: Currency.XRP, xrayTicket: "B2CQA-2505, B2CQA-2647, B2CQA-2675" }, | ||
{ currency: Currency.DOT, xrayTicket: "B2CQA-2504, B2CQA-2648, B2CQA-2676" }, | ||
|
@@ -50,6 +50,7 @@ for (const currency of currencies) { | |
if (currency.currency.name !== Currency.TON.name) { | ||
await app.layout.expectBalanceVisibility(); | ||
} | ||
await app.portfolio.opperationHistory(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. small typo 2 "p" |
||
await app.layout.goToAccounts(); | ||
await app.accounts.navigateToAccountByName(firstAccountName); | ||
await app.account.expectAccountVisibility(firstAccountName); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you replace by
#operation-list
please?