Skip to content

Commit

Permalink
feat(deployment): e2e deploy hello world test
Browse files Browse the repository at this point in the history
  • Loading branch information
baktun14 committed Sep 29, 2024
1 parent 9d7b8fd commit f9f2260
Show file tree
Hide file tree
Showing 14 changed files with 487 additions and 403 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,8 @@ export const DeploymentDepositModal: React.FunctionComponent<DeploymentDepositMo
side: "right",
disabled: !amount || isCheckingDepositor || (useDepositor && validGrants.length === 0) || !walletBalance,
isLoading: isCheckingDepositor,
onClick: onDepositClick
onClick: onDepositClick,
"data-testid": "deposit-modal-continue-button"
}
]}
onClose={onClose}
Expand Down
27 changes: 22 additions & 5 deletions apps/deploy-web/src/components/deployments/DeploymentDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -164,11 +164,27 @@ export function DeploymentDetail({ dseq }: React.PropsWithChildren<{ dseq: strin

<Tabs value={activeTab} onValueChange={onChangeTab}>
<TabsList className="grid w-full grid-cols-5">
<TabsTrigger value="LEASES">Leases</TabsTrigger>
{isActive && <TabsTrigger value="LOGS">Logs</TabsTrigger>}
{isActive && <TabsTrigger value="SHELL">Shell</TabsTrigger>}
{isActive && <TabsTrigger value="EVENTS">Events</TabsTrigger>}
<TabsTrigger value="EDIT">Update</TabsTrigger>
<TabsTrigger value="LEASES" data-testid="deployment-tab-leases">
Leases
</TabsTrigger>
{isActive && (
<TabsTrigger value="LOGS" data-testid="deployment-tab-logs">
Logs
</TabsTrigger>
)}
{isActive && (
<TabsTrigger value="SHELL" data-testid="deployment-tab-events">
Shell
</TabsTrigger>
)}
{isActive && (
<TabsTrigger value="EVENTS" data-testid="deployment-tab-events">
Events
</TabsTrigger>
)}
<TabsTrigger value="EDIT" data-testid="deployment-tab-update">
Update
</TabsTrigger>
</TabsList>

{activeTab === "EDIT" && deployment && leases && (
Expand Down Expand Up @@ -200,6 +216,7 @@ export function DeploymentDetail({ dseq }: React.PropsWithChildren<{ dseq: strin
leases.map((lease, i) => (
<LeaseRow
key={lease.id}
index={i}
lease={lease}
setActiveTab={setActiveTab}
ref={leaseRefs[i]}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export const DeploymentDetailTopBar: React.FunctionComponent<Props> = ({ address
<div className="flex items-center">
<DropdownMenu modal={false}>
<DropdownMenuTrigger asChild>
<Button size="icon" variant="ghost" className="rounded-full">
<Button size="icon" variant="ghost" className="rounded-full" data-testid="deployment-detail-dropdown">
<MoreHoriz />
</Button>
</DropdownMenuTrigger>
Expand All @@ -119,7 +119,11 @@ export const DeploymentDetailTopBar: React.FunctionComponent<Props> = ({ address
Redeploy
</CustomDropdownLinkItem>
)}
<CustomDropdownLinkItem onClick={() => onCloseDeployment()} icon={<XmarkSquare fontSize="small" />}>
<CustomDropdownLinkItem
onClick={() => onCloseDeployment()}
icon={<XmarkSquare fontSize="small" />}
data-testid="deployment-detail-close-button"
>
Close
</CustomDropdownLinkItem>
</DropdownMenuContent>
Expand Down
Loading

0 comments on commit f9f2260

Please sign in to comment.