-
Notifications
You must be signed in to change notification settings - Fork 142
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* refactor ui tests * store acceptance test artifacts * create a separate job for ui tests * invoke selenium settings for ui tests only * remove needless input field Co-authored-by: Jordan Pellizzari <jordan@weave.works>
- Loading branch information
1 parent
afaa5aa
commit 3ae9201
Showing
7 changed files
with
405 additions
and
54 deletions.
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
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,34 @@ | ||
package pages | ||
|
||
import ( | ||
"github.com/sclevine/agouti" | ||
) | ||
|
||
type AddAppPageElements struct { | ||
AddAppHeader *agouti.Selection | ||
AppName *agouti.Selection | ||
AppNamespace *agouti.Selection | ||
AppRepoURL *agouti.Selection | ||
ConfigRepoURL *agouti.Selection | ||
PathToManifests *agouti.Selection | ||
Branch *agouti.Selection | ||
AutoMergeCheck *agouti.Selection | ||
SubmitButton *agouti.Selection | ||
AuthenticationButton *agouti.Selection | ||
} | ||
|
||
func GetAddAppPageElements(webDriver *agouti.Page) *AddAppPageElements { | ||
addApplicationPage := AddAppPageElements{ | ||
AddAppHeader: webDriver.FindByXPath(`//*[@id="app"]//nav//h2[text()="Add Application"]`), | ||
AppName: webDriver.FindByID("name"), | ||
AppNamespace: webDriver.FindByID("namespace"), | ||
AppRepoURL: webDriver.FindByID("url"), | ||
ConfigRepoURL: webDriver.FindByID("configUrl"), | ||
PathToManifests: webDriver.FindByID("path"), | ||
Branch: webDriver.FindByID("branch"), | ||
AutoMergeCheck: webDriver.FindByXPath(`//input[@type="checkbox" and contains(@class, 'MuiSwitch-input')]`), | ||
SubmitButton: webDriver.FindByXPath(`//button[@type="submit" and //@span=(text()="Submit")]`), | ||
AuthenticationButton: webDriver.FindByXPath(`//button[@type="button"]/span[text()="Authenticate with Github"]`)} | ||
|
||
return &addApplicationPage | ||
} |
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,67 @@ | ||
package pages | ||
|
||
import "github.com/sclevine/agouti" | ||
|
||
type AppDetailsPageElements struct { | ||
ApplicationsHeader *agouti.Selection | ||
NameSubheader *agouti.Selection | ||
DeploymentTypeSubheader *agouti.Selection | ||
URLSubheader *agouti.Selection | ||
PathSubheader *agouti.Selection | ||
AppName *agouti.Selection | ||
} | ||
|
||
type NamedElements struct { | ||
AppNameHeader *agouti.Selection | ||
AppName *agouti.Selection | ||
AppType *agouti.Selection | ||
AppURL *agouti.Selection | ||
AppPathToManifests *agouti.Selection | ||
HelmSuccessMessage *agouti.Selection | ||
KustomizeSuccessMessage *agouti.Selection | ||
} | ||
|
||
func GetAppDetailsPageElements(webDriver *agouti.Page) *AppDetailsPageElements { | ||
appDetailsPage := AppDetailsPageElements{ | ||
ApplicationsHeader: webDriver.FindByXPath(`//*[@id="app"]//nav/ol/li/a/span/h2[text()="Applications"]`), | ||
NameSubheader: webDriver.FindByXPath(`//table/tbody/tr/td[1]/div[text()="Name"]`), | ||
DeploymentTypeSubheader: webDriver.FindByXPath(`//table/tbody/tr/td[2]/div[text()="Deployment Type"]`), | ||
URLSubheader: webDriver.FindByXPath(`//table/tbody/tr/td[3]/div[text()="URL"]`), | ||
PathSubheader: webDriver.FindByXPath(`//table/tbody/tr/td[4]/div[text()="Path"]`)} | ||
|
||
return &appDetailsPage | ||
} | ||
|
||
func GetAppNameElements(webDriver *agouti.Page, appName string) *NamedElements { | ||
appNameElements := NamedElements{ | ||
AppNameHeader: webDriver.FindByXPath(`//*[@id="app"]//div/nav/ol/li/h2[text()="` + appName + `"]`), | ||
AppName: webDriver.FindByXPath(`//table/tbody/tr/td[1]/div[text()="` + appName + `"]`)} | ||
|
||
return &appNameElements | ||
} | ||
|
||
func GetAppTypeElement(webDriver *agouti.Page, appType string) *NamedElements { | ||
appTypeElement := NamedElements{ | ||
AppType: webDriver.FindByXPath(`//table/tbody/tr/td[2]/div[text()="` + appType + `"]`)} | ||
return &appTypeElement | ||
} | ||
|
||
func GetURLElement(webDriver *agouti.Page, appURL string) *NamedElements { | ||
appURLElement := NamedElements{ | ||
AppURL: webDriver.FindByXPath(`//table/tbody/tr/td[3]/div[text()="` + appURL + `"]`)} | ||
return &appURLElement | ||
} | ||
|
||
func GetPathElement(webDriver *agouti.Page, pathToManifests string) *NamedElements { | ||
appPathElement := NamedElements{ | ||
AppPathToManifests: webDriver.FindByXPath(`//table/tbody/tr/td[4]/div[text()="` + pathToManifests + `"]`)} | ||
return &appPathElement | ||
} | ||
|
||
func GetMessageElements(webDriver *agouti.Page, msg string) *NamedElements { | ||
successMsgElement := NamedElements{ | ||
HelmSuccessMessage: webDriver.FindByXPath(`//table//tbody/tr/td[text()="` + msg + ` install succeeded"]`), | ||
KustomizeSuccessMessage: webDriver.FindByXPath(`//table/tbody/tr/td[text()="` + msg + `"]`)} | ||
|
||
return &successMsgElement | ||
} |
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
Oops, something went wrong.