From 3140e98146f3e152b70a0401cc99ec87667cbde8 Mon Sep 17 00:00:00 2001 From: Sumit Kumar Date: Thu, 1 Apr 2021 17:10:30 +0530 Subject: [PATCH] modify hint message to include fix (#3829) Modify hint message to include fix. --- .../services/DatasourceServiceImpl.java | 6 ++-- .../services/DatasourceServiceTest.java | 35 +++++++++++-------- .../services/LayoutActionServiceTest.java | 7 ++-- 3 files changed, 28 insertions(+), 20 deletions(-) diff --git a/app/server/appsmith-server/src/main/java/com/appsmith/server/services/DatasourceServiceImpl.java b/app/server/appsmith-server/src/main/java/com/appsmith/server/services/DatasourceServiceImpl.java index 2ba88f5c1a..2f2d701693 100644 --- a/app/server/appsmith-server/src/main/java/com/appsmith/server/services/DatasourceServiceImpl.java +++ b/app/server/appsmith-server/src/main/java/com/appsmith/server/services/DatasourceServiceImpl.java @@ -171,8 +171,10 @@ public class DatasourceServiceImpl extends BaseService 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)) diff --git a/app/server/appsmith-server/src/test/java/com/appsmith/server/services/LayoutActionServiceTest.java b/app/server/appsmith-server/src/test/java/com/appsmith/server/services/LayoutActionServiceTest.java index 4d234c0042..b0c6e780fd 100644 --- a/app/server/appsmith-server/src/test/java/com/appsmith/server/services/LayoutActionServiceTest.java +++ b/app/server/appsmith-server/src/test/java/com/appsmith/server/services/LayoutActionServiceTest.java @@ -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();