Bugfix Ticket #1041 & #1039 Validations inside a loop (for 4.1)#1070
Merged
caleeli merged 13 commits into4.1-developfrom Oct 11, 2021
Merged
Bugfix Ticket #1041 & #1039 Validations inside a loop (for 4.1)#1070caleeli merged 13 commits into4.1-developfrom
caleeli merged 13 commits into4.1-developfrom
Conversation
…ker/screen-builder into bugfix/ticket-1039-4.1
caleeli
requested changes
Oct 7, 2021
|
|
||
| function shouldHaveValidationErrors() | ||
| { | ||
| cy.get('[data-cy=preview-content] [data-cy="screen-field-submit"]') |
Collaborator
There was a problem hiding this comment.
Suggested change
| cy.get('[data-cy=preview-content] [data-cy="screen-field-submit"]') | |
| cy.get('#preview .form-group.form-group--error:visible') |
| function shouldHaveValidationErrors() | ||
| { | ||
| cy.get('[data-cy=preview-content] [data-cy="screen-field-submit"]') | ||
| .should('contain.html', 'alert alert-danger'); |
Collaborator
There was a problem hiding this comment.
Suggested change
| .should('contain.html', 'alert alert-danger'); | |
| .should('have.length.greaterThan', 0); |
Collaborator
There was a problem hiding this comment.
Since the 4.1 version does not show the invalid fields, chance this test to check if the form has invalid fields
|
|
||
| function submitForm() | ||
| { | ||
| cy.get('[data-cy=preview-content] [data-cy="screen-field-submit"]') |
Collaborator
There was a problem hiding this comment.
Suggested change
| cy.get('[data-cy=preview-content] [data-cy="screen-field-submit"]') | |
| cy.get('#preview .form-group.form-group--error:visible') |
| function submitForm() | ||
| { | ||
| cy.get('[data-cy=preview-content] [data-cy="screen-field-submit"]') | ||
| .should('not.contain.html', 'alert alert-danger'); |
Collaborator
There was a problem hiding this comment.
Suggested change
| .should('not.contain.html', 'alert alert-danger'); | |
| .should('have.length', 0); |
Collaborator
There was a problem hiding this comment.
Since the 4.1 version does not show the invalid fields, chance this test to check if the form has invalid fields
caleeli
reviewed
Oct 11, 2021
src/mixins/Json2Vue.js
Outdated
| // Asynchronous loading of validations | ||
| const validations = {}; | ||
| ValidationsFactory(definition, { screen: definition, firstPage }).addValidations(validations).then(() => { | ||
| ValidationsFactory(definition, { screen: definition, firstPage, data: this.vdata }).addValidations(validations).then(() => { |
Collaborator
There was a problem hiding this comment.
Suggested change
| ValidationsFactory(definition, { screen: definition, firstPage, data: this.vdata }).addValidations(validations).then(() => { | |
| ValidationsFactory(definition, { screen: definition, firstPage, data: {_parent: this._parent, ...this.vdata} }).addValidations(validations).then(() => { |
caleeli
approved these changes
Oct 11, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Problem:
Tickets:
Changes: