File tree Expand file tree Collapse file tree
plugins/code-server/app/components Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import type { Meta , StoryObj } from '@storybook/vue3-vite'
22import type { CodeServerDetection } from '../connect'
3+ import { expect , within } from 'storybook/test'
34import LauncherView from './LauncherView.vue'
45
56const localCodeServer : CodeServerDetection = {
@@ -44,6 +45,18 @@ export const NotInstalled: Story = {
4445 server : { status : 'stopped' } ,
4546 busy : false ,
4647 } ,
48+ play : async ( { canvasElement } ) => {
49+ const canvas = within ( canvasElement )
50+ const docsLink = canvas . getByRole ( 'link' , { name : 'Installation docs' } )
51+ const repoLink = canvas . getByRole ( 'link' , { name : 'GitHub' } )
52+
53+ await expect ( docsLink ) . toHaveAttribute ( 'href' , 'https://coder.com/docs/code-server/latest/install' )
54+ await expect ( docsLink ) . toHaveAttribute ( 'target' , '_blank' )
55+ await expect ( docsLink ) . toHaveAttribute ( 'rel' , 'noreferrer' )
56+ await expect ( repoLink ) . toHaveAttribute ( 'href' , 'https://github.com/coder/code-server' )
57+ await expect ( repoLink ) . toHaveAttribute ( 'target' , '_blank' )
58+ await expect ( repoLink ) . toHaveAttribute ( 'rel' , 'noreferrer' )
59+ } ,
4760}
4861
4962/** Short dock panel with install instructions available through scrolling. */
Original file line number Diff line number Diff line change @@ -130,10 +130,24 @@ const errorText = computed(() => (props.server.status === 'error' ? props.server
130130 >
131131 {{ busy ? 'Checking…' : 'Re-check' }}
132132 </ActionButton >
133- <ActionButton variant="text" size="sm" :href =" DOCS_URL " icon="i-ph-arrow-square-out">
133+ <ActionButton
134+ variant="text"
135+ size="sm"
136+ :href =" DOCS_URL "
137+ target="_blank"
138+ rel="noreferrer"
139+ icon="i-ph-arrow-square-out"
140+ >
134141 Installation docs
135142 </ActionButton >
136- <ActionButton variant="text" size="sm" :href =" REPO_URL " icon="i-ph-github-logo">
143+ <ActionButton
144+ variant="text"
145+ size="sm"
146+ :href =" REPO_URL "
147+ target="_blank"
148+ rel="noreferrer"
149+ icon="i-ph-github-logo"
150+ >
137151 GitHub
138152 </ActionButton >
139153 </div >
You can’t perform that action at this time.
0 commit comments