Extract and set form values through the DOM—no frameworks required! https://github.com/TheoryOfNekomata/formxtra
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.

blank.test.ts 522 B

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