Skip to content

Commit

Permalink
Functional Tests : BO - Stocks - Movements - Filter by category, move…
Browse files Browse the repository at this point in the history
…ment type, employee and period
  • Loading branch information
Progi1984 committed Sep 6, 2023
1 parent d97a0e1 commit cded55f
Show file tree
Hide file tree
Showing 14 changed files with 1,085 additions and 8,068 deletions.
5 changes: 4 additions & 1 deletion admin-dev/themes/new-theme/js/app/widgets/ps-select.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@
* @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
*-->
<template>
<div class="ps-select">
<div
class="ps-select"
:id="itemId"
>
<select
class="form-control"
v-model="selected"
Expand Down
2 changes: 2 additions & 0 deletions admin-dev/themes/new-theme/js/app/widgets/ps-tree/ps-tree.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,15 @@
<button
class="btn btn-text text-uppercase pointer"
@click="expand"
data-action="expand"
>
<i class="material-icons">keyboard_arrow_down</i>
<span v-if="translations">{{ translations.expand }}</span>
</button>
<button
class="btn btn-text float-right text-uppercase pointer"
@click="reduce"
data-action="reduce"
>
<i class="material-icons">keyboard_arrow_up</i>
<span v-if="translations">{{ translations.reduce }}</span>
Expand Down

Large diffs are not rendered by default.

53 changes: 53 additions & 0 deletions tests/UI/commonTests/BO/catalog/stock.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
// Import utils
import testContext from '@utils/testContext';

import {expect} from 'chai';
import {createPool} from 'mariadb';
import type {Pool, PoolConnection} from 'mariadb';

let dbPool: Pool;
let dbConnection: PoolConnection;

/**
* Function to clean all Stock Movements
* @param baseContext {string} String to identify the test
*/
function cleanTableStockMovements(baseContext: string = 'commonTests-cleanTableStockMovements'): void {
const dbPrefix: string = global.INSTALL.DB_PREFIX;

describe(`Clean table ${dbPrefix}stock_mvt`, async () => {
// before and after functions
before(async () => {
dbPool = createPool({
user: global.INSTALL.DB_USER,
password: global.INSTALL.DB_PASSWD,
host: global.INSTALL.DB_SERVER,
port: 3306,
database: global.INSTALL.DB_NAME,
connectionLimit: 5,
});

if (!global.GENERATE_FAILED_STEPS) {
dbConnection = await dbPool.getConnection();
}
});

after(async () => {
if (dbConnection) {
await dbConnection.release();
}
await dbPool.end();
});

it(`should remove all lines in ${dbPrefix}stock_mvt`, async function () {
await testContext.addContextItem(this, 'testIdentifier', 'truncateTable', baseContext);

await dbConnection.query(`TRUNCATE TABLE ${dbPrefix}stock_mvt`);

const rows = await dbConnection.query(`SELECT * FROM ${dbPrefix}stock_mvt`);
expect(rows.length).to.be.equal(0);
});
});
}

export default cleanTableStockMovements;
14 changes: 7 additions & 7 deletions tests/UI/data/types/product.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,25 +69,25 @@ type ProductCombinationBulk = {

type ProductCombinationBulkRetailPrice = {
costPriceToEnable: boolean
costPrice: number
costPrice?: number
impactOnPriceTIncToEnable: boolean
impactOnPriceTInc: number
impactOnPriceTInc?: number
impactOnWeightToEnable: boolean
impactOnWeight: number
impactOnWeight?: number
}

type ProductCombinationBulkSpecificReferences = {
referenceToEnable: boolean
reference: string
reference?: string
}

type ProductCombinationBulkStock = {
quantityToEnable: boolean
quantity: number
quantity?: number
minimalQuantityToEnable: boolean
minimalQuantity: number
minimalQuantity?: number
stockLocationToEnable: boolean
stockLocation: string
stockLocation?: string
};

type ProductCustomization = {
Expand Down

0 comments on commit cded55f

Please sign in to comment.