Skip to content
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

refactor: fund test migrate, closes #4187 #4191

Merged
merged 4 commits into from
Sep 11, 2023
Merged

Conversation

alter-eggo
Copy link
Contributor

@alter-eggo alter-eggo commented Sep 7, 2023

Try out this version of the Leather — download extension builds.

See title

@alter-eggo alter-eggo force-pushed the refactor/fund-test branch 2 times, most recently from 357c4e1 to 2ec62bd Compare September 8, 2023 05:50
@alter-eggo alter-eggo marked this pull request as ready for review September 8, 2023 06:10
@alter-eggo
Copy link
Contributor Author

hm, very weird, fund tests are passing locally

Copy link
Contributor

@pete-watters pete-watters left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code LGTM - nice work 👍

About the fails, I remember we had an issue loading the providers.json sometimes.

Maybe it would be better to mock this, or at least the values we need for the tests?

We could have one test of loading that file if we really want but then the other tests will be more reliable and probably faster

@@ -9,4 +9,5 @@ export enum HomePageSelectors {
ActivityTabBtn = 'tab-activity',
BalancesTabBtn = 'tab-balances',
SwapBtn = 'swap-btn',
BtnFundAccount = 'btn-fund-account',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we decided it reads better to keep them FundAccountBtn moving fwd?

Copy link
Contributor

@fbwoolf fbwoolf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have been needing to rerun tests the last few days with the sign in being flakey, not sure why. Rerunning the failed tests here to see if pass.

@kyranjamie
Copy link
Collaborator

What's the providers.json? These come from the wallet-config right? 🤔

@pete-watters
Copy link
Contributor

pete-watters commented Sep 11, 2023

What's the providers.json? These come from the wallet-config right? 🤔

Yes, you're right, sorry. I meant that the activeFiatProviders come from wallet-config.json but I think somtimes it doesn't get loaded correctly and then the tests fail as a result.

We could check if this code is working in the tests:

// TODO: BRANCH_NAME is not working here for config changes on PR branches
// Playwright tests fail with config changes not on main
const defaultBranch = IS_DEV_ENV || WALLET_ENVIRONMENT === 'testing' ? 'dev' : 'main';
const githubWalletConfigRawUrl = `https://raw.githubusercontent.com/${GITHUB_ORG}/${GITHUB_REPO}/${
  BRANCH_NAME || defaultBranch
}/config/wallet-config.json`;

Or just mock activeFiatProviders

@alter-eggo
Copy link
Contributor Author

hmm, feel like last commit fixed it

@alter-eggo alter-eggo added this pull request to the merge queue Sep 11, 2023
Merged via the queue into dev with commit 2a5d421 Sep 11, 2023
27 checks passed
@alter-eggo alter-eggo deleted the refactor/fund-test branch September 11, 2023 08:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants