|
|
@ -6,11 +6,9 @@ export const genTest = (apiType, dbType) => { |
|
|
|
if (!isTestSuiteActive(apiType, dbType)) return; |
|
|
|
if (!isTestSuiteActive(apiType, dbType)) return; |
|
|
|
|
|
|
|
|
|
|
|
describe(`${apiType.toUpperCase()} Columns of type attachment`, () => { |
|
|
|
describe(`${apiType.toUpperCase()} Columns of type attachment`, () => { |
|
|
|
before(() => { |
|
|
|
// before(() => {
|
|
|
|
loginPage.loginAndOpenProject(apiType, dbType); |
|
|
|
// // loginPage.loginAndOpenProject(apiType, dbType);
|
|
|
|
cy.openTableTab("Country", 25); |
|
|
|
// });
|
|
|
|
cy.saveLocalStorage(); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
beforeEach(() => { |
|
|
|
beforeEach(() => { |
|
|
|
cy.restoreLocalStorage(); |
|
|
|
cy.restoreLocalStorage(); |
|
|
@ -49,6 +47,8 @@ export const genTest = (apiType, dbType) => { |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
it(`Add column of type attachments`, () => { |
|
|
|
it(`Add column of type attachments`, () => { |
|
|
|
|
|
|
|
cy.openTableTab("Country", 25); |
|
|
|
|
|
|
|
|
|
|
|
mainPage.addColumnWithType("testAttach", "Attachment", "Country"); |
|
|
|
mainPage.addColumnWithType("testAttach", "Attachment", "Country"); |
|
|
|
|
|
|
|
|
|
|
|
for (let i = 4; i <= 6; i++) { |
|
|
|
for (let i = 4; i <= 6; i++) { |
|
|
@ -77,7 +77,7 @@ export const genTest = (apiType, dbType) => { |
|
|
|
|
|
|
|
|
|
|
|
mainPage.shareView().click(); |
|
|
|
mainPage.shareView().click(); |
|
|
|
|
|
|
|
|
|
|
|
cy.wait(5000); |
|
|
|
// cy.wait(5000);
|
|
|
|
|
|
|
|
|
|
|
|
// copy link text, visit URL
|
|
|
|
// copy link text, visit URL
|
|
|
|
cy.getActiveModal(".nc-modal-share-view") |
|
|
|
cy.getActiveModal(".nc-modal-share-view") |
|
|
@ -85,6 +85,10 @@ export const genTest = (apiType, dbType) => { |
|
|
|
.contains("/nc/form/", { timeout: 10000 }) |
|
|
|
.contains("/nc/form/", { timeout: 10000 }) |
|
|
|
.should("exist") |
|
|
|
.should("exist") |
|
|
|
.then(($obj) => { |
|
|
|
.then(($obj) => { |
|
|
|
|
|
|
|
cy.intercept("/api/v1/db/public/shared-view/**").as( |
|
|
|
|
|
|
|
"waitForSharedViewLoad" |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
let linkText = $obj.text().trim(); |
|
|
|
let linkText = $obj.text().trim(); |
|
|
|
cy.log(linkText); |
|
|
|
cy.log(linkText); |
|
|
|
|
|
|
|
|
|
|
@ -93,10 +97,12 @@ export const genTest = (apiType, dbType) => { |
|
|
|
cy.visit(linkText, { |
|
|
|
cy.visit(linkText, { |
|
|
|
baseUrl: null, |
|
|
|
baseUrl: null, |
|
|
|
}); |
|
|
|
}); |
|
|
|
cy.wait(5000); |
|
|
|
// cy.wait(5000);
|
|
|
|
|
|
|
|
cy.wait(["@waitForSharedViewLoad"]); |
|
|
|
|
|
|
|
|
|
|
|
// wait for share view page to load!
|
|
|
|
// wait for share view page to load!
|
|
|
|
cy.get(".nc-form").should("exist"); |
|
|
|
cy.get(".nc-form").should("exist"); |
|
|
|
|
|
|
|
cy.get("button:contains(Submit)").should("exist"); |
|
|
|
|
|
|
|
|
|
|
|
// fill form
|
|
|
|
// fill form
|
|
|
|
// 0: Country
|
|
|
|
// 0: Country
|
|
|
@ -128,7 +134,7 @@ export const genTest = (apiType, dbType) => { |
|
|
|
// projectsPage.openConfiguredProject(apiType, dbType);
|
|
|
|
// projectsPage.openConfiguredProject(apiType, dbType);
|
|
|
|
|
|
|
|
|
|
|
|
cy.openTableTab("Country", 25); |
|
|
|
cy.openTableTab("Country", 25); |
|
|
|
cy.wait(1000); |
|
|
|
// cy.wait(1000);
|
|
|
|
|
|
|
|
|
|
|
|
mainPage.filterField("testAttach", "is not null", null); |
|
|
|
mainPage.filterField("testAttach", "is not null", null); |
|
|
|
mainPage.hideField("LastUpdate"); |
|
|
|
mainPage.hideField("LastUpdate"); |
|
|
|