+
{{ $t('msg.warning.barcode.renderError') }}
diff --git a/tests/playwright/pages/Dashboard/common/Cell/index.ts b/tests/playwright/pages/Dashboard/common/Cell/index.ts
index 01577430de..1de2a1db40 100644
--- a/tests/playwright/pages/Dashboard/common/Cell/index.ts
+++ b/tests/playwright/pages/Dashboard/common/Cell/index.ts
@@ -137,6 +137,23 @@ export class CellPageObject extends BasePage {
await _verify(expectedSrcValue);
}
+ async verifyBarcodeCellShowsInvalidInputMessage({ index, columnHeader }: { index: number; columnHeader: string }) {
+ const _verify = async expectedInvalidInputMessage => {
+ await expect
+ .poll(async () => {
+ const barcodeCell = await this.get({
+ index,
+ columnHeader,
+ });
+ const barcodeInvalidInputMessage = await barcodeCell.getByTestId('barcode-invalid-input-message');
+ return await barcodeInvalidInputMessage.textContent();
+ })
+ .toEqual(expectedInvalidInputMessage);
+ };
+
+ await _verify('Barcode error - please check compatibility between input and barcode type');
+ }
+
async verifyBarcodeCell({
index,
columnHeader,
diff --git a/tests/playwright/tests/columnBarcode.spec.ts b/tests/playwright/tests/columnBarcode.spec.ts
index 354974fdff..18aac6e2fe 100644
--- a/tests/playwright/tests/columnBarcode.spec.ts
+++ b/tests/playwright/tests/columnBarcode.spec.ts
@@ -156,30 +156,30 @@ test.describe('Virtual Columns', () => {
await dashboard.closeTab({ title: 'City' });
});
- test('changing the format of the Barcode is reflected in the change of the actual rendered barcode', async () => {
+ test('a) showing an error message for non-compatible barcode input and b) changing the format of the Barcode is reflected in the change of the actual rendered barcode', async () => {
await dashboard.closeTab({ title: 'Team & Auth' });
await dashboard.treeView.openTable({ title: 'City' });
- await grid.cell.fillText({ columnHeader: 'City', index: 0, text: 'Berlin' });
-
await grid.column.create({
title: 'Barcode1',
type: 'Barcode',
barcodeValueColumnTitle: 'City',
});
- await barcodeColumnVerify('Barcode1', [barcodeCellValuesForBerlin]);
-
await grid.column.openEdit({
title: 'Barcode1',
});
await grid.column.changeBarcodeFormat({ barcodeFormatName: 'CODE39' });
- await barcodeColumnVerify('Barcode1 Renamed', [
- { referencedValue: 'Berlin', barcodeSvg: barcodeCode39SvgForBerlin },
- ]);
- });
- test('barcode cells with invalid input for the choosen barcode format are showing a replacement message', async () => {});
+ await grid.cell.verifyBarcodeCellShowsInvalidInputMessage({
+ index: 0,
+ columnHeader: 'Barcode1',
+ });
+
+ await grid.cell.fillText({ columnHeader: 'City', index: 0, text: 'Berlin' });
+
+ await barcodeColumnVerify('Barcode1', [{ referencedValue: 'Berlin', barcodeSvg: barcodeCode39SvgForBerlin }]);
+ });
});
});