Improved notification checking, improved reconciliation tests to improve flakiness rate (#4041)
This commit is contained in:
parent
aba5f7ff10
commit
423715d3ca
@ -16,7 +16,7 @@ const fixture = [
|
|||||||
*/
|
*/
|
||||||
const addReconciliationService = () => {
|
const addReconciliationService = () => {
|
||||||
cy.get('.recon-dialog-service-list', { log: false }).then(($list) => {
|
cy.get('.recon-dialog-service-list', { log: false }).then(($list) => {
|
||||||
if ($list.find('.recon-dialog-service-selector').length > 1) {
|
if ($list.find('.recon-dialog-service-selector').length > 0) {
|
||||||
// cy.get('.recon-dialog-service-selector-remove').click({ multiple: true });
|
// cy.get('.recon-dialog-service-selector-remove').click({ multiple: true });
|
||||||
|
|
||||||
cy.get('.recon-dialog-service-selector', { log: false }).each(($btn) => {
|
cy.get('.recon-dialog-service-selector', { log: false }).each(($btn) => {
|
||||||
@ -27,6 +27,8 @@ const addReconciliationService = () => {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
// Checking that the list is empty ensure the deletion of all previous services is completed
|
||||||
|
cy.get('.recon-dialog-service-list', { log: false }).should('be.empty');
|
||||||
|
|
||||||
cy.get('.dialog-container button', { log: false })
|
cy.get('.dialog-container button', { log: false })
|
||||||
.contains('Add Standard Service...', { log: false })
|
.contains('Add Standard Service...', { log: false })
|
||||||
@ -39,6 +41,9 @@ const addReconciliationService = () => {
|
|||||||
.contains('Add Service', { log: false })
|
.contains('Add Service', { log: false })
|
||||||
.click({ log: false });
|
.click({ log: false });
|
||||||
|
|
||||||
|
// Checking that the list have only one service ensures that the services has been added
|
||||||
|
cy.get('.recon-dialog-service-selector', { log: false }).should('have.length', 1);
|
||||||
|
|
||||||
cy.get('.recon-dialog-service-selector:last-child').should(
|
cy.get('.recon-dialog-service-selector:last-child').should(
|
||||||
'to.contain',
|
'to.contain',
|
||||||
'CSV Reconciliation service'
|
'CSV Reconciliation service'
|
||||||
@ -56,6 +61,7 @@ describe('Base reconciliation tests', () => {
|
|||||||
cy.loadAndVisitProject(fixture);
|
cy.loadAndVisitProject(fixture);
|
||||||
cy.columnActionClick('species', ['Reconcile', 'Start reconciling']);
|
cy.columnActionClick('species', ['Reconcile', 'Start reconciling']);
|
||||||
addReconciliationService();
|
addReconciliationService();
|
||||||
|
cy.get('.recon-dialog-service-panel.recon-dialog-standard-service-panel').should('be.visible');
|
||||||
cy.get('.dialog-header').should('to.contain', 'Reconcile column "species"');
|
cy.get('.dialog-header').should('to.contain', 'Reconcile column "species"');
|
||||||
cy.get('.dialog-body').should(
|
cy.get('.dialog-body').should(
|
||||||
'to.contain',
|
'to.contain',
|
||||||
@ -76,6 +82,8 @@ describe('Base reconciliation tests', () => {
|
|||||||
cy.columnActionClick('species', ['Reconcile', 'Start reconciling']);
|
cy.columnActionClick('species', ['Reconcile', 'Start reconciling']);
|
||||||
addReconciliationService();
|
addReconciliationService();
|
||||||
|
|
||||||
|
cy.get('.recon-dialog-service-panel.recon-dialog-standard-service-panel').should('be.visible');
|
||||||
|
|
||||||
cy.get('.dialog-container span')
|
cy.get('.dialog-container span')
|
||||||
.contains('Auto-match')
|
.contains('Auto-match')
|
||||||
.siblings('input')
|
.siblings('input')
|
||||||
@ -95,6 +103,7 @@ describe('Base reconciliation tests', () => {
|
|||||||
cy.loadAndVisitProject(fixture);
|
cy.loadAndVisitProject(fixture);
|
||||||
cy.columnActionClick('species', ['Reconcile', 'Start reconciling']);
|
cy.columnActionClick('species', ['Reconcile', 'Start reconciling']);
|
||||||
addReconciliationService();
|
addReconciliationService();
|
||||||
|
cy.get('.recon-dialog-service-panel.recon-dialog-standard-service-panel').should('be.visible');
|
||||||
|
|
||||||
cy.get('.dialog-container span')
|
cy.get('.dialog-container span')
|
||||||
.contains('Auto-match')
|
.contains('Auto-match')
|
||||||
@ -118,6 +127,7 @@ describe('Base reconciliation tests', () => {
|
|||||||
cy.loadAndVisitProject(fixture);
|
cy.loadAndVisitProject(fixture);
|
||||||
cy.columnActionClick('species', ['Reconcile', 'Start reconciling']);
|
cy.columnActionClick('species', ['Reconcile', 'Start reconciling']);
|
||||||
addReconciliationService();
|
addReconciliationService();
|
||||||
|
cy.get('.recon-dialog-service-panel.recon-dialog-standard-service-panel').should('be.visible');
|
||||||
cy.get('.dialog-container input[bind="maxCandidates"]').type(2);
|
cy.get('.dialog-container input[bind="maxCandidates"]').type(2);
|
||||||
cy.get('.dialog-container button').contains('Start Reconciling...').click();
|
cy.get('.dialog-container button').contains('Start Reconciling...').click();
|
||||||
cy.assertColumnIsReconciled('species');
|
cy.assertColumnIsReconciled('species');
|
||||||
|
@ -349,6 +349,7 @@ Cypress.Commands.add(
|
|||||||
);
|
);
|
||||||
|
|
||||||
Cypress.Commands.add('assertNotificationContainingText', (text) => {
|
Cypress.Commands.add('assertNotificationContainingText', (text) => {
|
||||||
|
cy.get('#notification-container');
|
||||||
cy.get('#notification').should('be.visible').should('to.contain', text);
|
cy.get('#notification').should('be.visible').should('to.contain', text);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user