Browse Source

Merge pull request #2482 from nocodb/fix/2429-LTAR-column_naming

fix: LTAR column naming
pull/2490/head
Pranav C 2 years ago committed by GitHub
parent
commit
ad3cca20e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 10
      packages/nocodb/src/__tests__/restv2.test.ts
  2. 8
      packages/nocodb/src/lib/meta/api/columnApis.ts
  3. 8
      packages/nocodb/src/lib/meta/api/metaDiffApis.ts
  4. 4
      packages/nocodb/src/lib/meta/api/projectApis.ts
  5. 6
      scripts/cypress/integration/common/1a_table_operations.js
  6. 2
      scripts/cypress/integration/common/1d_pg_table_view_drag_drop_reorder.js
  7. 2
      scripts/cypress/integration/common/1d_table_view_drag_drop_reorder.js
  8. 4
      scripts/cypress/integration/common/2a_table_with_belongs_to_colulmn.js
  9. 4
      scripts/cypress/integration/common/2b_table_with_m2m_column.js
  10. 2
      scripts/cypress/integration/common/4c_form_view_detailed.js
  11. 6
      scripts/cypress/integration/common/4d_table_view_grid_locked.js
  12. 6
      scripts/cypress/integration/common/4e_form_view_share.js
  13. 30
      scripts/cypress/integration/common/4f_grid_view_share.js
  14. 28
      scripts/cypress/integration/common/4f_pg_grid_view_share.js
  15. 2
      scripts/cypress/integration/common/5a_user_role.js
  16. 4
      scripts/cypress/integration/common/6b_downloadCsv.js
  17. 2
      scripts/cypress/integration/common/6f_attachments.js
  18. 2
      scripts/cypress/integration/spec/roleValidation.spec.js

10
packages/nocodb/src/__tests__/restv2.test.ts

