-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add combined test suite and runs model and view
- Loading branch information
Showing
6 changed files
with
238 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
package component | ||
|
||
import ( | ||
"fmt" | ||
"github.com/raphi011/handoff/internal/model" | ||
) | ||
|
||
templ TestSuitesWithRuns(suitesWithRuns []model.TestSuiteWithRuns) { | ||
<main class="lg:pl-72"> | ||
<header class="flex items-center justify-between border-b border-white/5 px-4 py-4 sm:px-6 sm:py-6 lg:px-8"> | ||
<h1 class="text-base/7 font-semibold text-gray-900">Test Suites With Runs</h1> | ||
</header> | ||
<ul role="list" class="divide-y divide-gray/5 border-t border-b"> | ||
for _, suite := range suitesWithRuns { | ||
<li class="relative flex items-center space-x-4 px-4 py-4 sm:px-6 lg:px-8"> | ||
<div class="min-w-0 flex-auto"> | ||
<div class="flex items-center gap-x-3"> | ||
<div class="flex-none rounded-full bg-gray-600/10 p-1 text-gray-500"> | ||
<div class="size-2 rounded-full bg-current"></div> | ||
</div> | ||
<h2 class="min-w-0 text-sm/6 font-semibold text-gray-500"> | ||
<a href={ templ.URL(fmt.Sprintf("/suites/%s/runs", suite.Suite.Name)) } class="flex gap-x-2"> | ||
<span class="truncate">Staging</span> | ||
<span class="text-gray-400">/</span> | ||
<span class="whitespace-nowrap text-gray-900">{ suite.Suite.Name }</span> | ||
<span class="absolute inset-0"></span> | ||
</a> | ||
</h2> | ||
</div> | ||
<div class="mt-3 flex items-center gap-x-2.5 text-xs/5 text-gray-400"> | ||
<p class="truncate">{ fmt.Sprintf("%d tests in suite", len(suite.Suite.Tests)) }</p> | ||
<svg viewBox="0 0 2 2" class="size-0.5 flex-none fill-gray-300"> | ||
<circle cx="1" cy="1" r="1"></circle> | ||
</svg> | ||
<p class="whitespace-nowrap">Initiated 1m 32s ago</p> | ||
</div> | ||
</div> | ||
<!-- <div class="flex-none rounded-full bg-gray-400/10 px-2 py-1 text-xs font-medium text-gray-400 ring-1 ring-inset ring-gray-400/20">Preview</div> --> | ||
<!-- <svg class="size-5 flex-none text-gray-400" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" data-slot="icon"> --> | ||
<!-- <path fill-rule="evenodd" d="M8.22 5.22a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.75.75 0 0 1-1.06-1.06L11.94 10 8.22 6.28a.75.75 0 0 1 0-1.06Z" clip-rule="evenodd"></path> --> | ||
<!-- </svg> --> | ||
</li> | ||
} | ||
</ul> | ||
</main> | ||
<aside class="bg-white lg:fixed lg:bottom-0 lg:right-0 lg:top-0 lg:w-2/6 lg:overflow-y-auto lg:border-l lg:border-gray/5"> | ||
<header class="flex items-center justify-between border-b border-white/5 px-4 py-4 sm:px-6 sm:py-6 lg:px-8"> | ||
<h2 class="text-base/7 font-semibold text-gray-900">Runs</h2> | ||
<a href="#" class="text-sm/6 font-semibold text-indigo-400">View all</a> | ||
</header> | ||
<div class="divide-y divide-white/5 border-t p-5"> | ||
@RunActivity() | ||
</div> | ||
</aside> | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters