2024-10-11 13:46:30 +00:00
|
|
|
/// <reference types="cypress" />
|
2024-10-16 07:21:57 +00:00
|
|
|
describe('Client basic data', () => {
|
2024-10-11 13:46:30 +00:00
|
|
|
beforeEach(() => {
|
|
|
|
cy.viewport(1280, 720);
|
|
|
|
cy.login('developer');
|
2024-11-22 09:16:56 +00:00
|
|
|
cy.visit('#/customer/1102/basic-data');
|
2024-10-11 13:46:30 +00:00
|
|
|
});
|
|
|
|
it('Should load layout', () => {
|
|
|
|
cy.get('.q-card').should('be.visible');
|
2024-11-22 09:48:03 +00:00
|
|
|
cy.dataCy('customerPhone').filter('input').should('be.visible');
|
|
|
|
cy.dataCy('customerPhone').filter('input').type('123456789');
|
2024-11-22 09:16:56 +00:00
|
|
|
cy.get('.q-btn-group > .q-btn--standard').click();
|
|
|
|
cy.intercept('PATCH', '/api/Clients/1102', (req) => {
|
|
|
|
const { body } = req;
|
|
|
|
cy.wrap(body).should('have.property', 'phone', '123456789');
|
|
|
|
});
|
|
|
|
cy.get('.q-notification__message').should('have.text', 'Data saved');
|
2024-10-11 13:46:30 +00:00
|
|
|
});
|
|
|
|
});
|