From 74031b3302fabe60de3a1186a44a15a740350237 Mon Sep 17 00:00:00 2001 From: Raju Udava <86527202+dstala@users.noreply.github.com> Date: Sat, 8 Oct 2022 17:11:39 +0530 Subject: [PATCH 1/2] test: survey form Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> --- .../form/[viewId]/index/survey.vue | 38 +++- .../integration/common/4i_survey_form.js | 191 ++++++++++++++++++ .../cypress/integration/test/pg-restViews.js | 2 + scripts/cypress/integration/test/restViews.js | 2 + .../integration/test/xcdb-restViews.js | 2 + scripts/cypress/support/commands.js | 3 +- 6 files changed, 227 insertions(+), 11 deletions(-) create mode 100644 scripts/cypress/integration/common/4i_survey_form.js diff --git a/packages/nc-gui/pages/[projectType]/form/[viewId]/index/survey.vue b/packages/nc-gui/pages/[projectType]/form/[viewId]/index/survey.vue index 5d31023b30..3efa85dc85 100644 --- a/packages/nc-gui/pages/[projectType]/form/[viewId]/index/survey.vue +++ b/packages/nc-gui/pages/[projectType]/form/[viewId]/index/survey.vue @@ -158,11 +158,12 @@ onMounted(() => { class="max-w-[max(33%,600px)] mx-auto flex flex-col justify-end" >
-

{{ sharedFormView.heading }}

+

{{ sharedFormView.heading }}

{{ sharedFormView?.subheading }}

@@ -197,7 +198,7 @@ onMounted(() => { @@ -205,7 +206,7 @@ onMounted(() => { v-else v-model="formState[field.title]" class="nc-input" - :class="`nc-form-input-${field.title.replaceAll(' ', '')}`" + :data-cy="`nc-survey-form__input-${field.title.replaceAll(' ', '')}`" :column="field" :edit-enabled="true" /> @@ -215,7 +216,7 @@ onMounted(() => { {{ error.$message }}
-
+
{{ field.description }}
@@ -225,7 +226,12 @@ onMounted(() => {
-
@@ -238,6 +244,7 @@ onMounted(() => { > +
@@ -292,7 +306,7 @@ onMounted(() => { @@ -304,7 +318,11 @@ onMounted(() => { class="color-transition shadow-sm absolute bottom-18 right-1/2 transform translate-x-[50%] md:bottom-4 md:(right-12 transform-none) flex items-center bg-white border dark:bg-slate-500 rounded divide-x-1" > - @@ -314,7 +332,7 @@ onMounted(() => { :mouse-enter-delay="0.25" :mouse-leave-delay="0" > -