diff --git a/.github/workflows/client.yml b/.github/workflows/client.yml index de83060742..e7659c8bf3 100644 --- a/.github/workflows/client.yml +++ b/.github/workflows/client.yml @@ -138,7 +138,7 @@ jobs: --env APPSMITH_REDIS_URL=redis://localhost:6379 \ --env APPSMITH_ENCRYPTION_PASSWORD=password \ --env APPSMITH_ENCRYPTION_SALT=salt \ - appsmith/appsmith-server:latest + appsmith/appsmith-server:release - name: Installing Yarn serve run: | diff --git a/app/client/README.md b/app/client/README.md index dbbdec4dc2..b795585608 100755 --- a/app/client/README.md +++ b/app/client/README.md @@ -80,4 +80,6 @@ This section has moved here: https://facebook.github.io/create-react-app/docs/de This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify +### Cypress tests via Github Actions +The cypress tests run via Github actions pull the `release` Docker image of the server to run as a service locally. This is to ensure that we don't face any network flakiness during tests. \ No newline at end of file diff --git a/app/server/appsmith-server/src/main/java/com/appsmith/server/services/PluginServiceImpl.java b/app/server/appsmith-server/src/main/java/com/appsmith/server/services/PluginServiceImpl.java index 8e33e15764..47e421d18f 100644 --- a/app/server/appsmith-server/src/main/java/com/appsmith/server/services/PluginServiceImpl.java +++ b/app/server/appsmith-server/src/main/java/com/appsmith/server/services/PluginServiceImpl.java @@ -308,7 +308,7 @@ public class PluginServiceImpl extends BaseService resourceMono = Mono.zip(formMono, editorMono) @@ -391,7 +391,7 @@ public class PluginServiceImpl extends BaseService formConfig = pluginSpy.getFormConfig("random-plugin-id"); + StepVerifier.create(formConfig) + .expectError(AppsmithException.class) + .verify(); + } + + // The editor form config is not mandatory for plugins. The function should return successfully even if it's not present + @Test + public void getPluginFormWithNullEditorConfig() { + PluginService pluginSpy = Mockito.spy(pluginService); + + Map formMap = new HashMap(); + formMap.put("form", new Object()); + + Mockito.when(pluginSpy.loadPluginResource(Mockito.anyString(), eq("form.json"))) + .thenReturn(Mono.just(formMap)); + Mockito.when(pluginSpy.loadPluginResource(Mockito.anyString(), eq("editor.json"))) + .thenReturn(Mono.error(new AppsmithException(AppsmithError.PLUGIN_LOAD_FORM_JSON_FAIL))); + + Mono formConfig = pluginSpy.getFormConfig("random-plugin-id"); + StepVerifier.create(formConfig) + .assertNext(form -> { + assertThat(form).isNotNull(); + assertThat(form.get("form")).isNotNull(); + assertThat(form.get("editor")).isNull(); + }) + .verifyComplete(); + } }