-
Notifications
You must be signed in to change notification settings - Fork 2
Structure tests
Lydia Gray edited this page Apr 26, 2022
·
15 revisions
-
cdintotests/structure-tests - Run
npm iornpm install - In a separate terminal, run formbuilder with
dotnet run- You can run formbuilder in IIS through Visual Studio, if you do you need to change the
baseUrlvalue incypress.json
- You can run formbuilder in IIS through Visual Studio, if you do you need to change the
- Run
npm run start. This should open a browser with the list of Cypress tests
- To run all the tests, click on
Run ** integration specsin the upper right hand corner - Each test will run and show you pass/fail information
- If your test returns a 500 when navigating to the form page, it's likely there is a Property missing from the form json or your BaseUrl Property does not match your test url
- The snapshot is different
- Before you generate a new snapshot, make sure that the DOM structure change is expected behaviour
- Add your test json to the main
dslfolder in formbuilder, and make sure it's prefixed withui-so it doesn't get included in the git ignore - Create a new folder in the
integrationfolder, and inside that create anindex.jsfile - In the
index.jsfile you write your tests-
describeis the name of the group of tests, this should be the name of the Component being tested and the same as the name of the folder -
itis the name of the test, this should be descriptive of the configuration or page of the Component being tested
-
- Run the test and this should update the
snapshot.jsfile with the current DOM
- Once you are sure that a
snapshot.jsshould be updated, remove the key value pair (eg "1": "\n <fieldset aria-describedby=...") from the corresponding snapshot test DOM in the basesnapshot.js - Run the test and this should update the
snapshot.jsfile with the new DOM
- Availability
- Actions
- Behaviours
- Breadcrumbs
-
Conditions
- String Conditions
- Date Conditions
- Integer Conditions
- File Upload Conditions
- Custom validation
-
Elements
- AddAnother
- Address
- Button
- Booking
- Checkbox
- Date Input
- Date Picker
- Declaration
- Document Download
- Document Upload
- File Upload
- H1-H6
- HR
- Image
- Inline Alert
- Link
- Map
- Multiple File Upload
- OrderedList
- Organisation
- P
- Radio
- Select
- Street
- Summary
- Success page
- Textarea
- Textbox
- Time input
- Unordered List
- Uploaded files summary
- Warning
- EnabledFor
- Feedback form
- File uploads
- Form Schema
- Header
- Inbound Values
- Integrating with PowerAutomate/0365
- Lookup
- Page
- Payment & Payment calculations
- Preview data structure
- Render conditions
- Reusable elements
- Structure tests
- Success page
- Tag parsers
- Target mapping
- Validators