34c551d9a5
* fix: merge conflict * fix: restored missing set_gst_state_and_state_number function * fix: style linting as per codacy * fix: Fixes related to customer/lead merging * fix: merge conflict * fix: Fixes related to customer/lead merging * fix: Assign isue/opportunity to user * fix: Assign isue/opportunity to user * fix: Replaced Invoice type by GST Category * fix: merge conflict * fix: merge conflict * fix: test cases * fix: test cases
32 lines
1.2 KiB
JavaScript
32 lines
1.2 KiB
JavaScript
context('Form', () => {
|
|
before(() => {
|
|
cy.login('Administrator', 'qwe');
|
|
cy.visit('/desk');
|
|
});
|
|
|
|
it('create a new opportunity', () => {
|
|
cy.visit('/desk#Form/Opportunity/New Opportunity 1');
|
|
cy.get('.page-title').should('contain', 'Not Saved');
|
|
cy.fill_field('opportunity_from', 'Customer', 'Select');
|
|
cy.fill_field('party_name', 'Test Customer', 'Link').blur();
|
|
cy.get('.primary-action').click();
|
|
cy.get('.page-title').should('contain', 'Open');
|
|
cy.get('.form-inner-toolbar button:contains("Lost")').click({ force: true });
|
|
cy.get('.modal input[data-fieldname="lost_reason"]').as('input');
|
|
cy.get('@input').focus().type('Higher', { delay: 200 });
|
|
cy.get('.modal .awesomplete ul')
|
|
.should('be.visible')
|
|
.get('li:contains("Higher Price")')
|
|
.click({ force: true });
|
|
cy.get('@input').focus().type('No Followup', { delay: 200 });
|
|
cy.get('.modal .awesomplete ul')
|
|
.should('be.visible')
|
|
.get('li:contains("No Followup")')
|
|
.click();
|
|
|
|
cy.fill_field('detailed_reason', 'Test Detailed Reason', 'Text');
|
|
cy.get('.modal button:contains("Declare Lost")').click({ force: true });
|
|
cy.get('.page-title').should('contain', 'Lost');
|
|
});
|
|
});
|