mirror of https://github.com/nocodb/nocodb
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
151 lines
18 KiB
151 lines
18 KiB
import { test } from '@playwright/test'; |
|
import { DashboardPage } from '../pages/Dashboard'; |
|
import setup from '../setup'; |
|
import { GridPage } from '../pages/Dashboard/Grid'; |
|
|
|
type ExpectedQrCodeData = { |
|
referencedValue: string; |
|
base64EncodedSrc: string; |
|
}; |
|
|
|
test.describe('Virtual Columns', () => { |
|
let dashboard: DashboardPage; |
|
let grid: GridPage; |
|
let context: any; |
|
|
|
test.beforeEach(async ({ page }) => { |
|
context = await setup({ page }); |
|
dashboard = new DashboardPage(page, context.project); |
|
grid = dashboard.grid; |
|
}); |
|
|
|
test.describe('QrCode Column', () => { |
|
async function qrCodeColumnVerify(qrColumnTitle: string, expectedQrCodeData: ExpectedQrCodeData[]) { |
|
for (let i = 0; i < expectedQrCodeData.length; i++) { |
|
await grid.cell.verifyQrCodeCell({ |
|
index: i, |
|
columnHeader: qrColumnTitle, |
|
expectedSrcValue: expectedQrCodeData[i].base64EncodedSrc, |
|
}); |
|
} |
|
} |
|
test('creation, showing, updating value and change qr column title and reference column', async () => { |
|
// Add qr code column referencing the City column |
|
// and compare the base64 encoded codes/src attributes for the first 3 rows. |
|
// Column data from City table (Sakila DB) |
|
/** |
|
* City LastUpdate Address List Country |
|
* A Corua (La Corua) 2006-02-15 04:45:25 939 Probolinggo Loop Spain |
|
* Abha 2006-02-15 04:45:25 733 Mandaluyong Place Saudi Arabia |
|
* Abu Dhabi 2006-02-15 04:45:25 535 Ahmadnagar Manor United Arab Emirates |
|
*/ |
|
const expectedQrCodeCellValues: ExpectedQrCodeData[] = [ |
|
{ |
|
referencedValue: 'A Corua (La Corua)', |
|
base64EncodedSrc: |
|
'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAACWCAYAAAA8AXHiAAAAAXNSR0IArs4c6QAAB+dJREFUeF7tne2W2jAMBZf3f2h66Om2TTB4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Z6cgGLlzGwBCCgWgGRITkCxcma2AAQUC0AyJCegWDkzWwACigUgGZITUKycmS0AAcUCkAzJCShWzswWgIBiAUiG5AQUK2dmC0BAsQAkQ3ICipUzswUgoFgAkiE5AcXKmdkCEFAsAMmQnIBi5cxsAQgoFoBkSE7gPxlL8reNvNsfAAAAAElFTkSuQmCC', |
|
}, |
|
]; |
|
|
|
// close 'Team & Auth' tab |
|
await dashboard.closeTab({ title: 'Team & Auth' }); |
|
|
|
await dashboard.treeView.openTable({ title: 'City' }); |
|
|
|
await grid.column.create({ |
|
title: 'QrCode1', |
|
type: 'QrCode', |
|
qrCodeValueColumnTitle: 'City', |
|
}); |
|
|
|
await qrCodeColumnVerify('QrCode1', expectedQrCodeCellValues); |
|
|
|
// Clicking on qr code in first row and expect it shows a |
|
// popup with an enlarged version of the qr code |
|
await grid.cell.get({ columnHeader: 'QrCode1', index: 0 }).click(); |
|
const qrGridOverlay = grid.qrCodeOverlay; |
|
await qrGridOverlay.verifyQrValueLabel(expectedQrCodeCellValues[0].referencedValue); |
|
await qrGridOverlay.clickCloseButton(); |
|
|
|
// Change the value in the referenced column, first row |
|
// and expect respective QR changes accordingly |
|
await grid.cell.fillText({ columnHeader: 'City', index: 0, text: 'Hamburg' }); |
|
const expectedQrCodeCellValuesAfterCityNameChange = [ |
|
{ |
|
referencedValue: 'Hamburg', |
|
base64EncodedSrc: |
|
'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAACWCAYAAAA8AXHiAAAAAXNSR0IArs4c6QAAB1FJREFUeF7tndF2GjEMRMP/f3R6IG1ZNms08kjeQG6fZUseXcuyCeXy+fn5+cE/FChW4AJYxYoy3U0BwAKEFgUAq0VWJgUsGGhRALBaZGVSwIKBFgUAq0VWJgUsGGhRALBaZGVSwIKBFgUAq0VWJgUsGGhRALBaZGVSwIKBFgUAq0VWJgUsGGhRALBaZGVSwIKBFgUAq0VWJgUsGGhRoAWsy+XSEuzspO73RZz1jHw7c87q8Gycq9F+b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WALBijbCYUACwJkRjSKwAYMUaYTGhAGBNiMaQWAHAijXCYkIBwJoQjSGxAoAVa4TFhAKANSEaQ2IFACvWCIsJBf4ABVN/xpCpplAAAAAASUVORK5CYII=', |
|
}, |
|
...expectedQrCodeCellValues.slice(1), |
|
]; |
|
await qrCodeColumnVerify('QrCode1', expectedQrCodeCellValuesAfterCityNameChange); |
|
|
|
// Change the QR Code column title |
|
await grid.column.openEdit({ title: 'QrCode1' }); |
|
await grid.column.fillTitle({ title: 'QrCode1 Renamed' }); |
|
await grid.column.save({ isUpdated: true }); |
|
await qrCodeColumnVerify('QrCode1 Renamed', expectedQrCodeCellValuesAfterCityNameChange); |
|
|
|
// Change the referenced column title |
|
await grid.column.openEdit({ title: 'City' }); |
|
await grid.column.fillTitle({ title: 'City Renamed' }); |
|
await grid.column.save({ isUpdated: true }); |
|
await qrCodeColumnVerify('QrCode1 Renamed', expectedQrCodeCellValuesAfterCityNameChange); |
|
|
|
// Change to another referenced column |
|
await grid.column.create({ title: 'New City Column' }); |
|
await grid.cell.fillText({ columnHeader: 'New City Column', index: 0, text: 'Hamburg' }); |
|
await grid.column.openEdit({ title: 'QrCode1 Renamed' }); |
|
await grid.column.changeReferencedColumnForQrCode({ titleOfReferencedColumn: 'New City Column' }); |
|
|
|
await qrCodeColumnVerify('QrCode1 Renamed', [ |
|
{ |
|
referencedValue: 'Hamburg', |
|
base64EncodedSrc: |
|
'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAACWCAYAAAA8AXHiAAAAAXNSR0IArs4c6QAAB1FJREFUeF7tndF2GjEMRMP/f3R6IG1ZNms08kjeQG6fZUseXcuyCeXy+fn5+cE/FChW4AJYxYoy3U0BwAKEFgUAq0VWJgUsGGhRALBaZGVSwIKBFgUAq0VWJgUsGGhRALBaZGVSwIKBFgUAq0VWJgUsGGhRALBaZGVSwIKBFgUAq0VWJgUsGGhRALBaZGVSwIKBFgUAq0VWJgUsGGhRoAWsy+XSEuzspO73RZz1jHw7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YTCgAWBOiMSRWALBijbCYUACwJkRjSKwAYMUaYTGhAGBNiMaQWAHAijXCYkIBwJoQjSGxAoAVa4TFhAKANSEaQ2IFACvWCIsJBf4ABVN/xpCpplAAAAAASUVORK5CYII=', |
|
}, |
|
]); |
|
|
|
await dashboard.closeTab({ title: 'City' }); |
|
}); |
|
|
|
test('deletion of the QR column: directly and indirectly when the reference value column is deleted', async () => { |
|
// close 'Team & Auth' tab |
|
await dashboard.closeTab({ title: 'Team & Auth' }); |
|
|
|
await dashboard.treeView.openTable({ title: 'City' }); |
|
|
|
await grid.column.create({ title: 'column_name_a' }); |
|
await grid.column.verify({ title: 'column_name_a' }); |
|
await grid.column.create({ |
|
title: 'QrCode2', |
|
type: 'QrCode', |
|
qrCodeValueColumnTitle: 'column_name_a', |
|
}); |
|
await grid.column.verify({ title: 'QrCode2', isVisible: true }); |
|
await grid.column.delete({ title: 'QrCode2' }); |
|
await grid.column.verify({ title: 'QrCode2', isVisible: false }); |
|
|
|
await grid.column.create({ |
|
title: 'QrCode2', |
|
type: 'QrCode', |
|
qrCodeValueColumnTitle: 'column_name_a', |
|
}); |
|
await grid.column.verify({ title: 'QrCode2', isVisible: true }); |
|
await grid.column.delete({ title: 'column_name_a' }); |
|
await grid.column.verify({ title: 'QrCode2', isVisible: false }); |
|
|
|
await dashboard.closeTab({ title: 'City' }); |
|
}); |
|
}); |
|
});
|
|
|