mirror of
https://github.com/nocodb/nocodb.git
synced 2026-05-05 02:16:34 +00:00
* fix(nc-gui): remove field modal title & type selector label * fix(nc-gui): hide default value input initially * fix(nc-gui): remove clear icon from default value input * fix(nc-gui): update email, phone, url column validation settings ui * fix(nc-gui): add missing validate field condition * fix(nc-gui): update long text field modal ui * fix(nc-gui): update default field modal width & enable rich text option * fix(nc-gui): small changes * fix(nc-gui): hide default value input only if user clicks on delete icon * fix(nc-gui): decimal field option ui * fix(nc-gui): update percent option ui * fix(nc-gui): small changes * fix(nc-gui): update field modal switch option alignment * fix(nc-gui): update date & dateTime field modal options * feat(nc-gui): add 12, 24 hrs time format option in field modal * feat(nc-gui): add 12hr time cell format support * fix(nc-gui): update time cell placeholder according to time format * fix(nc-gui): field modal default value option visibility issue * fix(nc-gui): update barcode, qr code field modal option * fix(nc-gui): field modal expanded json input modal overlay click issue * fix(nc-gui): currency code option from field modal * fix(nc-gui): udpate duration option * fix(nc-gui): date time cell clear icon visibility issue in link record dropdown * fix(nc-gui): update field modal lookup options * fix(nc-gui): update user option from field modal * fix(nc-gui): update rollup option from field modal * fix(nc-gui): update select field type ui for create column * fix(nc-gui): update field modal cancel & save btn alignment * fix(nc-gui): update formula option margin * fic(nc-gui): update select type option * fix(nc-gui): small changes * fix(nc-gui): update links field options * fix(nc-gui): small changes * fix(nc-gui): select option border issue * fix(nc-gui): add new color picker * fix(nc-gui): update rating field options * fix(nc-gui): update geodata field options * fix(nc-gui): geodata option small changes * fix(nc-gui): add new color picker for select type options * fix(nc-gui): show only title & field type list if uidt is null * feat(nc-gui): add 12hrs time support in dateTime cell * fix(nc-gui): formula suggestion list visibility issue * fix(nc-gui): reduce formaula suggestion fields icon size * fix(nc-gui): rich text default value visibility issue in field modal * fix(nc-gui): update rich text default value bubble menu option * fix(nc-gui): some pr review changes * fix(nc-gui): remove example from duration format * feat(nc-gui): add keyboard navigation support for field list * fix(nc-gui): update email, url, phone validate text * fix(nc-gui): update qr & barcode value select input * fix(nc-gui): pr review changes * test: update create column test cases * fix(nc-gui): remove required symbol from field modal inputs * fix(nc-gui): remove delete default value icon and add cross icon in default input itself * test: update duration field type test * fix(nc-gui): update column name & type input shadow * fix(nc-gui): add hover effect on selected type * fix(nc-gui): enabel rich text case update * fix(nc-gui): update select options * fix(nc-gui): show full time format in edit modal default value * fix(nc-gui): remove optional placeholder of default value * fix(nc-gui): instead of removing field type option disable it if it is onlyNameUpdateOnEditColumns * fix(nc-gui): update links field icons from field modal * fix(nc-gui): add links options in edit modal * fix(nc-gui): show links config and disable if it is not editable in edit column mode * fix(nc-gui): add support to configure date time format for create & last modified type field * fix(nc-gui): virtual field icon visibility issue if it is edit mode * fix(nc-gui): disabled edit option from field context menu if column is pk or system column * fix(nc-gui): update field modal submit btn text * fix(nc-gui): add shdow on input field in field modal * fix(nc-gui): disable submit btn if field modal has some warnings * test: update field add/edit save test case * test: update links column add/edit test cases * test: uncomment code * test: update user field default value update test cases * test: update select type option default value * test: update multi field editor test cases * test: update kanban view add option test cases * test: update multifield editor test cases * test: update create column keyboard shortcut test case * chore(nc-gui): lint * fix(nc-gui): field modal redio option shadow issue * fix(nc-gui): update field modal select option color picker btn border radius * fix(nc-gui): checkbox & rating icon alignment issue * fix(nc-gui): update field modal formula field * fix(nc-gui): field modal padding and gap issue * fix(nc-gui): update set default value font case & font color * fix(nc-gui): update field modal formula suggestion list ui * fix(nc-gui): removecolumn create field search list from multifield editor * fix(nc-gui): add placeholder for lookup & rollup options * fix: label * fix(nc-gui): remove placeholder from select type * fix(nc-gui): remove link type from link field select option * fix(nc-gui): qr, barcode value field icon issue * fix(nc-gui): set color picker tab according to active color * fix(nc-gui): json editor save btn ui changes in edit modal * fix(nc-gui): disable editing primary key col * chore(nc-gui): lint --------- Co-authored-by: Raju Udava <86527202+dstala@users.noreply.github.com>
102 lines
3.2 KiB
TypeScript
102 lines
3.2 KiB
TypeScript
import { test } from '@playwright/test';
|
|
import { DashboardPage } from '../../../pages/Dashboard';
|
|
import setup, { unsetup } from '../../../setup';
|
|
import { enableQuickRun } from '../../../setup/db';
|
|
|
|
// Storing one additional dummy value "10" at end of every input array
|
|
// this will trigger update to previously committed data
|
|
const durationData = [
|
|
{
|
|
format: 'h:mm',
|
|
input: ['1:30', '30', '60', '80', '12:34', '15:130', '123123', '10'],
|
|
output: ['01:30', '00:30', '01:00', '01:20', '12:34', '17:10', '2052:03'],
|
|
},
|
|
{
|
|
format: 'h:mm:ss',
|
|
input: ['11:22:33', '1234', '50', '1:1111', '1:11:1111', '15:130', '123123', '10'],
|
|
output: ['11:22:33', '00:20:34', '00:00:50', '00:19:31', '01:29:31', '00:17:10', '34:12:03'],
|
|
},
|
|
{
|
|
format: 'h:mm:ss.s',
|
|
input: ['1234', '12:34', '12:34:56', '12:34:999', '12:999:56', '12:34:56.12', '12:34:56.199', '10'],
|
|
output: ['00:20:34.0', '00:12:34.0', '12:34:56.0', '12:50:39.0', '28:39:56.0', '12:34:56.1', '12:34:56.2'],
|
|
},
|
|
{
|
|
format: 'h:mm:ss.ss',
|
|
input: ['1234', '12:34', '12:34:56', '12:34:999', '12:999:56', '12:34:56.12', '12:34:56.199', '10'],
|
|
output: ['00:20:34.00', '00:12:34.00', '12:34:56.00', '12:50:39.00', '28:39:56.00', '12:34:56.12', '12:34:56.20'],
|
|
},
|
|
{
|
|
format: 'h:mm:ss.sss',
|
|
input: ['1234', '12:34', '12:34:56', '12:34:999', '12:999:56', '12:34:56.12', '12:34:56.199', '10'],
|
|
output: [
|
|
'00:20:34.000',
|
|
'00:12:34.000',
|
|
'12:34:56.000',
|
|
'12:50:39.000',
|
|
'28:39:56.000',
|
|
'12:34:56.012',
|
|
'12:34:56.199',
|
|
],
|
|
},
|
|
];
|
|
|
|
test.describe('Duration column', () => {
|
|
if (enableQuickRun()) test.skip();
|
|
|
|
let dashboard: DashboardPage;
|
|
let context: any;
|
|
|
|
test.beforeEach(async ({ page }) => {
|
|
context = await setup({ page, isEmptyProject: true });
|
|
dashboard = new DashboardPage(page, context.base);
|
|
});
|
|
|
|
test.afterEach(async () => {
|
|
await unsetup(context);
|
|
});
|
|
|
|
test('Create duration column', async () => {
|
|
await dashboard.treeView.createTable({ title: 'tablex', baseTitle: context.base.title });
|
|
// Create duration column
|
|
await dashboard.grid.column.create({
|
|
title: 'NC_DURATION_0',
|
|
type: 'Duration',
|
|
format: durationData[0].format,
|
|
});
|
|
for (let i = 0; i < 8; i++) {
|
|
await dashboard.grid.addNewRow({
|
|
index: i,
|
|
columnHeader: 'NC_DURATION_0',
|
|
value: i.toString(),
|
|
networkValidation: false,
|
|
});
|
|
}
|
|
|
|
for (let i = 0; i < durationData.length; i++) {
|
|
// Edit duration column
|
|
await dashboard.grid.column.openEdit({
|
|
title: 'NC_DURATION_0',
|
|
type: 'Duration',
|
|
format: durationData[i].format,
|
|
});
|
|
await dashboard.grid.column.save({ isUpdated: true });
|
|
for (let j = 0; j < durationData[i].input.length; j++) {
|
|
await dashboard.grid.editRow({
|
|
index: j,
|
|
columnHeader: 'NC_DURATION_0',
|
|
value: durationData[i].input[j],
|
|
networkValidation: false,
|
|
});
|
|
}
|
|
for (let j = 0; j < durationData[i].output.length; j++) {
|
|
await dashboard.grid.cell.verify({
|
|
index: j,
|
|
columnHeader: 'NC_DURATION_0',
|
|
value: durationData[i].output[j],
|
|
});
|
|
}
|
|
}
|
|
});
|
|
});
|