Skip to content

[PE-7250] CoinDetailPage Tests + Integration test reorg - #12820

Merged
DejayJD merged 26 commits into
mainfrom
jd/coin-page-test-setup
Nov 6, 2025
Merged

[PE-7250] CoinDetailPage Tests + Integration test reorg#12820
DejayJD merged 26 commits into
mainfrom
jd/coin-page-test-setup

Conversation

@DejayJD

@DejayJD DejayJD commented Aug 28, 2025

Copy link
Copy Markdown
Contributor

Description

New tests

  • Asset Details Page, as exhaustive of testing as I could get

New test mock data patterns:

  • Mock data is now in the fixtures/ folder
  • As best as I could I matched the data to live data
  • Also tried to make mock data realistic (i.e. it should be referencing other mock data, e.g. mockTrack is owned by artistUser)
  • Mock methods in their own file, each is a separate fn that takes in params to configure the response
    • TODO: really need to derive these types better, need to see if we can get incoming expected data types from SDK?
  • A couple more provider things set up in our tests (needed for asset test)
  • Change dom env to happy-dom, experimental for now. Supposed to be faster & lighter

How Has This Been Tested?

vitest

@changeset-bot

changeset-bot Bot commented Aug 28, 2025

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 184c4e0

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@DejayJD
DejayJD requested review from a team and dylanjeffers August 28, 2025 19:40

@dylanjeffers dylanjeffers left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nice job with the fixtures and asset-details test

Comment thread packages/web/src/pages/audio-page/WalletModal.tsx Outdated
Comment thread packages/web/src/pages/profile-page/ProfilePage.test.tsx Outdated
…jd/coin-page-test-setup

# Conflicts:
#	packages/web/src/components/notification/Notification/UserSubscriptionNotification.test.tsx
#	packages/web/src/pages/audio-page/WalletModal.tsx
#	packages/web/src/pages/coin-detail-page/AssetDetailPage.test.tsx
#	packages/web/src/pages/profile-page/ProfilePage.test.tsx
…jd/coin-page-test-setup

# Conflicts:
#	packages/web/src/components/notification/Notification/UserSubscriptionNotification.test.tsx
#	packages/web/src/pages/coin-detail-page/components/CoinInfoSection.tsx
#	packages/web/src/pages/profile-page/ProfilePage.test.tsx
Comment on lines +141 to +144
// Removes the long DOM output from failed queries
configure({
getElementError: (message: any) => new Error(message)
})

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

on the fence about whether to include this or not but the giant DOM it outputs is pretty useless most of the time since theres so much stuff on screen

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

does this drop the section that shows what accessible elements do exist on the page? that part is really useful, the big dom output after is not though

@DejayJD DejayJD changed the title Integration test reorg + AssetDetailPage test foundation [PE-7250] CoinDetailPage Tests + Integration test reorg Oct 29, 2025
@DejayJD
DejayJD requested review from a team and dylanjeffers October 29, 2025 20:47
@@ -0,0 +1,199 @@
import { userMetadataFromSDK } from '@audius/common/adapters'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nicee

},
test: {
environment: 'jsdom',
environment: 'happy-dom',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

cool! so main rationale here is render speed or what?

)
}

const assertCoinInsightsSection = async () => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nice, liking these helper fns

…jd/coin-page-test-setup

# Conflicts:
#	packages/web/src/components/notification/Notification/UserSubscriptionNotification.test.tsx
…jd/coin-page-test-setup

# Conflicts:
#	packages/web/src/common/store/upload/sagas.test.ts
#	packages/web/src/pages/profile-page/ProfilePage.test.tsx
@DejayJD
DejayJD merged commit 14a6ad9 into main Nov 6, 2025
9 of 12 checks passed
@DejayJD
DejayJD deleted the jd/coin-page-test-setup branch November 6, 2025 20:00
audius-infra pushed a commit that referenced this pull request Nov 8, 2025
[ed3e17b] [PE-7304] Fix upload saga test (#13387) Reed
[a6fba10] [PE-7303] Portfolio balance qa (#13380) Dylan Jeffers
[9d53680] [PE-7292] DAMM swaps with meteora (#13381) JD Francis
[14a6ad9] [PE-7250] CoinDetailPage Tests + Integration test reorg (#12820) JD Francis
[9a48c52] Remove hello in SummaryTable (#13382) Reed
[8f98e4f] [PE-7241] Fix web ProfilePage test (#13371) Reed
[619541f] Silver tier for endless streak (#13319) Ray Jacobson
[f403ecc] [PE-7302] Fix USDC image quality (#13379) Dylan Jeffers
[39fadcc] Update account balance calculation to use latest balances (#13378) Dylan Jeffers
[fea5e65] Drop decimals to fix swaps (#13377) Dylan Jeffers
[e0966af] [PE-7293] Prefer Meteora for external wallet swaps (#13374) Dylan Jeffers
[4ca25ba] Version Packages (#13343) github-actions[bot]
[c2f9700] [PE-7272] Fallback to meteora DBC swaps when jupiter fails (#13352) JD Francis
[e4f738e] Remove account requirement for unlock track modal coin buy (#13370) KJ
[b41179f] Add suppress any error ts config option back (#13369) KJ
[f831437] Dbc swaps relay sdk changes (#13368) JD Francis
[760c602] [PE-7283] Fix sign up route on completion logic (#13366) KJ
[c734ca5] [PE-7282] Update signup flow to remove social signup and profile pic requirement (#13367) KJ
[c879838] [PE-7280] Enable 16KB page size support for Android 15+ (#13365) Dylan Jeffers
[6e94428] [PE-7279] Fix wallet static page (#13364) Dylan Jeffers
[11b541a] [PE-2834] Fix balance history hover issue (#13363) Dylan Jeffers
[e918b01] [QA-2386] Fix portfolio icon (#13362) Dylan Jeffers
[18141c7] [PE-7260 PE-7258] Mobile wallet page updates (#13360) Dylan Jeffers
[16e1656] Remove feature flags (#13358) Dylan Jeffers
[25cdbfd] Add TradingVolumeLaunchBanner (#13359) Ray Jacobson
[f1c942f] ⚠️ [PE-7269] Upgrade cipher-base to 1.0.7 (#13357) Reed
[e51a55c] [PE-7270] useArtistCreatedCoin instead of useUserCreatedCoins (#13354) Reed
[76d6e86] [PE-7277] Hide chat blast coin holder audience if no coin (#13353) Reed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants