Skip to content

Commit

Permalink
Cleaned up diagnostic messages
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcameron committed Feb 28, 2024
1 parent e89b2da commit 841ec6c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 27 deletions.
7 changes: 2 additions & 5 deletions test/end-to-end/creditorGroups/creditor_groups.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,16 +61,13 @@ test.describe('Creditor Groups Management', () => {
});

test('deletes a creditor group', async () => {
console.debug('C1');
await TU.waitForSelector(`[data-update="${group.updated_name}"]`);
console.debug('C2');
await TU.locator(`[data-update="${group.updated_name}"]`).click();
console.debug('C3');

// click the "delete" button
await TU.buttons.delete();
console.debug('C4');
await TU.modal.submit(); // Confirm the deletion
console.debug('C5');

await components.notification.hasSuccess();
});

Expand Down
17 changes: 5 additions & 12 deletions test/end-to-end/stock/stock.entry.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,30 +81,23 @@ function StockEntryTests() {

test('Should enter stock from a transfer reception', async () => {
// set another Depot
console.debug('E0');
TU.screenshot('results/entry1.png');
await page.setDepot(DEPOT_SECONDAIRE);
TU.screenshot('results/entry2.png');
console.debug('E1');

// select the movement
await page.setTransfer(0);
console.debug('E2');

// Wait for the transfer selection dialog to close
await TU.waitForSelector('textarea[name="description"]:visible');
console.debug('E3');
TU.screenshot('results/entry3.png');

await page.setDate(new Date());
console.debug('E4');

await page.setDescription(DESCRIPTION.concat(' - Transfer reception'));

const lots = [
{ quantity : 75 },
];
console.debug('E5');
TU.screenshot('results/entry4.png');

await page.setLots(0, lots, true, null);
TU.screenshot('results/entry5.png');
console.debug('E6');

// Wait for the dialog to disappear
await expect(TU.locator('.modal-dialog')).toHaveCount(0);
Expand Down
12 changes: 2 additions & 10 deletions test/end-to-end/transactionType/transactionType.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,25 +45,17 @@ test.describe('transaction types', () => {
test('successfully updates an existing transaction type', async () => {
await TU.reloadPage(); // Force a page reload
const editButton = `[data-edit-type="${newType.text}"]`;
console.debug('T1');
TU.screenshot('results/trans1.png');
await TU.waitForSelector(editButton);
console.debug('T2');
TU.screenshot('results/trans2.png');

await TU.locator(editButton).click();
console.debug('T3');
await TU.waitForSelector('.modal-dialog');
console.debug('T4');
TU.screenshot('results/trans3.png');

await TU.input('$ctrl.transactionType.text', updateType.text);
await TU.select('$ctrl.transactionType.type', updateType.type);
console.debug('T5');

await TU.modal.submit();
console.debug('T6');

await components.notification.hasSuccess();
console.debug('T7 OK');
});

test('successfully creates a transaction type with a specific type', async () => {
Expand Down

0 comments on commit 841ec6c

Please sign in to comment.