-
Notifications
You must be signed in to change notification settings - Fork 52
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
Rewrite E2E test suite #1075
Rewrite E2E test suite #1075
Conversation
Please share your suggestions on how to improve test coverage in a cheap way |
…-browser-tx into klntsky/rewrite-e2e
Adapt Gero to E2E test suite on `preview`
Puppeteer has a cardano-transaction-lib/src/Internal/Test/E2E/Wallets.purs Lines 47 to 55 in d49f112
findWalletPage :: Pattern -> Toppokki.Browser -> Aff (Maybe Toppokki.Page)
findWalletPage pattern browser = do
pages <- Toppokki.pages browser
let walletPages = do
page <- pages
guard $ String.contains pattern (_url page)
pure page
-- ... where |
I don't agree, using a library function with the same purpose is better than using FFI. |
Yes, but pageUrl :: Toppokki.Page -> Aff String
pageUrl page = do
unsafeFromForeign <$> Toppokki.unsafeEvaluateStringFunction
"document.location.href"
page Anyways, it's not a big deal, just something I noticed. |
src/Internal/Test/E2E/Wallets.purs
Outdated
@@ -105,13 +74,13 @@ pageUrl page = do | |||
-- | Wait until the wallet page pops up. Timout should be at least a few seconds. | |||
-- | The 'String' param is the text of jQuery, which will be injected. |
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.
Not relevant, there is no String param.
src/Internal/Test/E2E/Wallets.purs
Outdated
<> "; URL pattern: " | ||
<> show (unwrap pattern) | ||
|
||
foreign import pageUrl :: Toppokki.Page -> String |
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.
This should still be in Effect
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.
LGTM
Closes #1058 #989 #986
Pre-review checklist
make format
)## Unreleased
header, using the appropriate sub-headings (### Added
,### Removed
,### Fixed
), and the links to the appropriate issues/PRs have been included