feat: add PR link to CI status popover header (#1200)
This commit is contained in:
@@ -84,17 +84,30 @@ function PRCIPopoverHeader({ pr }: { pr: TaskPR }) {
|
||||
className="flex items-center justify-between gap-2 border-b border-border/50 pb-2"
|
||||
>
|
||||
<span className="text-sm font-medium">CI status</span>
|
||||
<a
|
||||
data-testid="pr-popover-external-link"
|
||||
href={checksUrl}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="cursor-pointer text-muted-foreground hover:text-foreground"
|
||||
aria-label="View all checks on GitHub"
|
||||
onClick={(e) => e.stopPropagation()}
|
||||
>
|
||||
<IconExternalLink className="h-3.5 w-3.5" />
|
||||
</a>
|
||||
<div className="flex items-center gap-1.5">
|
||||
<a
|
||||
data-testid="pr-popover-pr-link"
|
||||
href={pr.pr_url}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="cursor-pointer text-muted-foreground hover:text-foreground"
|
||||
aria-label="View pull request on GitHub"
|
||||
onClick={(e) => e.stopPropagation()}
|
||||
>
|
||||
<IconGitPullRequest className="h-3.5 w-3.5" />
|
||||
</a>
|
||||
<a
|
||||
data-testid="pr-popover-external-link"
|
||||
href={checksUrl}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="cursor-pointer text-muted-foreground hover:text-foreground"
|
||||
aria-label="View all checks on GitHub"
|
||||
onClick={(e) => e.stopPropagation()}
|
||||
>
|
||||
<IconExternalLink className="h-3.5 w-3.5" />
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -583,6 +583,11 @@ export class SessionPage {
|
||||
return this.prTopbarPopover().getByTestId("pr-comments-row");
|
||||
}
|
||||
|
||||
/** Header PR-link icon (top-right corner of the popover). */
|
||||
prPopoverPRLink(): Locator {
|
||||
return this.prTopbarPopover().getByTestId("pr-popover-pr-link");
|
||||
}
|
||||
|
||||
/** Header external-link icon (top-right corner of the popover). */
|
||||
prPopoverExternalLink(): Locator {
|
||||
return this.prTopbarPopover().getByTestId("pr-popover-external-link");
|
||||
|
||||
Reference in New Issue
Block a user