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.

datetime_field_form_validation.js 664 B

4 years ago
12345678910111213141516171819
  1. context('Datetime Field Validation', () => {
  2. before(() => {
  3. cy.login();
  4. cy.visit('/app/communication');
  5. cy.window().its('frappe').then(frappe => {
  6. frappe.call("frappe.tests.ui_test_helpers.create_communication_records");
  7. });
  8. });
  9. // validating datetime field value when value is set from backend and get validated on form load.
  10. it('datetime field form validation', () => {
  11. cy.visit('/app/communication');
  12. cy.get('a[title="Test Form Communication 1"]').invoke('attr', 'data-name')
  13. .then((name) => {
  14. cy.visit(`/app/communication/${name}`);
  15. cy.get('.indicator-pill').should('contain', 'Open').should('have.class', 'red');
  16. });
  17. });
  18. });