@ -6,7 +6,7 @@ export const genTest = (apiType, dbType) => {
if ( ! isTestSuiteActive ( apiType , dbType ) ) return ;
if ( ! isTestSuiteActive ( apiType , dbType ) ) return ;
// tbd: this needs a proper fix
// tbd: this needs a proper fix
let waitTime = 200 0;
let waitTime = 0 ;
let clear ;
let clear ;
describe ( ` ${ apiType . toUpperCase ( ) } api - Link to another record ` , ( ) => {
describe ( ` ${ apiType . toUpperCase ( ) } api - Link to another record ` , ( ) => {
@ -185,7 +185,6 @@ export const genTest = (apiType, dbType) => {
// Click on `Add new row` button
// Click on `Add new row` button
cy . get ( ".nc-add-new-row-btn:visible" ) . should ( "exist" ) ;
cy . get ( ".nc-add-new-row-btn:visible" ) . should ( "exist" ) ;
cy . get ( ".nc-add-new-row-btn" ) . click ( ) ;
cy . get ( ".nc-add-new-row-btn" ) . click ( ) ;
cy . wait ( waitTime ) ;
// Title
// Title
cy . get ( ".nc-expand-col-Title" )
cy . get ( ".nc-expand-col-Title" )
@ -205,32 +204,26 @@ export const genTest = (apiType, dbType) => {
. find ( ".nc-action-icon" )
. find ( ".nc-action-icon" )
. should ( "exist" )
. should ( "exist" )
. click ( { force : true } ) ;
. click ( { force : true } ) ;
cy . wait ( waitTime ) ;
cy . wait ( "@waitForCardLoad" ) ;
cy . wait ( "@waitForCardLoad" ) ;
cy . getActiveModal ( ".nc-modal-link-record" )
cy . getActiveModal ( ".nc-modal-link-record" )
. find ( ".ant-card" )
. find ( ".ant-card" )
. should ( "exist" )
. should ( "exist" )
. eq ( 0 )
. eq ( 0 )
. click ( ) ;
. click ( ) ;
cy . wait ( waitTime ) ;
// MM
// MM
cy . get ( ".nc-expand-col-Sheet1.List" ) . find ( ".ant-btn-primary" ) . click ( ) ;
cy . get ( ".nc-expand-col-Sheet1.List" ) . find ( ".ant-btn-primary" ) . click ( ) ;
cy . wait ( waitTime ) ;
cy . wait ( "@waitForCardLoad" ) ;
cy . wait ( "@waitForCardLoad" ) ;
cy . getActiveModal ( ".nc-modal-link-record" )
cy . getActiveModal ( ".nc-modal-link-record" )
. find ( ".ant-card" )
. find ( ".ant-card" )
. should ( "exist" )
. should ( "exist" )
. eq ( 0 )
. eq ( 0 )
. click ( ) ;
. click ( ) ;
cy . wait ( waitTime ) ;
// HM
// HM
cy . get ( ".nc-expand-col-Link2-1hm" ) . find ( ".ant-btn-primary" ) . click ( ) ;
cy . get ( ".nc-expand-col-Link2-1hm" ) . find ( ".ant-btn-primary" ) . click ( ) ;
cy . wait ( waitTime ) ;
cy . wait ( "@waitForCardLoad" ) ;
cy . wait ( "@waitForCardLoad" ) ;
cy . getActiveModal ( ) . find ( ".ant-card" ) . should ( "exist" ) . eq ( 0 ) . click ( ) ;
cy . getActiveModal ( ) . find ( ".ant-card" ) . should ( "exist" ) . eq ( 0 ) . click ( ) ;
cy . wait ( waitTime ) ;
// Save row
// Save row
cy . getActiveDrawer ( ".nc-drawer-expanded-form" )
cy . getActiveDrawer ( ".nc-drawer-expanded-form" )
@ -256,13 +249,11 @@ export const genTest = (apiType, dbType) => {
. getCell ( "Sheet1" , 2 )
. getCell ( "Sheet1" , 2 )
. find ( ".nc-action-icon" )
. find ( ".nc-action-icon" )
. click ( { force : true } ) ;
. click ( { force : true } ) ;
cy . wait ( waitTime ) ;
cy . getActiveModal ( ".nc-modal-link-record" )
cy . getActiveModal ( ".nc-modal-link-record" )
. find ( ".ant-card" )
. find ( ".ant-card" )
. should ( "exist" )
. should ( "exist" )
. eq ( 1 )
. eq ( 1 )
. click ( ) ;
. click ( ) ;
cy . wait ( waitTime ) ;
// MM
// MM
mainPage
mainPage
@ -270,13 +261,11 @@ export const genTest = (apiType, dbType) => {
. find ( ".nc-action-icon" )
. find ( ".nc-action-icon" )
. last ( )
. last ( )
. click ( { force : true } ) ;
. click ( { force : true } ) ;
cy . wait ( waitTime ) ;
cy . getActiveModal ( ".nc-modal-link-record" )
cy . getActiveModal ( ".nc-modal-link-record" )
. find ( ".ant-card" )
. find ( ".ant-card" )
. should ( "exist" )
. should ( "exist" )
. eq ( 1 )
. eq ( 1 )
. click ( ) ;
. click ( ) ;
cy . wait ( waitTime ) ;
// HM
// HM
mainPage
mainPage
@ -284,13 +273,11 @@ export const genTest = (apiType, dbType) => {
. find ( ".nc-action-icon" )
. find ( ".nc-action-icon" )
. last ( )
. last ( )
. click ( { force : true } ) ;
. click ( { force : true } ) ;
cy . wait ( waitTime ) ;
cy . getActiveModal ( ".nc-modal-link-record" )
cy . getActiveModal ( ".nc-modal-link-record" )
. find ( ".ant-card" )
. find ( ".ant-card" )
. should ( "exist" )
. should ( "exist" )
. eq ( 1 )
. eq ( 1 )
. click ( ) ;
. click ( ) ;
cy . wait ( waitTime ) ;
} ) ;
} ) ;
// Existing row, expand record
// Existing row, expand record
@ -300,49 +287,37 @@ export const genTest = (apiType, dbType) => {
addRow ( 3 , "2c" ) ;
addRow ( 3 , "2c" ) ;
cy . wait ( waitTime ) ;
cy . get ( ".nc-row-expand" ) . eq ( 2 ) . click ( { force : true } ) ;
cy . get ( ".nc-row-expand" ) . eq ( 2 ) . click ( { force : true } ) ;
cy . wait ( waitTime ) ;
// wait for page render to complete
// wait for page render to complete
cy . get ( 'button:contains("Save row"):visible' ) . should ( "exist" ) ;
cy . get ( 'button:contains("Save row"):visible' ) . should ( "exist" ) ;
// BT
// BT
cy . wait ( waitTime ) ;
cy . get ( ".nc-expand-col-Sheet1" )
cy . get ( ".nc-expand-col-Sheet1" )
. find ( ".nc-action-icon" )
. find ( ".nc-action-icon" )
. should ( "exist" )
. should ( "exist" )
. click ( { force : true } ) ;
. click ( { force : true } ) ;
cy . wait ( waitTime ) ;
// cy.wait("@waitForCardLoad");
cy . getActiveModal ( ".nc-modal-link-record" )
cy . getActiveModal ( ".nc-modal-link-record" )
. find ( ".ant-card" )
. find ( ".ant-card" )
. should ( "exist" )
. should ( "exist" )
. eq ( 2 )
. eq ( 2 )
. click ( ) ;
. click ( ) ;
cy . wait ( waitTime ) ;
// MM
// MM
cy . get ( ".nc-expand-col-Sheet1.List" ) . find ( ".ant-btn-primary" ) . click ( ) ;
cy . get ( ".nc-expand-col-Sheet1.List" ) . find ( ".ant-btn-primary" ) . click ( ) ;
cy . wait ( waitTime ) ;
// cy.wait("@waitForCardLoad");
cy . getActiveModal ( ".nc-modal-link-record" )
cy . getActiveModal ( ".nc-modal-link-record" )
. find ( ".ant-card" )
. find ( ".ant-card" )
. should ( "exist" )
. should ( "exist" )
. eq ( 2 )
. eq ( 2 )
. click ( ) ;
. click ( ) ;
cy . wait ( waitTime ) ;
// HM
// HM
cy . get ( ".nc-expand-col-Link2-1hm" ) . find ( ".ant-btn-primary" ) . click ( ) ;
cy . get ( ".nc-expand-col-Link2-1hm" ) . find ( ".ant-btn-primary" ) . click ( ) ;
cy . wait ( waitTime ) ;
// cy.wait("@waitForCardLoad");
cy . getActiveModal ( ".nc-modal-link-record" )
cy . getActiveModal ( ".nc-modal-link-record" )
. find ( ".ant-card" )
. find ( ".ant-card" )
. should ( "exist" )
. should ( "exist" )
. eq ( 2 )
. eq ( 2 )
. click ( ) ;
. click ( ) ;
cy . wait ( waitTime ) ;
cy . getActiveDrawer ( ".nc-drawer-expanded-form" )
cy . getActiveDrawer ( ".nc-drawer-expanded-form" )
. find ( "button" )
. find ( "button" )