Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions admin/src/federated-element.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down
41 changes: 39 additions & 2 deletions admin/src/shared/adt-build-picker.tsx
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -30,6 +31,7 @@ export function ADTBuildPickerModal({
const [gameId, setGameId] = useState(initialGameId)
const [versionName, setVersionName] = useState<string | null>(null)
const [pickedBuildId, setPickedBuildId] = useState<string | null>(null)
const [showSingleFileDetail, setShowSingleFileDetail] = useState(false)

const buildsQuery = usePlaytesthubServiceAdminApi_GetBuildsAdt_ByAdtLinkageId(
sdk,
Expand Down Expand Up @@ -68,6 +70,41 @@ export function ADTBuildPickerModal({
<Typography.Paragraph type="secondary">
Choose a game, select a version, then pick a specific build to use for this playtest.
</Typography.Paragraph>
<Alert
type="info"
showIcon
icon={<InfoCircleFilled style={{ marginTop: 3 }} />}
style={{ marginBottom: 16, alignItems: 'flex-start' }}
data-testid="adt-single-file-notice"
message={
<div>
<Typography.Text>Before uploading to ADT, package your build into a single file.</Typography.Text>
{!showSingleFileDetail && (
<>
{' '}
<Typography.Link onClick={() => setShowSingleFileDetail(true)}>Learn more</Typography.Link>
</>
)}
{showSingleFileDetail && (
<>
<ul style={{ margin: '8px 0 0', paddingInlineStart: 20, listStyleType: 'disc' }}>
<li>
<Typography.Text strong>Single build file</Typography.Text>: package your build into a single file so testers get a
clean download link (multiple files = multiple links).
</li>
<li>
<Typography.Text strong>buildinfo only</Typography.Text>: only the buildinfo build type is supported. Smartbuild is
currently not supported.
</li>
</ul>
<Typography.Link onClick={() => setShowSingleFileDetail(false)} style={{ display: 'inline-block', marginTop: 8 }}>
Show less
</Typography.Link>
</>
)}
</div>
}
/>
<div style={{ display: 'flex', gap: 16 }}>
<div style={{ width: 280 }}>
<Select
Expand Down
Loading