提交 150e89b0 编写于 作者: 雨爱无痕

Add ui test

上级 0503e460
...@@ -48,5 +48,7 @@ logs/ ...@@ -48,5 +48,7 @@ logs/
test/demo/php/conf test/demo/php/conf
test/demo/php/log test/demo/php/log
test/demo/php/product1 test/demo/php/product1
/test/ui/allure-results/
/test/cli/allure-results/ /test/cli/allure-results/
/test/allure-results/ /test/allure-results/
/test/ui/log/
#/bin/bash if [ ! -d "zentaoatf" ];then
if [ ! -d "/data/" ];then
git clone https://github.com/easysoft/zentaoatf.git git clone https://github.com/easysoft/zentaoatf.git
go env -w GOPROXY=https://goproxy.cn,direct go env -w GOPROXY=https://goproxy.cn,direct
cd zentaoatf
git checkout ztf-42_zhaoke
go mod tidy || true
go run github.com/playwright-community/playwright-go/cmd/playwright install --with-deps go run github.com/playwright-community/playwright-go/cmd/playwright install --with-deps
cd ui
npm install
cd ../
else else
cd zentaoatf cd zentaoatf
git pull git pull
go mod tidy || true
fi fi
cd test/cli cd test/cli
go run ./main.go -zentaoVersion 17.6.1 go run ./main.go -zentaoVersion 17.6.1
\ No newline at end of file
...@@ -29,9 +29,5 @@ func main() { ...@@ -29,9 +29,5 @@ func main() {
if err != nil { if err != nil {
fmt.Println("Build cli fail ", err) fmt.Println("Build cli fail ", err)
} }
// err = commonTestHelper.BuildServer()
// if err != nil {
// fmt.Println("Build server fail ")
// }
commonTestHelper.TestCli() commonTestHelper.TestCli()
} }
...@@ -19,11 +19,10 @@ func TestCli() (err error) { ...@@ -19,11 +19,10 @@ func TestCli() (err error) {
cmdStr := fmt.Sprintf(`%sztf allure -allureReportDir ./test/cli/allure-results go test %stest/cli -v`, RootPath, RootPath) cmdStr := fmt.Sprintf(`%sztf allure -allureReportDir ./test/cli/allure-results go test %stest/cli -v`, RootPath, RootPath)
var cmd *exec.Cmd var cmd *exec.Cmd
if runtime.GOOS == "windows" { if runtime.GOOS == "windows" {
cmdStr = fmt.Sprintf(`%sztf.exe allure -allureReportDir .\test\cli\allure-results go test %stest\cli -v -run=CliVersion`, RootPath, RootPath) cmdStr = fmt.Sprintf(`%sztf.exe allure -allureReportDir .\test\cli\allure-results go test %stest\cli -v`, RootPath, RootPath)
fmt.Println(RootPath, cmdStr) cmd = exec.Command("cmd", "/C", cmdStr, "-uuid", "cli_auto_test")
cmd = exec.Command("cmd", "/C", cmdStr)
} else { } else {
cmd = exec.Command("/bin/bash", "-c", cmdStr, "-uuid", "uuuuuuuuuuu") cmd = exec.Command("/bin/bash", "-c", cmdStr, "-uuid", "cli_auto_test")
} }
cmd.Dir = RootPath cmd.Dir = RootPath
fmt.Println(cmd.String()) fmt.Println(cmd.String())
...@@ -67,16 +66,14 @@ func TestCli() (err error) { ...@@ -67,16 +66,14 @@ func TestCli() (err error) {
return return
} }
cmd.Process.Kill() cmd.Process.Kill()
execHelper.KillProcessByUUID("uuuuuuuuuuu") execHelper.KillProcessByUUID("cli_auto_test")
report, err := analysisHelper.ReadReportByPath(strings.Replace(reportDir, "result.txt", "result.json", 1)) report, err := analysisHelper.ReadReportByPath(strings.Replace(reportDir, "result.txt", "result.json", 1))
if err != nil { if err != nil {
return return
} }
config := commDomain.WorkspaceConf{Url: "http://127.0.0.1:8081/", Password: "Test123456.", Username: "admin"} config := commDomain.WorkspaceConf{Url: "http://127.0.0.1:8081/", Password: "Test123456.", Username: "admin"}
fmt.Println(report, config)
err = zentaoHelper.CommitResult(report, 1, 0, config, nil) err = zentaoHelper.CommitResult(report, 1, 0, config, nil)
fmt.Println(err)
return return
} }
...@@ -84,11 +81,10 @@ func TestUi() (err error) { ...@@ -84,11 +81,10 @@ func TestUi() (err error) {
cmdStr := fmt.Sprintf(`%sztf allure -allureReportDir ./test/cli/allure-results go test %stest/ui -v`, RootPath, RootPath) cmdStr := fmt.Sprintf(`%sztf allure -allureReportDir ./test/cli/allure-results go test %stest/ui -v`, RootPath, RootPath)
var cmd *exec.Cmd var cmd *exec.Cmd
if runtime.GOOS == "windows" { if runtime.GOOS == "windows" {
cmdStr = fmt.Sprintf(`%sztf.exe allure -allureReportDir .\test\cli\allure-results go test %stest\ui -v -run=CliVersion`, RootPath, RootPath) cmdStr = fmt.Sprintf(`%sztf.exe allure -allureReportDir .\test\cli\allure-results go test %stest\ui -v`, RootPath, RootPath)
fmt.Println(RootPath, cmdStr)
cmd = exec.Command("cmd", "/C", cmdStr) cmd = exec.Command("cmd", "/C", cmdStr)
} else { } else {
cmd = exec.Command("/bin/bash", "-c", cmdStr, "-uuid", "uuuuuuuuuuu") cmd = exec.Command("/bin/bash", "-c", cmdStr)
} }
cmd.Dir = RootPath cmd.Dir = RootPath
fmt.Println(cmd.String()) fmt.Println(cmd.String())
...@@ -132,15 +128,13 @@ func TestUi() (err error) { ...@@ -132,15 +128,13 @@ func TestUi() (err error) {
return return
} }
cmd.Process.Kill() cmd.Process.Kill()
execHelper.KillProcessByUUID("uuuuuuuuuuu") execHelper.KillProcessByUUID("ui_auto_test")
report, err := analysisHelper.ReadReportByPath(strings.Replace(reportDir, "result.txt", "result.json", 1)) report, err := analysisHelper.ReadReportByPath(strings.Replace(reportDir, "result.txt", "result.json", 1))
if err != nil { if err != nil {
return return
} }
config := commDomain.WorkspaceConf{Url: "http://127.0.0.1:8081/", Password: "Test123456.", Username: "admin"} config := commDomain.WorkspaceConf{Url: "http://127.0.0.1:8081/", Password: "Test123456.", Username: "admin"}
fmt.Println(report, config)
err = zentaoHelper.CommitResult(report, 1, 0, config, nil) err = zentaoHelper.CommitResult(report, 1, 0, config, nil)
fmt.Println(err)
return return
} }
...@@ -32,10 +32,22 @@ func BuildCli() (err error) { ...@@ -32,10 +32,22 @@ func BuildCli() (err error) {
func RunServer() (err error) { func RunServer() (err error) {
ztfPath := GetZtfPath() ztfPath := GetZtfPath()
var cmd *exec.Cmd var cmd *exec.Cmd
cmd = exec.Command(ztfPath, "-P", "8085") cmd = exec.Command(ztfPath, "-P", "8085", "-uuid=ui_auto_test")
cmd.Dir = RootPath cmd.Dir = RootPath
fmt.Println(cmd.String()) fmt.Println(cmd.String())
_, err = cmd.CombinedOutput() err = cmd.Start()
if err != nil {
return
}
return
}
func RunUi() (err error) {
var cmd *exec.Cmd
cmd = exec.Command("npm", "run", "serve", "-uuid=ui_auto_test")
cmd.Dir = RootPath + FilePthSep + "ui"
fmt.Println(cmd.String())
err = cmd.Start()
if err != nil { if err != nil {
return return
} }
......
...@@ -33,5 +33,9 @@ func main() { ...@@ -33,5 +33,9 @@ func main() {
if err != nil { if err != nil {
fmt.Println("Build server fail ") fmt.Println("Build server fail ")
} }
commonTestHelper.TestCli() err = commonTestHelper.RunUi()
if err != nil {
fmt.Println("Build server fail ")
}
commonTestHelper.TestUi()
} }
...@@ -28,7 +28,7 @@ func ScriptBug(t provider.T) { ...@@ -28,7 +28,7 @@ func ScriptBug(t provider.T) {
t.Errorf("Create the new page fail: %v", err) t.Errorf("Create the new page fail: %v", err)
t.FailNow() t.FailNow()
} }
if _, err = page.Goto("http://127.0.0.1:8081/", playwright.PageGotoOptions{ if _, err = page.Goto("http://127.0.0.1:8000/", playwright.PageGotoOptions{
WaitUntil: playwright.WaitUntilStateDomcontentloaded}); err != nil { WaitUntil: playwright.WaitUntilStateDomcontentloaded}); err != nil {
t.Errorf("The specific URL is missing: %v", err) t.Errorf("The specific URL is missing: %v", err)
t.FailNow() t.FailNow()
...@@ -100,7 +100,7 @@ func ScriptsBug(t provider.T) { ...@@ -100,7 +100,7 @@ func ScriptsBug(t provider.T) {
t.Errorf("Create the new page fail: %v", err) t.Errorf("Create the new page fail: %v", err)
t.FailNow() t.FailNow()
} }
if _, err = page.Goto("http://127.0.0.1:8081/", playwright.PageGotoOptions{ if _, err = page.Goto("http://127.0.0.1:8000/", playwright.PageGotoOptions{
WaitUntil: playwright.WaitUntilStateDomcontentloaded}); err != nil { WaitUntil: playwright.WaitUntilStateDomcontentloaded}); err != nil {
t.Errorf("The specific URL is missing: %v", err) t.Errorf("The specific URL is missing: %v", err)
t.FailNow() t.FailNow()
......
...@@ -32,7 +32,7 @@ func CreateInterpreter(t provider.T) { ...@@ -32,7 +32,7 @@ func CreateInterpreter(t provider.T) {
t.Errorf("Create the new page fail: %v", err) t.Errorf("Create the new page fail: %v", err)
t.FailNow() t.FailNow()
} }
if _, err = page.Goto("http://127.0.0.1:8081/", playwright.PageGotoOptions{ if _, err = page.Goto("http://127.0.0.1:8000/", playwright.PageGotoOptions{
WaitUntil: playwright.WaitUntilStateDomcontentloaded}); err != nil { WaitUntil: playwright.WaitUntilStateDomcontentloaded}); err != nil {
t.Errorf("The specific URL is missing: %v", err) t.Errorf("The specific URL is missing: %v", err)
t.FailNow() t.FailNow()
...@@ -120,7 +120,7 @@ func EditInterpreter(t provider.T) { ...@@ -120,7 +120,7 @@ func EditInterpreter(t provider.T) {
t.Errorf("Create the new page fail: %v", err) t.Errorf("Create the new page fail: %v", err)
t.FailNow() t.FailNow()
} }
if _, err = page.Goto("http://127.0.0.1:8081/", playwright.PageGotoOptions{ if _, err = page.Goto("http://127.0.0.1:8000/", playwright.PageGotoOptions{
WaitUntil: playwright.WaitUntilStateDomcontentloaded}); err != nil { WaitUntil: playwright.WaitUntilStateDomcontentloaded}); err != nil {
t.Errorf("The specific URL is missing: %v", err) t.Errorf("The specific URL is missing: %v", err)
t.FailNow() t.FailNow()
...@@ -218,7 +218,7 @@ func DeleteInterpreter(t provider.T) { ...@@ -218,7 +218,7 @@ func DeleteInterpreter(t provider.T) {
t.Errorf("Create the new page fail: %v", err) t.Errorf("Create the new page fail: %v", err)
t.FailNow() t.FailNow()
} }
if _, err = page.Goto("http://127.0.0.1:8081/", playwright.PageGotoOptions{ if _, err = page.Goto("http://127.0.0.1:8000/", playwright.PageGotoOptions{
WaitUntil: playwright.WaitUntilStateDomcontentloaded}); err != nil { WaitUntil: playwright.WaitUntilStateDomcontentloaded}); err != nil {
t.Errorf("The specific URL is missing: %v", err) t.Errorf("The specific URL is missing: %v", err)
t.FailNow() t.FailNow()
......
...@@ -32,7 +32,7 @@ func SwitchLanguage(t provider.T) { ...@@ -32,7 +32,7 @@ func SwitchLanguage(t provider.T) {
t.Errorf("Create the new page fail: %v", err) t.Errorf("Create the new page fail: %v", err)
t.FailNow() t.FailNow()
} }
if _, err = page.Goto("http://127.0.0.1:8081/", playwright.PageGotoOptions{ if _, err = page.Goto("http://127.0.0.1:8000/", playwright.PageGotoOptions{
WaitUntil: playwright.WaitUntilStateDomcontentloaded}); err != nil { WaitUntil: playwright.WaitUntilStateDomcontentloaded}); err != nil {
t.Errorf("The specific URL is missing: %v", err) t.Errorf("The specific URL is missing: %v", err)
t.FailNow() t.FailNow()
......
...@@ -30,7 +30,7 @@ func CollapseLog(t provider.T) { ...@@ -30,7 +30,7 @@ func CollapseLog(t provider.T) {
t.Errorf("Create the new page fail: %v", err) t.Errorf("Create the new page fail: %v", err)
t.FailNow() t.FailNow()
} }
if _, err = page.Goto("http://127.0.0.1:8081/", playwright.PageGotoOptions{ if _, err = page.Goto("http://127.0.0.1:8000/", playwright.PageGotoOptions{
WaitUntil: playwright.WaitUntilStateDomcontentloaded}); err != nil { WaitUntil: playwright.WaitUntilStateDomcontentloaded}); err != nil {
t.Errorf("The specific URL is missing: %v", err) t.Errorf("The specific URL is missing: %v", err)
t.FailNow() t.FailNow()
...@@ -124,7 +124,7 @@ func FullScreenLog(t provider.T) { ...@@ -124,7 +124,7 @@ func FullScreenLog(t provider.T) {
t.Errorf("Create the new page fail: %v", err) t.Errorf("Create the new page fail: %v", err)
t.FailNow() t.FailNow()
} }
if _, err = page.Goto("http://127.0.0.1:8081/", playwright.PageGotoOptions{ if _, err = page.Goto("http://127.0.0.1:8000/", playwright.PageGotoOptions{
WaitUntil: playwright.WaitUntilStateDomcontentloaded}); err != nil { WaitUntil: playwright.WaitUntilStateDomcontentloaded}); err != nil {
t.Errorf("The specific URL is missing: %v", err) t.Errorf("The specific URL is missing: %v", err)
t.FailNow() t.FailNow()
......
...@@ -30,7 +30,7 @@ func SwitchProduct(t provider.T) { ...@@ -30,7 +30,7 @@ func SwitchProduct(t provider.T) {
t.Errorf("Create the new page fail: %v", err) t.Errorf("Create the new page fail: %v", err)
t.FailNow() t.FailNow()
} }
if _, err = page.Goto("http://127.0.0.1:8081/", playwright.PageGotoOptions{ if _, err = page.Goto("http://127.0.0.1:8000/", playwright.PageGotoOptions{
WaitUntil: playwright.WaitUntilStateDomcontentloaded}); err != nil { WaitUntil: playwright.WaitUntilStateDomcontentloaded}); err != nil {
t.Errorf("The specific URL is missing: %v", err) t.Errorf("The specific URL is missing: %v", err)
t.FailNow() t.FailNow()
......
...@@ -31,7 +31,7 @@ func Detail(t provider.T) { ...@@ -31,7 +31,7 @@ func Detail(t provider.T) {
t.Errorf("Create the new page fail: %v", err) t.Errorf("Create the new page fail: %v", err)
t.FailNow() t.FailNow()
} }
if _, err = page.Goto("http://127.0.0.1:8081/", playwright.PageGotoOptions{ if _, err = page.Goto("http://127.0.0.1:8000/", playwright.PageGotoOptions{
WaitUntil: playwright.WaitUntilStateDomcontentloaded}); err != nil { WaitUntil: playwright.WaitUntilStateDomcontentloaded}); err != nil {
t.Errorf("The specific URL is missing: %v", err) t.Errorf("The specific URL is missing: %v", err)
t.FailNow() t.FailNow()
...@@ -149,7 +149,7 @@ func SubmitResult(t provider.T) { ...@@ -149,7 +149,7 @@ func SubmitResult(t provider.T) {
t.Errorf("Create the new page fail: %v", err) t.Errorf("Create the new page fail: %v", err)
t.FailNow() t.FailNow()
} }
if _, err = page.Goto("http://127.0.0.1:8081/", playwright.PageGotoOptions{ if _, err = page.Goto("http://127.0.0.1:8000/", playwright.PageGotoOptions{
WaitUntil: playwright.WaitUntilStateDomcontentloaded}); err != nil { WaitUntil: playwright.WaitUntilStateDomcontentloaded}); err != nil {
t.Errorf("The specific URL is missing: %v", err) t.Errorf("The specific URL is missing: %v", err)
t.FailNow() t.FailNow()
...@@ -254,7 +254,7 @@ func SubmitBug(t provider.T) { ...@@ -254,7 +254,7 @@ func SubmitBug(t provider.T) {
t.Errorf("Create the new page fail: %v", err) t.Errorf("Create the new page fail: %v", err)
t.FailNow() t.FailNow()
} }
if _, err = page.Goto("http://127.0.0.1:8081/", playwright.PageGotoOptions{ if _, err = page.Goto("http://127.0.0.1:8000/", playwright.PageGotoOptions{
WaitUntil: playwright.WaitUntilStateDomcontentloaded}); err != nil { WaitUntil: playwright.WaitUntilStateDomcontentloaded}); err != nil {
t.Errorf("The specific URL is missing: %v", err) t.Errorf("The specific URL is missing: %v", err)
t.FailNow() t.FailNow()
...@@ -349,7 +349,7 @@ func SubmitBugTwoStep(t provider.T) { ...@@ -349,7 +349,7 @@ func SubmitBugTwoStep(t provider.T) {
t.Errorf("Create the new page fail: %v", err) t.Errorf("Create the new page fail: %v", err)
t.FailNow() t.FailNow()
} }
if _, err = page.Goto("http://127.0.0.1:8081/", playwright.PageGotoOptions{ if _, err = page.Goto("http://127.0.0.1:8000/", playwright.PageGotoOptions{
WaitUntil: playwright.WaitUntilStateDomcontentloaded}); err != nil { WaitUntil: playwright.WaitUntilStateDomcontentloaded}); err != nil {
t.Errorf("The specific URL is missing: %v", err) t.Errorf("The specific URL is missing: %v", err)
t.FailNow() t.FailNow()
......
...@@ -29,7 +29,7 @@ func RunFailStatistic(t provider.T) { ...@@ -29,7 +29,7 @@ func RunFailStatistic(t provider.T) {
t.Errorf("Create the new page fail: %v", err) t.Errorf("Create the new page fail: %v", err)
t.FailNow() t.FailNow()
} }
if _, err = page.Goto("http://127.0.0.1:8081/", playwright.PageGotoOptions{ if _, err = page.Goto("http://127.0.0.1:8000/", playwright.PageGotoOptions{
WaitUntil: playwright.WaitUntilStateDomcontentloaded}); err != nil { WaitUntil: playwright.WaitUntilStateDomcontentloaded}); err != nil {
t.Errorf("The specific URL is missing: %v", err) t.Errorf("The specific URL is missing: %v", err)
t.FailNow() t.FailNow()
...@@ -115,7 +115,7 @@ func RunSuccessStatistic(t provider.T) { ...@@ -115,7 +115,7 @@ func RunSuccessStatistic(t provider.T) {
t.Errorf("Create the new page fail: %v", err) t.Errorf("Create the new page fail: %v", err)
t.FailNow() t.FailNow()
} }
if _, err = page.Goto("http://127.0.0.1:8081/", playwright.PageGotoOptions{ if _, err = page.Goto("http://127.0.0.1:8000/", playwright.PageGotoOptions{
WaitUntil: playwright.WaitUntilStateDomcontentloaded}); err != nil { WaitUntil: playwright.WaitUntilStateDomcontentloaded}); err != nil {
t.Errorf("The specific URL is missing: %v", err) t.Errorf("The specific URL is missing: %v", err)
t.FailNow() t.FailNow()
...@@ -201,7 +201,7 @@ func RunBugStatistic(t provider.T) { ...@@ -201,7 +201,7 @@ func RunBugStatistic(t provider.T) {
t.Errorf("Create the new page fail: %v", err) t.Errorf("Create the new page fail: %v", err)
t.FailNow() t.FailNow()
} }
if _, err = page.Goto("http://127.0.0.1:8081/", playwright.PageGotoOptions{ if _, err = page.Goto("http://127.0.0.1:8000/", playwright.PageGotoOptions{
WaitUntil: playwright.WaitUntilStateDomcontentloaded}); err != nil { WaitUntil: playwright.WaitUntilStateDomcontentloaded}); err != nil {
t.Errorf("The specific URL is missing: %v", err) t.Errorf("The specific URL is missing: %v", err)
t.FailNow() t.FailNow()
......
...@@ -32,7 +32,7 @@ func RunScript(t provider.T) { ...@@ -32,7 +32,7 @@ func RunScript(t provider.T) {
t.Errorf("Create the new page fail: %v", err) t.Errorf("Create the new page fail: %v", err)
t.FailNow() t.FailNow()
} }
if _, err = page.Goto("http://127.0.0.1:8081/", playwright.PageGotoOptions{ if _, err = page.Goto("http://127.0.0.1:8000/", playwright.PageGotoOptions{
WaitUntil: playwright.WaitUntilStateDomcontentloaded}); err != nil { WaitUntil: playwright.WaitUntilStateDomcontentloaded}); err != nil {
t.Errorf("The specific URL is missing: %v", err) t.Errorf("The specific URL is missing: %v", err)
t.FailNow() t.FailNow()
...@@ -144,7 +144,7 @@ func RunSelectedScripts(t provider.T) { ...@@ -144,7 +144,7 @@ func RunSelectedScripts(t provider.T) {
t.Errorf("Create the new page fail: %v", err) t.Errorf("Create the new page fail: %v", err)
t.FailNow() t.FailNow()
} }
if _, err = page.Goto("http://127.0.0.1:8081/", playwright.PageGotoOptions{ if _, err = page.Goto("http://127.0.0.1:8000/", playwright.PageGotoOptions{
WaitUntil: playwright.WaitUntilStateDomcontentloaded}); err != nil { WaitUntil: playwright.WaitUntilStateDomcontentloaded}); err != nil {
t.Errorf("The specific URL is missing: %v", err) t.Errorf("The specific URL is missing: %v", err)
t.FailNow() t.FailNow()
...@@ -280,7 +280,7 @@ func RunOpenedAndLast(t provider.T) { ...@@ -280,7 +280,7 @@ func RunOpenedAndLast(t provider.T) {
t.Errorf("Create the new page fail: %v", err) t.Errorf("Create the new page fail: %v", err)
t.FailNow() t.FailNow()
} }
if _, err = page.Goto("http://127.0.0.1:8081/", playwright.PageGotoOptions{ if _, err = page.Goto("http://127.0.0.1:8000/", playwright.PageGotoOptions{
WaitUntil: playwright.WaitUntilStateDomcontentloaded}); err != nil { WaitUntil: playwright.WaitUntilStateDomcontentloaded}); err != nil {
t.Errorf("The specific URL is missing: %v", err) t.Errorf("The specific URL is missing: %v", err)
t.FailNow() t.FailNow()
...@@ -477,7 +477,7 @@ func RunAll(t provider.T) { ...@@ -477,7 +477,7 @@ func RunAll(t provider.T) {
t.Errorf("Create the new page fail: %v", err) t.Errorf("Create the new page fail: %v", err)
t.FailNow() t.FailNow()
} }
if _, err = page.Goto("http://127.0.0.1:8081/", playwright.PageGotoOptions{ if _, err = page.Goto("http://127.0.0.1:8000/", playwright.PageGotoOptions{
WaitUntil: playwright.WaitUntilStateDomcontentloaded}); err != nil { WaitUntil: playwright.WaitUntilStateDomcontentloaded}); err != nil {
t.Errorf("The specific URL is missing: %v", err) t.Errorf("The specific URL is missing: %v", err)
t.FailNow() t.FailNow()
...@@ -607,7 +607,7 @@ func RunReExecFailCase(t provider.T) { ...@@ -607,7 +607,7 @@ func RunReExecFailCase(t provider.T) {
t.Errorf("Create the new page fail: %v", err) t.Errorf("Create the new page fail: %v", err)
t.FailNow() t.FailNow()
} }
if _, err = page.Goto("http://127.0.0.1:8081/", playwright.PageGotoOptions{ if _, err = page.Goto("http://127.0.0.1:8000/", playwright.PageGotoOptions{
WaitUntil: playwright.WaitUntilStateDomcontentloaded}); err != nil { WaitUntil: playwright.WaitUntilStateDomcontentloaded}); err != nil {
t.Errorf("The specific URL is missing: %v", err) t.Errorf("The specific URL is missing: %v", err)
t.FailNow() t.FailNow()
...@@ -730,7 +730,7 @@ func RunReExecAllCase(t provider.T) { ...@@ -730,7 +730,7 @@ func RunReExecAllCase(t provider.T) {
t.Errorf("Create the new page fail: %v", err) t.Errorf("Create the new page fail: %v", err)
t.FailNow() t.FailNow()
} }
if _, err = page.Goto("http://127.0.0.1:8081/", playwright.PageGotoOptions{ if _, err = page.Goto("http://127.0.0.1:8000/", playwright.PageGotoOptions{
WaitUntil: playwright.WaitUntilStateDomcontentloaded}); err != nil { WaitUntil: playwright.WaitUntilStateDomcontentloaded}); err != nil {
t.Errorf("The specific URL is missing: %v", err) t.Errorf("The specific URL is missing: %v", err)
t.FailNow() t.FailNow()
...@@ -853,7 +853,7 @@ func RunWorkspace(t provider.T) { ...@@ -853,7 +853,7 @@ func RunWorkspace(t provider.T) {
t.Errorf("Create the new page fail: %v", err) t.Errorf("Create the new page fail: %v", err)
t.FailNow() t.FailNow()
} }
if _, err = page.Goto("http://127.0.0.1:8081/", playwright.PageGotoOptions{ if _, err = page.Goto("http://127.0.0.1:8000/", playwright.PageGotoOptions{
WaitUntil: playwright.WaitUntilStateDomcontentloaded}); err != nil { WaitUntil: playwright.WaitUntilStateDomcontentloaded}); err != nil {
t.Errorf("The specific URL is missing: %v", err) t.Errorf("The specific URL is missing: %v", err)
t.FailNow() t.FailNow()
...@@ -965,7 +965,7 @@ func RunUnit(t provider.T) { ...@@ -965,7 +965,7 @@ func RunUnit(t provider.T) {
t.Errorf("Create the new page fail: %v", err) t.Errorf("Create the new page fail: %v", err)
t.FailNow() t.FailNow()
} }
if _, err = page.Goto("http://127.0.0.1:8081/", playwright.PageGotoOptions{ if _, err = page.Goto("http://127.0.0.1:8000/", playwright.PageGotoOptions{
WaitUntil: playwright.WaitUntilStateDomcontentloaded}); err != nil { WaitUntil: playwright.WaitUntilStateDomcontentloaded}); err != nil {
t.Errorf("The specific URL is missing: %v", err) t.Errorf("The specific URL is missing: %v", err)
t.FailNow() t.FailNow()
......
...@@ -30,7 +30,7 @@ func SaveScript(t provider.T) { ...@@ -30,7 +30,7 @@ func SaveScript(t provider.T) {
t.Errorf("Create the new page fail: %v", err) t.Errorf("Create the new page fail: %v", err)
t.FailNow() t.FailNow()
} }
if _, err = page.Goto("http://127.0.0.1:8081/", playwright.PageGotoOptions{ if _, err = page.Goto("http://127.0.0.1:8000/", playwright.PageGotoOptions{
WaitUntil: playwright.WaitUntilStateDomcontentloaded}); err != nil { WaitUntil: playwright.WaitUntilStateDomcontentloaded}); err != nil {
t.Errorf("The specific URL is missing: %v", err) t.Errorf("The specific URL is missing: %v", err)
t.FailNow() t.FailNow()
...@@ -138,7 +138,7 @@ func ViewScript(t provider.T) { ...@@ -138,7 +138,7 @@ func ViewScript(t provider.T) {
t.Errorf("Create the new page fail: %v", err) t.Errorf("Create the new page fail: %v", err)
t.FailNow() t.FailNow()
} }
if _, err = page.Goto("http://127.0.0.1:8081/", playwright.PageGotoOptions{ if _, err = page.Goto("http://127.0.0.1:8000/", playwright.PageGotoOptions{
WaitUntil: playwright.WaitUntilStateDomcontentloaded}); err != nil { WaitUntil: playwright.WaitUntilStateDomcontentloaded}); err != nil {
t.Errorf("The specific URL is missing: %v", err) t.Errorf("The specific URL is missing: %v", err)
t.FailNow() t.FailNow()
......
...@@ -32,7 +32,7 @@ func CreateSite(t provider.T) { ...@@ -32,7 +32,7 @@ func CreateSite(t provider.T) {
t.Errorf("Create the new page fail: %v", err) t.Errorf("Create the new page fail: %v", err)
t.FailNow() t.FailNow()
} }
if _, err = page.Goto("http://127.0.0.1:8081/", playwright.PageGotoOptions{ if _, err = page.Goto("http://127.0.0.1:8000/", playwright.PageGotoOptions{
WaitUntil: playwright.WaitUntilStateDomcontentloaded}); err != nil { WaitUntil: playwright.WaitUntilStateDomcontentloaded}); err != nil {
t.Errorf("The specific URL is missing: %v", err) t.Errorf("The specific URL is missing: %v", err)
t.FailNow() t.FailNow()
...@@ -153,7 +153,7 @@ func EditSite(t provider.T) { ...@@ -153,7 +153,7 @@ func EditSite(t provider.T) {
t.Errorf("Create the new page fail: %v", err) t.Errorf("Create the new page fail: %v", err)
t.FailNow() t.FailNow()
} }
if _, err = page.Goto("http://127.0.0.1:8081/", playwright.PageGotoOptions{ if _, err = page.Goto("http://127.0.0.1:8000/", playwright.PageGotoOptions{
WaitUntil: playwright.WaitUntilStateDomcontentloaded}); err != nil { WaitUntil: playwright.WaitUntilStateDomcontentloaded}); err != nil {
t.Errorf("The specific URL is missing: %v", err) t.Errorf("The specific URL is missing: %v", err)
t.FailNow() t.FailNow()
...@@ -286,7 +286,7 @@ func DeleteSite(t provider.T) { ...@@ -286,7 +286,7 @@ func DeleteSite(t provider.T) {
t.Errorf("Create the new page fail: %v", err) t.Errorf("Create the new page fail: %v", err)
t.FailNow() t.FailNow()
} }
if _, err = page.Goto("http://127.0.0.1:8081/", playwright.PageGotoOptions{ if _, err = page.Goto("http://127.0.0.1:8000/", playwright.PageGotoOptions{
WaitUntil: playwright.WaitUntilStateDomcontentloaded}); err != nil { WaitUntil: playwright.WaitUntilStateDomcontentloaded}); err != nil {
t.Errorf("The specific URL is missing: %v", err) t.Errorf("The specific URL is missing: %v", err)
t.FailNow() t.FailNow()
......
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册