🔴 HIGH - Core eForm creation functionality
Migrate eForm Visual Editor creation test to Cypress. This complements the already-migrated edit functionality to provide complete coverage of the visual editor.
-
eform-visual-editor.create-eform.spec.ts- Creating eForms from scratch ✅ MIGRATED
- wdio tests:
eform-client/e2e/Tests/eform-visual-editor/ - Target location:
eform-client/cypress/e2e/j/(with other visual editor tests)
✅ eform-visual-editor.edit-eform.spec.ts - In cypress/e2e/j/
✅ eform-visual-editor.edit-xml.spec.ts - In cypress/e2e/j/
✅ eform-visual-editor.multi-language.spec.ts - In cypress/e2e/j/
- Should navigate to visual editor
- Should create new eForm from scratch
- Should add eForm title/name
- Should add fields (text, number, picture, etc.)
- Should add field groups
- Should add validation rules
- Should save new eForm
- Should verify eForm appears in my eForms list
- Should be able to edit newly created eForm
- Existing: Visual editor page objects may already exist from edit tests
- Action: Reuse/extend existing page objects for create scenarios
- Navigate to eForm Visual Editor
- Start new eForm creation
- Set eForm basic properties (title, description)
- Add various field types:
- Text input
- Number input
- Date/Time
- Picture/Photo
- Signature
- CheckBox
- Select/Dropdown
- Configure field properties
- Add field groups/sections
- Set validation rules
- Preview eForm (if available)
- Save eForm
- Verify in eForm list
- Test file migrated to Cypress
- Tests follow existing Cypress patterns in j/ folder
- Reuse existing visual editor page objects
- Complete create workflow tested
- Multiple field types tested
- Validation rules tested
- Tests pass locally
- Tests pass in CI/CD pipeline
- Created eForms properly cleaned up
- Reference existing edit tests in
cypress/e2e/j/for patterns - Use
cy.intercept()for visual editor API calls - Use existing helpers like
selectValueInNgSelectorNoSelector()fromhelper-functions.ts - Ensure consistent test data naming with UUID/GUID
- Clean up created eForms in
afterEachhooks - May need longer timeouts for complex eForm saves
// From eform-visual-editor.edit-eform.spec.cy.ts
cy.intercept('GET', '**/api/tags/index').as('getTags');
cy.get('#eformsVisualEditor').click();
cy.wait('@getTags', { timeout: 60000 });
// Adding fields
cy.get('#initialFieldCreateBtn').click();
cy.get('#fieldTypeSelector input').clear().type('text');
selectValueInNgSelectorNoSelector('Text');
cy.get('#fieldNameTranslation_0').clear().type('Field Name');
cy.get('#changeFieldSaveBtn').click();
// Saving eForm
cy.intercept('POST', '**/api/template-visual-editor/').as('saveeForm');
cy.get('#saveCreateEformBtn').click();
cy.wait('@saveeForm', { timeout: 60000 });Based on common eForm fields:
- Text (short and long)
- Number/Numeric
- Date
- Time
- DateTime
- Picture/Photo
- Signature
- CheckBox
- Select List
- Multi-Select
- Save Button
- Comment
- Login functionality (already available in Cypress)
- Visual editor navigation
- Existing edit test patterns (reference)
- Helper functions from
cypress/e2e/helper-functions.ts
Medium (3-4 hours) - Can leverage existing patterns from edit tests
- Existing tests:
cypress/e2e/j/eform-visual-editor.edit-eform.spec.cy.ts - Helper functions:
cypress/e2e/helper-functions.ts - Full Migration Plan
- Testing Documentation
Before closing this issue:
- Test file passing
- Create workflow complete
- Multiple field types tested
- eForm saved successfully
- eForm appears in list
- Can edit created eForm
- Test eForms cleaned up
- Tests are deterministic
- No test data leakage
- Code reviewed
- Consistent with edit test patterns
- Update
WDIO_TO_CYPRESS_MIGRATION.mdprogress tracking