diff --git a/packages/ncform-e2e/ncform/cypress/integration/examples/ui.placeholder.spec.js b/packages/ncform-e2e/ncform/cypress/integration/examples/ui.placeholder.spec.js new file mode 100644 index 0000000..5e729aa --- /dev/null +++ b/packages/ncform-e2e/ncform/cypress/integration/examples/ui.placeholder.spec.js @@ -0,0 +1,24 @@ +/// + +const md5 = require('blueimp-md5'); + +context('ui.placeholder', () => { + + before(() => { + cy.visit('http://localhost:3000/examples/components/vue-ncform/_ui.placeholder.html') + }) + + it('Display placeholder: text / dx', () => { + let id = md5('Display placeholder: text / dx'); + cy.get(`[data-cy=${id}]`).within(() => { + cy.get('label').contains('firstname').next().find('input').then($input => { + cy.wrap($input.attr('placeholder')).should('equal', 'fill your firstname'); + cy.wrap($input).type('daniel'); + }); + cy.get('label').contains('lastname').next().find('input').then($input => { + cy.wrap($input.attr('placeholder')).should('equal', 'your firstname: daniel'); + }); + }) + }) + +}) diff --git a/packages/ncform/examples/components/vue-ncform/_ui.placeholder.html b/packages/ncform/examples/components/vue-ncform/_ui.placeholder.html new file mode 100644 index 0000000..76210d8 --- /dev/null +++ b/packages/ncform/examples/components/vue-ncform/_ui.placeholder.html @@ -0,0 +1,80 @@ + + + + + vue-ncform Example + + + + + +
+ +
+ + + + + + + +