This commit is contained in:
@@ -49,6 +49,11 @@ CURRENT TODOs
|
||||
|
||||
@@@@@@@@@@@ ROADMAP STAGE 2:
|
||||
|
||||
todo: change all testing data-cy attributes to conditional see ay-customize for example
|
||||
- :data-cy="!!enableCypress ? item.key : false"
|
||||
- Really need at this point a way to not have to add a fucking data property to *every* fucking form but rather a central location available to all vue from main or window
|
||||
- dig into that and see if it's possible again and how to do it because then all forms could be simplified a great deal.
|
||||
|
||||
todo: add tests for the following:
|
||||
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
<template v-for="item in obj">
|
||||
<v-col :key="item.key" cols="12" sm="6" lg="4" xl="3" px-2>
|
||||
<v-card>
|
||||
<v-card :data-cy="!!enableCypress ? item.key : false">
|
||||
<v-card-title>
|
||||
{{ item.title }}
|
||||
</v-card-title>
|
||||
@@ -112,6 +112,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
enableCypress: true,
|
||||
obj: [],
|
||||
concurrencyToken: undefined,
|
||||
formCustomTemplateKey: this.$route.params.formCustomTemplateKey,
|
||||
@@ -330,6 +331,9 @@ function initForm(vm) {
|
||||
// Ensures UI translated text is available
|
||||
//
|
||||
function fetchTranslatedText(vm) {
|
||||
//NOTE: This form expects to arrive here from the form being customized
|
||||
//so it does *not* attempt to fetch the translations for the field names of the form in question
|
||||
//since they should already be set by that form.
|
||||
let tKeysRequired = [
|
||||
"FormFieldEntryRequired",
|
||||
"FormFieldVisible",
|
||||
|
||||
25
ayanova/tests/e2e/specs/customize-form.js
Normal file
25
ayanova/tests/e2e/specs/customize-form.js
Normal file
@@ -0,0 +1,25 @@
|
||||
// https://docs.cypress.io/api/introduction/api.html
|
||||
|
||||
describe("CUSTOMIZE", () => {
|
||||
it("Loads from edit form", () => {
|
||||
cy.visit("/login");
|
||||
|
||||
cy.get("input[name=username]")
|
||||
.clear()
|
||||
.type(Cypress.env("adminusername"));
|
||||
|
||||
// {enter} causes the form to submit
|
||||
cy.get("input[name=password]")
|
||||
.clear()
|
||||
.type(`${Cypress.env("adminpassword")}{enter}`);
|
||||
cy.url().should("include", "/home-dashboard");
|
||||
|
||||
cy.visit("/widgets/0");
|
||||
cy.url().should("include", "/widgets/0");
|
||||
cy.wait(100);
|
||||
cy.get("[data-cy=contextmenu]").click();
|
||||
cy.get('[data-cy="app:customize"]').click();
|
||||
cy.url().should("include", "/customize/Widget");
|
||||
cy.get("[data-cy=WidgetCustom8]").scrollIntoView();
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user