From 318c39052ebcbbee187dbc2a08a0a456dab70352 Mon Sep 17 00:00:00 2001 From: Louis Garman Date: Tue, 12 Sep 2023 19:41:46 +0100 Subject: [PATCH] chore: remove unnecessary link from widget heading --- internal/http/html/static/templates/content/module_list.tmpl | 2 +- .../http/html/static/templates/content/organization_list.tmpl | 2 +- internal/http/html/static/templates/content/team_list.tmpl | 2 +- .../html/static/templates/partials/variable_set_item.tmpl | 4 +--- .../http/html/static/templates/partials/workspace_item.tmpl | 2 +- internal/integration/module_e2e_test.go | 2 +- internal/integration/tag_e2e_test.go | 2 +- internal/integration/team_ui_test.go | 2 +- internal/integration/web_test.go | 4 ++-- 9 files changed, 10 insertions(+), 12 deletions(-) diff --git a/internal/http/html/static/templates/content/module_list.tmpl b/internal/http/html/static/templates/content/module_list.tmpl index ee90d1056..1b7a88dc5 100644 --- a/internal/http/html/static/templates/content/module_list.tmpl +++ b/internal/http/html/static/templates/content/module_list.tmpl @@ -24,7 +24,7 @@ {{ define "content-list-item" }}
- {{ .Name }} + {{ .Name }} {{ durationRound .CreatedAt }} ago
{{ template "identifier" . }} diff --git a/internal/http/html/static/templates/content/organization_list.tmpl b/internal/http/html/static/templates/content/organization_list.tmpl index 2a86636c3..2bbe9ab10 100644 --- a/internal/http/html/static/templates/content/organization_list.tmpl +++ b/internal/http/html/static/templates/content/organization_list.tmpl @@ -15,7 +15,7 @@ {{ define "content-list-item" }}
- {{ .Name }} + {{ .Name }}
{{ template "identifier" . }} diff --git a/internal/http/html/static/templates/content/team_list.tmpl b/internal/http/html/static/templates/content/team_list.tmpl index 5a973d5f6..aaf2951f2 100644 --- a/internal/http/html/static/templates/content/team_list.tmpl +++ b/internal/http/html/static/templates/content/team_list.tmpl @@ -17,7 +17,7 @@ {{ range .Teams }}
- {{ .Name }} + {{ .Name }}
{{ template "identifier" . }} diff --git a/internal/http/html/static/templates/partials/variable_set_item.tmpl b/internal/http/html/static/templates/partials/variable_set_item.tmpl index b0dd1c858..3964a545c 100644 --- a/internal/http/html/static/templates/partials/variable_set_item.tmpl +++ b/internal/http/html/static/templates/partials/variable_set_item.tmpl @@ -1,8 +1,6 @@ {{ define "variable-set-item" }}
- - {{ .Name }} - + {{ .Name }}
{{ template "identifier" . }} diff --git a/internal/http/html/static/templates/partials/workspace_item.tmpl b/internal/http/html/static/templates/partials/workspace_item.tmpl index 361f0ec8d..95ee0abd2 100644 --- a/internal/http/html/static/templates/partials/workspace_item.tmpl +++ b/internal/http/html/static/templates/partials/workspace_item.tmpl @@ -1,7 +1,7 @@ {{ define "workspace-item" }}
- {{ .Name }} + {{ .Name }} {{ with .LatestRun }} {{ template "run-status" . }} {{ end }} diff --git a/internal/integration/module_e2e_test.go b/internal/integration/module_e2e_test.go index 93d33b803..1597a3488 100644 --- a/internal/integration/module_e2e_test.go +++ b/internal/integration/module_e2e_test.go @@ -117,7 +117,7 @@ module "mod" { // go to modules chromedp.Click("#modules > a", chromedp.ByQuery), // select existing module - chromedp.Click(`//a[text()='mod']`), + chromedp.Click(`.widget`, chromedp.ByQuery), // confirm no longer connected chromedp.WaitNotPresent(`//span[@id='vcs-repo']`), // delete module diff --git a/internal/integration/tag_e2e_test.go b/internal/integration/tag_e2e_test.go index 3b91f2049..34ddc3851 100644 --- a/internal/integration/tag_e2e_test.go +++ b/internal/integration/tag_e2e_test.go @@ -96,7 +96,7 @@ resource "null_resource" "tags_e2e" {} chromedp.Click(`//label[@for='workspace-tag-filter-baz']`), screenshot(t), // confirm workspace listing contains tagged workspace - chromedp.WaitVisible(`//div[@id='content-list']//a[text()='tagged']`), + chromedp.WaitVisible(`//div[@id='content-list']/div[@id='item-workspace-tagged']`), }) // should be tags 'foo' and 'baz' diff --git a/internal/integration/team_ui_test.go b/internal/integration/team_ui_test.go index 11d9c9d3e..fd4e2c5f3 100644 --- a/internal/integration/team_ui_test.go +++ b/internal/integration/team_ui_test.go @@ -28,7 +28,7 @@ func TestIntegration_TeamUI(t *testing.T) { chromedp.Click(`//a[text()='teams']`), screenshot(t), // go to owners team page - chromedp.Click(`//div[@id='content-list']//a[text()='owners']`), + chromedp.Click(`//div[@id='item-team-owners']`), screenshot(t, "owners_team_page"), // set focus to search box chromedp.Focus(`//input[@x-ref='input-search']`, chromedp.NodeVisible), diff --git a/internal/integration/web_test.go b/internal/integration/web_test.go index ba11c0ede..7cdb5af32 100644 --- a/internal/integration/web_test.go +++ b/internal/integration/web_test.go @@ -39,7 +39,7 @@ func TestWeb(t *testing.T) { chromedp.Click("#teams > a", chromedp.ByQuery), screenshot(t), // select devops team - chromedp.Click("#item-team-devops a", chromedp.ByQuery), + chromedp.Click("#item-team-devops", chromedp.ByQuery), screenshot(t), // tick checkbox for workspace manager role chromedp.Click("#manage_workspaces", chromedp.ByQuery), @@ -69,7 +69,7 @@ func TestWeb(t *testing.T) { // list teams chromedp.Click("#teams > a", chromedp.ByQuery), // select owners team - chromedp.Click("#item-team-owners a", chromedp.ByQuery), + chromedp.Click("#item-team-owners", chromedp.ByQuery), screenshot(t), matchText(t, fmt.Sprintf("#item-user-%s #username", user.Username), user.Username, chromedp.ByQuery), },