diff --git a/admin/src/federated-element.test.tsx b/admin/src/federated-element.test.tsx index a18976c..d35bf99 100644 --- a/admin/src/federated-element.test.tsx +++ b/admin/src/federated-element.test.tsx @@ -472,6 +472,34 @@ describe('PlaytestCreatePage', () => { expect(within(dialog).getByText(/starfield dev/i)).toBeInTheDocument() }) + it('shows the single-file packaging notice with a Learn more / Show less toggle', async () => { + setLinkages() + mockGetAdtGames.mockReturnValue({ + data: { games: [{ id: 'game-1', name: 'Starfield Dev' }] }, + isLoading: false, + error: null + }) + renderAt('/new') + const user = userEvent.setup() + await gotoDistributionStep(user) + await user.click(screen.getByRole('radio', { name: /^ADT$/i })) + await user.click(screen.getByLabelText(/adt linkage/i)) + await user.click(await screen.findByText(/adt-ns-1/i)) + await user.click(await screen.findByRole('button', { name: /select game build/i })) + + const dialog = await screen.findByRole('dialog', { name: /select game build/i }) + const notice = within(dialog).getByTestId('adt-single-file-notice') + // Compact line is always present; the detail is hidden until "Learn more". + expect(within(notice).getByText(/package your build into a single file/i)).toBeInTheDocument() + expect(within(notice).queryByText(/Smartbuild is currently not supported/i)).not.toBeInTheDocument() + + await user.click(within(notice).getByText(/learn more/i)) + expect(within(notice).getByText(/Smartbuild is currently not supported/i)).toBeInTheDocument() + + await user.click(within(notice).getByText(/show less/i)) + expect(within(notice).queryByText(/Smartbuild is currently not supported/i)).not.toBeInTheDocument() + }) + it('groups builds by game_version_name in the left rail with per-version build counts', async () => { setLinkages() mockGetAdtGames.mockReturnValue({ diff --git a/admin/src/shared/adt-build-picker.tsx b/admin/src/shared/adt-build-picker.tsx index 0bbdb4a..961f365 100644 --- a/admin/src/shared/adt-build-picker.tsx +++ b/admin/src/shared/adt-build-picker.tsx @@ -1,9 +1,10 @@ import { useAppUIContext } from '@accelbyte/sdk-extend-app-ui' -import { Card, Modal, Select, Space, Tag, Typography } from 'antd' +import { InfoCircleFilled } from '@ant-design/icons' +import { Alert, Card, Modal, Select, Space, Tag, Typography } from 'antd' import { useMemo, useState } from 'react' +import { usePlaytesthubServiceAdminApi_GetBuildsAdt_ByAdtLinkageId } from '../playtesthubapi/generated-admin/queries/PlaytesthubServiceAdmin.query' import type { V1AdtBuild } from '../playtesthubapi/generated-definitions/V1AdtBuild' import type { V1AdtGame } from '../playtesthubapi/generated-definitions/V1AdtGame' -import { usePlaytesthubServiceAdminApi_GetBuildsAdt_ByAdtLinkageId } from '../playtesthubapi/generated-admin/queries/PlaytesthubServiceAdmin.query' // ADTBuildPickerModal renders the namespace → game → version → build // picker that B13 specs against docs/images/build-picker-mockup.png. @@ -30,6 +31,7 @@ export function ADTBuildPickerModal({ const [gameId, setGameId] = useState(initialGameId) const [versionName, setVersionName] = useState(null) const [pickedBuildId, setPickedBuildId] = useState(null) + const [showSingleFileDetail, setShowSingleFileDetail] = useState(false) const buildsQuery = usePlaytesthubServiceAdminApi_GetBuildsAdt_ByAdtLinkageId( sdk, @@ -68,6 +70,41 @@ export function ADTBuildPickerModal({ Choose a game, select a version, then pick a specific build to use for this playtest. + } + style={{ marginBottom: 16, alignItems: 'flex-start' }} + data-testid="adt-single-file-notice" + message={ +
+ Before uploading to ADT, package your build into a single file. + {!showSingleFileDetail && ( + <> + {' '} + setShowSingleFileDetail(true)}>Learn more + + )} + {showSingleFileDetail && ( + <> +
    +
  • + Single build file: package your build into a single file so testers get a + clean download link (multiple files = multiple links). +
  • +
  • + buildinfo only: only the buildinfo build type is supported. Smartbuild is + currently not supported. +
  • +
+ setShowSingleFileDetail(false)} style={{ display: 'inline-block', marginTop: 8 }}> + Show less + + + )} +
+ } + />