modify hint message to include fix (#3829)

Modify hint message to include fix.
This commit is contained in:
Sumit Kumar 2021-04-01 17:10:30 +05:30 committed by GitHub
parent bdf31dbf37
commit 3140e98146
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 28 additions and 20 deletions

View File

@ -171,8 +171,10 @@ public class DatasourceServiceImpl extends BaseService<DatasourceRepository, Dat
}
if(usingLocalhostUrl) {
messages.add("You may not able to access your localhost if Appsmith is running inside a docker " +
"container or on the cloud. Please check out Appsmith's documentation to understand more.");
messages.add("You may not be able to access your localhost if Appsmith is running inside a docker " +
"container or on the cloud. To enable access to your localhost you may use ngrok to expose " +
"your local endpoint to the internet. Please check out Appsmith's documentation to understand more" +
".");
}
}

View File

@ -807,9 +807,10 @@ public class DatasourceServiceTest {
assertThat(testResult.getInvalids()).isEmpty();
assertThat(testResult.getMessages()).isNotEmpty();
String expectedMessage = "You may not able to access your localhost if Appsmith is running inside" +
" a docker container or on the cloud. Please check out Appsmith's documentation to " +
"understand more.";
String expectedMessage = "You may not be able to access your localhost if Appsmith is running " +
"inside a docker container or on the cloud. To enable access to your localhost you may use " +
"ngrok to expose your local endpoint to the internet. Please check out Appsmith's " +
"documentation to understand more.";
assertThat(
testResult.getMessages().stream()
.anyMatch(message -> expectedMessage.equals(message))
@ -841,9 +842,10 @@ public class DatasourceServiceTest {
.assertNext(createdDatasource -> {
assertThat(createdDatasource.getMessages()).isNotEmpty();
String expectedMessage = "You may not able to access your localhost if Appsmith is running inside" +
" a docker container or on the cloud. Please check out Appsmith's documentation to " +
"understand more.";
String expectedMessage = "You may not be able to access your localhost if Appsmith is running " +
"inside a docker container or on the cloud. To enable access to your localhost you may " +
"use ngrok to expose your local endpoint to the internet. Please check out Appsmith's " +
"documentation to understand more.";
assertThat(
createdDatasource.getMessages().stream()
.anyMatch(message -> expectedMessage.equals(message))
@ -891,9 +893,10 @@ public class DatasourceServiceTest {
.create(datasourceMono)
.assertNext(updatedDatasource -> {
assertThat(updatedDatasource.getMessages().size()).isNotZero();
String expectedMessage = "You may not able to access your localhost if Appsmith is running inside" +
" a docker container or on the cloud. Please check out Appsmith's documentation to " +
"understand more.";
String expectedMessage = "You may not be able to access your localhost if Appsmith is running " +
"inside a docker container or on the cloud. To enable access to your localhost you may " +
"use ngrok to expose your local endpoint to the internet. Please check out Appsmith's " +
"documentation to understand more.";
assertThat(
updatedDatasource.getMessages().stream()
.anyMatch(message -> expectedMessage.equals(message))
@ -928,9 +931,10 @@ public class DatasourceServiceTest {
.assertNext(createdDatasource -> {
assertThat(createdDatasource.getMessages()).isNotEmpty();
String expectedMessage = "You may not able to access your localhost if Appsmith is running inside" +
" a docker container or on the cloud. Please check out Appsmith's documentation to " +
"understand more.";
String expectedMessage = "You may not be able to access your localhost if Appsmith is running " +
"inside a docker container or on the cloud. To enable access to your localhost you may " +
"use ngrok to expose your local endpoint to the internet. Please check out Appsmith's " +
"documentation to understand more.";
assertThat(
createdDatasource.getMessages().stream()
.anyMatch(message -> expectedMessage.equals(message))
@ -980,9 +984,10 @@ public class DatasourceServiceTest {
.create(datasourceMono)
.assertNext(updatedDatasource -> {
assertThat(updatedDatasource.getMessages().size()).isNotZero();
String expectedMessage = "You may not able to access your localhost if Appsmith is running inside" +
" a docker container or on the cloud. Please check out Appsmith's documentation to " +
"understand more.";
String expectedMessage = "You may not be able to access your localhost if Appsmith is running " +
"inside a docker container or on the cloud. To enable access to your localhost you may " +
"use ngrok to expose your local endpoint to the internet. Please check out " +
"Appsmith's documentation to understand more.";
assertThat(
updatedDatasource.getMessages().stream()
.anyMatch(message -> expectedMessage.equals(message))

View File

@ -434,9 +434,10 @@ public class LayoutActionServiceTest {
.assertNext(resultAction -> {
assertThat(resultAction.getDatasource().getMessages().size()).isNotZero();
String expectedMessage = "You may not able to access your localhost if Appsmith is running inside" +
" a docker container or on the cloud. Please check out Appsmith's documentation to " +
"understand more.";
String expectedMessage = "You may not be able to access your localhost if Appsmith is running " +
"inside a docker container or on the cloud. To enable access to your localhost you may " +
"use ngrok to expose your local endpoint to the internet. Please check out " +
"Appsmith's documentation to understand more.";
assertThat(resultAction.getDatasource().getMessages().stream()
.anyMatch(message -> expectedMessage.equals(message))
).isTrue();