Skip to content

Commit

Permalink
Second try to update connect/site-info mock response to return differ…
Browse files Browse the repository at this point in the history
…ent response on a non wp site.
  • Loading branch information
hafizrahman committed Dec 12, 2024
1 parent 0a1803f commit 2b6c9a1
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 21 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"request": {
"method": "GET",
"urlPath": "/rest/v1.1/connect/site-info/",
"queryParameters": {
"url": {
"matches": ".*notawpsite.com.*"
}
}
},
"response": {
"status": 200,
"jsonBody": {
"exists": true,
"isWordPress": false,
"hasJetpack": false,
"isJetpackActive": false,
"isJetpackConnected": false,
"isWordPressDotCom": false,
"urlAfterRedirects": "",
"jetpackVersion": false
},
"headers": {
"Content-Type": "application/json",
"Connection": "keep-alive",
"Cache-Control": "no-cache, must-revalidate, max-age=0"
}
}
}
Original file line number Diff line number Diff line change
@@ -1,24 +1,29 @@
{
"request": {
"method": "GET",
"urlPath": "/rest/v1.1/connect/site-info/"
"request": {
"method": "GET",
"urlPath": "/rest/v1.1/connect/site-info/",
"queryParameters": {
"url": {
"matches": ".*automatticwidgets.wpcomstaging.com.*"
}
}
},
"response": {
"status": 200,
"jsonBody": {
"exists": true,
"isWordPress": true,
"hasJetpack": true,
"isJetpackActive": true,
"isJetpackConnected": true,
"isWordPressDotCom": true,
"urlAfterRedirects": "https:\/\/automatticwidgets.wpcomstaging.com",
"jetpackVersion": false
},
"response": {
"status": 200,
"jsonBody": {
"exists": true,
"isWordPress": true,
"hasJetpack": true,
"isJetpackActive": true,
"isJetpackConnected": true,
"isWordPressDotCom": true,
"urlAfterRedirects": "https:\/\/automatticwidgets.wpcomstaging.com",
"jetpackVersion": false
},
"headers": {
"Content-Type": "application/json",
"Connection": "keep-alive",
"Cache-Control": "no-cache, must-revalidate, max-age=0"
}
"headers": {
"Content-Type": "application/json",
"Connection": "keep-alive",
"Cache-Control": "no-cache, must-revalidate, max-age=0"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class LoginUITest: TestBase() {
@Test
fun siteAddressWithWrongURL() {
SiteAddressScreen()
.openLoginNotWpScreen(siteAddress = "https://yahoo.com/")
.openLoginNotWpScreen(siteAddress = "notawpsite.com")
.assertErrorElements()
}
}

0 comments on commit 2b6c9a1

Please sign in to comment.