Skip to content
This repository has been archived by the owner on Mar 31, 2021. It is now read-only.

Commit

Permalink
Update test
Browse files Browse the repository at this point in the history
  • Loading branch information
TheBestPessimist committed Jul 31, 2019
1 parent c3e887d commit 1ab2b6d
Showing 1 changed file with 15 additions and 13 deletions.
Expand Up @@ -60,13 +60,6 @@ describe('Change warehouse in material receipt candidate #153', function() {
cy.openReferencedDocuments('M_ReceiptSchedule');

cy.selectNthRow(0).dblclick();
// todo fixme
// const tableRows = '.table-flex-wrapper-row';
// const rowSelector = 'tbody tr';
// cy.get(tableRows)
// .find(rowSelector)
// .eq(0)
// .dblclick();
});

it('Check Warehouse', function() {
Expand All @@ -75,7 +68,7 @@ describe('Change warehouse in material receipt candidate #153', function() {

it('Change the warehouse with Warehouse Override', function() {
cy.openAdvancedEdit();
cy.writeIntoStringField('M_Warehouse_Override_ID', warehouse2, true);
cy.selectInListField('M_Warehouse_Override_ID', warehouse2, true);
cy.pressDoneButton();
});

Expand All @@ -85,9 +78,9 @@ describe('Change warehouse in material receipt candidate #153', function() {

it('Go back to the filtered view of Material Receipt Candidates and create the Material Receipt', function() {
cy.go('back');
cy.selectNthRow(0).dblclick();
cy.selectNthRow(0).click();
cy.executeQuickAction('WEBUI_M_ReceiptSchedule_ReceiveHUs_UsingDefaults', true);
cy.executeQuickAction('WEBUI_M_HU_CreateReceipt_NoParams', true);
cy.executeQuickAction('WEBUI_M_HU_CreateReceipt_NoParams', true, true);
});

it('Go to the referenced Material Receipt', function() {
Expand All @@ -96,9 +89,18 @@ describe('Change warehouse in material receipt candidate #153', function() {
cy.waitUntilProcessIsFinished();
cy.openReferencedDocuments('M_ReceiptSchedule');

// 2 rows: the product and the packing item
cy.expectNumberOfRows(2);
cy.selectNthRow(0).dblclick();
// todo:
// expect only 1 row
// the warehouse should be Lager für Streckengeschäft
});

it('Warehouse should not be changed', function() {
cy.getStringFieldValue('M_Warehouse_ID').should('contain', warehouse1);
});

it('Warehouse Override should be second warehouse', function() {
cy.openAdvancedEdit();
cy.getStringFieldValue('M_Warehouse_Override_ID').should('contain', warehouse2);
cy.pressDoneButton();
});
});

0 comments on commit 1ab2b6d

Please sign in to comment.