зеркало из https://github.com/Azure/ARO-RP.git
Added 2 more tests
This commit is contained in:
Родитель
484d3e6154
Коммит
3980dc8610
9
go.sum
9
go.sum
|
@ -175,7 +175,9 @@ github.com/Azure/go-ntlmssp v0.0.0-20191115210519-2b2be6cc8ed4/go.mod h1:chxPXzS
|
|||
github.com/Azure/go-ntlmssp v0.0.0-20200615164410-66371956d46c/go.mod h1:chxPXzSsl7ZWRAuOIE23GDNzjWuZquvFlgA8xmpunjU=
|
||||
github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
|
||||
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
||||
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802 h1:1BDTz0u9nC3//pOCMdNH+CiXJVYJh5UQNCOBG7jbELc=
|
||||
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
|
||||
github.com/BurntSushi/xgbutil v0.0.0-20160919175755-f7c97cef3b4e h1:4ZrkT/RzpnROylmoQL57iVUL57wGKTR5O6KpVnbm2tA=
|
||||
github.com/BurntSushi/xgbutil v0.0.0-20160919175755-f7c97cef3b4e/go.mod h1:uw9h2sd4WWHOPdJ13MQpwK5qYWKYDumDqxWWIknEQ+k=
|
||||
github.com/ChrisTrenkamp/goxpath v0.0.0-20170922090931-c385f95c6022/go.mod h1:nuWgzSkT5PnyOd+272uUmV0dnAnAn42Mk7PiQC5VzN4=
|
||||
github.com/ChrisTrenkamp/goxpath v0.0.0-20190607011252-c5096ec8773d/go.mod h1:nuWgzSkT5PnyOd+272uUmV0dnAnAn42Mk7PiQC5VzN4=
|
||||
|
@ -365,6 +367,7 @@ github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmV
|
|||
github.com/armon/go-metrics v0.3.6/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc=
|
||||
github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=
|
||||
github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=
|
||||
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio=
|
||||
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs=
|
||||
github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A=
|
||||
github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY=
|
||||
|
@ -700,8 +703,6 @@ github.com/docker/docker v20.10.2+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05b
|
|||
github.com/docker/docker v20.10.5+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
|
||||
github.com/docker/docker v20.10.12+incompatible h1:CEeNmFM0QZIsJCZKMkZx0ZcahTiewkrgiwfYD+dfl1U=
|
||||
github.com/docker/docker v20.10.12+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
|
||||
github.com/docker/docker v20.10.14+incompatible h1:+T9/PRYWNDo5SZl5qS1r9Mo/0Q8AwxKKPtu9S1yxM0w=
|
||||
github.com/docker/docker v20.10.14+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
|
||||
github.com/docker/docker-credential-helpers v0.6.3/go.mod h1:WRaJzqw3CTB9bk10avuGsjVBZsD05qeibJ1/TYlvc0Y=
|
||||
github.com/docker/docker-credential-helpers v0.6.4 h1:axCks+yV+2MR3/kZhAmy07yC56WZ2Pwu/fKWtKuZB0o=
|
||||
github.com/docker/docker-credential-helpers v0.6.4/go.mod h1:ofX3UI0Gz1TteYBjtgs07O36Pyasyp66D2uKT7H8W1c=
|
||||
|
@ -716,7 +717,6 @@ github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDD
|
|||
github.com/docker/libtrust v0.0.0-20160708172513-aabc10ec26b7 h1:UhxFibDNY/bfvqU5CAUmr9zpesgbU6SWc8/B4mflAE4=
|
||||
github.com/docker/libtrust v0.0.0-20160708172513-aabc10ec26b7/go.mod h1:cyGadeNEkKy96OOhEzfZl+yxihPEzKnqJwvfuSUqbZE=
|
||||
github.com/docker/spdystream v0.0.0-20181023171402-6480d4af844c/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM=
|
||||
github.com/docker/spdystream v0.1.0/go.mod h1:lZ/N41B0v/T/VqR+VTcoIN9SS+cTEjH6BoxjQtyFk4U=
|
||||
github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE=
|
||||
github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
|
||||
github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
|
||||
|
@ -1072,6 +1072,7 @@ github.com/golang-migrate/migrate/v4 v4.7.0/go.mod h1:Qvut3N4xKWjoH3sokBccML6WyH
|
|||
github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0=
|
||||
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k=
|
||||
github.com/golang/geo v0.0.0-20190916061304-5b978397cfec/go.mod h1:QZ0nwyI2jOfgRAoBvP+ab5aRr7c9x7lhGEJrKvBwjWI=
|
||||
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58=
|
||||
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
|
||||
github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
||||
github.com/golang/groupcache v0.0.0-20180513044358-24b0969c4cb7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
||||
|
@ -2353,8 +2354,6 @@ github.com/sourcegraph/go-diff v0.5.1/go.mod h1:j2dHj3m8aZgQO8lMTcTnBcXkRRRqi34c
|
|||
github.com/sourcegraph/go-diff v0.6.0/go.mod h1:iBszgVvyxdc8SFZ7gm69go2KDdt3ag071iBaWPF6cjs=
|
||||
github.com/sourcegraph/go-diff v0.6.1 h1:hmA1LzxW0n1c3Q4YbrFgg4P99GSnebYa3x8gr0HZqLQ=
|
||||
github.com/sourcegraph/go-diff v0.6.1/go.mod h1:iBszgVvyxdc8SFZ7gm69go2KDdt3ag071iBaWPF6cjs=
|
||||
github.com/sourcegraph/go-selenium v0.0.0-20170113155244-3da7d00aac9c h1:C4aVIEaSWhShJhvo/7q6OrGb+QB0KEI+i1tRqHO23as=
|
||||
github.com/sourcegraph/go-selenium v0.0.0-20170113155244-3da7d00aac9c/go.mod h1:exR7zK4PXsNuOQYE3CKdu4PwZVcZpCOpZh77NDLj6r0=
|
||||
github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
|
||||
github.com/spf13/afero v1.1.0/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ=
|
||||
github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ=
|
||||
|
|
|
@ -4,9 +4,12 @@ package e2e
|
|||
// Licensed under the Apache License 2.0.
|
||||
|
||||
import (
|
||||
"os"
|
||||
|
||||
. "github.com/onsi/ginkgo"
|
||||
. "github.com/onsi/gomega"
|
||||
conditions "github.com/serge1peshcoff/selenium-go-conditions"
|
||||
"github.com/tebeka/selenium"
|
||||
. "github.com/tebeka/selenium"
|
||||
)
|
||||
|
||||
|
@ -35,7 +38,7 @@ var _ = FDescribe("Admin Portal E2E Testing", func() {
|
|||
panic(err)
|
||||
}
|
||||
|
||||
Expect(cluster.Text()).To(Equal("elljohns-test"))
|
||||
Expect(cluster.Text()).To(Equal(os.Getenv("CLUSTER")))
|
||||
})
|
||||
|
||||
It("Should be able to filter cluster data correctly", func() {
|
||||
|
@ -46,13 +49,128 @@ var _ = FDescribe("Admin Portal E2E Testing", func() {
|
|||
panic(err)
|
||||
}
|
||||
|
||||
filter.SendKeys("boogers")
|
||||
// Set filter so it doesn't match cluster name
|
||||
filter.SendKeys("Incorrect Cluster")
|
||||
|
||||
wd.Wait(conditions.ElementIsLocated(ByCSSSelector, "span.itemsCount-162"))
|
||||
text, err := wd.FindElement(ByCSSSelector, "span.itemsCount-162")
|
||||
// wd.Wait(conditions.ElementTextIs()
|
||||
// cluster, err := wd.FindElement(ByCSSSelector, "div[data-automation-key='name']")
|
||||
|
||||
Expect(text.Text()).To(Equal("Showing 0 items"))
|
||||
})
|
||||
|
||||
It("Should be able to populate cluster info panel correctly", func() {
|
||||
testValues := [17]string{
|
||||
"Public",
|
||||
"Undefined",
|
||||
"1",
|
||||
"Undefined",
|
||||
"2021-11-03T06:04:39Z",
|
||||
"unknown",
|
||||
"Undefined",
|
||||
"elljohns-test-hrqbs",
|
||||
"Undefined",
|
||||
"Undefined",
|
||||
"Undefined",
|
||||
"Undefined",
|
||||
"Undefined",
|
||||
"elljohns-test",
|
||||
"Succeeded",
|
||||
"4.8.11",
|
||||
"Installed"}
|
||||
|
||||
wd.Wait(conditions.ElementIsLocated(ByCSSSelector, "div[data-automation-key='name']"))
|
||||
|
||||
cluster, err := wd.FindElement(ByCSSSelector, "div[data-automation-key='name']")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
cluster.Click()
|
||||
|
||||
wd.Wait(conditions.ElementIsLocated(ByCSSSelector, "ms-Panel is-open ms-Panel--hasCloseButton ms-Panel--custom root-225"))
|
||||
|
||||
panelFields, err := wd.FindElements(ByCSSSelector, "css-287")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
var filteredPanelFields []string
|
||||
for _, panelField := range panelFields {
|
||||
panelText, err := panelField.Text()
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
if panelText != ":" {
|
||||
filteredPanelFields = append(filteredPanelFields, panelText)
|
||||
}
|
||||
}
|
||||
|
||||
panelValues, err := wd.FindElements(ByCSSSelector, "css-290")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
for i, panelValue := range panelValues {
|
||||
panelFieldText, err := panelFields[i].Text()
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
panelValueText, err := panelValue.Text()
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
Expect(panelFieldText + " : " + panelValueText).To(Equal(panelFieldText + " : " + testValues[i]))
|
||||
}
|
||||
})
|
||||
|
||||
It("Should be able to copy cluster resource id", func() {
|
||||
wd.Wait(conditions.ElementIsLocated(ByCSSSelector, "button[aria-label='Copy Resource ID']"))
|
||||
|
||||
button, err := wd.FindElement(ByCSSSelector, "button[aria-label='Copy Resource ID']")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
button.Click()
|
||||
|
||||
filter, err := wd.FindElement(ByCSSSelector, "input[placeholder='Filter on resource ID']")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
filter.Click()
|
||||
filter.SendKeys(selenium.ControlKey + "v")
|
||||
|
||||
resourceId, err := filter.GetAttribute("value")
|
||||
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
Expect(resourceId).To(Equal("/subscriptions/225e02bc-43d0-43d1-a01a-17e584a4ef69/resourceGroups/v4-eastus/providers/Microsoft.RedHatOpenShift/openShiftClusters/" + os.Getenv("CLUSTER")))
|
||||
})
|
||||
|
||||
// It("Should be able to open ssh panel and get ssh details", func() {
|
||||
// wd.Wait(conditions.ElementIsLocated(ByCSSSelector, "div[data-automation-key='name']"))
|
||||
|
||||
// cluster, err := wd.FindElement(ByCSSSelector, "div[data-automation-key='name']")
|
||||
// if err != nil {
|
||||
// panic(err)
|
||||
// }
|
||||
|
||||
// Expect(cluster.Text()).To(Equal(os.Getenv("CLUSTER")))
|
||||
// })
|
||||
|
||||
// It("Should be able to download kubeconfig", func() {
|
||||
// wd.Wait(conditions.ElementIsLocated(ByCSSSelector, "div[data-automation-key='name']"))
|
||||
|
||||
// cluster, err := wd.FindElement(ByCSSSelector, "div[data-automation-key='name']")
|
||||
// if err != nil {
|
||||
// panic(err)
|
||||
// }
|
||||
|
||||
// Expect(cluster.Text()).To(Equal(os.Getenv("CLUSTER")))
|
||||
// })
|
||||
})
|
||||
|
|
Загрузка…
Ссылка в новой задаче