Extract and set form values through the DOM—no frameworks required! https://github.com/TheoryOfNekomata/formxtra
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

blank.test.ts 594 B

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