From 38633c1fef065d2f763ce52c8d504f09a8d65d88 Mon Sep 17 00:00:00 2001 From: Carlos Jimenez <=> Date: Mon, 17 Sep 2018 10:50:15 +0200 Subject: [PATCH] #639 Refacto e2e waitForSnackbar + error corrections --- .../client-module/01_create_client.spec.js | 16 +++++----- .../client-module/02_edit_basic_data.spec.js | 4 +-- .../client-module/03_edit_fiscal_data.spec.js | 12 +++---- .../client-module/04_edit_pay_method.spec.js | 4 +-- .../client-module/05_add_address.spec.js | 12 +++---- .../06_add_address_notes.spec.js | 12 +++---- .../client-module/07_edit_web_access.spec.js | 4 +-- e2e/paths/client-module/08_add_notes.spec.js | 4 +-- e2e/paths/client-module/09_add_credit.spec.js | 4 +-- e2e/paths/client-module/10_add_greuge.spec.js | 8 ++--- .../12_lock_of_verified_data.spec.js | 32 +++++++++---------- .../02_edit_item_basic_data.spec.js | 4 +-- .../item-module/03_edit_item_tax.spec.js | 4 +-- .../item-module/04_create_item_tags.spec.js | 4 +-- .../item-module/05_create_item_niche.spec.js | 4 +-- .../06_create_item_botanical.spec.js | 8 ++--- .../07_create_item_barcode.spec.js | 4 +-- .../08_item_create_and_clone.spec.js | 4 +-- .../01_create_ticket_observations.spec.js | 4 +-- .../05_create_new_tracking_state.spec.js | 12 +++---- 20 files changed, 80 insertions(+), 80 deletions(-) diff --git a/e2e/paths/client-module/01_create_client.spec.js b/e2e/paths/client-module/01_create_client.spec.js index 742614341..012a9952d 100644 --- a/e2e/paths/client-module/01_create_client.spec.js +++ b/e2e/paths/client-module/01_create_client.spec.js @@ -65,9 +65,9 @@ describe('Client', () => { it('should receive an error when clicking the create button having all the form fields empty', () => { return nightmare .click(selectors.createClientView.createButton) - .waitForSnackbar() + .waitForLastSnackbar() .then(result => { - expect(result).toEqual(jasmine.arrayContaining(['Some fields are invalid'])); + expect(result).toEqual('Some fields are invalid'); }); }); @@ -79,9 +79,9 @@ describe('Client', () => { .waitToClick(selectors.createClientView.salesPersonInput) .waitToClick(selectors.createClientView.salesBruceBannerOption) .click(selectors.createClientView.createButton) - .waitForSnackbar() + .waitForLastSnackbar() .then(result => { - expect(result).toEqual(jasmine.arrayContaining(['Some fields are invalid'])); + expect(result).toEqual('Some fields are invalid'); }); }); @@ -92,9 +92,9 @@ describe('Client', () => { .clearInput(selectors.createClientView.email) .type(selectors.createClientView.email, 'incorrect email format') .click(selectors.createClientView.createButton) - .waitForSnackbar() + .waitForLastSnackbar() .then(result => { - expect(result).toEqual(jasmine.arrayContaining(['Some fields are invalid'])); + expect(result).toEqual('Some fields are invalid'); }); }); @@ -103,9 +103,9 @@ describe('Client', () => { .clearInput(selectors.createClientView.email) .type(selectors.createClientView.email, 'caroldanvers@verdnatura.es') .click(selectors.createClientView.createButton) - .waitForSnackbar() + .waitForLastSnackbar() .then(result => { - expect(result).toEqual(jasmine.arrayContaining(['Data saved!'])); + expect(result).toEqual('Data saved!'); }); }); diff --git a/e2e/paths/client-module/02_edit_basic_data.spec.js b/e2e/paths/client-module/02_edit_basic_data.spec.js index 4bee3ea26..30d92fb4c 100644 --- a/e2e/paths/client-module/02_edit_basic_data.spec.js +++ b/e2e/paths/client-module/02_edit_basic_data.spec.js @@ -64,9 +64,9 @@ describe('Client', () => { .waitToClick(selectors.clientBasicData.channelInput) .waitToClick(selectors.clientBasicData.channelMetropolisOption) .click(selectors.clientBasicData.saveButton) - .waitForSnackbar() + .waitForLastSnackbar() .then(result => { - expect(result).toEqual(jasmine.arrayContaining(['Data saved!'])); + expect(result).toEqual('Data saved!'); }); }); diff --git a/e2e/paths/client-module/03_edit_fiscal_data.spec.js b/e2e/paths/client-module/03_edit_fiscal_data.spec.js index a46ab294a..8dc6fc733 100644 --- a/e2e/paths/client-module/03_edit_fiscal_data.spec.js +++ b/e2e/paths/client-module/03_edit_fiscal_data.spec.js @@ -109,18 +109,18 @@ describe('Client Edit fiscalData path', () => { .waitToClick(selectors.clientFiscalData.equalizationTaxCheckboxLabel) .waitToClick(selectors.clientFiscalData.verifiedDataCheckboxInput) .click(selectors.clientFiscalData.saveButton) - .waitForSnackbar() + .waitForLastSnackbar() .then(result => { - expect(result).toEqual(jasmine.arrayContaining(['Data saved!'])); + expect(result).toEqual('Data saved!'); }); }); it('should propagate the Equalization tax', () => { return nightmare .waitToClick(selectors.clientFiscalData.acceptPropagationButton) - .waitForSnackbar() + .waitForLastSnackbar() .then(result => { - expect(result).toEqual(jasmine.arrayContaining(['Equivalent tax spreaded'])); + expect(result).toEqual('Equivalent tax spreaded'); }); }); @@ -315,9 +315,9 @@ describe('Client Edit fiscalData path', () => { .waitToClick(selectors.clientAddresses.firstEditButton) .waitToClick(selectors.clientAddresses.equalizationTaxCheckboxLabel) .click(selectors.clientAddresses.saveButton) - .waitForSnackbar() + .waitForLastSnackbar() .then(result => { - expect(result).toEqual(jasmine.arrayContaining(['Data saved!'])); + expect(result).toEqual('Data saved!'); }); }); diff --git a/e2e/paths/client-module/04_edit_pay_method.spec.js b/e2e/paths/client-module/04_edit_pay_method.spec.js index 1d796e706..3224c162d 100644 --- a/e2e/paths/client-module/04_edit_pay_method.spec.js +++ b/e2e/paths/client-module/04_edit_pay_method.spec.js @@ -58,9 +58,9 @@ describe('Client', () => { .waitToClick(selectors.clientPayMethod.receivedCoreVNLCheckbox) .waitToClick(selectors.clientPayMethod.receivedB2BVNLCheckbox) .waitToClick(selectors.clientPayMethod.saveButton) - .waitForSnackbar() + .waitForLastSnackbar() .then(result => { - expect(result).toEqual(jasmine.arrayContaining(['That payment method requires an IBAN'])); + expect(result).toEqual('That payment method requires an IBAN'); }); }); diff --git a/e2e/paths/client-module/05_add_address.spec.js b/e2e/paths/client-module/05_add_address.spec.js index f773c02d8..e128822d8 100644 --- a/e2e/paths/client-module/05_add_address.spec.js +++ b/e2e/paths/client-module/05_add_address.spec.js @@ -88,9 +88,9 @@ describe('Client', () => { .type(selectors.clientAddresses.phoneInput, '999887744') .type(selectors.clientAddresses.mobileInput, '999887744') .waitToClick(selectors.clientFiscalData.saveButton) - .waitForSnackbar() + .waitForLastSnackbar() .then(result => { - expect(result).toEqual(jasmine.arrayContaining(['Some fields are invalid'])); + expect(result).toEqual('Some fields are invalid'); }); }); @@ -100,9 +100,9 @@ describe('Client', () => { .type(selectors.clientAddresses.streetAddressInput, '320 Park Avenue New York') .type(selectors.clientAddresses.cityInput, 'New York') .click(selectors.clientAddresses.saveButton) - .waitForSnackbar() + .waitForLastSnackbar() .then(result => { - expect(result).toEqual(jasmine.arrayContaining(['Some fields are invalid'])); + expect(result).toEqual('Data saved!'); }); }); @@ -141,9 +141,9 @@ describe('Client', () => { return nightmare .waitToClick(selectors.clientAddresses.activeCheckbox) .waitToClick(selectors.clientAddresses.saveButton) - .waitForSnackbar() + .waitForLastSnackbar() .then(result => { - expect(result).toEqual(jasmine.arrayContaining(['The default consignee can not be unchecked'])); + expect(result).toEqual('The default consignee can not be unchecked'); }); }); }); diff --git a/e2e/paths/client-module/06_add_address_notes.spec.js b/e2e/paths/client-module/06_add_address_notes.spec.js index 1899f61ea..52e5b2062 100644 --- a/e2e/paths/client-module/06_add_address_notes.spec.js +++ b/e2e/paths/client-module/06_add_address_notes.spec.js @@ -62,9 +62,9 @@ describe('Client add address notes path', () => { .wait(selectors.clientAddresses.firstObservationDescriptionInput) .type(selectors.clientAddresses.firstObservationDescriptionInput, 'first description') .waitToClick(selectors.clientAddresses.saveButton) - .waitForSnackbar() + .waitForLastSnackbar() .then(result => { - expect(result).toEqual(jasmine.arrayContaining(['Observation type cannot be blank'])); + expect(result).toEqual('Observation type cannot be blank'); }); }); @@ -74,9 +74,9 @@ describe('Client add address notes path', () => { .waitToClick(selectors.clientAddresses.firstObservationTypeSelect) .waitToClick(selectors.clientAddresses.firstObservationTypeSelectOptionOne) .waitToClick(selectors.clientAddresses.saveButton) - .waitForSnackbar() + .waitForLastSnackbar() .then(result => { - expect(result).toEqual(jasmine.arrayContaining(['Some fields are invalid'])); + expect(result).toEqual('Some fields are invalid'); }); }); @@ -88,9 +88,9 @@ describe('Client add address notes path', () => { .waitToClick(selectors.clientAddresses.secondObservationTypeSelectOptionTwo) .type(selectors.clientAddresses.secondObservationDescriptionInput, 'second description') .waitToClick(selectors.clientAddresses.saveButton) - .waitForSnackbar() + .waitForLastSnackbar() .then(result => { - expect(result).toEqual(jasmine.arrayContaining(['Data saved!'])); + expect(result).toEqual('Data saved!'); }); }); }); diff --git a/e2e/paths/client-module/07_edit_web_access.spec.js b/e2e/paths/client-module/07_edit_web_access.spec.js index 46c30d5e3..24aaf2f1d 100644 --- a/e2e/paths/client-module/07_edit_web_access.spec.js +++ b/e2e/paths/client-module/07_edit_web_access.spec.js @@ -52,9 +52,9 @@ describe('Client', () => { .clearInput(selectors.clientWebAccess.userNameInput) .type(selectors.clientWebAccess.userNameInput, 'Hulk') .waitToClick(selectors.clientWebAccess.saveButton) - .waitForSnackbar() + .waitForLastSnackbar() .then(result => { - expect(result).toEqual(jasmine.arrayContaining(['Data saved!'])); + expect(result).toEqual('Data saved!'); }); }); diff --git a/e2e/paths/client-module/08_add_notes.spec.js b/e2e/paths/client-module/08_add_notes.spec.js index fa19431d4..d09c107fa 100644 --- a/e2e/paths/client-module/08_add_notes.spec.js +++ b/e2e/paths/client-module/08_add_notes.spec.js @@ -60,9 +60,9 @@ describe('Client', () => { return nightmare .type(selectors.clientNotes.noteInput, 'Meeting with Black Widow 21st 9am') .click(selectors.clientNotes.saveButton) - .waitForSnackbar() + .waitForLastSnackbar() .then(result => { - expect(result).toEqual(jasmine.arrayContaining(['Data saved!'])); + expect(result).toEqual('Data saved!'); }); }); diff --git a/e2e/paths/client-module/09_add_credit.spec.js b/e2e/paths/client-module/09_add_credit.spec.js index 358a0305b..1bc1f8dbb 100644 --- a/e2e/paths/client-module/09_add_credit.spec.js +++ b/e2e/paths/client-module/09_add_credit.spec.js @@ -61,9 +61,9 @@ describe('Client', () => { .clearInput(selectors.clientCredit.creditInput) .type(selectors.clientCredit.creditInput, 999) .click(selectors.clientCredit.saveButton) - .waitForSnackbar() + .waitForLastSnackbar() .then(result => { - expect(result).toEqual(jasmine.arrayContaining(['Data saved!'])); + expect(result).toEqual('Data saved!'); }); }); diff --git a/e2e/paths/client-module/10_add_greuge.spec.js b/e2e/paths/client-module/10_add_greuge.spec.js index cc7f827d2..576db1293 100644 --- a/e2e/paths/client-module/10_add_greuge.spec.js +++ b/e2e/paths/client-module/10_add_greuge.spec.js @@ -61,9 +61,9 @@ describe('Client', () => { .waitToClick(selectors.clientGreuge.typeInput) .waitToClick(selectors.clientGreuge.typeSecondOption) .click(selectors.clientGreuge.saveButton) - .waitForSnackbar() + .waitForLastSnackbar() .then(result => { - expect(result).toEqual(jasmine.arrayContaining(['Some fields are invalid'])); + expect(result).toEqual('Some fields are invalid'); }); }); @@ -73,9 +73,9 @@ describe('Client', () => { .waitForTextInInput(selectors.clientGreuge.amountInput, '999') .type(selectors.clientGreuge.descriptionInput, 'new armor for Batman!') .click(selectors.clientGreuge.saveButton) - .waitForSnackbar() + .waitForLastSnackbar() .then(result => { - expect(result).toEqual(jasmine.arrayContaining(['Data saved!'])); + expect(result).toEqual('Data saved!'); }); }); diff --git a/e2e/paths/client-module/12_lock_of_verified_data.spec.js b/e2e/paths/client-module/12_lock_of_verified_data.spec.js index 4c25f0620..19fbf7999 100644 --- a/e2e/paths/client-module/12_lock_of_verified_data.spec.js +++ b/e2e/paths/client-module/12_lock_of_verified_data.spec.js @@ -74,9 +74,9 @@ describe('Client lock verified data path', () => { .clearInput(selectors.clientFiscalData.socialNameInput) .type(selectors.clientFiscalData.socialNameInput, 'salesPerson was here') .click(selectors.clientFiscalData.saveButton) - .waitForSnackbar() + .waitForLastSnackbar() .then(result => { - expect(result).toEqual(jasmine.arrayContaining(['Data saved!'])); + expect(result).toEqual('Data saved!'); }); }); @@ -161,9 +161,9 @@ describe('Client lock verified data path', () => { return nightmare .waitToClick(selectors.clientFiscalData.verifiedDataCheckboxInput) .waitToClick(selectors.clientFiscalData.saveButton) - .waitForSnackbar() + .waitForLastSnackbar() .then(result => { - expect(result).toEqual(jasmine.arrayContaining(['Data saved!'])); + expect(result).toEqual('Data saved!'); }); }); @@ -187,13 +187,13 @@ describe('Client lock verified data path', () => { .clearInput(selectors.clientFiscalData.socialNameInput) .type(selectors.clientFiscalData.socialNameInput, 'administrative was here') .click(selectors.clientFiscalData.saveButton) - .waitForSnackbar() + .waitForLastSnackbar() .then(result => { - expect(result).toEqual(jasmine.arrayContaining(['Data saved!'])); + expect(result).toEqual('Data saved!'); }); }); - it('should confirm the social name have been edited once and for all', () => { + it('should again confirm the social name have been edited', () => { return nightmare .waitToClick(selectors.clientBasicData.basicDataButton) .wait(selectors.clientBasicData.nameInput) @@ -289,7 +289,7 @@ describe('Client lock verified data path', () => { .waitForLogin('salesAssistant'); }); - it('should navigate to clients index', () => { + it('should now navigate to clients index', () => { return nightmare .waitToClick(selectors.globalItems.applicationsMenuButton) .wait(selectors.globalItems.applicationsMenuVisible) @@ -301,7 +301,7 @@ describe('Client lock verified data path', () => { }); }); - it('should search again for the user Petter Parker', () => { + it('should now search again for the user Petter Parker', () => { return nightmare .wait(selectors.clientsIndex.searchResult) .type(selectors.clientsIndex.searchClientInput, 'Petter Parker') @@ -350,9 +350,9 @@ describe('Client lock verified data path', () => { return nightmare .waitToClick(selectors.clientFiscalData.verifiedDataCheckboxInput) .waitToClick(selectors.clientFiscalData.saveButton) - .waitForSnackbar() + .waitForLastSnackbar() .then(result => { - expect(result).toEqual(jasmine.arrayContaining(['Data saved!'])); + expect(result).toEqual('Data saved!'); }); }); @@ -370,19 +370,19 @@ describe('Client lock verified data path', () => { }); }); - it('should again edit the social name', () => { + it('should now edit the social name', () => { return nightmare .wait(selectors.clientFiscalData.socialNameInput) .clearInput(selectors.clientFiscalData.socialNameInput) .type(selectors.clientFiscalData.socialNameInput, 'salesAssistant was here') .click(selectors.clientFiscalData.saveButton) - .waitForSnackbar() + .waitForLastSnackbar() .then(result => { - expect(result).toEqual(jasmine.arrayContaining(['Data saved!'])); + expect(result).toEqual('Data saved!'); }); }); - it('should confirm the social name have been edited once and for all', () => { + it('should now confirm the social name have been edited once and for all', () => { return nightmare .waitToClick(selectors.clientBasicData.basicDataButton) .wait(selectors.clientBasicData.nameInput) @@ -402,7 +402,7 @@ describe('Client lock verified data path', () => { .waitForLogin('salesPerson'); }); - it('should again click on the Clients button of the top bar menu', () => { + it('should now click on the Clients button of the top bar menu', () => { return nightmare .waitToClick(selectors.globalItems.applicationsMenuButton) .wait(selectors.globalItems.applicationsMenuVisible) diff --git a/e2e/paths/item-module/02_edit_item_basic_data.spec.js b/e2e/paths/item-module/02_edit_item_basic_data.spec.js index f0361aa9c..05aa5653e 100644 --- a/e2e/paths/item-module/02_edit_item_basic_data.spec.js +++ b/e2e/paths/item-module/02_edit_item_basic_data.spec.js @@ -61,9 +61,9 @@ describe('Item', () => { .clearInput(selectors.itemBasicData.longNameInput) .type(selectors.itemBasicData.longNameInput, 'RS Rose of Purity') .click(selectors.itemBasicData.submitBasicDataButton) - .waitForSnackbar() + .waitForLastSnackbar() .then(result => { - expect(result).toEqual(jasmine.arrayContaining(['Data saved!'])); + expect(result).toEqual('Data saved!'); }); }); diff --git a/e2e/paths/item-module/03_edit_item_tax.spec.js b/e2e/paths/item-module/03_edit_item_tax.spec.js index 63f66c38d..9faa20795 100644 --- a/e2e/paths/item-module/03_edit_item_tax.spec.js +++ b/e2e/paths/item-module/03_edit_item_tax.spec.js @@ -53,9 +53,9 @@ describe('Item', () => { .waitToClick(selectors.itemTax.thirdClassSelect) .waitToClick(selectors.itemTax.thirdClassSelectOptionTwo) .click(selectors.itemTax.submitTaxButton) - .waitForSnackbar() + .waitForLastSnackbar() .then(result => { - expect(result).toEqual(jasmine.arrayContaining(['Data saved!'])); + expect(result).toEqual('Data saved!'); }); }); diff --git a/e2e/paths/item-module/04_create_item_tags.spec.js b/e2e/paths/item-module/04_create_item_tags.spec.js index 2d03af0c7..51b81c7de 100644 --- a/e2e/paths/item-module/04_create_item_tags.spec.js +++ b/e2e/paths/item-module/04_create_item_tags.spec.js @@ -54,9 +54,9 @@ describe('Item', () => { .clearInput(selectors.itemTags.seventhRelevancyInput) .type(selectors.itemTags.seventhRelevancyInput, '1') .click(selectors.itemTags.submitItemTagsButton) - .waitForSnackbar() + .waitForLastSnackbar() .then(result => { - expect(result).toEqual(jasmine.arrayContaining(['Data saved!'])); + expect(result).toEqual('Data saved!'); }); }); diff --git a/e2e/paths/item-module/05_create_item_niche.spec.js b/e2e/paths/item-module/05_create_item_niche.spec.js index c3a1c04e0..7439824b5 100644 --- a/e2e/paths/item-module/05_create_item_niche.spec.js +++ b/e2e/paths/item-module/05_create_item_niche.spec.js @@ -52,9 +52,9 @@ describe('Item', () => { .waitToClick(selectors.itemNiches.thirdWarehouseSelectFourthOption) .type(selectors.itemNiches.thirdCodeInput, 'A4') .click(selectors.itemNiches.submitNichesButton) - .waitForSnackbar() + .waitForLastSnackbar() .then(result => { - expect(result).toEqual(jasmine.arrayContaining(['Data saved!'])); + expect(result).toEqual('Data saved!'); }); }); diff --git a/e2e/paths/item-module/06_create_item_botanical.spec.js b/e2e/paths/item-module/06_create_item_botanical.spec.js index 1bc3dfa39..3f7aa6fe6 100644 --- a/e2e/paths/item-module/06_create_item_botanical.spec.js +++ b/e2e/paths/item-module/06_create_item_botanical.spec.js @@ -52,9 +52,9 @@ describe('Item', () => { .waitToClick(selectors.itemBotanical.speciesSelect) .waitToClick(selectors.itemBotanical.speciesSelectOptionOne) .waitToClick(selectors.itemBotanical.submitBotanicalButton) - .waitForSnackbar() + .waitForLastSnackbar() .then(result => { - expect(result).toEqual(jasmine.arrayContaining(['Data saved!'])); + expect(result).toEqual('Data saved!'); }); }); @@ -96,9 +96,9 @@ describe('Item', () => { .waitToClick(selectors.itemBotanical.speciesSelect) .waitToClick(selectors.itemBotanical.speciesSelectOptionTwo) .waitToClick(selectors.itemBotanical.submitBotanicalButton) - .waitForSnackbar() + .waitForLastSnackbar() .then(result => { - expect(result).toEqual(jasmine.arrayContaining(['Data saved!'])); + expect(result).toEqual('Data saved!'); }); }); diff --git a/e2e/paths/item-module/07_create_item_barcode.spec.js b/e2e/paths/item-module/07_create_item_barcode.spec.js index 2a15b0dc4..e9e83220f 100644 --- a/e2e/paths/item-module/07_create_item_barcode.spec.js +++ b/e2e/paths/item-module/07_create_item_barcode.spec.js @@ -51,9 +51,9 @@ describe('Item', () => { .wait(selectors.itemBarcodes.thirdCodeInput) .type(selectors.itemBarcodes.thirdCodeInput, '5') .waitToClick(selectors.itemBarcodes.submitBarcodesButton) - .waitForSnackbar() + .waitForLastSnackbar() .then(result => { - expect(result).toEqual(jasmine.arrayContaining(['Data saved!'])); + expect(result).toEqual('Data saved!'); }); }); diff --git a/e2e/paths/item-module/08_item_create_and_clone.spec.js b/e2e/paths/item-module/08_item_create_and_clone.spec.js index b74e65a18..11ed26d61 100644 --- a/e2e/paths/item-module/08_item_create_and_clone.spec.js +++ b/e2e/paths/item-module/08_item_create_and_clone.spec.js @@ -71,9 +71,9 @@ describe('Item', () => { .waitToClick(selectors.itemCreateView.originSelect) .waitToClick(selectors.itemCreateView.originSelectOptionOne) .click(selectors.itemCreateView.createButton) - .waitForSnackbar() + .waitForLastSnackbar() .then(result => { - expect(result).toEqual(jasmine.arrayContaining(['Data saved!'])); + expect(result).toEqual('Data saved!'); }); }); diff --git a/e2e/paths/ticket-module/01_create_ticket_observations.spec.js b/e2e/paths/ticket-module/01_create_ticket_observations.spec.js index a3729102f..fc83fccb1 100644 --- a/e2e/paths/ticket-module/01_create_ticket_observations.spec.js +++ b/e2e/paths/ticket-module/01_create_ticket_observations.spec.js @@ -53,9 +53,9 @@ describe('Ticket', () => { .waitToClick(selectors.ticketNotes.firstNoteSelectSecondOption) .type(selectors.ticketNotes.firstDescriptionInput, 'description') .click(selectors.ticketNotes.submitNotesButton) - .waitForSnackbar() + .waitForLastSnackbar() .then(result => { - expect(result).toEqual(jasmine.arrayContaining(['Data saved!'])); + expect(result).toEqual('Data saved!'); }); }); diff --git a/e2e/paths/ticket-module/05_create_new_tracking_state.spec.js b/e2e/paths/ticket-module/05_create_new_tracking_state.spec.js index 4117348fb..0e8a5df05 100644 --- a/e2e/paths/ticket-module/05_create_new_tracking_state.spec.js +++ b/e2e/paths/ticket-module/05_create_new_tracking_state.spec.js @@ -59,9 +59,9 @@ describe('Ticket', () => { it(`should attempt create a new state but receive an error if state is empty`, () => { return nightmare .click(selectors.createStateView.saveStateButton) - .waitForSnackbar() + .waitForLastSnackbar() .then(result => { - expect(result).toEqual(jasmine.arrayContaining(['No changes to save'])); + expect(result).toEqual('No changes to save'); }); }); @@ -71,9 +71,9 @@ describe('Ticket', () => { .waitToClick(selectors.createStateView.stateInputOptionOne) .waitToClick(selectors.createStateView.clearStateInputButton) .click(selectors.createStateView.saveStateButton) - .waitForSnackbar() + .waitForLastSnackbar() .then(result => { - expect(result).toEqual(jasmine.arrayContaining(['Data saved!'])); + expect(result).toEqual('Data saved!'); }); }); @@ -92,9 +92,9 @@ describe('Ticket', () => { .waitToClick(selectors.createStateView.stateInput) .waitToClick(selectors.createStateView.stateInputOptionOne) .click(selectors.createStateView.saveStateButton) - .waitForSnackbar() + .waitForLastSnackbar() .then(result => { - expect(result).toEqual(jasmine.arrayContaining(['Data saved!'])); + expect(result).toEqual('Data saved!'); }); }); });