Extract and set form values through the DOM—no frameworks required! https://github.com/TheoryOfNekomata/formxtra
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

19 lines
522 B

  1. import getFormValues from '../../src'
  2. import * as utils from '../../test/utils'
  3. describe('blank template', () => {
  4. beforeEach(utils.setup('blank'))
  5. it('should have blank form value', () => {
  6. utils.test(
  7. (cy: any) => cy.get('[type="submit"]'),
  8. (form: HTMLFormElement, submitter: any, search: any) => {
  9. const before = utils.makeSearchParams(getFormValues(form, {submitter})).toString();
  10. const after = utils.makeSearchParams(search).toString();
  11. expect(before).toEqual(after);
  12. },
  13. {}
  14. );
  15. });
  16. })