@ -209,7 +209,7 @@ describe('Noco v2 Tests', () => {
type: UITypes.Rollup, type: UITypes.Rollup,
alias: 'filmCount', alias: 'filmCount',
rollupColumn: 'FilmId', rollupColumn: 'FilmId',
relationColumn: 'FilmMMList', relationColumn: 'Film List',
rollupFunction: 'count' rollupFunction: 'count'
} }
]; ];
@ -413,7 +413,7 @@ describe('Noco v2 Tests', () => {
type: UITypes.Lookup, type: UITypes.Lookup,
alias: 'filmNames', alias: 'filmNames',
lookupColumn: 'Title', lookupColumn: 'Title',
relationColumn: 'FilmMMList' relationColumn: 'Film List'
}; };
request(app) request(app)
.post(`/nc/${projectId}/generate`) .post(`/nc/${projectId}/generate`)
@ -1335,7 +1335,7 @@ describe('Noco v2 Tests', () => {
type: UITypes.Lookup, type: UITypes.Lookup,
alias: 'filmIds', alias: 'filmIds',
lookupColumn: 'FilmId', lookupColumn: 'FilmId',
relationColumn: 'FilmMMList' relationColumn: 'Film List'
}, },
{ {
table: 'actor', table: 'actor',
@ -1398,7 +1398,7 @@ describe('Noco v2 Tests', () => {
type: UITypes.Rollup, type: UITypes.Rollup,
alias: 'actorsCount', alias: 'actorsCount',
rollupColumn: 'ActorId', rollupColumn: 'ActorId',
relationColumn: 'ActorMMList', relationColumn: 'ActorList',
rollupFunction: 'count' rollupFunction: 'count'
}, },
{ {
@ -1406,7 +1406,7 @@ describe('Noco v2 Tests', () => {
type: UITypes.Lookup, type: UITypes.Lookup,
alias: 'actorsCountList', alias: 'actorsCountList',
lookupColumn: 'actorsCount', lookupColumn: 'actorsCount',
relationColumn: 'FilmMMList' relationColumn: 'Film List'
}, },
{ {
table: 'actor', table: 'actor',

8
packages/nocodb/src/lib/meta/api/columnApis.ts

@ -57,7 +57,7 @@ async function createHmAndBtColumn(
{ {
const title = getUniqueColumnAliasName( const title = getUniqueColumnAliasName(
await child.getColumns(), await child.getColumns(),
type === 'bt' ? alias : `${parent.title}Read` type === 'bt' ? alias : `${parent.title}`
); );
await Column.insert<LinkToAnotherRecordColumn>({ await Column.insert<LinkToAnotherRecordColumn>({
title, title,
@ -79,7 +79,7 @@ async function createHmAndBtColumn(
{ {
const title = getUniqueColumnAliasName( const title = getUniqueColumnAliasName(
await parent.getColumns(), await parent.getColumns(),
type === 'hm' ? alias : `${child.title}List` type === 'hm' ? alias : `${child.title} List`
); );
await Column.insert({ await Column.insert({
title, title,
@ -427,7 +427,7 @@ export async function columnAdd(req: Request, res: Response<TableType>) {
await Column.insert({ await Column.insert({
title: getUniqueColumnAliasName( title: getUniqueColumnAliasName(
await child.getColumns(), await child.getColumns(),
`${child.title}MMList` `${parent.title} List`
), ),
uidt: UITypes.LinkToAnotherRecord, uidt: UITypes.LinkToAnotherRecord,
type: 'mm', type: 'mm',
@ -447,7 +447,7 @@ export async function columnAdd(req: Request, res: Response<TableType>) {
await Column.insert({ await Column.insert({
title: getUniqueColumnAliasName( title: getUniqueColumnAliasName(
await parent.getColumns(), await parent.getColumns(),
req.body.title ?? `${parent.title}MMList` req.body.title ?? `${child.title} List`
), ),
uidt: UITypes.LinkToAnotherRecord, uidt: UITypes.LinkToAnotherRecord,

8
packages/nocodb/src/lib/meta/api/metaDiffApis.ts

@ -671,7 +671,7 @@ export async function metaDiffSync(req, res) {
if (change.relationType === RelationTypes.BELONGS_TO) { if (change.relationType === RelationTypes.BELONGS_TO) {
const title = getUniqueColumnAliasName( const title = getUniqueColumnAliasName(
childModel.columns, childModel.columns,
`${parentModel.title || parentModel.table_name}Read` `${parentModel.title || parentModel.table_name}`
); );
await Column.insert<LinkToAnotherRecordColumn>({ await Column.insert<LinkToAnotherRecordColumn>({
uidt: UITypes.LinkToAnotherRecord, uidt: UITypes.LinkToAnotherRecord,
@ -686,7 +686,7 @@ export async function metaDiffSync(req, res) {
} else if (change.relationType === RelationTypes.HAS_MANY) { } else if (change.relationType === RelationTypes.HAS_MANY) {
const title = getUniqueColumnAliasName( const title = getUniqueColumnAliasName(
childModel.columns, childModel.columns,
`${childModel.title || childModel.table_name}List` `${childModel.title || childModel.table_name} List`
); );
await Column.insert<LinkToAnotherRecordColumn>({ await Column.insert<LinkToAnotherRecordColumn>({
uidt: UITypes.LinkToAnotherRecord, uidt: UITypes.LinkToAnotherRecord,
@ -785,7 +785,7 @@ export async function extractAndGenerateManyToManyRelations(
await Column.insert<LinkToAnotherRecordColumn>({ await Column.insert<LinkToAnotherRecordColumn>({
title: getUniqueColumnAliasName( title: getUniqueColumnAliasName(
modelA.columns, modelA.columns,
`${modelB.title}MMList` `${modelB.title} List`
), ),
fk_model_id: modelA.id, fk_model_id: modelA.id,
fk_related_model_id: modelB.id, fk_related_model_id: modelB.id,
@ -803,7 +803,7 @@ export async function extractAndGenerateManyToManyRelations(
await Column.insert<LinkToAnotherRecordColumn>({ await Column.insert<LinkToAnotherRecordColumn>({
title: getUniqueColumnAliasName( title: getUniqueColumnAliasName(
modelB.columns, modelB.columns,
`${modelA.title}MMList` `${modelA.title} List`
), ),
fk_model_id: modelB.id, fk_model_id: modelB.id,
fk_related_model_id: modelA.id, fk_related_model_id: modelA.id,

4
packages/nocodb/src/lib/meta/api/projectApis.ts

@ -215,7 +215,7 @@ async function populateMeta(base: Base, project: Project): Promise<any> {
uidt: UITypes.LinkToAnotherRecord, uidt: UITypes.LinkToAnotherRecord,
type: 'hm', type: 'hm',
hm, hm,
title: `${hm.title}List` title: `${hm.title} List`
}; };
}), }),
...belongsTo.map(bt => { ...belongsTo.map(bt => {
@ -230,7 +230,7 @@ async function populateMeta(base: Base, project: Project): Promise<any> {
uidt: UITypes.LinkToAnotherRecord, uidt: UITypes.LinkToAnotherRecord,
type: 'bt', type: 'bt',
bt, bt,
title: `${bt.rtitle}Read` title: `${bt.rtitle}`
}; };
}) })
]; ];

6
scripts/cypress/integration/common/1a_table_operations.js

@ -80,9 +80,9 @@ export const genTest = (apiType, dbType) => {
// 4a. Address table, has many field // 4a. Address table, has many field
cy.openTableTab("Address", 25); cy.openTableTab("Address", 25);
mainPage.getCell("CityRead", 1).scrollIntoView(); mainPage.getCell("City", 1).scrollIntoView();
mainPage mainPage
.getCell("CityRead", 1) .getCell("City", 1)
.find(".name") .find(".name")
.contains("Lethbridge") .contains("Lethbridge")
.should("exist"); .should("exist");
@ -92,7 +92,7 @@ export const genTest = (apiType, dbType) => {
cy.openTableTab("Country", 25); cy.openTableTab("Country", 25);
mainPage mainPage
.getCell("CityList", 1) .getCell("City List", 1)
.find(".name") .find(".name")
.contains("Kabul") .contains("Kabul")
.should("exist"); .should("exist");

2
scripts/cypress/integration/common/1d_pg_table_view_drag_drop_reorder.js

@ -23,7 +23,7 @@ export const genTest = (apiType, dbType) => {
/* /*
Original order of list items Original order of list items
Actor, Address, Category, City, Country, Customer, FIlm, FilmText, Language, Payment, Rental Staff Actor, Address, Category, City, Country, Customer, FIlm, FilmText, Language, Payment, Rental Staff
ActorInfo, CustomerList, FilmList, NiceButSlowerFilmList, SalesByFilmCategory, SalesByStore, StaffList ActorInfo, Customer List, Film List, NiceButSlowerFilm List, SalesByFilmCategory, SalesByStore, Staff List
*/ */
it(`Table & SQL View list, Drag/drop`, () => { it(`Table & SQL View list, Drag/drop`, () => {

2
scripts/cypress/integration/common/1d_table_view_drag_drop_reorder.js

@ -18,7 +18,7 @@ export const genTest = (apiType, dbType) => {
/* /*
Original order of list items Original order of list items
Actor, Address, Category, City, Country, Customer, FIlm, FilmText, Language, Payment, Rental Staff Actor, Address, Category, City, Country, Customer, FIlm, FilmText, Language, Payment, Rental Staff
ActorInfo, CustomerList, FilmList, NiceButSlowerFilmList, SalesByFilmCategory, SalesByStore, StaffList ActorInfo, Customer List, Film List, NiceButSlowerFilm List, SalesByFilmCategory, SalesByStore, Staff List
*/ */
before(() => { before(() => {

4
scripts/cypress/integration/common/2a_table_with_belongs_to_colulmn.js

@ -23,12 +23,12 @@ export const genTest = (apiType, dbType) => {
it("Expand belongs-to column", () => { it("Expand belongs-to column", () => {
// expand first row // expand first row
cy.get('td[data-col="CityList"] div:visible', { cy.get('td[data-col="City List"] div:visible', {
timeout: 12000, timeout: 12000,
}) })
.first() .first()
.click(); .click();
cy.get('td[data-col="CityList"] div .mdi-arrow-expand:visible') cy.get('td[data-col="City List"] div .mdi-arrow-expand:visible')
.first() .first()
.click(); .click();

4
scripts/cypress/integration/common/2b_table_with_m2m_column.js

@ -23,10 +23,10 @@ export const genTest = (apiType, dbType) => {
it("Expand m2m column", () => { it("Expand m2m column", () => {
// expand first row // expand first row
cy.get('td[data-col="FilmMMList"] div', { timeout: 12000 }) cy.get('td[data-col="Film List"] div', { timeout: 12000 })
.first() .first()
.click({ force: true }); .click({ force: true });
cy.get('td[data-col="FilmMMList"] div .mdi-arrow-expand') cy.get('td[data-col="Film List"] div .mdi-arrow-expand')
.first() .first()
.click({ force: true }); .click({ force: true });

2
scripts/cypress/integration/common/4c_form_view_detailed.js

@ -119,7 +119,7 @@ export const genTest = (apiType, dbType) => {
.should("exist"); .should("exist");
cy.get(".nc-field-wrapper") cy.get(".nc-field-wrapper")
.eq(1) .eq(1)
.contains("CityList") .contains("City List")
.should("exist"); .should("exist");
cy.get(".nc-field-wrapper") cy.get(".nc-field-wrapper")
.eq(2) .eq(2)

6
scripts/cypress/integration/common/4d_table_view_grid_locked.js

@ -77,18 +77,18 @@ export const genTest = (apiType, dbType) => {
// check if add/ expand options available for 'has many' column type // check if add/ expand options available for 'has many' column type
mainPage mainPage
.getCell("CityList", 1) .getCell("City List", 1)
.click() .click()
.find("button.mdi-plus") .find("button.mdi-plus")
.should(`${vString}exist`); .should(`${vString}exist`);
mainPage mainPage
.getCell("CityList", 1) .getCell("City List", 1)
.click() .click()
.find("button.mdi-arrow-expand") .find("button.mdi-arrow-expand")
.should(`${vString}exist`); .should(`${vString}exist`);
// update row option (right click) - should not be available for Lock view // update row option (right click) - should not be available for Lock view
mainPage.getCell("CityList", 1).rightclick(); mainPage.getCell("City List", 1).rightclick();
cy.get(".menuable__content__active").should( cy.get(".menuable__content__active").should(
`${vString}be.visible` `${vString}be.visible`
); );

6
scripts/cypress/integration/common/4e_form_view_share.js

@ -72,7 +72,7 @@ export const genTest = (apiType, dbType) => {
// "#data-table-form-City" // "#data-table-form-City"
// ); // );
cy.get('[title="AddressList"]').drag(".nc-drag-n-drop-to-hide"); cy.get('[title="Address List"]').drag(".nc-drag-n-drop-to-hide");
cy.get(".nc-form > .mx-auto") cy.get(".nc-form > .mx-auto")
.find('[type="checkbox"]') .find('[type="checkbox"]')
@ -131,8 +131,8 @@ export const genTest = (apiType, dbType) => {
// all fields, barring removed field should exist // all fields, barring removed field should exist
cy.get('[title="City"]').should("exist"); cy.get('[title="City"]').should("exist");
cy.get('[title="LastUpdate"]').should("exist"); cy.get('[title="LastUpdate"]').should("exist");
cy.get('[title="CountryRead"]').should("exist"); cy.get('[title="Country"]').should("exist");
cy.get('[title="AddressList"]').should("not.exist"); cy.get('[title="Address List"]').should("not.exist");
// order of LastUpdate & City field is retained // order of LastUpdate & City field is retained
cy.get(".nc-field-wrapper") cy.get(".nc-field-wrapper")

30
scripts/cypress/integration/common/4f_grid_view_share.js

@ -170,7 +170,7 @@ export const genTest = (apiType, dbType) => {
const verifyCsv = (retrievedRecords) => { const verifyCsv = (retrievedRecords) => {
// expected output, statically configured // expected output, statically configured
let storedRecords = [ let storedRecords = [
`Address,District,PostalCode,Phone,Location,CustomerList,StaffList,CityRead,StaffMMList`, `Address,District,PostalCode,Phone,Location,Customer List,Staff List,City,Staff List`,
`1013 Tabuk Boulevard,West Bengali,96203,158399646978,[object Object],2,,Kanchrapara,`, `1013 Tabuk Boulevard,West Bengali,96203,158399646978,[object Object],2,,Kanchrapara,`,
`1892 Nabereznyje Telny Lane,Tutuila,28396,478229987054,[object Object],2,,Tafuna,`, `1892 Nabereznyje Telny Lane,Tutuila,28396,478229987054,[object Object],2,,Tafuna,`,
`1993 Tabuk Lane,Tamil Nadu,64221,648482415405,[object Object],2,,Tambaram,`, `1993 Tabuk Lane,Tamil Nadu,64221,648482415405,[object Object],2,,Tambaram,`,
@ -231,7 +231,7 @@ export const genTest = (apiType, dbType) => {
const verifyCsv = (retrievedRecords) => { const verifyCsv = (retrievedRecords) => {
// expected output, statically configured // expected output, statically configured
let storedRecords = [ let storedRecords = [
`Address,District,PostalCode,Phone,Location,CustomerList,StaffList,CityRead,StaffMMList`, `Address,District,PostalCode,Phone,Location,Customer List,Staff List,City,Staff List`,
`1993 Tabuk Lane,Tamil Nadu,64221,648482415405,[object Object],2,,Tambaram,`, `1993 Tabuk Lane,Tamil Nadu,64221,648482415405,[object Object],2,,Tambaram,`,
`1661 Abha Drive,Tamil Nadu,14400,270456873752,[object Object],1,,Pudukkottai,`, `1661 Abha Drive,Tamil Nadu,14400,270456873752,[object Object],1,,Pudukkottai,`,
]; ];
@ -267,24 +267,24 @@ export const genTest = (apiType, dbType) => {
it(`Share GRID view : Virtual column validation > has many`, () => { it(`Share GRID view : Virtual column validation > has many`, () => {
// verify column headers // verify column headers
cy.get('[data-col="CustomerList"]').should("exist"); cy.get('[data-col="Customer List"]').should("exist");
cy.get('[data-col="StaffList"]').should("exist"); cy.get('[data-col="Staff List"]').should("exist");
cy.get('[data-col="CityRead"]').should("exist"); cy.get('[data-col="City"]').should("exist");
cy.get('[data-col="StaffMMList"]').should("exist"); cy.get('[data-col="Staff List"]').should("exist");
// has many field validation // has many field validation
mainPage mainPage
.getCell("CustomerList", 3) .getCell("Customer List", 3)
.click() .click()
.find("button.mdi-close-thick") .find("button.mdi-close-thick")
.should("not.exist"); .should("not.exist");
mainPage mainPage
.getCell("CustomerList", 3) .getCell("Customer List", 3)
.click() .click()
.find("button.mdi-plus") .find("button.mdi-plus")
.should("not.exist"); .should("not.exist");
mainPage mainPage
.getCell("CustomerList", 3) .getCell("Customer List", 3)
.click() .click()
.find("button.mdi-arrow-expand") .find("button.mdi-arrow-expand")
.click(); .click();
@ -308,17 +308,17 @@ export const genTest = (apiType, dbType) => {
it(`Share GRID view : Virtual column validation > belongs to`, () => { it(`Share GRID view : Virtual column validation > belongs to`, () => {
// belongs to field validation // belongs to field validation
mainPage mainPage
.getCell("CityRead", 1) .getCell("City", 1)
.click() .click()
.find("button.mdi-close-thick") .find("button.mdi-close-thick")
.should("not.exist"); .should("not.exist");
mainPage mainPage
.getCell("CityRead", 1) .getCell("City", 1)
.click() .click()
.find("button.mdi-arrow-expand") .find("button.mdi-arrow-expand")
.should("not.exist"); .should("not.exist");
mainPage mainPage
.getCell("CityRead", 1) .getCell("City", 1)
.find(".v-chip") .find(".v-chip")
.contains("Kanchrapara") .contains("Kanchrapara")
.should("exist"); .should("exist");
@ -327,17 +327,17 @@ export const genTest = (apiType, dbType) => {
it(`Share GRID view : Virtual column validation > many to many`, () => { it(`Share GRID view : Virtual column validation > many to many`, () => {
// many-to-many field validation // many-to-many field validation
mainPage mainPage
.getCell("StaffMMList", 1) .getCell("Staff List", 1)
.click() .click()
.find("button.mdi-close-thick") .find("button.mdi-close-thick")
.should("not.exist"); .should("not.exist");
mainPage mainPage
.getCell("StaffMMList", 1) .getCell("Staff List", 1)
.click() .click()
.find("button.mdi-plus") .find("button.mdi-plus")
.should("not.exist"); .should("not.exist");
mainPage mainPage
.getCell("StaffMMList", 1) .getCell("Staff List", 1)
.click() .click()
.find("button.mdi-arrow-expand") .find("button.mdi-arrow-expand")
.click(); .click();

28
scripts/cypress/integration/common/4f_pg_grid_view_share.js

@ -228,7 +228,7 @@ export const genTest = (apiType, dbType) => {
const verifyCsv = (retrievedRecords) => { const verifyCsv = (retrievedRecords) => {
// expected output, statically configured // expected output, statically configured
let storedRecords = [ let storedRecords = [
`Address,District,PostalCode,Phone,Location,CustomerList,StaffList,CityRead,StaffMMList`, `Address,District,PostalCode,Phone,Location,Customer List,Staff List,City,Staff List`,
`1888 Kabul Drive,,20936,,1,,Ife,,`, `1888 Kabul Drive,,20936,,1,,Ife,,`,
`1661 Abha Drive,,14400,,1,,Pudukkottai,,`, `1661 Abha Drive,,14400,,1,,Pudukkottai,,`,
]; ];
@ -262,24 +262,24 @@ export const genTest = (apiType, dbType) => {
it(`Share GRID view : Virtual column validation > has many`, () => { it(`Share GRID view : Virtual column validation > has many`, () => {
// verify column headers // verify column headers
cy.get('[data-col="CustomerList"]').should("exist"); cy.get('[data-col="Customer List"]').should("exist");
cy.get('[data-col="StaffList"]').should("exist"); cy.get('[data-col="Staff List"]').should("exist");
cy.get('[data-col="CityRead"]').should("exist"); cy.get('[data-col="City"]').should("exist");
cy.get('[data-col="StaffMMList"]').should("exist"); cy.get('[data-col="Staff List"]').should("exist");
// has many field validation // has many field validation
mainPage mainPage
.getCell("CustomerList", 3) .getCell("Customer List", 3)
.click() .click()
.find("button.mdi-close-thick") .find("button.mdi-close-thick")
.should("not.exist"); .should("not.exist");
mainPage mainPage
.getCell("CustomerList", 3) .getCell("Customer List", 3)
.click() .click()
.find("button.mdi-plus") .find("button.mdi-plus")
.should("not.exist"); .should("not.exist");
mainPage mainPage
.getCell("CustomerList", 3) .getCell("Customer List", 3)
.click() .click()
.find("button.mdi-arrow-expand") .find("button.mdi-arrow-expand")
.click(); .click();
@ -303,17 +303,17 @@ export const genTest = (apiType, dbType) => {
it(`Share GRID view : Virtual column validation > belongs to`, () => { it(`Share GRID view : Virtual column validation > belongs to`, () => {
// belongs to field validation // belongs to field validation
mainPage mainPage
.getCell("CityRead", 1) .getCell("City", 1)
.click() .click()
.find("button.mdi-close-thick") .find("button.mdi-close-thick")
.should("not.exist"); .should("not.exist");
mainPage mainPage
.getCell("CityRead", 1) .getCell("City", 1)
.click() .click()
.find("button.mdi-arrow-expand") .find("button.mdi-arrow-expand")
.should("not.exist"); .should("not.exist");
mainPage mainPage
.getCell("CityRead", 1) .getCell("City", 1)
.find(".v-chip") .find(".v-chip")
.contains("al-Ayn") .contains("al-Ayn")
.should("exist"); .should("exist");
@ -322,17 +322,17 @@ export const genTest = (apiType, dbType) => {
it(`Share GRID view : Virtual column validation > many to many`, () => { it(`Share GRID view : Virtual column validation > many to many`, () => {
// many-to-many field validation // many-to-many field validation
mainPage mainPage
.getCell("StaffMMList", 1) .getCell("Staff List", 1)
.click() .click()
.find("button.mdi-close-thick") .find("button.mdi-close-thick")
.should("not.exist"); .should("not.exist");
mainPage mainPage
.getCell("StaffMMList", 1) .getCell("Staff List", 1)
.click() .click()
.find("button.mdi-plus") .find("button.mdi-plus")
.should("not.exist"); .should("not.exist");
mainPage mainPage
.getCell("StaffMMList", 1) .getCell("Staff List", 1)
.click() .click()
.find("button.mdi-arrow-expand") .find("button.mdi-arrow-expand")
.click(); .click();

2
scripts/cypress/integration/common/5a_user_role.js

@ -209,7 +209,7 @@ export const genTest = (apiType, dbType) => {
const verifyCsv = (retrievedRecords) => { const verifyCsv = (retrievedRecords) => {
// expected output, statically configured // expected output, statically configured
let storedRecords = [ let storedRecords = [
`City,AddressList,CountryRead`, `City,Address List,Country`,
`A Corua (La Corua),939 Probolinggo Loop,Spain`, `A Corua (La Corua),939 Probolinggo Loop,Spain`,
`Abha,733 Mandaluyong Place,Saudi Arabia`, `Abha,733 Mandaluyong Place,Saudi Arabia`,
`Abu Dhabi,535 Ahmadnagar Manor,United Arab Emirates`, `Abu Dhabi,535 Ahmadnagar Manor,United Arab Emirates`,

4
scripts/cypress/integration/common/6b_downloadCsv.js

@ -31,7 +31,7 @@ export const genTest = (apiType, dbType) => {
// `Angola,"Benguela, Namibe"`, // `Angola,"Benguela, Namibe"`,
// ]; // ];
let storedRecords = [ let storedRecords = [
['Country','CityList'], ['Country','City List'],
['Afghanistan','Kabul'], ['Afghanistan','Kabul'],
['Algeria','Skikda', 'Bchar', 'Batna'], ['Algeria','Skikda', 'Bchar', 'Batna'],
['American Samoa','Tafuna'], ['American Samoa','Tafuna'],
@ -41,7 +41,7 @@ export const genTest = (apiType, dbType) => {
// if (isPostgres()) { // if (isPostgres()) {
// // order of second entry is different // // order of second entry is different
// storedRecords = [ // storedRecords = [
// `Country,CityList`, // `Country,City List`,
// `Afghanistan,Kabul`, // `Afghanistan,Kabul`,
// `Algeria,"Skikda, Bchar, Batna"`, // `Algeria,"Skikda, Bchar, Batna"`,
// `American Samoa,Tafuna`, // `American Samoa,Tafuna`,

2
scripts/cypress/integration/common/6f_attachments.js

@ -113,7 +113,7 @@ export const genTest = (apiType, dbType) => {
const verifyCsv = (retrievedRecords) => { const verifyCsv = (retrievedRecords) => {
let storedRecords = [ let storedRecords = [
`Country,CityList,testAttach`, `Country,City List,testAttach`,
`Afghanistan,Kabul,1.json(http://localhost:8080/download/p_h0wxjx5kgoq3w4/vw_skyvc7hsp9i34a/2HvU8R.json)`, `Afghanistan,Kabul,1.json(http://localhost:8080/download/p_h0wxjx5kgoq3w4/vw_skyvc7hsp9i34a/2HvU8R.json)`,
]; ];

2
scripts/cypress/integration/spec/roleValidation.spec.js

@ -236,7 +236,7 @@ export function _viewMenu(roleType, previewMode, navDrawListCnt) {
// Download CSV / Upload CSV / Shared View List / Webhook // Download CSV / Upload CSV / Shared View List / Webhook
actionsMenuItemsCnt = 4; actionsMenuItemsCnt = 4;
} else if (roleType == "editor") { } else if (roleType == "editor") {
// Download CSV / Upload CSV // Download CSV / Upload CSV
actionsMenuItemsCnt = 2; actionsMenuItemsCnt = 2;
} }

Loading…
Cancel
Save