test: fixed flaky test for form, timeline_email
This commit is contained in:
parent
ff6f4c93c3
commit
d558f16e71
3 changed files with 10 additions and 3 deletions
|
|
@ -27,7 +27,7 @@ context('Form', () => {
|
|||
|
||||
cy.clear_filters();
|
||||
cy.get('.standard-filter-section [data-fieldname="name"] input').type('Test Form Contact 3').blur();
|
||||
cy.click_listview_row_item(0);
|
||||
cy.click_listview_row_item_with_text('Test Form Contact 3');
|
||||
|
||||
cy.get('#page-Contact .page-head').findByTitle('Test Form Contact 3').should('exist');
|
||||
cy.get('.prev-doc').should('be.visible').click();
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ context('Timeline Email', () => {
|
|||
|
||||
it('Adding email and verifying timeline content for email attachment', () => {
|
||||
cy.visit('/app/todo');
|
||||
cy.get('.list-row > .level-left > .list-subject').eq(0).click();
|
||||
cy.click_listview_row_item_with_text('Test ToDo');
|
||||
|
||||
//Creating a new email
|
||||
cy.get('.timeline-actions > .timeline-item > .action-buttons > .action-btn').click();
|
||||
|
|
@ -47,7 +47,7 @@ context('Timeline Email', () => {
|
|||
|
||||
it('Deleting attachment and ToDo', () => {
|
||||
cy.visit('/app/todo');
|
||||
cy.get('.list-row > .level-left > .list-subject > .level-item.ellipsis > .ellipsis').eq(0).click();
|
||||
cy.click_listview_row_item_with_text('Test ToDo');
|
||||
|
||||
//Removing the added attachment
|
||||
cy.get('.attachment-row > .data-pill > .remove-btn > .icon').click();
|
||||
|
|
|
|||
|
|
@ -352,6 +352,13 @@ Cypress.Commands.add('click_listview_row_item', (row_no) => {
|
|||
cy.get('.list-row > .level-left > .list-subject > .level-item > .ellipsis').eq(row_no).click({force: true});
|
||||
});
|
||||
|
||||
Cypress.Commands.add('click_listview_row_item_with_text', (text) => {
|
||||
cy.get('.list-row > .level-left > .list-subject > .level-item > .ellipsis')
|
||||
.contains(text)
|
||||
.first()
|
||||
.click({force: true});
|
||||
});
|
||||
|
||||
Cypress.Commands.add('click_filter_button', () => {
|
||||
cy.get('.filter-selector > .btn').click();
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue