-
Notifications
You must be signed in to change notification settings - Fork 63
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 #1052 from madfish-solutions/development
- Loading branch information
Showing
318 changed files
with
8,494 additions
and
4,376 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
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,42 @@ | ||
Feature: Notifications | ||
@notifications | ||
Scenario: As a user, I'd like to read some news | ||
Given I make request for creating a notification | ||
And I have imported an existing account | ||
And I press Notification Icon Button on the Home page | ||
|
||
And I am on the NotificationsList page | ||
And I check that new notification is displayed | ||
And I click on the new notification | ||
|
||
And I am on the NotificationContent page | ||
And The Notification Title Text on the Notification Content page has correct Test Title value | ||
And The Notification Description Text on the Notification Content page has correct Test content value | ||
|
||
And I press Got it Button on the Notification Content page | ||
And I am on the NotificationsList page | ||
|
||
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 General Button on the Settings page | ||
And I am on the GeneralSettings page | ||
# turning off notifications | ||
And I scroll 900 pixels on the GeneralSettings page | ||
And I press Notification Check Box on the Setting General page | ||
|
||
And I scroll -900 pixels on the GeneralSettings page | ||
And I press Temple Logo Icon on the Header page | ||
And I am on the Home page | ||
|
||
And I press Notification Icon Button on the Home page | ||
And I am on the NotificationsList page | ||
|
||
Then I check that new notification is NOT 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import { SettingsGeneralSelectors } from 'src/app/templates/SettingsGeneral/selectors'; | ||
|
||
import { Page } from '../../classes/page.class'; | ||
import { createPageElement } from '../../utils/search.utils'; | ||
|
||
export class GeneralSettingsPage extends Page { | ||
languageitem = createPageElement(SettingsGeneralSelectors.languageitem); | ||
languageDropDown = createPageElement(SettingsGeneralSelectors.languageDropDown); | ||
currencyItem = createPageElement(SettingsGeneralSelectors.currencyItem); | ||
currenctyDropDown = createPageElement(SettingsGeneralSelectors.currenctyDropDown); | ||
blockExplorerItem = createPageElement(SettingsGeneralSelectors.blockExplorerItem); | ||
blockExplorerDropDown = createPageElement(SettingsGeneralSelectors.blockExplorerDropDown); | ||
popUpCheckBox = createPageElement(SettingsGeneralSelectors.popUpCheckBox); | ||
extensionLockUpCheckBox = createPageElement(SettingsGeneralSelectors.extensionLockUpCheckBox); | ||
anonymousAnalyticsCheckBox = createPageElement(SettingsGeneralSelectors.anonymousAnalyticsCheckBox); | ||
notificationCheckBox = createPageElement(SettingsGeneralSelectors.notificationCheckBox); | ||
partnersPromotion = createPageElement(SettingsGeneralSelectors.partnersPromotion); | ||
|
||
async isVisible() { | ||
await this.languageDropDown.waitForDisplayed(); | ||
await this.currenctyDropDown.waitForDisplayed(); | ||
await this.blockExplorerDropDown.waitForDisplayed(); | ||
await this.popUpCheckBox.waitForDisplayed(); | ||
await this.extensionLockUpCheckBox.waitForDisplayed(); | ||
await this.anonymousAnalyticsCheckBox.waitForDisplayed(); | ||
await this.notificationCheckBox.waitForDisplayed(); | ||
await this.partnersPromotion.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
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 { NotificationsContentSelectors } from 'src/lib/notifications/components/item/notifications-content.selectors'; | ||
|
||
import { Page } from '../../classes/page.class'; | ||
import { createPageElement } from '../../utils/search.utils'; | ||
|
||
export class NotificationContentPage extends Page { | ||
notificationContentTitle = createPageElement(NotificationsContentSelectors.notificationContentTitle); | ||
notificationContentDescription = createPageElement(NotificationsContentSelectors.notificationContentDescription); | ||
gotItButton = createPageElement(NotificationsContentSelectors.gotItButton); | ||
|
||
async isVisible() { | ||
await this.notificationContentTitle.waitForDisplayed(); | ||
await this.notificationContentDescription.waitForDisplayed(); | ||
await this.gotItButton.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,55 @@ | ||
import { PreviewItemSelectors } from 'src/lib/notifications/components/notifications/preview-item.selectors'; | ||
import type { NotificationInterface } from 'src/lib/notifications/types'; | ||
|
||
import { VERY_SHORT_TIMEOUT } from 'e2e/src/utils/timing.utils'; | ||
|
||
import { Page } from '../../classes/page.class'; | ||
import { createPageElement } from '../../utils/search.utils'; | ||
|
||
export class NotificationsListPage extends Page { | ||
newNotification?: NotificationInterface; | ||
notificationItem = createPageElement(PreviewItemSelectors.notificationItem); | ||
notificationItemTitleText = createPageElement(PreviewItemSelectors.notificationItemTitleText); | ||
notificationItemDescriptionText = createPageElement(PreviewItemSelectors.notificationItemDescriptionText); | ||
|
||
async isVisible() { | ||
await this.notificationItem.waitForDisplayed(); | ||
await this.notificationItemTitleText.waitForDisplayed(); | ||
await this.notificationItemDescriptionText.waitForDisplayed(); | ||
} | ||
|
||
async isNotificationDisplayed({ id, title, description }: NotificationInterface) { | ||
const notificationTextPageElem = createPageElement(PreviewItemSelectors.notificationItem, { id: String(id) }); | ||
|
||
await notificationTextPageElem.waitForDisplayed( | ||
VERY_SHORT_TIMEOUT, | ||
`Notification with ${title} title is not displayed` | ||
); | ||
|
||
const titleText = await notificationTextPageElem | ||
.createChildElement(PreviewItemSelectors.notificationItemTitleText) | ||
.getText(); | ||
if (titleText !== title) throw new Error(`Notification title missmatch. Got: ${titleText}`); | ||
|
||
const descriptionText = await notificationTextPageElem | ||
.createChildElement(PreviewItemSelectors.notificationItemDescriptionText) | ||
.getText(); | ||
if (descriptionText !== description) throw new Error(`Notification description missmatch. Got: ${descriptionText}`); | ||
} | ||
|
||
async clickOnTheNotification({ id }: NotificationInterface) { | ||
const notificationTextElem = createPageElement(PreviewItemSelectors.notificationItem, { id: String(id) }); | ||
await notificationTextElem.click(); | ||
} | ||
|
||
async isNotificationNotDisplayed({ id, title }: NotificationInterface) { | ||
const notificationTextElem = createPageElement(PreviewItemSelectors.notificationItem, { id: String(id) }); | ||
|
||
await notificationTextElem.waitForDisplayed(1_500).then( | ||
() => { | ||
throw new Error(`The notification '${title}' is displayed after turning off 'news' checkbox in settings`); | ||
}, | ||
() => undefined | ||
); | ||
} | ||
} |
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
Oops, something went wrong.