Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions api/bases/test.openstack.org_horizontests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1325,6 +1325,12 @@ spec:
ProjectNameXpath is the xpath to select project name
on the horizon dashboard based on the u/s or d/s theme
type: string
projectTextXpath:
description: |-
ProjectTextXpath is the xpath to element displaying
current project name on the horizon dashboard based
on the u/s or d/s theme
type: string
repoUrl:
default: https://review.opendev.org/openstack/horizon
description: RepoUrl is the URL of the Horizon repository.
Expand Down
7 changes: 7 additions & 0 deletions api/v1beta1/horizontest_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,13 @@ type HorizonTestSpec struct {
// on the horizon dashboard based on the u/s or d/s theme
ProjectNameXpath string `json:"projectNameXpath"`

// +kubebuilder:validation:Optional
// +operator-sdk:csv:customresourcedefinitions:type=spec
// ProjectTextXpath is the xpath to element displaying
// current project name on the horizon dashboard based
// on the u/s or d/s theme
ProjectTextXpath string `json:"projectTextXpath"`

// +kubebuilder:validation:Required
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:MaxLength=253
Expand Down
6 changes: 6 additions & 0 deletions config/crd/bases/test.openstack.org_horizontests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1325,6 +1325,12 @@ spec:
ProjectNameXpath is the xpath to select project name
on the horizon dashboard based on the u/s or d/s theme
type: string
projectTextXpath:
description: |-
ProjectTextXpath is the xpath to element displaying
current project name on the horizon dashboard based
on the u/s or d/s theme
type: string
repoUrl:
default: https://review.opendev.org/openstack/horizon
description: RepoUrl is the URL of the Horizon repository.
Expand Down
3 changes: 3 additions & 0 deletions config/samples/test_v1beta1_horizontest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ spec:
# ProjectNameXpath is the xpath to select project name on dashboard (optional)
projectNameXpath: "//span[@class='rcueicon rcueicon-folder-open']/ancestor::li"

# ProjectTextXpath is the xpath to element displaying current project (optional)
projectTextXpath: ".//span[@class='rcueicon rcueicon-folder-open']/ancestor::li"

# Privileged
# ----------
#
Expand Down
1 change: 1 addition & 0 deletions internal/controller/horizontest_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ func (r *HorizonTestReconciler) PrepareHorizonTestEnvVars(
"HORIZON_KEYS_FOLDER": "/etc/test_operator",
"EXTRA_FLAG": instance.Spec.ExtraFlag,
"PROJECT_NAME_XPATH": instance.Spec.ProjectNameXpath,
"PROJECT_TEXT_XPATH": instance.Spec.ProjectTextXpath,
})

return envVars
Expand Down
1 change: 1 addition & 0 deletions zuul.d/jobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@
cifmw_test_operator_horizontest_dashboard_url: "https://horizon-openstack.apps-crc.testing/"
cifmw_test_operator_horizontest_extra_flag: "not pagination and test_users.py"
cifmw_test_operator_horizontest_project_name_xpath: //*[@class="context-project"]//ancestor::ul
cifmw_test_operator_horizontest_project_text_xpath: './/*[@class="context-project"]'
cifmw_test_operator_horizontest_extra_mounts:
- name: v1
region: r1
Expand Down
Loading