Extract and set form values through the DOM—no frameworks required! https://github.com/TheoryOfNekomata/formxtra
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

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. })