This repository has been archived by the owner on Apr 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 152
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* pair improvements * fix lint * feat: add notify Snap method * Added getAllNotifications method * go back after getting all notifications * remove timeout * fix post merge errors Co-authored-by: Bernard <bero4net@gmail.com> Co-authored-by: Marin Petrunic <marin.petrunic@gmail.com>
- Loading branch information
1 parent
c4c0e5f
commit ae17944
Showing
13 changed files
with
90 additions
and
21 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { clickOnElement, openProfileDropdown } from "../helpers"; | ||
import { DappeteerPage } from "../page"; | ||
import { NotificationList } from "./types"; | ||
|
||
export const getAllNotifications = | ||
(page: DappeteerPage) => async (): Promise<NotificationList> => { | ||
await page.bringToFront(); | ||
await openProfileDropdown(page); | ||
await clickOnElement(page, "Notifications"); | ||
await page.waitForSelector(".notifications__item__details__message"); | ||
const notificationList: NotificationList = await page.$$eval( | ||
".notifications__item__details__message", | ||
(elements) => | ||
elements.map((element) => ({ message: element.textContent })) | ||
); | ||
const backButton = await page.waitForSelector( | ||
".notifications__header__title-container__back-button" | ||
); | ||
|
||
await backButton.click(); | ||
return notificationList; | ||
}; |
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,3 +1,4 @@ | ||
export { flaskOnly } from "./utils"; | ||
export { installSnap } from "./install"; | ||
export { invokeSnap } from "./invokeSnap"; | ||
export { getAllNotifications } from "./getAllNotifications"; |
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 |
---|---|---|
|
@@ -18,3 +18,5 @@ export interface InstallSnapResult { | |
}; | ||
}; | ||
} | ||
|
||
export type NotificationList = { message: string }[]; |
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