Skip to content

Commit 4ea1f1d

Browse files
poyohosheremet-va
andauthored
test: ui e2e (#2710)
* feat: ui test * test: ui * feat: no auto open browser * fix: lint * fix: test timeout * fix: timeout * fix: test * fix: wait more times * fix: kill * fix: exit process * fix: kill * chore: update * chore: update * chore: update * fix: lint * fix: await page load * chore: update * fix: test * fix: test * fix: test * feat: must had content * chore: update * chore: update * chore: update * fix: times * fix: ports * chore: update config * fix: catch * feat: asset command no error * feat: log the command stdout * fix: error * chore: update * chore: use the same port * chore: update pnpm * fix: error * chore: update * feat: test * chore: update page register * chore: ignore not close process * fix: params * fix: port * feat: pipe * feat: catch error * feat: test report * chore: update * chore: update * chore: update sna * test: ui * chore: update * chore: update * test: untilUpdated * chore: untilUpdated * test: format named * test: url should update * chore: update * chore: fix lockfile * chore: upate snapshot --------- Co-authored-by: Vladimir Sheremet <[email protected]>
1 parent fcd2df2 commit 4ea1f1d

File tree

13 files changed

+670
-168
lines changed

13 files changed

+670
-168
lines changed

packages/ui/client/components/FileDetails.vue

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ function onDraft(value: boolean) {
4343
</script>
4444

4545
<template>
46-
<div v-if="current" flex flex-col h-full max-h-full overflow-hidden>
46+
<div v-if="current" flex flex-col h-full max-h-full overflow-hidden data-testid="file-detail">
4747
<div>
4848
<div p="2" h-10 flex="~ gap-2" items-center bg-header border="b base">
4949
<StatusIcon :task="current" />
@@ -65,12 +65,14 @@ function onDraft(value: boolean) {
6565
<button
6666
tab-button
6767
:class="{ 'tab-button-active': viewMode == null }"
68+
data-testid="btn-report"
6869
@click="changeViewMode(null)"
6970
>
7071
Report
7172
</button>
7273
<button
7374
tab-button
75+
data-testid="btn-graph"
7476
:class="{ 'tab-button-active': viewMode === 'graph' }"
7577
@click="changeViewMode('graph')"
7678
>
@@ -79,13 +81,15 @@ function onDraft(value: boolean) {
7981
<button
8082
v-if="!isReport"
8183
tab-button
84+
data-testid="btn-code"
8285
:class="{ 'tab-button-active': viewMode === 'editor' }"
8386
@click="changeViewMode('editor')"
8487
>
8588
{{ draft ? '*&#160;' : '' }}Code
8689
</button>
8790
<button
8891
tab-button
92+
data-testid="btn-console"
8993
:class="{ 'tab-button-active': viewMode === 'console', 'op20': viewMode !== 'console' && consoleCount === 0 }"
9094
@click="changeViewMode('console')"
9195
>
@@ -96,11 +100,11 @@ function onDraft(value: boolean) {
96100

97101
<div flex flex-col flex-1 overflow="hidden">
98102
<div v-if="hasGraphBeenDisplayed" flex-1>
99-
<ViewModuleGraph v-show="viewMode === 'graph'" :graph="graph" />
103+
<ViewModuleGraph v-show="viewMode === 'graph'" :graph="graph" data-testid="graph" />
100104
</div>
101-
<ViewEditor v-if="viewMode === 'editor'" :key="current.filepath" :file="current" @draft="onDraft" />
102-
<ViewConsoleOutput v-else-if="viewMode === 'console'" :file="current" />
103-
<ViewReport v-else-if="!viewMode" :file="current" />
105+
<ViewEditor v-if="viewMode === 'editor'" :key="current.filepath" :file="current" data-testid="editor" @draft="onDraft" />
106+
<ViewConsoleOutput v-else-if="viewMode === 'console'" :file="current" data-testid="console" />
107+
<ViewReport v-else-if="!viewMode" :file="current" data-testid="report" />
104108
</div>
105109
</div>
106110
</template>

packages/ui/client/components/Suites.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const updateSnapshot = () => current.value && client.rpc.updateSnapshot(current.
1313
<TasksList :tasks="current.tasks" :nested="true">
1414
<template #header>
1515
<StatusIcon mx-1 :task="current" />
16-
<span font-bold text-sm flex-auto ws-nowrap overflow-hidden truncate>{{ name }}</span>
16+
<span data-testid="filenames" font-bold text-sm flex-auto ws-nowrap overflow-hidden truncate>{{ name }}</span>
1717
<div class="flex text-lg">
1818
<IconButton
1919
v-if="(failedSnapshot && !isReport)"

0 commit comments

Comments
 (0)