ci: Release v1.7.4
Release v1.7.4
This commit is contained in:
commit
4e8ebfbfeb
2
.github/config.json
vendored
2
.github/config.json
vendored
File diff suppressed because one or more lines are too long
1
.github/workflows/release-drafter.yml
vendored
1
.github/workflows/release-drafter.yml
vendored
|
|
@ -25,5 +25,6 @@ jobs:
|
|||
# (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml
|
||||
config-name: release-drafter-template.yml
|
||||
disable-autolabeler: true
|
||||
commitish: master
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
|
|
|||
1398
app/client/cypress/fixtures/CharacterDTdsl.json
Normal file
1398
app/client/cypress/fixtures/CharacterDTdsl.json
Normal file
File diff suppressed because it is too large
Load Diff
1501
app/client/cypress/fixtures/DateTimeDTdsl.json
Normal file
1501
app/client/cypress/fixtures/DateTimeDTdsl.json
Normal file
File diff suppressed because it is too large
Load Diff
1218
app/client/cypress/fixtures/NumericDTdsl.json
Normal file
1218
app/client/cypress/fixtures/NumericDTdsl.json
Normal file
File diff suppressed because it is too large
Load Diff
127
app/client/cypress/fixtures/datePickerdsl.json
Normal file
127
app/client/cypress/fixtures/datePickerdsl.json
Normal file
|
|
@ -0,0 +1,127 @@
|
|||
{
|
||||
"dsl": {
|
||||
"widgetName": "MainContainer",
|
||||
"backgroundColor": "none",
|
||||
"rightColumn": 4896,
|
||||
"snapColumns": 64,
|
||||
"detachFromLayout": true,
|
||||
"widgetId": "0",
|
||||
"topRow": 0,
|
||||
"bottomRow": 5120,
|
||||
"containerStyle": "none",
|
||||
"snapRows": 128,
|
||||
"parentRowSpace": 1,
|
||||
"type": "CANVAS_WIDGET",
|
||||
"canExtend": true,
|
||||
"version": 59,
|
||||
"minHeight": 1292,
|
||||
"parentColumnSpace": 1,
|
||||
"dynamicBindingPathList": [],
|
||||
"leftColumn": 0,
|
||||
"children": [
|
||||
{
|
||||
"boxShadow": "none",
|
||||
"minDate": "",
|
||||
"widgetName": "DatePicker1",
|
||||
"dateFormat": "DD/MM/YYYY HH:mm",
|
||||
"dynamicPropertyPathList": [
|
||||
{
|
||||
"key": "defaultDate"
|
||||
},
|
||||
{
|
||||
"key": "minDate"
|
||||
},
|
||||
{
|
||||
"key": "maxDate"
|
||||
}
|
||||
],
|
||||
"topRow": 0,
|
||||
"bottomRow": 4,
|
||||
"shortcuts": false,
|
||||
"parentRowSpace": 40,
|
||||
"type": "DATE_PICKER_WIDGET2",
|
||||
"parentColumnSpace": 74,
|
||||
"dynamicTriggerPathList": [],
|
||||
"leftColumn": 20,
|
||||
"dynamicBindingPathList": [
|
||||
{
|
||||
"key": "accentColor"
|
||||
}
|
||||
],
|
||||
"isDisabled": false,
|
||||
"labelTextSize": "0.875rem",
|
||||
"isRequired": false,
|
||||
"defaultDate": "",
|
||||
"rightColumn": 40,
|
||||
"widgetId": "w4htilgv5t",
|
||||
"accentColor": "{{appsmith.theme.colors.primaryColor}}",
|
||||
"isVisible": true,
|
||||
"datePickerType": "DATE_PICKER",
|
||||
"label": "",
|
||||
"version": 2,
|
||||
"parentId": "0",
|
||||
"isLoading": false,
|
||||
"borderRadius": "0px",
|
||||
"closeOnSelection": false,
|
||||
"maxDate": ""
|
||||
},
|
||||
{
|
||||
"boxShadow": "none",
|
||||
"widgetName": "Text1",
|
||||
"topRow": 12,
|
||||
"bottomRow": 16,
|
||||
"parentRowSpace": 40,
|
||||
"type": "TEXT_WIDGET",
|
||||
"parentColumnSpace": 74,
|
||||
"overflow": "NONE",
|
||||
"fontFamily": "System Default",
|
||||
"dynamicTriggerPathList": [],
|
||||
"leftColumn": 4,
|
||||
"dynamicBindingPathList": [
|
||||
{
|
||||
"key": "text"
|
||||
}
|
||||
],
|
||||
"text": "{{DatePicker1.formattedDate}}",
|
||||
"labelTextSize": "0.875rem",
|
||||
"rightColumn": 20,
|
||||
"textAlign": "LEFT",
|
||||
"widgetId": "voohxsv4t2",
|
||||
"isVisible": true,
|
||||
"fontStyle": "BOLD",
|
||||
"version": 1,
|
||||
"textColor": "#231F20",
|
||||
"parentId": "0",
|
||||
"isLoading": false,
|
||||
"borderRadius": "0px",
|
||||
"fontSize": "0.875rem"
|
||||
},
|
||||
{
|
||||
"boxShadow": "none",
|
||||
"widgetName": "Text2",
|
||||
"topRow": 12,
|
||||
"bottomRow": 16,
|
||||
"parentRowSpace": 40,
|
||||
"type": "TEXT_WIDGET",
|
||||
"parentColumnSpace": 74,
|
||||
"overflow": "NONE",
|
||||
"fontFamily": "System Default",
|
||||
"leftColumn": 32,
|
||||
"dynamicBindingPathList": [],
|
||||
"text": "Label",
|
||||
"labelTextSize": "0.875rem",
|
||||
"rightColumn": 48,
|
||||
"textAlign": "LEFT",
|
||||
"widgetId": "xif8wugzjv",
|
||||
"isVisible": true,
|
||||
"fontStyle": "BOLD",
|
||||
"version": 1,
|
||||
"textColor": "#231F20",
|
||||
"parentId": "0",
|
||||
"isLoading": false,
|
||||
"borderRadius": "0px",
|
||||
"fontSize": "0.875rem"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
@ -6,7 +6,7 @@
|
|||
"data": [
|
||||
{
|
||||
"id": "616d7e429594b25adfa3e57e",
|
||||
"organizationId": "6156b8c6c7e12534da9c5a1d",
|
||||
"workspaceId": "6156b8c6c7e12534da9c5a1d",
|
||||
"pluginType": "DB",
|
||||
"pluginId": "6156b848c7e12534da9c5985",
|
||||
"name": "InsertQuery",
|
||||
|
|
@ -87,7 +87,7 @@
|
|||
},
|
||||
{
|
||||
"id": "616d7e429594b25adfa3e57d",
|
||||
"organizationId": "6156b8c6c7e12534da9c5a1d",
|
||||
"workspaceId": "6156b8c6c7e12534da9c5a1d",
|
||||
"pluginType": "DB",
|
||||
"pluginId": "6156b848c7e12534da9c5985",
|
||||
"name": "DeleteQuery",
|
||||
|
|
@ -169,7 +169,7 @@
|
|||
},
|
||||
{
|
||||
"id": "616d7e429594b25adfa3e580",
|
||||
"organizationId": "6156b8c6c7e12534da9c5a1d",
|
||||
"workspaceId": "6156b8c6c7e12534da9c5a1d",
|
||||
"pluginType": "DB",
|
||||
"pluginId": "6156b848c7e12534da9c5985",
|
||||
"name": "FindQuery",
|
||||
|
|
@ -266,7 +266,7 @@
|
|||
},
|
||||
{
|
||||
"id": "616d7e429594b25adfa3e57f",
|
||||
"organizationId": "6156b8c6c7e12534da9c5a1d",
|
||||
"workspaceId": "6156b8c6c7e12534da9c5a1d",
|
||||
"pluginType": "DB",
|
||||
"pluginId": "6156b848c7e12534da9c5985",
|
||||
"name": "UpdateQuery",
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
"data": [
|
||||
{
|
||||
"id": "616532b5b58fda6558e56bb9",
|
||||
"organizationId": "6156b8c6c7e12534da9c5a1d",
|
||||
"workspaceId": "6156b8c6c7e12534da9c5a1d",
|
||||
"pluginType": "DB",
|
||||
"pluginId": "6156b849c7e12534da9c5998",
|
||||
"name": "DeleteQuery",
|
||||
|
|
@ -47,7 +47,7 @@
|
|||
},
|
||||
{
|
||||
"id": "616532b5b58fda6558e56bbc",
|
||||
"organizationId": "6156b8c6c7e12534da9c5a1d",
|
||||
"workspaceId": "6156b8c6c7e12534da9c5a1d",
|
||||
"pluginType": "DB",
|
||||
"pluginId": "6156b849c7e12534da9c5998",
|
||||
"name": "UpdateQuery",
|
||||
|
|
@ -96,7 +96,7 @@
|
|||
},
|
||||
{
|
||||
"id": "616532b5b58fda6558e56bbb",
|
||||
"organizationId": "6156b8c6c7e12534da9c5a1d",
|
||||
"workspaceId": "6156b8c6c7e12534da9c5a1d",
|
||||
"pluginType": "DB",
|
||||
"pluginId": "6156b849c7e12534da9c5998",
|
||||
"name": "InsertQuery",
|
||||
|
|
@ -145,7 +145,7 @@
|
|||
},
|
||||
{
|
||||
"id": "616532b5b58fda6558e56bba",
|
||||
"organizationId": "6156b8c6c7e12534da9c5a1d",
|
||||
"workspaceId": "6156b8c6c7e12534da9c5a1d",
|
||||
"pluginType": "DB",
|
||||
"pluginId": "6156b849c7e12534da9c5998",
|
||||
"name": "SelectQuery",
|
||||
|
|
|
|||
|
|
@ -11,8 +11,8 @@
|
|||
"email": "viewerappsmith@mailinator.com",
|
||||
"source": "FORM",
|
||||
"isEnabled": true,
|
||||
"currentOrganizationId": "5f16f6ea5536dc1f0549e42e",
|
||||
"organizationIds": [
|
||||
"currentWorkspaceId": "5f16f6ea5536dc1f0549e42e",
|
||||
"workspaceIds": [
|
||||
"5f0d4e14d3f75e0ed39f20be",
|
||||
"5f0d4f38d3f75e0ed39f20c4",
|
||||
"5f0d557dd3f75e0ed39f20ce",
|
||||
|
|
@ -132,7 +132,7 @@
|
|||
"6057644469c2320b5c462471",
|
||||
"6057653869c2320b5c462478"
|
||||
],
|
||||
"examplesOrganizationId": "5f16f6ea5536dc1f0549e42e",
|
||||
"examplesWorkspaceId": "5f16f6ea5536dc1f0549e42e",
|
||||
"groupIds": [],
|
||||
"permissions": [],
|
||||
"isAnonymous": false,
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
],
|
||||
"name": "Untitled Datasource 5213",
|
||||
"pluginId": "5e687c18fb01e64e6a3f873f",
|
||||
"organizationId": "5fd639aceb554e031ee61fef",
|
||||
"workspaceId": "5fd639aceb554e031ee61fef",
|
||||
"datasourceConfiguration": {
|
||||
"connection": {
|
||||
"mode": "READ_WRITE",
|
||||
|
|
|
|||
|
|
@ -10,6 +10,6 @@
|
|||
"isEnabled": true,
|
||||
"isSuperUser": true,
|
||||
"name": "test",
|
||||
"organizationIds": ["61a8a112ccc8b629d92a1aad"],
|
||||
"workspaceIds": ["61a8a112ccc8b629d92a1aad"],
|
||||
"username": "test@appsmith.com"
|
||||
}
|
||||
|
|
@ -13,15 +13,15 @@ let homePage = ObjectsRegistry.HomePage,
|
|||
|
||||
describe("AForce - Community Issues page validations", function() {
|
||||
before(function() {
|
||||
agHelper.clearLocalStorageCache();
|
||||
agHelper.ClearLocalStorageCache();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
agHelper.restoreLocalStorageCache();
|
||||
agHelper.RestoreLocalStorageCache();
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
agHelper.saveLocalStorageCache();
|
||||
agHelper.SaveLocalStorageCache();
|
||||
});
|
||||
|
||||
let selectedRow: number;
|
||||
|
|
@ -104,7 +104,7 @@ describe("AForce - Community Issues page validations", function() {
|
|||
});
|
||||
|
||||
it("3. Validate table navigation with Server Side pagination disabled with Default selected row selection", () => {
|
||||
agHelper.NavigateBacktoEditor();
|
||||
deployMode.NavigateBacktoEditor();
|
||||
table.WaitUntilTableLoad();
|
||||
ee.SelectEntityByName("Table1", "WIDGETS");
|
||||
propPane.ToggleOnOrOff("serversidepagination", "Off");
|
||||
|
|
@ -112,7 +112,7 @@ describe("AForce - Community Issues page validations", function() {
|
|||
table.WaitUntilTableLoad();
|
||||
table.AssertPageNumber(1, "Off");
|
||||
table.AssertSelectedRow(selectedRow);
|
||||
agHelper.NavigateBacktoEditor();
|
||||
deployMode.NavigateBacktoEditor();
|
||||
table.WaitUntilTableLoad();
|
||||
ee.SelectEntityByName("Table1", "WIDGETS");
|
||||
propPane.ToggleOnOrOff("serversidepagination", "On");
|
||||
|
|
@ -127,7 +127,7 @@ describe("AForce - Community Issues page validations", function() {
|
|||
table.NavigateToNextPage(); //page 2
|
||||
table.AssertPageNumber(2);
|
||||
table.AssertSelectedRow(1);
|
||||
agHelper.NavigateBacktoEditor();
|
||||
deployMode.NavigateBacktoEditor();
|
||||
table.WaitUntilTableLoad();
|
||||
});
|
||||
|
||||
|
|
@ -138,14 +138,14 @@ describe("AForce - Community Issues page validations", function() {
|
|||
table.AssertSearchText("Bug");
|
||||
table.WaitUntilTableLoad();
|
||||
table.WaitUntilTableLoad();
|
||||
agHelper.NavigateBacktoEditor();
|
||||
deployMode.NavigateBacktoEditor();
|
||||
|
||||
ee.SelectEntityByName("Table1", "WIDGETS");
|
||||
jsEditor.EnterJSContext("Default Search Text", "Question", false);
|
||||
deployMode.DeployApp();
|
||||
table.AssertSearchText("Question");
|
||||
table.WaitUntilTableLoad();
|
||||
agHelper.NavigateBacktoEditor();
|
||||
deployMode.NavigateBacktoEditor();
|
||||
table.WaitUntilTableLoad();
|
||||
|
||||
ee.SelectEntityByName("Table1", "WIDGETS");
|
||||
|
|
@ -153,7 +153,7 @@ describe("AForce - Community Issues page validations", function() {
|
|||
deployMode.DeployApp();
|
||||
table.AssertSearchText("Epic");
|
||||
table.WaitForTableEmpty();
|
||||
agHelper.NavigateBacktoEditor();
|
||||
deployMode.NavigateBacktoEditor();
|
||||
table.WaitUntilTableLoad();
|
||||
|
||||
ee.SelectEntityByName("Table1", "WIDGETS");
|
||||
|
|
@ -176,7 +176,7 @@ describe("AForce - Community Issues page validations", function() {
|
|||
table.WaitUntilTableLoad();
|
||||
cy.xpath(table._searchBoxCross).click();
|
||||
|
||||
agHelper.NavigateBacktoEditor();
|
||||
deployMode.NavigateBacktoEditor();
|
||||
table.WaitUntilTableLoad();
|
||||
|
||||
ee.SelectEntityByName("Table1", "WIDGETS");
|
||||
|
|
@ -193,7 +193,7 @@ describe("AForce - Community Issues page validations", function() {
|
|||
table.WaitForTableEmpty();
|
||||
cy.xpath(table._searchBoxCross).click();
|
||||
|
||||
agHelper.NavigateBacktoEditor();
|
||||
deployMode.NavigateBacktoEditor();
|
||||
table.WaitUntilTableLoad();
|
||||
ee.SelectEntityByName("Table1", "WIDGETS");
|
||||
propPane.ToggleOnOrOff("enableclientsidesearch", "On");
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@ const homePage = require("../../../locators/HomePage");
|
|||
const reconnectDatasourceModal = require("../../../locators/ReconnectLocators");
|
||||
|
||||
describe("Import, Export and Fork application and validate data binding", function() {
|
||||
let orgid;
|
||||
let workspaceId;
|
||||
let appid;
|
||||
let newOrganizationName;
|
||||
let newWorkspaceName;
|
||||
let appName;
|
||||
it("Import application from json and validate data on pageload", function() {
|
||||
// import application
|
||||
|
|
@ -12,8 +12,8 @@ describe("Import, Export and Fork application and validate data binding", functi
|
|||
cy.get(homePage.optionsIcon)
|
||||
.first()
|
||||
.click();
|
||||
cy.get(homePage.orgImportAppOption).click({ force: true });
|
||||
cy.get(homePage.orgImportAppModal).should("be.visible");
|
||||
cy.get(homePage.workspaceImportAppOption).click({ force: true });
|
||||
cy.get(homePage.workspaceImportAppModal).should("be.visible");
|
||||
cy.xpath(homePage.uploadLogo).attachFile("forkedApp.json");
|
||||
cy.get(homePage.importAppProgressWrapper).should("be.visible");
|
||||
cy.wait("@importNewApplication").then((interception) => {
|
||||
|
|
@ -65,7 +65,7 @@ describe("Import, Export and Fork application and validate data binding", functi
|
|||
.first()
|
||||
.click({ force: true });
|
||||
cy.get(homePage.forkAppFromMenu).click({ force: true });
|
||||
cy.get(homePage.forkAppOrgButton).click({ force: true });
|
||||
cy.get(homePage.forkAppWorkspaceButton).click({ force: true });
|
||||
cy.wait(4000);
|
||||
// validating data binding for the forked application
|
||||
cy.xpath("//input[@value='Submit']").should("be.visible");
|
||||
|
|
@ -100,19 +100,20 @@ describe("Import, Export and Fork application and validate data binding", functi
|
|||
);
|
||||
cy.writeFile("cypress/fixtures/exportedApp.json", body, "utf-8");
|
||||
cy.generateUUID().then((uid) => {
|
||||
orgid = uid;
|
||||
localStorage.setItem("OrgName", orgid);
|
||||
cy.createOrg();
|
||||
cy.wait("@createOrg").then((createOrgInterception) => {
|
||||
newOrganizationName = createOrgInterception.response.body.data.name;
|
||||
cy.renameOrg(newOrganizationName, orgid);
|
||||
cy.get(homePage.orgImportAppOption).click({ force: true });
|
||||
workspaceId = uid;
|
||||
localStorage.setItem("OrgName", workspaceId);
|
||||
cy.createWorkspace();
|
||||
cy.wait("@createWorkspace").then((createWorkspaceInterception) => {
|
||||
newWorkspaceName =
|
||||
createWorkspaceInterception.response.body.data.name;
|
||||
cy.renameWorkspace(newWorkspaceName, workspaceId);
|
||||
cy.get(homePage.workspaceImportAppOption).click({ force: true });
|
||||
|
||||
cy.get(homePage.orgImportAppModal).should("be.visible");
|
||||
cy.get(homePage.workspaceImportAppModal).should("be.visible");
|
||||
// cy.get(".t--import-json-card input").attachFile("exportedApp.json");
|
||||
cy.xpath(homePage.uploadLogo).attachFile("exportedApp.json");
|
||||
// import exported application in new organization
|
||||
// cy.get(homePage.orgImportAppButton).click({ force: true });
|
||||
// import exported application in new workspace
|
||||
// cy.get(homePage.workspaceImportAppButton).click({ force: true });
|
||||
cy.wait("@importNewApplication").then((interception) => {
|
||||
const { isPartialImport } = interception.response.body.data;
|
||||
if (isPartialImport) {
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@ const widgetsPage = require("../../../locators/Widgets.json");
|
|||
const appPage = require("../../../locators/PgAdminlocators.json");
|
||||
|
||||
describe("PgAdmin Clone App", function() {
|
||||
let orgid;
|
||||
let newOrganizationName;
|
||||
let workspaceId;
|
||||
let newWorkspaceName;
|
||||
let appname;
|
||||
let datasourceName;
|
||||
|
||||
|
|
|
|||
|
|
@ -2,22 +2,22 @@ const homePage = require("../../../locators/HomePage");
|
|||
const reconnectDatasourceModal = require("../../../locators/ReconnectLocators");
|
||||
|
||||
describe("Reconnect Datasource Modal validation while importing application", function() {
|
||||
let orgid;
|
||||
let workspaceId;
|
||||
let appid;
|
||||
let newOrganizationName;
|
||||
let newWorkspaceName;
|
||||
let appName;
|
||||
it("Import application from json with one postgres and success modal", function() {
|
||||
cy.NavigateToHome();
|
||||
// import application
|
||||
cy.generateUUID().then((uid) => {
|
||||
orgid = uid;
|
||||
localStorage.setItem("OrgName", orgid);
|
||||
cy.createOrg();
|
||||
cy.wait("@createOrg").then((createOrgInterception) => {
|
||||
newOrganizationName = createOrgInterception.response.body.data.name;
|
||||
cy.renameOrg(newOrganizationName, orgid);
|
||||
cy.get(homePage.orgImportAppOption).click({ force: true });
|
||||
cy.get(homePage.orgImportAppModal).should("be.visible");
|
||||
workspaceId = uid;
|
||||
localStorage.setItem("OrgName", workspaceId);
|
||||
cy.createWorkspace();
|
||||
cy.wait("@createWorkspace").then((createWorkspaceInterception) => {
|
||||
newWorkspaceName = createWorkspaceInterception.response.body.data.name;
|
||||
cy.renameWorkspace(newWorkspaceName, workspaceId);
|
||||
cy.get(homePage.workspaceImportAppOption).click({ force: true });
|
||||
cy.get(homePage.workspaceImportAppModal).should("be.visible");
|
||||
cy.xpath(homePage.uploadLogo).attachFile("one_postgres.json");
|
||||
cy.wait("@importNewApplication").then((interception) => {
|
||||
cy.wait(100);
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ describe("API Panel Test Functionality ", function() {
|
|||
cy.enterDatasourceAndPath(testdata.baseUrl, "{{ '/random' }}");
|
||||
cy.assertPageSave();
|
||||
cy.get("body").click(0, 0);
|
||||
ee.expandCollapseEntity("QUERIES/JS");
|
||||
ee.ExpandCollapseEntity("QUERIES/JS");
|
||||
ee.ActionContextMenuByEntityName("FirstAPI", "Copy to page", "SecondPage");
|
||||
// click on learn how link
|
||||
cy.get(".t--learn-how-apis-link").click();
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ describe("Validate API request body panel", () => {
|
|||
|
||||
ee.SelectEntityByName("CloudinaryUploadApi", "QUERIES/JS");
|
||||
|
||||
apiPage.OnPageLoadRun(false); //Bug 12476
|
||||
apiPage.ToggleOnPageLoadRun(false); //Bug 12476
|
||||
ee.SelectEntityByName("Page1");
|
||||
deployMode.DeployApp(locator._spanButton("Select Files"));
|
||||
agHelper.ClickButton("Select Files");
|
||||
|
|
@ -145,7 +145,7 @@ describe("Validate API request body panel", () => {
|
|||
expect($src).not.eq("https://assets.appsmith.com/widgets/default.png");
|
||||
});
|
||||
agHelper.AssertElementVisible(locator._spanButton("Select Files")); //verifying if reset!
|
||||
agHelper.NavigateBacktoEditor();
|
||||
deployMode.NavigateBacktoEditor();
|
||||
});
|
||||
|
||||
it("8. Checks MultiPart form data for a Array Type upload results in API error", () => {
|
||||
|
|
|
|||
|
|
@ -618,7 +618,7 @@ describe("App Theming funtionality", function() {
|
|||
it("8. Verify widgets conform to the selected theme in Publish mode", () => {
|
||||
cy.PublishtheApp();
|
||||
|
||||
cy.wait(2000); //for theme to settle
|
||||
cy.wait(4000); //for theme to settle
|
||||
|
||||
cy.get("body").should("have.css", "font-family", "Montserrat"); //Font
|
||||
|
||||
|
|
@ -808,7 +808,7 @@ describe("App Theming funtionality", function() {
|
|||
|
||||
//Resetting back to theme
|
||||
ee.NavigateToSwitcher("explorer");
|
||||
ee.expandCollapseEntity("WIDGETS"); //to expand widgets
|
||||
ee.ExpandCollapseEntity("WIDGETS"); //to expand widgets
|
||||
ee.SelectEntityByName("Button2");
|
||||
cy.get(".t--property-control-buttoncolor .reset-button").then(($elem) => {
|
||||
$elem[0].removeAttribute("display: none");
|
||||
|
|
|
|||
|
|
@ -3,9 +3,9 @@ import homePage from "../../../../locators/HomePage";
|
|||
const commonlocators = require("../../../../locators/commonlocators.json");
|
||||
|
||||
describe("Export application as a JSON file", function() {
|
||||
let orgid;
|
||||
let workspaceId;
|
||||
let appid;
|
||||
let newOrganizationName;
|
||||
let newWorkspaceName;
|
||||
let appname;
|
||||
|
||||
before(() => {
|
||||
|
|
@ -45,15 +45,15 @@ describe("Export application as a JSON file", function() {
|
|||
it("User with admin access,should be able to export the app", function() {
|
||||
cy.LogintoApp(Cypress.env("USERNAME"), Cypress.env("PASSWORD"));
|
||||
cy.generateUUID().then((uid) => {
|
||||
orgid = uid;
|
||||
workspaceId = uid;
|
||||
appid = uid;
|
||||
localStorage.setItem("OrgName", orgid);
|
||||
cy.createOrg();
|
||||
cy.wait("@createOrg").then((interception) => {
|
||||
newOrganizationName = interception.response.body.data.name;
|
||||
cy.renameOrg(newOrganizationName, orgid);
|
||||
localStorage.setItem("OrgName", workspaceId);
|
||||
cy.createWorkspace();
|
||||
cy.wait("@createWorkspace").then((interception) => {
|
||||
newWorkspaceName = interception.response.body.data.name;
|
||||
cy.renameWorkspace(newWorkspaceName, workspaceId);
|
||||
});
|
||||
cy.CreateAppForOrg(orgid, appid);
|
||||
cy.CreateAppForWorkspace(workspaceId, appid);
|
||||
cy.wait("@getPagesForCreateApp").should(
|
||||
"have.nested.property",
|
||||
"response.body.responseMeta.status",
|
||||
|
|
@ -95,15 +95,15 @@ describe("Export application as a JSON file", function() {
|
|||
it("User with developer access,should not be able to export the app", function() {
|
||||
cy.LogintoApp(Cypress.env("USERNAME"), Cypress.env("PASSWORD"));
|
||||
cy.generateUUID().then((uid) => {
|
||||
orgid = uid;
|
||||
workspaceId = uid;
|
||||
appid = uid;
|
||||
localStorage.setItem("OrgName", orgid);
|
||||
cy.createOrg();
|
||||
cy.wait("@createOrg").then((interception) => {
|
||||
newOrganizationName = interception.response.body.data.name;
|
||||
cy.renameOrg(newOrganizationName, orgid);
|
||||
localStorage.setItem("OrgName", workspaceId);
|
||||
cy.createWorkspace();
|
||||
cy.wait("@createWorkspace").then((interception) => {
|
||||
newWorkspaceName = interception.response.body.data.name;
|
||||
cy.renameWorkspace(newWorkspaceName, workspaceId);
|
||||
});
|
||||
cy.CreateAppForOrg(orgid, appid);
|
||||
cy.CreateAppForWorkspace(workspaceId, appid);
|
||||
cy.wait("@getPagesForCreateApp").should(
|
||||
"have.nested.property",
|
||||
"response.body.responseMeta.status",
|
||||
|
|
@ -145,15 +145,15 @@ describe("Export application as a JSON file", function() {
|
|||
it("User with viewer access,should not be able to export the app", function() {
|
||||
cy.LogintoApp(Cypress.env("USERNAME"), Cypress.env("PASSWORD"));
|
||||
cy.generateUUID().then((uid) => {
|
||||
orgid = uid;
|
||||
workspaceId = uid;
|
||||
appid = uid;
|
||||
localStorage.setItem("OrgName", orgid);
|
||||
cy.createOrg();
|
||||
cy.wait("@createOrg").then((interception) => {
|
||||
newOrganizationName = interception.response.body.data.name;
|
||||
cy.renameOrg(newOrganizationName, orgid);
|
||||
localStorage.setItem("OrgName", workspaceId);
|
||||
cy.createWorkspace();
|
||||
cy.wait("@createWorkspace").then((interception) => {
|
||||
newWorkspaceName = interception.response.body.data.name;
|
||||
cy.renameWorkspace(newWorkspaceName, workspaceId);
|
||||
});
|
||||
cy.CreateAppForOrg(orgid, appid);
|
||||
cy.CreateAppForWorkspace(workspaceId, appid);
|
||||
cy.wait("@getPagesForCreateApp").should(
|
||||
"have.nested.property",
|
||||
"response.body.responseMeta.status",
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ let forkedApplicationDsl;
|
|||
let parentApplicationDsl;
|
||||
let forkableAppUrl;
|
||||
|
||||
describe("Fork application across orgs", function() {
|
||||
describe("Fork application across workspaces", function() {
|
||||
before(() => {
|
||||
cy.addDsl(dsl);
|
||||
});
|
||||
|
|
@ -35,10 +35,10 @@ describe("Fork application across orgs", function() {
|
|||
.first()
|
||||
.click({ force: true });
|
||||
cy.get(homePage.forkAppFromMenu).click({ force: true });
|
||||
cy.get(homePage.forkAppOrgButton).click({ force: true });
|
||||
cy.get(homePage.forkAppWorkspaceButton).click({ force: true });
|
||||
// eslint-disable-next-line cypress/no-unnecessary-waiting
|
||||
cy.wait(4000);
|
||||
cy.wait("@postForkAppOrg").then((httpResponse) => {
|
||||
cy.wait("@postForkAppWorkspace").then((httpResponse) => {
|
||||
expect(httpResponse.status).to.equal(200);
|
||||
});
|
||||
// check that forked application has same dsl
|
||||
|
|
@ -59,8 +59,8 @@ describe("Fork application across orgs", function() {
|
|||
cy.get(homePage.optionsIcon)
|
||||
.first()
|
||||
.click();
|
||||
cy.get(homePage.orgImportAppOption).click({ force: true });
|
||||
cy.get(homePage.orgImportAppModal).should("be.visible");
|
||||
cy.get(homePage.workspaceImportAppOption).click({ force: true });
|
||||
cy.get(homePage.workspaceImportAppModal).should("be.visible");
|
||||
cy.xpath(homePage.uploadLogo).attachFile("forkNonSignedInUser.json");
|
||||
cy.wait("@importNewApplication").then((interception) => {
|
||||
const { isPartialImport } = interception.response.body.data;
|
||||
|
|
@ -96,7 +96,7 @@ describe("Fork application across orgs", function() {
|
|||
cy.get(applicationLocators.forkButton)
|
||||
.first()
|
||||
.click({ force: true });
|
||||
cy.get(homePage.forkAppOrgButton).should("be.visible");
|
||||
cy.get(homePage.forkAppWorkspaceButton).should("be.visible");
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ describe("Checks for analytics initialization", function() {
|
|||
});
|
||||
cy.generateUUID().then((id) => {
|
||||
appId = id;
|
||||
cy.CreateAppInFirstListedOrg(id);
|
||||
cy.CreateAppInFirstListedWorkspace(id);
|
||||
localStorage.setItem("AppName", appId);
|
||||
});
|
||||
cy.wait(3000);
|
||||
|
|
@ -48,7 +48,7 @@ describe("Checks for analytics initialization", function() {
|
|||
});
|
||||
cy.generateUUID().then((id) => {
|
||||
appId = id;
|
||||
cy.CreateAppInFirstListedOrg(id);
|
||||
cy.CreateAppInFirstListedWorkspace(id);
|
||||
localStorage.setItem("AppName", appId);
|
||||
});
|
||||
cy.wait(3000);
|
||||
|
|
@ -72,7 +72,7 @@ describe("Checks for analytics initialization", function() {
|
|||
});
|
||||
cy.generateUUID().then((id) => {
|
||||
appId = id;
|
||||
cy.CreateAppInFirstListedOrg(id);
|
||||
cy.CreateAppInFirstListedWorkspace(id);
|
||||
localStorage.setItem("AppName", appId);
|
||||
});
|
||||
cy.wait(3000);
|
||||
|
|
|
|||
|
|
@ -31,18 +31,21 @@ describe("Binding the Button widget with Text widget using Recpatcha v3", functi
|
|||
cy.get(".t--draggable-textwidget .bp3-ui-text").should("have.value", "");
|
||||
});
|
||||
|
||||
/* This test to be enabled once the product bug is fixed
|
||||
it("Validate the Button binding with Text Widget with Recaptcha Token with invalid key before using valid key", function() {
|
||||
//This test to be enabled once the product bug is fixed
|
||||
it.skip("Validate the Button binding with Text Widget with Recaptcha Token with invalid key before using valid key", function() {
|
||||
cy.get("button")
|
||||
.contains("Submit")
|
||||
.should("be.visible")
|
||||
.click({ force: true });
|
||||
cy.testCodeMirrorLast(testdata.invalidKey)
|
||||
cy.testCodeMirrorLast(testdata.invalidKey);
|
||||
cy.SearchEntityandOpen("Text1");
|
||||
cy.get(".t--draggable-textwidget span").last().invoke('text').then((x) => {
|
||||
cy.log(x);
|
||||
expect(x).to.be.empty;
|
||||
})
|
||||
cy.get(".t--draggable-textwidget span")
|
||||
.last()
|
||||
.invoke("text")
|
||||
.then((x) => {
|
||||
cy.log(x);
|
||||
expect(x).to.be.empty;
|
||||
});
|
||||
cy.SearchEntityandOpen("Button1");
|
||||
cy.get(".t--property-control-googlerecaptchaversion .bp3-popover-target")
|
||||
.last()
|
||||
|
|
@ -55,15 +58,18 @@ describe("Binding the Button widget with Text widget using Recpatcha v3", functi
|
|||
.contains("Submit")
|
||||
.should("be.visible")
|
||||
.click({ force: true });
|
||||
cy.get(".t--toast-action span").should("have.text",testdata.errorMsg)
|
||||
cy.get(".t--toast-action span").should("have.text", testdata.errorMsg);
|
||||
cy.SearchEntityandOpen("Text1");
|
||||
cy.wait(3000);
|
||||
cy.get(".t--draggable-textwidget span").last().invoke('text').then((x) => {
|
||||
cy.log(x);
|
||||
expect(x).to.be.empty;
|
||||
})
|
||||
cy.get(".t--draggable-textwidget span")
|
||||
.last()
|
||||
.invoke("text")
|
||||
.then((x) => {
|
||||
cy.log(x);
|
||||
expect(x).to.be.empty;
|
||||
});
|
||||
});
|
||||
*/
|
||||
|
||||
it("2. Validate the Button binding with Text Widget with Recaptcha Token with v2Key", function() {
|
||||
cy.get("button")
|
||||
.contains("Submit")
|
||||
|
|
@ -138,19 +144,22 @@ describe("Binding the Button widget with Text widget using Recpatcha v3", functi
|
|||
});
|
||||
});
|
||||
|
||||
/* This test to be enabled once the product bug is fixed
|
||||
//This test to be enabled once the product bug is fixed
|
||||
|
||||
it("Validate the Button binding with Text Widget with Recaptcha Token with invalid key", function() {
|
||||
it.skip("Validate the Button binding with Text Widget with Recaptcha Token with invalid key", function() {
|
||||
cy.get("button")
|
||||
.contains("Submit")
|
||||
.should("be.visible")
|
||||
.click({ force: true });
|
||||
cy.testCodeMirrorLast(testdata.invalidKey)
|
||||
cy.testCodeMirrorLast(testdata.invalidKey);
|
||||
cy.SearchEntityandOpen("Text1");
|
||||
cy.get(".t--draggable-textwidget span").last().invoke('text').then((x) => {
|
||||
cy.log(x);
|
||||
expect(x).not.to.be.empty;
|
||||
})
|
||||
cy.get(".t--draggable-textwidget span")
|
||||
.last()
|
||||
.invoke("text")
|
||||
.then((x) => {
|
||||
cy.log(x);
|
||||
expect(x).not.to.be.empty;
|
||||
});
|
||||
cy.SearchEntityandOpen("Button1");
|
||||
cy.get(".t--property-control-googlerecaptchaversion .bp3-popover-target")
|
||||
.last()
|
||||
|
|
@ -165,10 +174,12 @@ describe("Binding the Button widget with Text widget using Recpatcha v3", functi
|
|||
.click({ force: true });
|
||||
cy.SearchEntityandOpen("Text1");
|
||||
cy.wait(3000);
|
||||
cy.get(".t--draggable-textwidget span").last().invoke('text').then((x) => {
|
||||
cy.log(x);
|
||||
expect(x).not.to.be.empty;
|
||||
})
|
||||
cy.get(".t--draggable-textwidget span")
|
||||
.last()
|
||||
.invoke("text")
|
||||
.then((x) => {
|
||||
cy.log(x);
|
||||
expect(x).not.to.be.empty;
|
||||
});
|
||||
});
|
||||
*/
|
||||
});
|
||||
|
|
|
|||
|
|
@ -31,8 +31,8 @@ describe("Validate JSObjects binding to Input widget", () => {
|
|||
toRun: true,
|
||||
shouldCreateNewJSObj: true,
|
||||
});
|
||||
ee.expandCollapseEntity("WIDGETS"); //to expand widgets
|
||||
ee.expandCollapseEntity("Form1");
|
||||
ee.ExpandCollapseEntity("WIDGETS"); //to expand widgets
|
||||
ee.ExpandCollapseEntity("Form1");
|
||||
ee.SelectEntityByName("Input2");
|
||||
cy.get(locator._inputWidget)
|
||||
.last()
|
||||
|
|
@ -53,7 +53,7 @@ describe("Validate JSObjects binding to Input widget", () => {
|
|||
cy.get(locator._inputWidgetInDeployed)
|
||||
.last()
|
||||
.should("have.value", "Success");
|
||||
agHelper.NavigateBacktoEditor();
|
||||
deployMode.NavigateBacktoEditor();
|
||||
|
||||
// cy.get(locator._inputWidget)
|
||||
// .last()
|
||||
|
|
@ -78,8 +78,8 @@ describe("Validate JSObjects binding to Input widget", () => {
|
|||
ee.SelectEntityByName(jsOjbNameReceived as string, "QUERIES/JS");
|
||||
jsEditor.EditJSObj(jsBody);
|
||||
agHelper.AssertAutoSave();
|
||||
ee.expandCollapseEntity("WIDGETS");
|
||||
ee.expandCollapseEntity("Form1");
|
||||
ee.ExpandCollapseEntity("WIDGETS");
|
||||
ee.ExpandCollapseEntity("Form1");
|
||||
ee.SelectEntityByName("Input2");
|
||||
cy.get(locator._inputWidget).last().invoke("attr", "value").should("equal", 'Success'); //Function is renamed & reference is checked if updated properly!
|
||||
deployMode.DeployApp(locator._inputWidgetInDeployed)
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ describe("Validate JSObj binding to Table widget", () => {
|
|||
table.NavigateToPreviousPage_List();
|
||||
table.AssertPageNumber_List(1);
|
||||
agHelper.AssertElementLength(locator._textWidgetInDeployed, 8);
|
||||
agHelper.NavigateBacktoEditor();
|
||||
deployMode.NavigateBacktoEditor();
|
||||
});
|
||||
|
||||
it("3. Validate the List widget + Bug 12438 ", function() {
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ describe("Validate basic Promises", () => {
|
|||
deployMode.DeployApp();
|
||||
agHelper.ClickButton("Submit");
|
||||
agHelper.ValidateToastMessage(date);
|
||||
agHelper.NavigateBacktoEditor();
|
||||
deployMode.NavigateBacktoEditor();
|
||||
});
|
||||
|
||||
it("2. Verify resolve & chaining via direct Promises", () => {
|
||||
|
|
@ -48,7 +48,7 @@ describe("Validate basic Promises", () => {
|
|||
deployMode.DeployApp();
|
||||
agHelper.ClickButton("Submit");
|
||||
agHelper.ValidateToastMessage("We are on planet Earth");
|
||||
agHelper.NavigateBacktoEditor();
|
||||
deployMode.NavigateBacktoEditor();
|
||||
});
|
||||
|
||||
it("3. Verify Async Await in direct Promises", () => {
|
||||
|
|
@ -86,7 +86,7 @@ describe("Validate basic Promises", () => {
|
|||
cy.get(locator._toastMsg)
|
||||
.last()
|
||||
.contains(/male|female|null/g);
|
||||
agHelper.NavigateBacktoEditor();
|
||||
deployMode.NavigateBacktoEditor();
|
||||
});
|
||||
|
||||
it("4. Verify .then & .catch via direct Promises", () => {
|
||||
|
|
@ -120,7 +120,7 @@ describe("Validate basic Promises", () => {
|
|||
cy.get(locator._toastMsg)
|
||||
.should("have.length", 1)
|
||||
.contains(/You have a beautiful picture|Oops!/g);
|
||||
agHelper.NavigateBacktoEditor();
|
||||
deployMode.NavigateBacktoEditor();
|
||||
});
|
||||
|
||||
it("5. Verify .then & .catch via JS Objects in Promises", () => {
|
||||
|
|
@ -145,7 +145,7 @@ return InspiringQuotes.run().then((res) => { showAlert("Today's quote for " + us
|
|||
cy.get(locator._toastMsg)
|
||||
.should("have.length", 1)
|
||||
.contains(/Today's quote for You|Unable to fetch quote for/g);
|
||||
agHelper.NavigateBacktoEditor();
|
||||
deployMode.NavigateBacktoEditor();
|
||||
});
|
||||
|
||||
it("6. Verify Promise.race via direct Promises", () => {
|
||||
|
|
@ -172,7 +172,7 @@ return InspiringQuotes.run().then((res) => { showAlert("Today's quote for " + us
|
|||
cy.get(locator._toastMsg)
|
||||
.should("have.length", 1)
|
||||
.contains(/Melinda|Trump/g);
|
||||
agHelper.NavigateBacktoEditor();
|
||||
deployMode.NavigateBacktoEditor();
|
||||
});
|
||||
|
||||
it("7. Verify maintaining context via direct Promises", () => {
|
||||
|
|
@ -225,7 +225,7 @@ return InspiringQuotes.run().then((res) => { showAlert("Today's quote for " + us
|
|||
cy.get(locator._toastMsg)
|
||||
//.should("have.length", 1)//covered in WaitUntilEleAppear()
|
||||
.should("have.text", "Showing results for : fruits basket : the final");
|
||||
agHelper.NavigateBacktoEditor();
|
||||
deployMode.NavigateBacktoEditor();
|
||||
});
|
||||
|
||||
it("8: Verify Promise.all via direct Promises", () => {
|
||||
|
|
@ -252,7 +252,7 @@ return InspiringQuotes.run().then((res) => { showAlert("Today's quote for " + us
|
|||
deployMode.DeployApp();
|
||||
agHelper.ClickButton("Submit");
|
||||
agHelper.ValidateToastMessage("cat,dog,camel,rabbit,rat");
|
||||
agHelper.NavigateBacktoEditor();
|
||||
deployMode.NavigateBacktoEditor();
|
||||
});
|
||||
|
||||
it("9. Bug 10150: Verify Promise.all via JSObjects", () => {
|
||||
|
|
@ -296,7 +296,7 @@ showAlert("Wonderful! all apis executed", "success")).catch(() => showAlert("Ple
|
|||
cy.get(locator._toastMsg)
|
||||
.last()
|
||||
.contains(/Wonderful|Please check/g);
|
||||
agHelper.NavigateBacktoEditor();
|
||||
deployMode.NavigateBacktoEditor();
|
||||
});
|
||||
|
||||
it("10. Verify Promises.any via direct JSObjects", () => {
|
||||
|
|
@ -320,7 +320,7 @@ showAlert("Wonderful! all apis executed", "success")).catch(() => showAlert("Ple
|
|||
return Promise.any([this.func2(), this.func3(), this.func1()]).then((value) => showAlert("Resolved promise is:" + value))
|
||||
}
|
||||
}`,
|
||||
{ paste: true, completeReplace: true, toRun: true, shouldCreateNewJSObj: true },
|
||||
{ paste: true, completeReplace: true, toRun: false, shouldCreateNewJSObj: true },
|
||||
);
|
||||
ee.SelectEntityByName("Button1", "WIDGETS");
|
||||
cy.get("@jsObjName").then((jsObjName) => {
|
||||
|
|
@ -340,7 +340,7 @@ showAlert("Wonderful! all apis executed", "success")).catch(() => showAlert("Ple
|
|||
cy.get(locator._toastMsg)
|
||||
.last()
|
||||
.contains("Resolved promise is:func3");
|
||||
agHelper.NavigateBacktoEditor();
|
||||
deployMode.NavigateBacktoEditor();
|
||||
});
|
||||
|
||||
it("11. Bug : 11110 - Verify resetWidget via .then direct Promises", () => {
|
||||
|
|
@ -358,7 +358,7 @@ showAlert("Wonderful! all apis executed", "success")).catch(() => showAlert("Ple
|
|||
cy.get(locator._inputWidgetInDeployed).type("Update value");
|
||||
agHelper.ClickButton("Submit");
|
||||
agHelper.ValidateToastMessage("Test");
|
||||
agHelper.NavigateBacktoEditor();
|
||||
deployMode.NavigateBacktoEditor();
|
||||
});
|
||||
|
||||
//Skipping until this bug this is addressed!
|
||||
|
|
|
|||
|
|
@ -82,8 +82,8 @@ describe("Table Widget property pane feature validation", function() {
|
|||
});
|
||||
|
||||
it("Table widget toggle test for style Alignment", function() {
|
||||
cy.openPropertyPane("tablewidget");
|
||||
cy.get(".t--property-pane-back-btn").click({ force: true });
|
||||
cy.openPropertyPane("tablewidget");
|
||||
cy.editColumn("id");
|
||||
cy.get(widgetsPage.toggleVerticalAlig)
|
||||
.first()
|
||||
|
|
@ -95,8 +95,7 @@ describe("Table Widget property pane feature validation", function() {
|
|||
.click({ force: true });
|
||||
// eslint-disable-next-line cypress/no-unnecessary-waiting
|
||||
cy.wait(1000);
|
||||
cy.toggleJsAndUpdate("tabledata", testdata.bindingStyle);
|
||||
|
||||
cy.toggleJsAndUpdateWithIndex("tabledata", testdata.bindingStyle, 3);
|
||||
cy.readTabledataValidateCSS("0", "0", "font-style", "normal");
|
||||
cy.readTabledataValidateCSS("1", "0", "font-style", "italic");
|
||||
});
|
||||
|
|
@ -115,7 +114,7 @@ describe("Table Widget property pane feature validation", function() {
|
|||
.click({ force: true });
|
||||
// eslint-disable-next-line cypress/no-unnecessary-waiting
|
||||
cy.wait(1000);
|
||||
cy.toggleJsAndUpdate("tabledata", testdata.bindingTextColor);
|
||||
cy.toggleJsAndUpdateWithIndex("tabledata", testdata.bindingTextColor, 5);
|
||||
|
||||
cy.wait("@updateLayout");
|
||||
cy.readTabledataValidateCSS("0", "0", "color", "rgb(0, 128, 0)");
|
||||
|
|
@ -136,7 +135,7 @@ describe("Table Widget property pane feature validation", function() {
|
|||
.click({ force: true });
|
||||
// eslint-disable-next-line cypress/no-unnecessary-waiting
|
||||
cy.wait(1000);
|
||||
cy.toggleJsAndUpdate("tabledata", testdata.bindingTextColor);
|
||||
cy.toggleJsAndUpdateWithIndex("tabledata", testdata.bindingTextColor, 6);
|
||||
|
||||
cy.wait("@updateLayout");
|
||||
cy.readTabledataValidateCSS(
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ describe("Validate Mongo CRUD with JSON Form", () => {
|
|||
10,
|
||||
);
|
||||
|
||||
agHelper.NavigateBacktoEditor();
|
||||
deployMode.NavigateBacktoEditor();
|
||||
table.WaitUntilTableLoad();
|
||||
|
||||
//Delete the test data
|
||||
|
|
@ -79,14 +79,14 @@ describe("Validate Mongo CRUD with JSON Form", () => {
|
|||
agHelper.GetNClick(dataSources._selectTableDropdown);
|
||||
agHelper.GetNClickByContains(dataSources._dropdownOption, "coffeeCafe");
|
||||
GenerateCRUDNValidateDeployPage("", "", "Washington, US", 11);
|
||||
agHelper.NavigateBacktoEditor();
|
||||
deployMode.NavigateBacktoEditor();
|
||||
table.WaitUntilTableLoad(1, 0);
|
||||
//Delete the test data
|
||||
ee.expandCollapseEntity("PAGES");
|
||||
ee.ExpandCollapseEntity("PAGES");
|
||||
ee.ActionContextMenuByEntityName("CoffeeCafe", "Delete", "Are you sure?");
|
||||
agHelper.ValidateNetworkStatus("@deletePage", 200);
|
||||
deployMode.DeployApp();
|
||||
agHelper.NavigateBacktoEditor();
|
||||
deployMode.NavigateBacktoEditor();
|
||||
dataSources.DeleteDatasouceFromActiveTab(dsName as string, 200);
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ describe("Validate MySQL Generate CRUD with JSON Form", () => {
|
|||
|
||||
GenerateCRUDNValidateDeployPage("ABW", "Aruba", "North America", "Code");
|
||||
|
||||
agHelper.NavigateBacktoEditor();
|
||||
deployMode.NavigateBacktoEditor();
|
||||
table.WaitUntilTableLoad();
|
||||
//Delete the test data
|
||||
ee.ActionContextMenuByEntityName("Page2", "Delete", "Are you sure?");
|
||||
|
|
@ -68,7 +68,7 @@ describe("Validate MySQL Generate CRUD with JSON Form", () => {
|
|||
});
|
||||
|
||||
deployMode.DeployApp();
|
||||
agHelper.NavigateBacktoEditor();
|
||||
deployMode.NavigateBacktoEditor();
|
||||
cy.get("@dsName").then(($dsName) => {
|
||||
dsName = $dsName;
|
||||
dataSources.DeleteDatasouceFromActiveTab(dsName as string, 200);
|
||||
|
|
@ -107,7 +107,7 @@ describe("Validate MySQL Generate CRUD with JSON Form", () => {
|
|||
"customerNumber",
|
||||
);
|
||||
|
||||
agHelper.NavigateBacktoEditor();
|
||||
deployMode.NavigateBacktoEditor();
|
||||
cy.get("@dsName").then(($dsName) => {
|
||||
dsName = $dsName;
|
||||
});
|
||||
|
|
@ -126,10 +126,10 @@ describe("Validate MySQL Generate CRUD with JSON Form", () => {
|
|||
"employeeNumber",
|
||||
);
|
||||
|
||||
agHelper.NavigateBacktoEditor();
|
||||
deployMode.NavigateBacktoEditor();
|
||||
table.WaitUntilTableLoad();
|
||||
//Delete the test data
|
||||
ee.expandCollapseEntity("PAGES");
|
||||
ee.ExpandCollapseEntity("PAGES");
|
||||
ee.ActionContextMenuByEntityName("Employees", "Delete", "Are you sure?");
|
||||
agHelper.ValidateNetworkStatus("@deletePage", 200);
|
||||
});
|
||||
|
|
@ -170,7 +170,7 @@ describe("Validate MySQL Generate CRUD with JSON Form", () => {
|
|||
dataSources.RunQuery();
|
||||
agHelper.ActionContextMenuWithInPane("Delete");
|
||||
|
||||
ee.expandCollapseEntity(dsName);
|
||||
ee.ExpandCollapseEntity(dsName);
|
||||
ee.ActionContextMenuByEntityName(dsName, "Refresh");
|
||||
agHelper.AssertElementVisible(ee._entityNameInExplorer("productlines"));
|
||||
});
|
||||
|
|
@ -225,7 +225,7 @@ describe("Validate MySQL Generate CRUD with JSON Form", () => {
|
|||
|
||||
dataSources.AssertJSONFormHeader(0, 0, "productLine");
|
||||
|
||||
agHelper.NavigateBacktoEditor();
|
||||
deployMode.NavigateBacktoEditor();
|
||||
table.WaitUntilTableLoad();
|
||||
// //Delete the test data
|
||||
// ee.ActionContextMenuByEntityName("Productlines", "Delete", "Are you sure?");
|
||||
|
|
@ -311,7 +311,7 @@ describe("Validate MySQL Generate CRUD with JSON Form", () => {
|
|||
dataSources.RunQuery();
|
||||
agHelper.ActionContextMenuWithInPane("Delete");
|
||||
|
||||
ee.expandCollapseEntity(dsName);
|
||||
ee.ExpandCollapseEntity(dsName);
|
||||
ee.ActionContextMenuByEntityName(dsName, "Refresh");
|
||||
agHelper.AssertElementVisible(ee._entityNameInExplorer("Stores"));
|
||||
});
|
||||
|
|
@ -340,7 +340,7 @@ describe("Validate MySQL Generate CRUD with JSON Form", () => {
|
|||
"store_id",
|
||||
);
|
||||
|
||||
agHelper.NavigateBacktoEditor();
|
||||
deployMode.NavigateBacktoEditor();
|
||||
table.WaitUntilTableLoad();
|
||||
});
|
||||
|
||||
|
|
@ -421,6 +421,7 @@ describe("Validate MySQL Generate CRUD with JSON Form", () => {
|
|||
agHelper.ClickButton("Confirm");
|
||||
agHelper.ValidateNetworkStatus("@postExecute", 200);
|
||||
agHelper.ValidateNetworkStatus("@postExecute", 200);
|
||||
agHelper.Sleep(2500);// for delete to take effect!
|
||||
table.AssertSelectedRow(0); //Control going back to 1st row in table
|
||||
dataSources.AssertJSONFormHeader(0, 0, "store_id");
|
||||
});
|
||||
|
|
@ -453,10 +454,10 @@ describe("Validate MySQL Generate CRUD with JSON Form", () => {
|
|||
});
|
||||
|
||||
it("15. Verify Add/Insert from Deploy page - on Stores - new record", () => {
|
||||
agHelper.NavigateBacktoEditor();
|
||||
deployMode.NavigateBacktoEditor();
|
||||
table.WaitUntilTableLoad();
|
||||
ee.expandCollapseEntity("WIDGETS");
|
||||
ee.expandCollapseEntity("Insert_Modal");
|
||||
ee.ExpandCollapseEntity("WIDGETS");
|
||||
ee.ExpandCollapseEntity("Insert_Modal");
|
||||
ee.SelectEntityByName("insert_form");
|
||||
agHelper.Sleep(2000);
|
||||
|
||||
|
|
@ -508,6 +509,7 @@ describe("Validate MySQL Generate CRUD with JSON Form", () => {
|
|||
agHelper.Sleep(2000); //for Insert to reflect!
|
||||
agHelper.ValidateNetworkStatus("@postExecute", 200);
|
||||
agHelper.ValidateNetworkStatus("@postExecute", 200);
|
||||
agHelper.Sleep(3000); //for Insert to reflect!
|
||||
agHelper
|
||||
.GetElementLength(locator._jsonFormWidget)
|
||||
.then(($len) => expect($len).to.eq(1));
|
||||
|
|
@ -570,7 +572,7 @@ describe("Validate MySQL Generate CRUD with JSON Form", () => {
|
|||
});
|
||||
|
||||
it("17. Validate Deletion of the Newly Created Page - Stores", () => {
|
||||
agHelper.NavigateBacktoEditor();
|
||||
deployMode.NavigateBacktoEditor();
|
||||
table.WaitUntilTableLoad();
|
||||
//Delete the test data
|
||||
ee.ActionContextMenuByEntityName("Stores", "Delete", "Are you sure?");
|
||||
|
|
@ -588,7 +590,7 @@ describe("Validate MySQL Generate CRUD with JSON Form", () => {
|
|||
|
||||
dataSources.RunQuery();
|
||||
agHelper.ActionContextMenuWithInPane("Delete");
|
||||
ee.expandCollapseEntity(dsName);
|
||||
ee.ExpandCollapseEntity(dsName);
|
||||
ee.ActionContextMenuByEntityName(dsName, "Refresh");
|
||||
agHelper.AssertElementAbsence(ee._entityNameInExplorer("Stores"));
|
||||
});
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ describe("Validate Postgres Generate CRUD with JSON Form", () => {
|
|||
"film_id",
|
||||
);
|
||||
|
||||
agHelper.NavigateBacktoEditor();
|
||||
deployMode.NavigateBacktoEditor();
|
||||
table.WaitUntilTableLoad();
|
||||
//Delete the test data
|
||||
ee.ActionContextMenuByEntityName("Page2", "Delete", "Are you sure?");
|
||||
|
|
@ -63,7 +63,7 @@ describe("Validate Postgres Generate CRUD with JSON Form", () => {
|
|||
});
|
||||
|
||||
deployMode.DeployApp();
|
||||
agHelper.NavigateBacktoEditor();
|
||||
deployMode.NavigateBacktoEditor();
|
||||
cy.get("@dsName").then(($dsName) => {
|
||||
dsName = $dsName;
|
||||
dataSources.DeleteDatasouceFromActiveTab(dsName as string, 200);
|
||||
|
|
@ -102,7 +102,7 @@ describe("Validate Postgres Generate CRUD with JSON Form", () => {
|
|||
"supplier_id",
|
||||
);
|
||||
|
||||
agHelper.NavigateBacktoEditor();
|
||||
deployMode.NavigateBacktoEditor();
|
||||
cy.get("@dsName").then(($dsName) => {
|
||||
dsName = $dsName;
|
||||
});
|
||||
|
|
@ -122,10 +122,10 @@ describe("Validate Postgres Generate CRUD with JSON Form", () => {
|
|||
"order_id",
|
||||
);
|
||||
|
||||
agHelper.NavigateBacktoEditor();
|
||||
deployMode.NavigateBacktoEditor();
|
||||
table.WaitUntilTableLoad();
|
||||
//Delete the test data
|
||||
ee.expandCollapseEntity("PAGES");
|
||||
ee.ExpandCollapseEntity("PAGES");
|
||||
ee.ActionContextMenuByEntityName(
|
||||
"Public.orders",
|
||||
"Delete",
|
||||
|
|
@ -174,7 +174,7 @@ describe("Validate Postgres Generate CRUD with JSON Form", () => {
|
|||
dataSources.RunQuery();
|
||||
agHelper.ActionContextMenuWithInPane("Delete");
|
||||
|
||||
ee.expandCollapseEntity(dsName);
|
||||
ee.ExpandCollapseEntity(dsName);
|
||||
ee.ActionContextMenuByEntityName(dsName, "Refresh");
|
||||
agHelper.AssertElementVisible(ee._entityNameInExplorer("public.vessels"));
|
||||
});
|
||||
|
|
@ -251,7 +251,7 @@ describe("Validate Postgres Generate CRUD with JSON Form", () => {
|
|||
|
||||
dataSources.AssertJSONFormHeader(0, 0, "ship_id");
|
||||
|
||||
agHelper.NavigateBacktoEditor();
|
||||
deployMode.NavigateBacktoEditor();
|
||||
table.WaitUntilTableLoad();
|
||||
// //Delete the test data
|
||||
// ee.ActionContextMenuByEntityName("Productlines", "Delete", "Are you sure?");
|
||||
|
|
@ -279,7 +279,7 @@ describe("Validate Postgres Generate CRUD with JSON Form", () => {
|
|||
ee.SelectEntityByName("UpdateQuery", "QUERIES/JS");
|
||||
agHelper.EnterValue(updateQuery);
|
||||
agHelper.AssertAutoSave();
|
||||
ee.expandCollapseEntity("QUERIES/JS", false);
|
||||
ee.ExpandCollapseEntity("QUERIES/JS", false);
|
||||
});
|
||||
|
||||
it("8. Verify Update data from Deploy page - on Vessels - existing record", () => {
|
||||
|
|
@ -288,8 +288,8 @@ describe("Validate Postgres Generate CRUD with JSON Form", () => {
|
|||
deployMode.DeployApp();
|
||||
agHelper.Sleep(2000)
|
||||
table.SelectTableRow(0); //to make JSON form hidden
|
||||
agHelper.Sleep(2000);//Sleep time for tab to disappear!
|
||||
agHelper.AssertElementAbsence(locator._jsonFormWidget);
|
||||
|
||||
table.SelectTableRow(5);
|
||||
agHelper.AssertElementVisible(locator._jsonFormWidget);
|
||||
dataSources.AssertJSONFormHeader(5, 0, "ship_id");
|
||||
|
|
@ -448,6 +448,7 @@ describe("Validate Postgres Generate CRUD with JSON Form", () => {
|
|||
agHelper.ClickButton("Confirm");
|
||||
agHelper.ValidateNetworkStatus("@postExecute", 200);
|
||||
agHelper.ValidateNetworkStatus("@postExecute", 200);
|
||||
agHelper.Sleep(2500);// for delete to take effect!
|
||||
table.AssertSelectedRow(0); //Control going back to 1st row in table
|
||||
dataSources.AssertJSONFormHeader(0, 0, "ship_id");
|
||||
});
|
||||
|
|
@ -456,7 +457,7 @@ describe("Validate Postgres Generate CRUD with JSON Form", () => {
|
|||
agHelper.GetNClick(dataSources._refreshIcon);
|
||||
|
||||
//Store Address deletion remains
|
||||
table.ReadTableRowColumnData(7, 3, 200).then(($cellData) => {
|
||||
table.ReadTableRowColumnData(7, 3, 2000).then(($cellData) => {
|
||||
expect($cellData).to.eq("");
|
||||
});
|
||||
table.ReadTableRowColumnData(7, 4, 200).then(($cellData) => {
|
||||
|
|
@ -480,7 +481,7 @@ describe("Validate Postgres Generate CRUD with JSON Form", () => {
|
|||
});
|
||||
|
||||
it("12. Update the InsertQuery to insert all columns from UI", () => {
|
||||
agHelper.NavigateBacktoEditor();
|
||||
deployMode.NavigateBacktoEditor();
|
||||
table.WaitUntilTableLoad();
|
||||
let insertQuery = `INSERT INTO public."vessels" (
|
||||
"ship_id",
|
||||
|
|
@ -520,12 +521,12 @@ describe("Validate Postgres Generate CRUD with JSON Form", () => {
|
|||
ee.SelectEntityByName("InsertQuery", "QUERIES/JS");
|
||||
agHelper.EnterValue(insertQuery);
|
||||
agHelper.AssertAutoSave();
|
||||
ee.expandCollapseEntity("QUERIES/JS", false);
|
||||
ee.ExpandCollapseEntity("QUERIES/JS", false);
|
||||
});
|
||||
|
||||
it("13. Verify Add/Insert from Deploy page - on Vessels - new record", () => {
|
||||
ee.expandCollapseEntity("WIDGETS");
|
||||
ee.expandCollapseEntity("Insert_Modal");
|
||||
ee.ExpandCollapseEntity("WIDGETS");
|
||||
ee.ExpandCollapseEntity("Insert_Modal");
|
||||
//ee.ActionContextMenuByEntityName("JSONForm1Copy", "Delete")
|
||||
ee.SelectEntityByName("insert_form");
|
||||
agHelper.Sleep(2000);
|
||||
|
|
@ -670,7 +671,7 @@ describe("Validate Postgres Generate CRUD with JSON Form", () => {
|
|||
});
|
||||
|
||||
it("15. Validate Deletion of the Newly Created Page - Vessels", () => {
|
||||
agHelper.NavigateBacktoEditor();
|
||||
deployMode.NavigateBacktoEditor();
|
||||
table.WaitUntilTableLoad();
|
||||
//Delete the test data
|
||||
ee.ActionContextMenuByEntityName("Public.vessels", "Delete", "Are you sure?");
|
||||
|
|
@ -688,7 +689,7 @@ describe("Validate Postgres Generate CRUD with JSON Form", () => {
|
|||
|
||||
dataSources.RunQuery();
|
||||
agHelper.ActionContextMenuWithInPane("Delete");
|
||||
ee.expandCollapseEntity(dsName);
|
||||
ee.ExpandCollapseEntity(dsName);
|
||||
ee.ActionContextMenuByEntityName(dsName, "Refresh");
|
||||
agHelper.AssertElementAbsence(ee._entityNameInExplorer("public.vessels"));
|
||||
});
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ const dsl = require("../../../../fixtures/basicDsl.json");
|
|||
const newCommentText1 = "new comment text 1";
|
||||
let commentThreadId;
|
||||
let appName;
|
||||
let orgName;
|
||||
let workspaceName;
|
||||
|
||||
describe("Comments", function() {
|
||||
before(() => {
|
||||
|
|
@ -15,13 +15,13 @@ describe("Comments", function() {
|
|||
|
||||
cy.generateUUID().then((uid) => {
|
||||
appName = uid;
|
||||
orgName = uid;
|
||||
cy.createOrg();
|
||||
cy.wait("@createOrg").then((interception) => {
|
||||
const newOrganizationName = interception.response.body.data.name;
|
||||
cy.renameOrg(newOrganizationName, orgName);
|
||||
workspaceName = uid;
|
||||
cy.createWorkspace();
|
||||
cy.wait("@createWorkspace").then((interception) => {
|
||||
const newWorkspaceName = interception.response.body.data.name;
|
||||
cy.renameWorkspace(newWorkspaceName, workspaceName);
|
||||
});
|
||||
cy.CreateAppForOrg(orgName, appName);
|
||||
cy.CreateAppForWorkspace(workspaceName, appName);
|
||||
cy.addDsl(dsl);
|
||||
});
|
||||
});
|
||||
|
|
@ -43,13 +43,13 @@ describe("Comments", function() {
|
|||
|
||||
cy.generateUUID().then((uid) => {
|
||||
appName = uid;
|
||||
orgName = uid;
|
||||
cy.createOrg();
|
||||
cy.wait("@createOrg").then((interception) => {
|
||||
const newOrganizationName = interception.response.body.data.name;
|
||||
cy.renameOrg(newOrganizationName, orgName);
|
||||
workspaceName = uid;
|
||||
cy.createWorkspace();
|
||||
cy.wait("@createWorkspace").then((interception) => {
|
||||
const newWorkspaceName = interception.response.body.data.name;
|
||||
cy.renameWorkspace(newWorkspaceName, workspaceName);
|
||||
});
|
||||
cy.CreateAppForOrg(orgName, appName);
|
||||
cy.CreateAppForWorkspace(workspaceName, appName);
|
||||
cy.addDsl(dsl);
|
||||
});
|
||||
cy.skipCommentsOnboarding();
|
||||
|
|
@ -75,13 +75,13 @@ describe("Comments", function() {
|
|||
|
||||
cy.generateUUID().then((uid) => {
|
||||
appName = uid;
|
||||
orgName = uid;
|
||||
cy.createOrg();
|
||||
cy.wait("@createOrg").then((interception) => {
|
||||
const newOrganizationName = interception.response.body.data.name;
|
||||
cy.renameOrg(newOrganizationName, orgName);
|
||||
workspaceName = uid;
|
||||
cy.createWorkspace();
|
||||
cy.wait("@createWorkspace").then((interception) => {
|
||||
const newWorkspaceName = interception.response.body.data.name;
|
||||
cy.renameWorkspace(newWorkspaceName, workspaceName);
|
||||
});
|
||||
cy.CreateAppForOrg(orgName, appName);
|
||||
cy.CreateAppForWorkspace(workspaceName, appName);
|
||||
cy.addDsl(dsl);
|
||||
});
|
||||
cy.get(commonLocators.canvas);
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ describe("Debugger logs", function() {
|
|||
cy.testJsontext("visible", "Test");
|
||||
cy.get(commonlocators.homeIcon).click({ force: true });
|
||||
cy.generateUUID().then((id) => {
|
||||
cy.CreateAppInFirstListedOrg(id);
|
||||
cy.CreateAppInFirstListedWorkspace(id);
|
||||
cy.get(debuggerLocators.errorCount).should("not.exist");
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ describe("Input widget test with default value from chart datapoint", () => {
|
|||
|
||||
afterEach(() => {
|
||||
//this is to enable re-attempt passing!
|
||||
agHelper.NavigateBacktoEditor()
|
||||
deployMode.NavigateBacktoEditor()
|
||||
})
|
||||
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
import { ObjectsRegistry } from "../../../../support/Objects/Registry"
|
||||
|
||||
let agHelper = ObjectsRegistry.AggregateHelper,
|
||||
ee = ObjectsRegistry.EntityExplorer,
|
||||
let ee = ObjectsRegistry.EntityExplorer,
|
||||
locator = ObjectsRegistry.CommonLocators,
|
||||
deployMode = ObjectsRegistry.DeployMode,
|
||||
propPane = ObjectsRegistry.PropertyPane;
|
||||
|
|
@ -19,7 +18,7 @@ describe("DocumentViewer Widget Functionality", () => {
|
|||
cy.get(locator._widgetInDeployed("documentviewerwidget")).should(
|
||||
"not.exist",
|
||||
);
|
||||
agHelper.NavigateBacktoEditor();
|
||||
deployMode.NavigateBacktoEditor();
|
||||
});
|
||||
|
||||
it("3. Change visibility & Publish app & verify again", () => {
|
||||
|
|
|
|||
|
|
@ -10,15 +10,15 @@ describe("Migration Validate", function() {
|
|||
cy.get(homePage.optionsIcon)
|
||||
.first()
|
||||
.click();
|
||||
cy.get(homePage.orgImportAppOption).click({ force: true });
|
||||
cy.get(homePage.orgImportAppModal).should("be.visible");
|
||||
cy.get(homePage.workspaceImportAppOption).click({ force: true });
|
||||
cy.get(homePage.workspaceImportAppModal).should("be.visible");
|
||||
cy.xpath(homePage.uploadLogo)
|
||||
.attachFile("TableMigrationAppExported.json")
|
||||
.wait(500);
|
||||
// cy.get(homePage.orgImportAppButton)
|
||||
// cy.get(homePage.workspaceImportAppButton)
|
||||
// .trigger("click")
|
||||
// .wait(500);
|
||||
cy.get(homePage.orgImportAppModal).should("not.exist");
|
||||
cy.get(homePage.workspaceImportAppModal).should("not.exist");
|
||||
|
||||
cy.wait("@importNewApplication").then((interception) => {
|
||||
// let appId = interception.response.body.data.id;
|
||||
|
|
@ -510,13 +510,13 @@ describe("Migration Validate", function() {
|
|||
// cy.get(homePage.optionsIcon)
|
||||
// .first()
|
||||
// .click();
|
||||
// cy.get(homePage.orgImportAppOption).click({ force: true });
|
||||
// cy.get(homePage.orgImportAppModal).should("be.visible");
|
||||
// cy.get(homePage.workspaceImportAppOption).click({ force: true });
|
||||
// cy.get(homePage.workspaceImportAppModal).should("be.visible");
|
||||
// cy.xpath(homePage.uploadLogo).attachFile("TableMigrationAppExported.json").wait(500);
|
||||
// cy.get(homePage.orgImportAppButton)
|
||||
// cy.get(homePage.workspaceImportAppButton)
|
||||
// .trigger("click")
|
||||
// .wait(500);
|
||||
// cy.get(homePage.orgImportAppModal).should("not.exist");
|
||||
// cy.get(homePage.workspaceImportAppModal).should("not.exist");
|
||||
|
||||
// cy.wait("@importNewApplication").then((interception) => {
|
||||
// let appId = interception.response.body.data.id;
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ describe("Verify various Table property bugs", function () {
|
|||
table.AssertURLColumnNavigation(0, 0, 'https://wallpaperaccess.com/full/1376499.jpg')
|
||||
table.AssertURLColumnNavigation(3, 0, 'https://wallpaperaccess.com/full/812632.jpg')
|
||||
|
||||
agHelper.NavigateBacktoEditor()
|
||||
deployMode.NavigateBacktoEditor()
|
||||
|
||||
});
|
||||
|
||||
|
|
@ -83,7 +83,7 @@ describe("Verify various Table property bugs", function () {
|
|||
table.AssertURLColumnNavigation(1, 0, 'https://wallpaperaccess.com/full/1688623.jpg')
|
||||
table.AssertURLColumnNavigation(2, 0, 'https://wallpaperaccess.com/full/2117775.jpg')
|
||||
|
||||
agHelper.NavigateBacktoEditor()
|
||||
deployMode.NavigateBacktoEditor()
|
||||
|
||||
});
|
||||
|
||||
|
|
@ -116,7 +116,7 @@ describe("Verify various Table property bugs", function () {
|
|||
table.AssertURLColumnNavigation(0, 0, 'https://wallpaperaccess.com/full/1376499.jpg')
|
||||
table.AssertURLColumnNavigation(3, 0, 'https://wallpaperaccess.com/full/812632.jpg')
|
||||
|
||||
agHelper.NavigateBacktoEditor()
|
||||
deployMode.NavigateBacktoEditor()
|
||||
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ describe("Api Naming conflict on a page test", function() {
|
|||
// create another API
|
||||
cy.NavigateToAPI_Panel();
|
||||
cy.CreateAPI(secondApiName);
|
||||
ee.expandCollapseEntity("QUERIES/JS", true);
|
||||
ee.ExpandCollapseEntity("QUERIES/JS", true);
|
||||
// try to rename one of the APIs with an existing API name
|
||||
cy.get(`.t--entity-item:contains(${secondApiName})`).within(() => {
|
||||
cy.get(".t--context-menu").click({ force: true });
|
||||
|
|
@ -44,11 +44,11 @@ describe("Api Naming conflict on different pages test", function() {
|
|||
cy.log("Login Successful");
|
||||
// create a new API
|
||||
cy.CreateAPI(firstApiName);
|
||||
ee.expandCollapseEntity("QUERIES/JS", true);
|
||||
ee.ExpandCollapseEntity("QUERIES/JS", true);
|
||||
// create a new page and an API on that page
|
||||
cy.Createpage("Page2");
|
||||
cy.CreateAPI(firstApiName);
|
||||
ee.expandCollapseEntity("QUERIES/JS", true);
|
||||
ee.ExpandCollapseEntity("QUERIES/JS", true);
|
||||
cy.get(".t--entity-name")
|
||||
.contains(firstApiName)
|
||||
.should("exist");
|
||||
|
|
@ -71,7 +71,7 @@ describe("Api Naming conflict on different pages test", function() {
|
|||
describe("Entity Naming conflict test", function() {
|
||||
it("expects JS objects and actions to not have identical names on the same page.", function() {
|
||||
cy.log("Login Successful");
|
||||
ee.expandCollapseEntity("QUERIES/JS", true);
|
||||
ee.ExpandCollapseEntity("QUERIES/JS", true);
|
||||
// create JS object and name it
|
||||
cy.createJSObject('return "Hello World";');
|
||||
|
||||
|
|
|
|||
|
|
@ -42,8 +42,8 @@ describe("Test Suite to validate copy/delete/undo functionalites", function() {
|
|||
200,
|
||||
);
|
||||
cy.get("body").type(`{${modifierKey}}z`);
|
||||
ee.expandCollapseEntity("WIDGETS");
|
||||
ee.expandCollapseEntity("FormTest");
|
||||
ee.ExpandCollapseEntity("WIDGETS");
|
||||
ee.ExpandCollapseEntity("FormTest");
|
||||
ee.ActionContextMenuByEntityName("FormTestCopy", "Show Bindings");
|
||||
cy.get(apiwidget.propertyList).then(function($lis) {
|
||||
expect($lis).to.have.length(3);
|
||||
|
|
|
|||
|
|
@ -105,6 +105,8 @@ describe("DatePicker Widget Property pane tests with js bindings", function() {
|
|||
|
||||
it("7. Datepicker default date validation with js binding and default date with moment object", function() {
|
||||
cy.openPropertyPane("datepickerwidget2");
|
||||
//cy.testJsontext("defaultdate", "");
|
||||
cy.clearPropertyValue(0);
|
||||
cy.get(formWidgetsPage.toggleJsDefaultDate)
|
||||
.click()
|
||||
.wait(1000); //disable
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ const formWidgetsPage = require("../../../../locators/FormWidgets.json");
|
|||
const dsl = require("../../../../fixtures/datePicker2dsl.json");
|
||||
const publishPage = require("../../../../locators/publishWidgetspage.json");
|
||||
const pages = require("../../../../locators/Pages.json");
|
||||
const datedsl = require("../../../../fixtures/datePickerdsl.json");
|
||||
|
||||
describe("DatePicker Widget Property pane tests with js bindings", function() {
|
||||
before(() => {
|
||||
|
|
@ -36,7 +37,7 @@ describe("DatePicker Widget Property pane tests with js bindings", function() {
|
|||
});
|
||||
|
||||
it("Text widgets binding with datepicker", function() {
|
||||
cy.SearchEntityandOpen("Text1");
|
||||
cy.openPropertyPane("textwidget");
|
||||
cy.testJsontext("text", "{{DatePicker1.formattedDate}}");
|
||||
cy.closePropertyPane();
|
||||
cy.SearchEntityandOpen("Text2");
|
||||
|
|
@ -59,6 +60,19 @@ describe("DatePicker Widget Property pane tests with js bindings", function() {
|
|||
cy.assertDateFormat();
|
||||
});
|
||||
|
||||
it("Datepicker default date validation message", function() {
|
||||
cy.openPropertyPane("datepickerwidget2");
|
||||
cy.testJsontext("defaultdate", "24-12-2021");
|
||||
cy.evaluateErrorMessage("Value does not match: ISO 8601 date string");
|
||||
cy.closePropertyPane();
|
||||
});
|
||||
});
|
||||
|
||||
describe("DatePicker Widget Property pane tests with js bindings", function() {
|
||||
before(() => {
|
||||
cy.addDsl(datedsl);
|
||||
});
|
||||
|
||||
it("Datepicker should not change the display data unless user selects the date", () => {
|
||||
cy.openPropertyPane("datepickerwidget2");
|
||||
|
||||
|
|
@ -69,7 +83,6 @@ describe("DatePicker Widget Property pane tests with js bindings", function() {
|
|||
cy.get(formWidgetsPage.toggleJsMinDate).click();
|
||||
cy.get(".t--property-control-mindate .bp3-input").clear();
|
||||
cy.get(".t--property-control-mindate .bp3-input").type("2020-02-01");
|
||||
|
||||
cy.selectDateFormat("D MMMM, YYYY");
|
||||
cy.get(".t--widget-datepickerwidget2 .bp3-input").should(
|
||||
"contain.value",
|
||||
|
|
@ -87,12 +100,11 @@ describe("DatePicker Widget Property pane tests with js bindings", function() {
|
|||
"{{moment().subtract(10, 'days').toISOString()}}",
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
it("Datepicker default date validation message", function() {
|
||||
cy.openPropertyPane("datepickerwidget2");
|
||||
cy.testJsontext("defaultdate", "24-12-2021");
|
||||
cy.evaluateErrorMessage("Value does not match: ISO 8601 date string");
|
||||
cy.closePropertyPane();
|
||||
describe("DatePicker Widget Property pane tests with js bindings", function() {
|
||||
before(() => {
|
||||
cy.addDsl(datedsl);
|
||||
});
|
||||
|
||||
it("Datepicker default date validation with strings", function() {
|
||||
|
|
@ -139,12 +151,19 @@ describe("DatePicker Widget Property pane tests with js bindings", function() {
|
|||
.first()
|
||||
.should("contain.text", "May 4, 2021 6:25 AM");
|
||||
});
|
||||
});
|
||||
|
||||
describe("DatePicker Widget Property pane tests with js bindings", function() {
|
||||
before(() => {
|
||||
cy.addDsl(datedsl);
|
||||
});
|
||||
|
||||
it("Check isDirty meta property", function() {
|
||||
cy.openPropertyPane("textwidget");
|
||||
cy.updateCodeInput(".t--property-control-text", `{{DatePicker1.isDirty}}`);
|
||||
// Init isDirty
|
||||
cy.openPropertyPane("datepickerwidget2");
|
||||
cy.testJsontextclear("defaultdate");
|
||||
cy.get(formWidgetsPage.toggleJsDefaultDate).click();
|
||||
cy.get(".t--property-control-defaultdate .bp3-input").clear();
|
||||
cy.get(formWidgetsPage.toggleJsDefaultDate).click();
|
||||
|
|
@ -170,6 +189,7 @@ describe("DatePicker Widget Property pane tests with js bindings", function() {
|
|||
.should("contain", "true");
|
||||
// Change defaultDate
|
||||
cy.openPropertyPane("datepickerwidget2");
|
||||
cy.testJsontext("defaultdate", "");
|
||||
cy.get(formWidgetsPage.toggleJsDefaultDate).click();
|
||||
cy.get(".t--property-control-defaultdate .bp3-input").clear();
|
||||
cy.get(formWidgetsPage.toggleJsDefaultDate).click();
|
||||
|
|
|
|||
|
|
@ -14,10 +14,10 @@ let repoName;
|
|||
describe("Git import flow", function() {
|
||||
before(() => {
|
||||
cy.NavigateToHome();
|
||||
cy.createOrg();
|
||||
cy.wait("@createOrg").then((interception) => {
|
||||
const newOrganizationName = interception.response.body.data.name;
|
||||
cy.CreateAppForOrg(newOrganizationName, newOrganizationName);
|
||||
cy.createWorkspace();
|
||||
cy.wait("@createWorkspace").then((interception) => {
|
||||
const newWorkspaceName = interception.response.body.data.name;
|
||||
cy.CreateAppForWorkspace(newWorkspaceName, newWorkspaceName);
|
||||
});
|
||||
});
|
||||
it("Import an app from JSON with Postgres, MySQL, Mongo db", () => {
|
||||
|
|
@ -25,8 +25,8 @@ describe("Git import flow", function() {
|
|||
cy.get(homePage.optionsIcon)
|
||||
.first()
|
||||
.click();
|
||||
cy.get(homePage.orgImportAppOption).click({ force: true });
|
||||
cy.get(homePage.orgImportAppModal).should("be.visible");
|
||||
cy.get(homePage.workspaceImportAppOption).click({ force: true });
|
||||
cy.get(homePage.workspaceImportAppModal).should("be.visible");
|
||||
cy.xpath(homePage.uploadLogo).attachFile("gitImport.json");
|
||||
cy.wait("@importNewApplication").then((interception) => {
|
||||
cy.log(interception.response.body.data);
|
||||
|
|
@ -69,16 +69,16 @@ describe("Git import flow", function() {
|
|||
});
|
||||
it("Import an app from Git and reconnect Postgres, MySQL and Mongo db ", () => {
|
||||
cy.NavigateToHome();
|
||||
cy.createOrg();
|
||||
cy.wait("@createOrg").then((interception) => {
|
||||
const newOrganizationName = interception.response.body.data.name;
|
||||
cy.CreateAppForOrg(newOrganizationName, "gitImport");
|
||||
cy.createWorkspace();
|
||||
cy.wait("@createWorkspace").then((interception) => {
|
||||
const newWorkspaceName = interception.response.body.data.name;
|
||||
cy.CreateAppForWorkspace(newWorkspaceName, "gitImport");
|
||||
});
|
||||
cy.get(homePage.homeIcon).click();
|
||||
cy.get(homePage.optionsIcon)
|
||||
.first()
|
||||
.click();
|
||||
cy.get(homePage.orgImportAppOption).click({ force: true });
|
||||
cy.get(homePage.workspaceImportAppOption).click({ force: true });
|
||||
cy.get(".t--import-json-card")
|
||||
.next()
|
||||
.click();
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ describe("Git import empty repository", function() {
|
|||
cy.get(homePage.optionsIcon)
|
||||
.first()
|
||||
.click();
|
||||
cy.get(homePage.orgImportAppOption).click({ force: true });
|
||||
cy.get(homePage.workspaceImportAppOption).click({ force: true });
|
||||
cy.get(".t--import-json-card")
|
||||
.next()
|
||||
.click();
|
||||
|
|
|
|||
|
|
@ -20,10 +20,10 @@ describe("Git sync:", function() {
|
|||
cy.Signup(`${uid}@appsmith.com`, uid);
|
||||
});
|
||||
cy.NavigateToHome();
|
||||
cy.createOrg();
|
||||
cy.wait("@createOrg").then((interception) => {
|
||||
const newOrganizationName = interception.response.body.data.name;
|
||||
cy.CreateAppForOrg(newOrganizationName, newOrganizationName);
|
||||
cy.createWorkspace();
|
||||
cy.wait("@createWorkspace").then((interception) => {
|
||||
const newWorkspaceName = interception.response.body.data.name;
|
||||
cy.CreateAppForWorkspace(newWorkspaceName, newWorkspaceName);
|
||||
});
|
||||
|
||||
cy.connectToGitRepo(repoName);
|
||||
|
|
|
|||
|
|
@ -17,10 +17,10 @@ const owner = Cypress.env("TEST_GITHUB_USER_NAME");
|
|||
describe("Git sync modal: connect tab", function() {
|
||||
before(() => {
|
||||
cy.NavigateToHome();
|
||||
cy.createOrg();
|
||||
cy.wait("@createOrg").then((interception) => {
|
||||
const newOrganizationName = interception.response.body.data.name;
|
||||
cy.CreateAppForOrg(newOrganizationName, newOrganizationName);
|
||||
cy.createWorkspace();
|
||||
cy.wait("@createWorkspace").then((interception) => {
|
||||
const newWorkspaceName = interception.response.body.data.name;
|
||||
cy.CreateAppForWorkspace(newWorkspaceName, newWorkspaceName);
|
||||
});
|
||||
cy.generateUUID().then((uid) => {
|
||||
repoName = uid;
|
||||
|
|
|
|||
|
|
@ -6,10 +6,10 @@ let repoName;
|
|||
describe("Git sync modal: deploy tab", function() {
|
||||
before(() => {
|
||||
cy.NavigateToHome();
|
||||
cy.createOrg();
|
||||
cy.wait("@createOrg").then((interception) => {
|
||||
const newOrganizationName = interception.response.body.data.name;
|
||||
cy.CreateAppForOrg(newOrganizationName, newOrganizationName);
|
||||
cy.createWorkspace();
|
||||
cy.wait("@createWorkspace").then((interception) => {
|
||||
const newWorkspaceName = interception.response.body.data.name;
|
||||
cy.CreateAppForWorkspace(newWorkspaceName, newWorkspaceName);
|
||||
});
|
||||
cy.generateUUID().then((uid) => {
|
||||
repoName = uid;
|
||||
|
|
|
|||
|
|
@ -5,10 +5,10 @@ let windowOpenSpy;
|
|||
describe("Git disconnect modal:", function() {
|
||||
before(() => {
|
||||
cy.NavigateToHome();
|
||||
cy.createOrg();
|
||||
cy.wait("@createOrg").then((interception) => {
|
||||
const newOrganizationName = interception.response.body.data.name;
|
||||
cy.CreateAppForOrg(newOrganizationName, newOrganizationName);
|
||||
cy.createWorkspace();
|
||||
cy.wait("@createWorkspace").then((interception) => {
|
||||
const newWorkspaceName = interception.response.body.data.name;
|
||||
cy.CreateAppForWorkspace(newWorkspaceName, newWorkspaceName);
|
||||
});
|
||||
cy.generateUUID().then((uid) => {
|
||||
repoName = uid;
|
||||
|
|
@ -59,7 +59,7 @@ describe("Git disconnect modal:", function() {
|
|||
});
|
||||
|
||||
it("should have disconnect repo button", function() {
|
||||
cy.wait(2000);
|
||||
cy.wait(4000);
|
||||
cy.get(gitSyncLocators.bottomBarCommitButton).click();
|
||||
cy.get("[data-cy=t--tab-GIT_CONNECTION]").click();
|
||||
|
||||
|
|
@ -87,7 +87,7 @@ describe("Git disconnect modal:", function() {
|
|||
// disconnecting validation
|
||||
cy.route("POST", "api/v1/git/disconnect/*").as("disconnect");
|
||||
cy.get(gitSyncLocators.disconnectButton).click();
|
||||
cy.get(gitSyncLocators.disconnectButton).should("be.disabled");
|
||||
//cy.get(gitSyncLocators.disconnectButton).should("be.disabled");
|
||||
cy.wait("@disconnect").should(
|
||||
"have.nested.property",
|
||||
"response.body.responseMeta.status",
|
||||
|
|
|
|||
|
|
@ -16,10 +16,10 @@ let repoName;
|
|||
describe("Git sync Bug #10773", function() {
|
||||
before(() => {
|
||||
cy.NavigateToHome();
|
||||
cy.createOrg();
|
||||
cy.wait("@createOrg").then((interception) => {
|
||||
const newOrganizationName = interception.response.body.data.name;
|
||||
cy.CreateAppForOrg(newOrganizationName, newOrganizationName);
|
||||
cy.createWorkspace();
|
||||
cy.wait("@createWorkspace").then((interception) => {
|
||||
const newWorkspaceName = interception.response.body.data.name;
|
||||
cy.CreateAppForWorkspace(newWorkspaceName, newWorkspaceName);
|
||||
});
|
||||
|
||||
cy.generateUUID().then((uid) => {
|
||||
|
|
@ -64,10 +64,10 @@ describe("Git sync Bug #10773", function() {
|
|||
describe("Git Bug: Fix clone page issue where JSObject are not showing up in destination page when application is connected to git", function() {
|
||||
it("Connect app to git, clone the Page ,verify JSobject duplication should not happen and validate data binding in deploy mode and edit mode", () => {
|
||||
cy.NavigateToHome();
|
||||
cy.createOrg();
|
||||
cy.wait("@createOrg").then((interception) => {
|
||||
const newOrganizationName = interception.response.body.data.name;
|
||||
cy.CreateAppForOrg(newOrganizationName, newOrganizationName);
|
||||
cy.createWorkspace();
|
||||
cy.wait("@createWorkspace").then((interception) => {
|
||||
const newWorkspaceName = interception.response.body.data.name;
|
||||
cy.CreateAppForWorkspace(newWorkspaceName, newWorkspaceName);
|
||||
cy.addDsl(dsl);
|
||||
});
|
||||
// connect app to git
|
||||
|
|
@ -76,7 +76,7 @@ describe("Git Bug: Fix clone page issue where JSObject are not showing up in des
|
|||
cy.createTestGithubRepo(repoName);
|
||||
cy.connectToGitRepo(repoName);
|
||||
});
|
||||
ee.expandCollapseEntity("QUERIES/JS", true);
|
||||
ee.ExpandCollapseEntity("QUERIES/JS", true);
|
||||
// create JS object and validate its data on Page1
|
||||
cy.createJSObject('return "Success";');
|
||||
cy.get(`.t--entity-name:contains("Page1")`)
|
||||
|
|
@ -168,13 +168,13 @@ describe("Git Bug: Fix clone page issue where JSObject are not showing up in des
|
|||
describe("Git synced app with JSObject", function() {
|
||||
it("Create an app with JSObject, connect it to git and verify its data in edit and deploy mode", function() {
|
||||
cy.NavigateToHome();
|
||||
cy.createOrg();
|
||||
cy.wait("@createOrg").then((interception) => {
|
||||
const newOrganizationName = interception.response.body.data.name;
|
||||
cy.CreateAppForOrg(newOrganizationName, newOrganizationName);
|
||||
cy.createWorkspace();
|
||||
cy.wait("@createWorkspace").then((interception) => {
|
||||
const newWorkspaceName = interception.response.body.data.name;
|
||||
cy.CreateAppForWorkspace(newWorkspaceName, newWorkspaceName);
|
||||
cy.addDsl(dsl);
|
||||
});
|
||||
ee.expandCollapseEntity("QUERIES/JS", true);
|
||||
ee.ExpandCollapseEntity("QUERIES/JS", true);
|
||||
// create JS object and validate its data on Page1
|
||||
cy.createJSObject('return "Success";');
|
||||
cy.get(`.t--entity-name:contains("Page1")`)
|
||||
|
|
@ -270,10 +270,10 @@ describe("Git synced app with JSObject", function() {
|
|||
describe("Git sync Bug #13385", function() {
|
||||
it("Bug:13385 : Unable to see application in home page after the git connect flow is aborted in middle", () => {
|
||||
cy.NavigateToHome();
|
||||
cy.createOrg();
|
||||
cy.wait("@createOrg").then((interception) => {
|
||||
const newOrganizationName = interception.response.body.data.name;
|
||||
cy.CreateAppForOrg(newOrganizationName, `${newOrganizationName}app`);
|
||||
cy.createWorkspace();
|
||||
cy.wait("@createWorkspace").then((interception) => {
|
||||
const newWorkspaceName = interception.response.body.data.name;
|
||||
cy.CreateAppForWorkspace(newWorkspaceName, `${newWorkspaceName}app`);
|
||||
|
||||
cy.generateUUID().then((uid) => {
|
||||
const owner = Cypress.env("TEST_GITHUB_USER_NAME");
|
||||
|
|
@ -306,7 +306,7 @@ describe("Git sync Bug #13385", function() {
|
|||
cy.NavigateToHome();
|
||||
cy.reload();
|
||||
cy.wait(3000);
|
||||
cy.SearchApp(`${newOrganizationName}app`);
|
||||
cy.SearchApp(`${newWorkspaceName}app`);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -24,10 +24,10 @@ let repoName;
|
|||
describe("Git sync apps", function() {
|
||||
before(() => {
|
||||
// cy.NavigateToHome();
|
||||
// cy.createOrg();
|
||||
// cy.wait("@createOrg").then((interception) => {
|
||||
// const newOrganizationName = interception.response.body.data.name;
|
||||
// cy.CreateAppForOrg(newOrganizationName, "gitSyncApp");
|
||||
// cy.createWorkspace();
|
||||
// cy.wait("@createWorkspace").then((interception) => {
|
||||
// const newWorkspaceName = interception.response.body.data.name;
|
||||
// cy.CreateAppForWorkspace(newWorkspaceName, "gitSyncApp");
|
||||
});
|
||||
it("1. Generate postgreSQL crud page , connect to git, clone the page, rename page with special character in it", () => {
|
||||
cy.NavigateToHome();
|
||||
|
|
@ -503,7 +503,7 @@ describe("Git sync apps", function() {
|
|||
cy.get(homePage.optionsIcon)
|
||||
.first()
|
||||
.click();
|
||||
cy.get(homePage.orgImportAppOption).click({ force: true });
|
||||
cy.get(homePage.workspaceImportAppOption).click({ force: true });
|
||||
cy.get(".t--import-json-card")
|
||||
.next()
|
||||
.click();
|
||||
|
|
|
|||
|
|
@ -28,11 +28,11 @@ let repoName;
|
|||
describe("Git sync:", function() {
|
||||
before(() => {
|
||||
cy.NavigateToHome();
|
||||
cy.createOrg();
|
||||
cy.wait("@createOrg").then((interception) => {
|
||||
const newOrganizationName = interception.response.body.data.name;
|
||||
cy.createWorkspace();
|
||||
cy.wait("@createWorkspace").then((interception) => {
|
||||
const newWorkspaceName = interception.response.body.data.name;
|
||||
cy.generateUUID().then((uid) => {
|
||||
cy.CreateAppForOrg(newOrganizationName, uid);
|
||||
cy.CreateAppForWorkspace(newWorkspaceName, uid);
|
||||
applicationName = uid;
|
||||
cy.get("@currentApplicationId").then(
|
||||
(currentAppId) => (applicationId = currentAppId),
|
||||
|
|
|
|||
|
|
@ -7,10 +7,10 @@ let mainBranch = "master";
|
|||
describe("Git sync modal: merge tab", function() {
|
||||
before(() => {
|
||||
cy.NavigateToHome();
|
||||
cy.createOrg();
|
||||
cy.wait("@createOrg").then((interception) => {
|
||||
const newOrganizationName = interception.response.body.data.name;
|
||||
cy.CreateAppForOrg(newOrganizationName, newOrganizationName);
|
||||
cy.createWorkspace();
|
||||
cy.wait("@createWorkspace").then((interception) => {
|
||||
const newWorkspaceName = interception.response.body.data.name;
|
||||
cy.CreateAppForWorkspace(newWorkspaceName, newWorkspaceName);
|
||||
});
|
||||
|
||||
cy.generateUUID().then((uid) => {
|
||||
|
|
|
|||
|
|
@ -7,10 +7,10 @@ describe("Pre git connection spec:", function() {
|
|||
it("deploy menu at the application dropdown menu", () => {
|
||||
// create new app
|
||||
cy.NavigateToHome();
|
||||
cy.createOrg();
|
||||
cy.wait("@createOrg").then((interception) => {
|
||||
const newOrganizationName = interception.response.body.data.name;
|
||||
cy.CreateAppForOrg(newOrganizationName, newOrganizationName);
|
||||
cy.createWorkspace();
|
||||
cy.wait("@createWorkspace").then((interception) => {
|
||||
const newWorkspaceName = interception.response.body.data.name;
|
||||
cy.CreateAppForWorkspace(newWorkspaceName, newWorkspaceName);
|
||||
});
|
||||
|
||||
cy.intercept("POST", "/api/v1/applications/publish/*").as("publishApp");
|
||||
|
|
|
|||
|
|
@ -13,10 +13,10 @@ let repoName;
|
|||
describe("Git sync:", function() {
|
||||
before(() => {
|
||||
cy.NavigateToHome();
|
||||
cy.createOrg();
|
||||
cy.wait("@createOrg").then((interception) => {
|
||||
const newOrganizationName = interception.response.body.data.name;
|
||||
cy.CreateAppForOrg(newOrganizationName, newOrganizationName);
|
||||
cy.createWorkspace();
|
||||
cy.wait("@createWorkspace").then((interception) => {
|
||||
const newWorkspaceName = interception.response.body.data.name;
|
||||
cy.CreateAppForWorkspace(newWorkspaceName, newWorkspaceName);
|
||||
});
|
||||
|
||||
cy.generateUUID().then((uid) => {
|
||||
|
|
|
|||
|
|
@ -8,7 +8,44 @@ const jsEditor = ObjectsRegistry.JSEditor,
|
|||
agHelper = ObjectsRegistry.AggregateHelper,
|
||||
deployMode = ObjectsRegistry.DeployMode;
|
||||
|
||||
let onPageLoadAndConfirmExecuteFunctionsLength: number,
|
||||
getJSObject: any,
|
||||
functionsLength: number, jsObj: any;
|
||||
|
||||
describe("JS Function Execution", function() {
|
||||
interface IFunctionSettingData {
|
||||
name: string;
|
||||
onPageLoad: boolean;
|
||||
confirmBeforeExecute: boolean;
|
||||
}
|
||||
const FUNCTIONS_SETTINGS_DEFAULT_DATA: IFunctionSettingData[] = [
|
||||
{
|
||||
name: "getId",
|
||||
onPageLoad: true,
|
||||
confirmBeforeExecute: false,
|
||||
},
|
||||
{
|
||||
name: "zip",
|
||||
onPageLoad: true,
|
||||
confirmBeforeExecute: true,
|
||||
},
|
||||
{
|
||||
name: "base",
|
||||
onPageLoad: false,
|
||||
confirmBeforeExecute: false,
|
||||
},
|
||||
{
|
||||
name: "assert",
|
||||
onPageLoad: false,
|
||||
confirmBeforeExecute: false,
|
||||
},
|
||||
{
|
||||
name: "test",
|
||||
onPageLoad: true,
|
||||
confirmBeforeExecute: true,
|
||||
},
|
||||
];
|
||||
|
||||
before(() => {
|
||||
ee.DragDropWidgetNVerify("tablewidget", 300, 300);
|
||||
ee.NavigateToSwitcher("explorer");
|
||||
|
|
@ -170,7 +207,7 @@ describe("JS Function Execution", function() {
|
|||
table.WaitUntilTableLoad();
|
||||
table.ReadTableRowColumnData(0, 1, 2000).then(($cellData) => {
|
||||
expect($cellData).to.eq("1"); //validating id column value - row 0
|
||||
agHelper.NavigateBacktoEditor();
|
||||
deployMode.NavigateBacktoEditor();
|
||||
});
|
||||
});
|
||||
|
||||
|
|
@ -238,4 +275,137 @@ describe("JS Function Execution", function() {
|
|||
jsEditor.EditJSObj(asyncJSCodeWithRenamedFunction2);
|
||||
agHelper.AssertElementAbsence(locator._toastMsg);
|
||||
});
|
||||
|
||||
it("7. Maintains order of async functions in settings tab alphabetically at all times", function() {
|
||||
functionsLength = FUNCTIONS_SETTINGS_DEFAULT_DATA.length;
|
||||
// Number of functions set to run on page load and should also confirm before execute
|
||||
onPageLoadAndConfirmExecuteFunctionsLength = FUNCTIONS_SETTINGS_DEFAULT_DATA.filter(
|
||||
(func) => func.onPageLoad && func.confirmBeforeExecute,
|
||||
).length;
|
||||
|
||||
getJSObject = (data: IFunctionSettingData[]) => {
|
||||
let JS_OBJECT_BODY = `export default`;
|
||||
for (let i = 0; i < functionsLength; i++) {
|
||||
const functionName = data[i].name;
|
||||
JS_OBJECT_BODY +=
|
||||
i === 0
|
||||
? `{
|
||||
${functionName}: async ()=>"${functionName}",`
|
||||
: i === functionsLength - 1
|
||||
? `
|
||||
${functionName}: async ()=>"${functionName}",
|
||||
}`
|
||||
: `
|
||||
${functionName}: async ()=> "${functionName}",`;
|
||||
}
|
||||
return JS_OBJECT_BODY;
|
||||
};
|
||||
|
||||
// Create js object
|
||||
jsEditor.CreateJSObject(getJSObject(FUNCTIONS_SETTINGS_DEFAULT_DATA), {
|
||||
paste: true,
|
||||
completeReplace: true,
|
||||
toRun: false,
|
||||
shouldCreateNewJSObj: true,
|
||||
});
|
||||
|
||||
cy.get("@jsObjName").then((jsObjName: any) => {
|
||||
jsObj = jsObjName;
|
||||
});
|
||||
// Switch to settings tab
|
||||
agHelper.GetNClick(jsEditor._settingsTab);
|
||||
// Add settings for each function (according to data)
|
||||
Object.values(FUNCTIONS_SETTINGS_DEFAULT_DATA).forEach(
|
||||
(functionSetting) => {
|
||||
jsEditor.EnableDisableAsyncFuncSettings(
|
||||
functionSetting.name,
|
||||
functionSetting.onPageLoad,
|
||||
functionSetting.confirmBeforeExecute,
|
||||
);
|
||||
},
|
||||
);
|
||||
// Switch to settings tab
|
||||
agHelper.GetNClick(jsEditor._settingsTab);
|
||||
//After JSObj is created - check methods are in alphabetical order
|
||||
assertAsyncFunctionsOrder(FUNCTIONS_SETTINGS_DEFAULT_DATA);
|
||||
|
||||
agHelper.RefreshPage();
|
||||
// click "Yes" button for all onPageload && ConfirmExecute functions
|
||||
for (let i = 0; i <= onPageLoadAndConfirmExecuteFunctionsLength - 1; i++) {
|
||||
//agHelper.AssertElementPresence(jsEditor._dialog("Confirmation Dialog")); // Not working in edit mode
|
||||
agHelper.ClickButton("Yes");
|
||||
agHelper.Sleep();
|
||||
}
|
||||
// Switch to settings tab and assert order
|
||||
agHelper.GetNClick(jsEditor._settingsTab);
|
||||
assertAsyncFunctionsOrder(FUNCTIONS_SETTINGS_DEFAULT_DATA);
|
||||
});
|
||||
|
||||
it("8. Verify Asyn methods alphabetical order after clone page and after rename", () => {
|
||||
const FUNCTIONS_SETTINGS_RENAMED_DATA: IFunctionSettingData[] = [
|
||||
{
|
||||
name: "newGetId",
|
||||
onPageLoad: true,
|
||||
confirmBeforeExecute: false,
|
||||
},
|
||||
{
|
||||
name: "zip1",
|
||||
onPageLoad: true,
|
||||
confirmBeforeExecute: true,
|
||||
},
|
||||
{
|
||||
name: "base",
|
||||
onPageLoad: false,
|
||||
confirmBeforeExecute: false,
|
||||
},
|
||||
{
|
||||
name: "newAssert",
|
||||
onPageLoad: true,
|
||||
confirmBeforeExecute: false,
|
||||
},
|
||||
{
|
||||
name: "test",
|
||||
onPageLoad: true,
|
||||
confirmBeforeExecute: true,
|
||||
},
|
||||
];
|
||||
|
||||
// clone page and assert order of functions
|
||||
ee.ClonePage();
|
||||
// click "Yes" button for all onPageload && ConfirmExecute functions
|
||||
for (let i = 0; i <= onPageLoadAndConfirmExecuteFunctionsLength - 1; i++) {
|
||||
//agHelper.AssertElementPresence(jsEditor._dialog("Confirmation Dialog")); // Not working in edit mode
|
||||
agHelper.ClickButton("Yes");
|
||||
agHelper.Sleep();
|
||||
}
|
||||
|
||||
ee.SelectEntityByName(jsObj as string, "QUERIES/JS");
|
||||
|
||||
agHelper.GetNClick(jsEditor._settingsTab);
|
||||
assertAsyncFunctionsOrder(FUNCTIONS_SETTINGS_DEFAULT_DATA);
|
||||
|
||||
// rename functions and assert order
|
||||
agHelper.GetNClick(jsEditor._codeTab);
|
||||
jsEditor.EditJSObj(getJSObject(FUNCTIONS_SETTINGS_RENAMED_DATA));
|
||||
cy.wait(3000);
|
||||
agHelper.GetNClick(jsEditor._settingsTab);
|
||||
assertAsyncFunctionsOrder(FUNCTIONS_SETTINGS_RENAMED_DATA);
|
||||
});
|
||||
|
||||
function assertAsyncFunctionsOrder(data: IFunctionSettingData[]) {
|
||||
// sorts functions alphabetically
|
||||
const sortFunctions = (data: IFunctionSettingData[]) =>
|
||||
data.sort((a, b) => a.name.localeCompare(b.name));
|
||||
cy.get(jsEditor._asyncJSFunctionSettings).then(function($lis) {
|
||||
const asyncFunctionLength = $lis.length;
|
||||
// Assert number of async functions
|
||||
expect(asyncFunctionLength).to.equal(functionsLength);
|
||||
Object.values(sortFunctions(data)).forEach((functionSetting, idx) => {
|
||||
// Assert alphabetical order
|
||||
expect($lis.eq(idx)).to.have.id(
|
||||
jsEditor._getJSFunctionSettingsId(functionSetting.name),
|
||||
);
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ describe("Guided Tour", function() {
|
|||
cy.get(guidedTourLocators.successButton).click();
|
||||
// Step 9: Deploy
|
||||
cy.PublishtheApp();
|
||||
cy.wait("@getOrganisation");
|
||||
cy.wait("@getWorkspace");
|
||||
cy.get(guidedTourLocators.rating).should("be.visible");
|
||||
cy.get(guidedTourLocators.rating)
|
||||
.eq(4)
|
||||
|
|
|
|||
|
|
@ -1,48 +0,0 @@
|
|||
/// <reference types="Cypress" />
|
||||
|
||||
import homePage from "../../../../locators/HomePage";
|
||||
|
||||
describe("Delete organization test spec", function() {
|
||||
let newOrganizationName;
|
||||
|
||||
it("should delete the organization", function() {
|
||||
cy.visit("/applications");
|
||||
cy.createOrg();
|
||||
cy.wait("@createOrg").then((interception) => {
|
||||
newOrganizationName = interception.response.body.data.name;
|
||||
cy.visit("/applications");
|
||||
cy.openOrgOptionsPopup(newOrganizationName);
|
||||
cy.contains("Delete Organization").click();
|
||||
cy.contains("Are you sure").click();
|
||||
cy.wait("@deleteOrgApiCall").then((httpResponse) => {
|
||||
expect(httpResponse.status).to.equal(200);
|
||||
});
|
||||
cy.get(newOrganizationName).should("not.exist");
|
||||
});
|
||||
});
|
||||
|
||||
it("should show option to delete organization for an admin user", function() {
|
||||
cy.visit("/applications");
|
||||
cy.wait(2000);
|
||||
cy.createOrg();
|
||||
cy.wait("@createOrg").then((interception) => {
|
||||
newOrganizationName = interception.response.body.data.name;
|
||||
cy.visit("/applications");
|
||||
cy.openOrgOptionsPopup(newOrganizationName);
|
||||
cy.contains("Delete Organization");
|
||||
cy.inviteUserForOrg(
|
||||
newOrganizationName,
|
||||
Cypress.env("TESTUSERNAME1"),
|
||||
homePage.viewerRole,
|
||||
);
|
||||
cy.LogOut();
|
||||
cy.LogintoApp(Cypress.env("TESTUSERNAME1"), Cypress.env("TESTPASSWORD1"));
|
||||
cy.visit("/applications");
|
||||
cy.openOrgOptionsPopup(newOrganizationName);
|
||||
cy.get(homePage.orgNamePopoverContent)
|
||||
.contains("Delete Organization")
|
||||
.should("not.exist");
|
||||
cy.LogOut();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
@ -1,62 +0,0 @@
|
|||
/// <reference types="Cypress" />
|
||||
|
||||
import homePage from "../../../../locators/HomePage";
|
||||
|
||||
describe("Leave organization test spec", function() {
|
||||
let newOrgId;
|
||||
let newOrganizationName;
|
||||
|
||||
it("leave organization menu is visible validation", function() {
|
||||
cy.visit("/applications");
|
||||
cy.createOrg();
|
||||
cy.wait("@createOrg").then((interception) => {
|
||||
newOrganizationName = interception.response.body.data.name;
|
||||
newOrgId = interception.response.body.data.name;
|
||||
cy.visit("/applications");
|
||||
cy.openOrgOptionsPopup(newOrganizationName);
|
||||
cy.contains("Leave Organization");
|
||||
});
|
||||
});
|
||||
|
||||
it("Only admin user can not leave organization validation", function() {
|
||||
cy.visit("/applications");
|
||||
cy.createOrg();
|
||||
cy.wait("@createOrg").then((interception) => {
|
||||
newOrganizationName = interception.response.body.data.name;
|
||||
newOrgId = interception.response.body.data.name;
|
||||
cy.visit("/applications");
|
||||
cy.openOrgOptionsPopup(newOrganizationName);
|
||||
cy.contains("Leave Organization").click();
|
||||
cy.contains("Are you sure").click();
|
||||
cy.wait("@leaveOrgApiCall").then((httpResponse) => {
|
||||
expect(httpResponse.status).to.equal(400);
|
||||
});
|
||||
cy.contains(newOrganizationName);
|
||||
});
|
||||
});
|
||||
|
||||
it("Non admin users can only access leave organization popup menu validation", function() {
|
||||
cy.visit("/applications");
|
||||
cy.createOrg();
|
||||
cy.wait("@createOrg").then((interception) => {
|
||||
newOrganizationName = interception.response.body.data.name;
|
||||
newOrgId = interception.response.body.data.name;
|
||||
cy.visit("/applications");
|
||||
cy.inviteUserForOrg(
|
||||
newOrganizationName,
|
||||
Cypress.env("TESTUSERNAME1"),
|
||||
homePage.viewerRole,
|
||||
);
|
||||
cy.LogOut();
|
||||
|
||||
cy.LogintoApp(Cypress.env("TESTUSERNAME1"), Cypress.env("TESTPASSWORD1"));
|
||||
cy.visit("/applications");
|
||||
cy.openOrgOptionsPopup(newOrganizationName);
|
||||
cy.get(homePage.orgNamePopoverContent)
|
||||
.find("a")
|
||||
.should("have.length", 1)
|
||||
.first()
|
||||
.contains("Leave Organization");
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
/// <reference types="Cypress" />
|
||||
|
||||
import homePage from "../../../../locators/HomePage";
|
||||
|
||||
describe("Check if org has user icons on homepage", function() {
|
||||
let orgid;
|
||||
let newOrganizationName;
|
||||
|
||||
it("create org and check if user icons exists in that org on homepage", function() {
|
||||
cy.NavigateToHome();
|
||||
cy.generateUUID().then((uid) => {
|
||||
orgid = uid;
|
||||
localStorage.setItem("OrgName", orgid);
|
||||
cy.createOrg();
|
||||
cy.wait("@createOrg").then((interception) => {
|
||||
newOrganizationName = interception.response.body.data.name;
|
||||
cy.renameOrg(newOrganizationName, orgid);
|
||||
cy.get(homePage.orgList.concat(orgid).concat(")"))
|
||||
.scrollIntoView()
|
||||
.should("be.visible")
|
||||
.within(() => {
|
||||
cy.get(homePage.shareUserIcons)
|
||||
.first()
|
||||
.should("be.visible");
|
||||
});
|
||||
});
|
||||
});
|
||||
cy.LogOut();
|
||||
});
|
||||
});
|
||||
|
|
@ -1,46 +0,0 @@
|
|||
/// <reference types="Cypress" />
|
||||
|
||||
import homePage from "../../../../locators/HomePage";
|
||||
|
||||
describe("Org name validation spec", function() {
|
||||
let orgid;
|
||||
let newOrganizationName;
|
||||
it("create org with leading space validation", function() {
|
||||
cy.NavigateToHome();
|
||||
cy.createOrg();
|
||||
cy.wait("@createOrg").then((interception) => {
|
||||
newOrganizationName = interception.response.body.data.name;
|
||||
cy.NavigateToHome();
|
||||
cy.contains(newOrganizationName)
|
||||
.closest(homePage.orgCompleteSection)
|
||||
.find(homePage.orgNamePopover)
|
||||
.find(homePage.optionsIcon)
|
||||
.click({ force: true });
|
||||
cy.get(homePage.renameOrgInput)
|
||||
.should("be.visible")
|
||||
.type(" ");
|
||||
cy.get(".error-message").should("be.visible");
|
||||
});
|
||||
});
|
||||
it("creates org and checks that orgname is editable", function() {
|
||||
cy.createOrg();
|
||||
cy.generateUUID().then((uid) => {
|
||||
orgid =
|
||||
"kadjhfkjadsjkfakjdscajdsnckjadsnckadsjcnanakdjsnckjdscnakjdscnnadjkncakjdsnckjadsnckajsdfkjadshfkjsdhfjkasdhfkjasdhfjkasdhjfasdjkfhjhdsfjhdsfjhadasdfasdfadsasdf" +
|
||||
uid;
|
||||
// create org with long name
|
||||
cy.createOrg();
|
||||
cy.wait("@createOrg").then((interception) => {
|
||||
newOrganizationName = interception.response.body.data.name;
|
||||
cy.renameOrg(newOrganizationName, orgid);
|
||||
});
|
||||
});
|
||||
});
|
||||
it("create org with special characters validation", function() {
|
||||
cy.createOrg();
|
||||
cy.wait("@createOrg").then((interception) => {
|
||||
newOrganizationName = interception.response.body.data.name;
|
||||
cy.renameOrg(newOrganizationName, "Test & Org");
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
@ -7,8 +7,8 @@ describe("Execute Action Functionality", function() {
|
|||
.first()
|
||||
.click();
|
||||
// Importing the App from the sample application
|
||||
cy.get(homePage.orgImportAppOption).click({ force: true });
|
||||
cy.get(homePage.orgImportAppModal).should("be.visible");
|
||||
cy.get(homePage.workspaceImportAppOption).click({ force: true });
|
||||
cy.get(homePage.workspaceImportAppModal).should("be.visible");
|
||||
cy.xpath(homePage.uploadLogo).attachFile("executeAction.json");
|
||||
cy.get(homePage.importAppProgressWrapper).should("be.visible");
|
||||
cy.wait(3000);
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
const commonlocators = require("../../../../locators/commonlocators.json");
|
||||
const templateLocators = require("../../../../locators/TemplatesLocators.json");
|
||||
|
||||
describe("Fork a template to an organisation", () => {
|
||||
it("Fork a template to an organisation", () => {
|
||||
describe("Fork a template to an workspace", () => {
|
||||
it("Fork a template to an workspace", () => {
|
||||
cy.NavigateToHome();
|
||||
cy.get(templateLocators.templatesTab).click();
|
||||
cy.get(templateLocators.templateForkButton)
|
||||
|
|
|
|||
|
|
@ -0,0 +1,48 @@
|
|||
/// <reference types="Cypress" />
|
||||
|
||||
import homePage from "../../../../locators/HomePage";
|
||||
|
||||
describe("Delete workspace test spec", function() {
|
||||
let newWorkspaceName;
|
||||
|
||||
it("should delete the workspace", function() {
|
||||
cy.visit("/applications");
|
||||
cy.createWorkspace();
|
||||
cy.wait("@createWorkspace").then((interception) => {
|
||||
newWorkspaceName = interception.response.body.data.name;
|
||||
cy.visit("/applications");
|
||||
cy.openWorkspaceOptionsPopup(newWorkspaceName);
|
||||
cy.contains("Delete Organization").click();
|
||||
cy.contains("Are you sure").click();
|
||||
cy.wait("@deleteWorkspaceApiCall").then((httpResponse) => {
|
||||
expect(httpResponse.status).to.equal(200);
|
||||
});
|
||||
cy.get(newWorkspaceName).should("not.exist");
|
||||
});
|
||||
});
|
||||
|
||||
it("should show option to delete workspace for an admin user", function() {
|
||||
cy.visit("/applications");
|
||||
cy.wait(2000);
|
||||
cy.createWorkspace();
|
||||
cy.wait("@createWorkspace").then((interception) => {
|
||||
newWorkspaceName = interception.response.body.data.name;
|
||||
cy.visit("/applications");
|
||||
cy.openWorkspaceOptionsPopup(newWorkspaceName);
|
||||
cy.contains("Delete Organization");
|
||||
cy.inviteUserForWorkspace(
|
||||
newWorkspaceName,
|
||||
Cypress.env("TESTUSERNAME1"),
|
||||
homePage.viewerRole,
|
||||
);
|
||||
cy.LogOut();
|
||||
cy.LogintoApp(Cypress.env("TESTUSERNAME1"), Cypress.env("TESTPASSWORD1"));
|
||||
cy.visit("/applications");
|
||||
cy.openWorkspaceOptionsPopup(newWorkspaceName);
|
||||
cy.get(homePage.workspaceNamePopoverContent)
|
||||
.contains("Delete Organization")
|
||||
.should("not.exist");
|
||||
cy.LogOut();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
/// <reference types="Cypress" />
|
||||
|
||||
import homePage from "../../../../locators/HomePage";
|
||||
|
||||
describe("Leave workspace test spec", function() {
|
||||
let newWorkspaceId;
|
||||
let newWorkspaceName;
|
||||
|
||||
it("leave workspace menu is visible validation", function() {
|
||||
cy.visit("/applications");
|
||||
cy.createWorkspace();
|
||||
cy.wait("@createWorkspace").then((interception) => {
|
||||
newWorkspaceName = interception.response.body.data.name;
|
||||
newWorkspaceId = interception.response.body.data.name;
|
||||
cy.visit("/applications");
|
||||
cy.openWorkspaceOptionsPopup(newWorkspaceName);
|
||||
cy.contains("Leave Organization");
|
||||
});
|
||||
});
|
||||
|
||||
it("Only admin user can not leave workspace validation", function() {
|
||||
cy.visit("/applications");
|
||||
cy.createWorkspace();
|
||||
cy.wait("@createWorkspace").then((interception) => {
|
||||
newWorkspaceName = interception.response.body.data.name;
|
||||
newWorkspaceId = interception.response.body.data.name;
|
||||
cy.visit("/applications");
|
||||
cy.openWorkspaceOptionsPopup(newWorkspaceName);
|
||||
cy.contains("Leave Organization").click();
|
||||
cy.contains("Are you sure").click();
|
||||
cy.wait("@leaveWorkspaceApiCall").then((httpResponse) => {
|
||||
expect(httpResponse.status).to.equal(400);
|
||||
});
|
||||
cy.contains(newWorkspaceName);
|
||||
});
|
||||
});
|
||||
|
||||
it("Non admin users can only access leave workspace popup menu validation", function() {
|
||||
cy.visit("/applications");
|
||||
cy.createWorkspace();
|
||||
cy.wait("@createWorkspace").then((interception) => {
|
||||
newWorkspaceName = interception.response.body.data.name;
|
||||
newWorkspaceId = interception.response.body.data.name;
|
||||
cy.visit("/applications");
|
||||
cy.inviteUserForWorkspace(
|
||||
newWorkspaceName,
|
||||
Cypress.env("TESTUSERNAME1"),
|
||||
homePage.viewerRole,
|
||||
);
|
||||
cy.LogOut();
|
||||
|
||||
cy.LogintoApp(Cypress.env("TESTUSERNAME1"), Cypress.env("TESTPASSWORD1"));
|
||||
cy.visit("/applications");
|
||||
cy.openWorkspaceOptionsPopup(newWorkspaceName);
|
||||
cy.get(homePage.workspaceNamePopoverContent)
|
||||
.find("a")
|
||||
.should("have.length", 1)
|
||||
.first()
|
||||
.contains("Leave Organization");
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
import homePage from "../../../../locators/HomePage";
|
||||
const dsl = require("../../../../fixtures/displayWidgetDsl.json");
|
||||
|
||||
describe("Organization Import Application", function() {
|
||||
let orgid;
|
||||
let newOrganizationName;
|
||||
describe("Workspace Import Application", function() {
|
||||
let workspaceId;
|
||||
let newWorkspaceName;
|
||||
let appname;
|
||||
|
||||
before(() => {
|
||||
|
|
@ -37,15 +37,16 @@ describe("Organization Import Application", function() {
|
|||
cy.writeFile("cypress/fixtures/exported-app.json", body, "utf-8");
|
||||
|
||||
cy.generateUUID().then((uid) => {
|
||||
orgid = uid;
|
||||
localStorage.setItem("OrgName", orgid);
|
||||
cy.createOrg();
|
||||
cy.wait("@createOrg").then((createOrgInterception) => {
|
||||
newOrganizationName = createOrgInterception.response.body.data.name;
|
||||
cy.renameOrg(newOrganizationName, orgid);
|
||||
cy.get(homePage.orgImportAppOption).click({ force: true });
|
||||
workspaceId = uid;
|
||||
localStorage.setItem("OrgName", workspaceId);
|
||||
cy.createWorkspace();
|
||||
cy.wait("@createWorkspace").then((createWorkspaceInterception) => {
|
||||
newWorkspaceName =
|
||||
createWorkspaceInterception.response.body.data.name;
|
||||
cy.renameWorkspace(newWorkspaceName, workspaceId);
|
||||
cy.get(homePage.workspaceImportAppOption).click({ force: true });
|
||||
|
||||
cy.get(homePage.orgImportAppModal).should("be.visible");
|
||||
cy.get(homePage.workspaceImportAppModal).should("be.visible");
|
||||
cy.xpath(homePage.uploadLogo).attachFile("exported-app.json");
|
||||
|
||||
cy.wait("@importNewApplication").then((interception) => {
|
||||
|
|
@ -2,27 +2,27 @@
|
|||
|
||||
import homePage from "../../../../locators/HomePage";
|
||||
|
||||
describe("Org Settings validation spec", function() {
|
||||
let orgid;
|
||||
let newOrganizationName;
|
||||
describe("Workspace Settings validation spec", function() {
|
||||
let workspaceId;
|
||||
let newWorkspaceName;
|
||||
|
||||
it("create org with long name should use ellipsis validation", function() {
|
||||
it("create workspace with long name should use ellipsis validation", function() {
|
||||
cy.NavigateToHome();
|
||||
cy.generateUUID().then((uid) => {
|
||||
orgid =
|
||||
workspaceId =
|
||||
"kadjhfkjadsjkfakjdscajdsnckjadsnckadsjcnanakdjsnckjdscnakjdscnnadjkncakjdsnckjadsnckajsdfkjadshfkjsdhfjkasdhfkjasdhfjkasdhjfasdjkfhjhdsfjhdsfjhadasdfasdfadsasdf" +
|
||||
uid;
|
||||
localStorage.setItem("OrgName", orgid);
|
||||
// create org with long name
|
||||
cy.createOrg();
|
||||
localStorage.setItem("OrgName", workspaceId);
|
||||
// create workspace with long name
|
||||
cy.createWorkspace();
|
||||
// stub the response and
|
||||
// find app name
|
||||
cy.wait("@createOrg").then((interception) => {
|
||||
newOrganizationName = interception.response.body.data.name;
|
||||
cy.renameOrg(newOrganizationName, orgid);
|
||||
cy.navigateToOrgSettings(orgid);
|
||||
cy.wait("@createWorkspace").then((interception) => {
|
||||
newWorkspaceName = interception.response.body.data.name;
|
||||
cy.renameWorkspace(newWorkspaceName, workspaceId);
|
||||
cy.navigateToWorkspaceSettings(workspaceId);
|
||||
// checking parent's(<a></a>) since the child(<span>) inherits css from it
|
||||
cy.get(homePage.orgHeaderName)
|
||||
cy.get(homePage.workspaceHeaderName)
|
||||
.parent()
|
||||
.then((elem) => {
|
||||
assert.isBelow(elem[0].offsetWidth, elem[0].scrollWidth);
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
/// <reference types="Cypress" />
|
||||
|
||||
import homePage from "../../../../locators/HomePage";
|
||||
|
||||
describe("Check if workspace has user icons on homepage", function() {
|
||||
let workspaceId;
|
||||
let newWorkspaceName;
|
||||
|
||||
it("create workspace and check if user icons exists in that workspace on homepage", function() {
|
||||
cy.NavigateToHome();
|
||||
cy.generateUUID().then((uid) => {
|
||||
workspaceId = uid;
|
||||
localStorage.setItem("OrgName", workspaceId);
|
||||
cy.createWorkspace();
|
||||
cy.wait("@createWorkspace").then((interception) => {
|
||||
newWorkspaceName = interception.response.body.data.name;
|
||||
cy.renameWorkspace(newWorkspaceName, workspaceId);
|
||||
cy.get(homePage.workspaceList.concat(workspaceId).concat(")"))
|
||||
.scrollIntoView()
|
||||
.should("be.visible")
|
||||
.within(() => {
|
||||
cy.get(homePage.shareUserIcons)
|
||||
.first()
|
||||
.should("be.visible");
|
||||
});
|
||||
});
|
||||
});
|
||||
cy.LogOut();
|
||||
});
|
||||
});
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
/// <reference types="Cypress" />
|
||||
|
||||
import homePage from "../../../../locators/HomePage";
|
||||
|
||||
describe("Workspace name validation spec", function() {
|
||||
let workspaceId;
|
||||
let newWorkspaceName;
|
||||
it("create workspace with leading space validation", function() {
|
||||
cy.NavigateToHome();
|
||||
cy.createWorkspace();
|
||||
cy.wait("@createWorkspace").then((interception) => {
|
||||
newWorkspaceName = interception.response.body.data.name;
|
||||
cy.NavigateToHome();
|
||||
cy.contains(newWorkspaceName)
|
||||
.closest(homePage.workspaceCompleteSection)
|
||||
.find(homePage.workspaceNamePopover)
|
||||
.find(homePage.optionsIcon)
|
||||
.click({ force: true });
|
||||
cy.get(homePage.renameWorkspaceInput)
|
||||
.should("be.visible")
|
||||
.type(" ");
|
||||
cy.get(".error-message").should("be.visible");
|
||||
});
|
||||
});
|
||||
it("creates workspace and checks that workspace name is editable", function() {
|
||||
cy.createWorkspace();
|
||||
cy.generateUUID().then((uid) => {
|
||||
workspaceId =
|
||||
"kadjhfkjadsjkfakjdscajdsnckjadsnckadsjcnanakdjsnckjdscnakjdscnnadjkncakjdsnckjadsnckajsdfkjadshfkjsdhfjkasdhfkjasdhfjkasdhjfasdjkfhjhdsfjhdsfjhadasdfasdfadsasdf" +
|
||||
uid;
|
||||
// create workspace with long name
|
||||
cy.createWorkspace();
|
||||
cy.wait("@createWorkspace").then((interception) => {
|
||||
newWorkspaceName = interception.response.body.data.name;
|
||||
cy.renameWorkspace(newWorkspaceName, workspaceId);
|
||||
});
|
||||
});
|
||||
});
|
||||
it("create workspace with special characters validation", function() {
|
||||
cy.createWorkspace();
|
||||
cy.wait("@createWorkspace").then((interception) => {
|
||||
newWorkspaceName = interception.response.body.data.name;
|
||||
cy.renameWorkspace(newWorkspaceName, "Test & Workspace");
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
@ -0,0 +1,391 @@
|
|||
import { ObjectsRegistry } from "../../../../support/Objects/Registry";
|
||||
|
||||
let guid: any, dsName: any, query: string;
|
||||
const agHelper = ObjectsRegistry.AggregateHelper,
|
||||
ee = ObjectsRegistry.EntityExplorer,
|
||||
dataSources = ObjectsRegistry.DataSources,
|
||||
propPane = ObjectsRegistry.PropertyPane,
|
||||
table = ObjectsRegistry.Table,
|
||||
locator = ObjectsRegistry.CommonLocators,
|
||||
deployMode = ObjectsRegistry.DeployMode;
|
||||
|
||||
describe("Postgres - Datatype Character tests", function() {
|
||||
before(() => {
|
||||
cy.fixture("CharacterDTdsl").then((val: any) => {
|
||||
agHelper.AddDsl(val);
|
||||
});
|
||||
propPane.ChangeTheme("Sharp");
|
||||
});
|
||||
|
||||
it("1. Create Postgress DS", function() {
|
||||
agHelper.GenerateUUID();
|
||||
cy.get("@guid").then((uid) => {
|
||||
dataSources.NavigateToDSCreateNew();
|
||||
dataSources.CreatePlugIn("PostgreSQL");
|
||||
guid = uid;
|
||||
agHelper.RenameWithInPane("Postgres " + guid, false);
|
||||
dataSources.FillPostgresDSForm();
|
||||
dataSources.TestSaveDatasource();
|
||||
cy.wrap("Postgres " + guid).as("dsName");
|
||||
});
|
||||
cy.get("@dsName").then(($dsName) => {
|
||||
dsName = $dsName;
|
||||
});
|
||||
});
|
||||
|
||||
it("2. Creating table - chartypes", () => {
|
||||
query = `create table charTypes(serialid serial primary key, "One(1)" char, "AsMany" varchar, "Limited(4)" varchar(4), "Unlimited" text)`;
|
||||
dataSources.NavigateFromActiveDS(dsName, true);
|
||||
agHelper.GetNClick(dataSources._templateMenu);
|
||||
agHelper.RenameWithInPane("createTable");
|
||||
agHelper.EnterValue(query);
|
||||
cy.get(".CodeMirror textarea").focus();
|
||||
dataSources.RunQuery();
|
||||
ee.ExpandCollapseEntity(dsName);
|
||||
ee.ActionContextMenuByEntityName(dsName, "Refresh");
|
||||
agHelper.AssertElementVisible(ee._entityNameInExplorer("public.chartypes"));
|
||||
});
|
||||
|
||||
it("3. Creating SELECT query - chartypes + Bug 14493", () => {
|
||||
query = `SELECT *, char_length("AsMany") as "AsMany-Len", char_length("Unlimited") as "Unlimited-Len" FROM public."chartypes" as charT LIMIT 10;`;
|
||||
ee.ActionTemplateMenuByEntityName("public.chartypes", "SELECT");
|
||||
agHelper.RenameWithInPane("selectRecords");
|
||||
dataSources.RunQuery();
|
||||
agHelper
|
||||
.GetText(dataSources._noRecordFound)
|
||||
.then(($noRecMsg) => expect($noRecMsg).to.eq("No data records to show"));
|
||||
agHelper.EnterValue(query);
|
||||
});
|
||||
|
||||
it("4. Creating INSERT query - chartypes", () => {
|
||||
query = `INSERT INTO public."chartypes" ("One(1)", "AsMany", "Limited(4)", "Unlimited")
|
||||
VALUES ({{Insertone.text}}, {{Insertasmany.text}}, {{Insertlimited.text}}::varchar(4), {{Insertunlimited.text}});`;
|
||||
ee.ActionTemplateMenuByEntityName("public.chartypes", "INSERT");
|
||||
agHelper.RenameWithInPane("insertRecord");
|
||||
agHelper.EnterValue(query);
|
||||
});
|
||||
|
||||
it("5. Creating UPDATE query - chartypes", () => {
|
||||
query = `UPDATE public."chartypes" SET
|
||||
"One(1)" = {{Updateone.text}},
|
||||
"AsMany" = {{Updateasmany.text}},
|
||||
"Limited(4)" = {{Updatelimited.text}}::varchar(4),
|
||||
"Unlimited" = {{Updateunlimited.text}}
|
||||
WHERE serialid = {{Table1.selectedRow.serialid}};`;
|
||||
ee.ActionTemplateMenuByEntityName("public.chartypes", "UPDATE");
|
||||
agHelper.RenameWithInPane("updateRecord");
|
||||
agHelper.EnterValue(query);
|
||||
});
|
||||
|
||||
it("5. Creating DELETE query with condition - chartypes", () => {
|
||||
query = `DELETE FROM public."chartypes"
|
||||
WHERE serialId = {{Table1.selectedRow.serialid}};`;
|
||||
ee.ActionTemplateMenuByEntityName("public.chartypes", "DELETE");
|
||||
agHelper.RenameWithInPane("deleteRecord");
|
||||
agHelper.EnterValue(query);
|
||||
});
|
||||
|
||||
it("6. Creating DELETE query for complete table empty - chartypes", () => {
|
||||
query = `DELETE FROM public."chartypes"`;
|
||||
ee.ActionTemplateMenuByEntityName("public.chartypes", "DELETE");
|
||||
agHelper.RenameWithInPane("deleteAllRecords");
|
||||
agHelper.EnterValue(query);
|
||||
});
|
||||
|
||||
it("7. Creating DROP table query - chartypes", () => {
|
||||
query = `drop table public."chartypes"`;
|
||||
ee.ActionTemplateMenuByEntityName("public.chartypes", "DELETE");
|
||||
agHelper.RenameWithInPane("dropTable");
|
||||
agHelper.EnterValue(query);
|
||||
ee.ExpandCollapseEntity("QUERIES/JS", false);
|
||||
ee.ExpandCollapseEntity(dsName, false);
|
||||
});
|
||||
|
||||
it("8. Inserting record (null values) - chartypes", () => {
|
||||
ee.SelectEntityByName("Page1");
|
||||
deployMode.DeployApp();
|
||||
table.WaitForTableEmpty(); //asserting table is empty before inserting!
|
||||
agHelper.ClickButton("Run InsertQuery");
|
||||
agHelper.AssertElementVisible(locator._modal);
|
||||
agHelper.ClickButton("Insert");
|
||||
agHelper.AssertElementVisible(locator._spanButton("Run InsertQuery"));
|
||||
table.ReadTableRowColumnData(0, 0, 2000).then(($cellData) => {
|
||||
expect($cellData).to.eq("1"); //asserting serial column is inserting fine in sequence
|
||||
});
|
||||
table.ReadTableRowColumnData(0, 1, 200).then(($cellData) => {
|
||||
expect($cellData).to.eq(" "); //white space for padding length!
|
||||
});
|
||||
table.ReadTableRowColumnData(0, 3, 200).then(($cellData) => {
|
||||
expect($cellData).to.eq("");
|
||||
});
|
||||
table.ReadTableRowColumnData(0, 5, 200).then(($cellData) => {
|
||||
expect(Number($cellData)).to.eq(0);
|
||||
});
|
||||
table.ReadTableRowColumnData(0, 6, 200).then(($cellData) => {
|
||||
expect(Number($cellData)).to.eq(0);
|
||||
});
|
||||
});
|
||||
|
||||
it("9. Inserting record (not null values) - chartypes", () => {
|
||||
agHelper.ClickButton("Run InsertQuery");
|
||||
agHelper.AssertElementVisible(locator._modal);
|
||||
agHelper.EnterInputText("One_1_", "a");
|
||||
agHelper.EnterInputText(
|
||||
"AsMany",
|
||||
"Sailing ships were used for thousands of years!",
|
||||
);
|
||||
agHelper.EnterInputText("Limited_4_", "Ocean");
|
||||
agHelper.EnterInputText(
|
||||
"Unlimited",
|
||||
"At one time, the steamships Titanic, Olympic, and Britannic were the largest ships in the world, Titanic sank on her maiden voyage after hitting an iceberg, becoming one of the most famous shipwrecks of all time",
|
||||
false,
|
||||
false,
|
||||
);
|
||||
agHelper.ClickButton("Insert");
|
||||
agHelper.AssertElementVisible(locator._spanButton("Run InsertQuery"));
|
||||
table.ReadTableRowColumnData(1, 0, 2000).then(($cellData) => {
|
||||
expect($cellData).to.eq("2"); //asserting serial column is inserting fine in sequence
|
||||
});
|
||||
table.ReadTableRowColumnData(1, 1, 200).then(($cellData) => {
|
||||
expect($cellData).to.eq("a");
|
||||
});
|
||||
table.ReadTableRowColumnData(1, 3, 200).then(($cellData) => {
|
||||
expect($cellData).to.eq("Ocea"); //asserting only 4 chars are inserted due to column dt constraint
|
||||
});
|
||||
table.ReadTableRowColumnData(1, 5, 200).then(($cellData) => {
|
||||
expect(Number($cellData)).to.be.greaterThan(0); //asserting length columns
|
||||
});
|
||||
table.ReadTableRowColumnData(1, 6, 200).then(($cellData) => {
|
||||
expect(Number($cellData)).to.be.greaterThan(0); //asserting length columns
|
||||
});
|
||||
});
|
||||
|
||||
it("10. Inserting another record (not null values) - chartypes", () => {
|
||||
agHelper.ClickButton("Run InsertQuery");
|
||||
agHelper.AssertElementVisible(locator._modal);
|
||||
agHelper.EnterInputText("One_1_", "<");
|
||||
agHelper.EnterInputText(
|
||||
"AsMany",
|
||||
"Some planes can fly for more than five hours after one of their engines goes out.!",
|
||||
);
|
||||
agHelper.EnterInputText("Limited_4_", "Planes");
|
||||
agHelper.EnterInputText(
|
||||
"Unlimited",
|
||||
" In fact, according to the FAA, there are 5,000 planes in the air over the United States at any moment in time, and more than 8,000 flying across the globe.",
|
||||
false,
|
||||
false,
|
||||
);
|
||||
agHelper.ClickButton("Insert");
|
||||
agHelper.AssertElementVisible(locator._spanButton("Run InsertQuery"));
|
||||
table.ReadTableRowColumnData(2, 0, 2000).then(($cellData) => {
|
||||
expect($cellData).to.eq("3"); //asserting serial column is inserting fine in sequence
|
||||
});
|
||||
table.ReadTableRowColumnData(2, 1, 200).then(($cellData) => {
|
||||
expect($cellData).to.eq("<");
|
||||
});
|
||||
table.ReadTableRowColumnData(2, 3, 200).then(($cellData) => {
|
||||
expect($cellData).to.eq("Plan");
|
||||
});
|
||||
table.ReadTableRowColumnData(2, 5, 200).then(($cellData) => {
|
||||
expect(Number($cellData)).to.be.greaterThan(0);
|
||||
});
|
||||
table.ReadTableRowColumnData(2, 6, 200).then(($cellData) => {
|
||||
expect(Number($cellData)).to.be.greaterThan(0);
|
||||
});
|
||||
});
|
||||
|
||||
it("11. Updating record (emtying some field) - chartypes", () => {
|
||||
table.SelectTableRow(2);
|
||||
agHelper.ClickButton("Run UpdateQuery");
|
||||
agHelper.AssertElementVisible(locator._modal);
|
||||
agHelper.EnterInputText("One_1_", ">", true);
|
||||
agHelper.EnterInputText(
|
||||
"AsMany",
|
||||
"Dimming the aircraft's lights serves a purpose beyond sleep.!",
|
||||
true,
|
||||
);
|
||||
agHelper.EnterInputText("Limited_4_", "Flights", true);
|
||||
agHelper.ClearInputText("Unlimited", false);
|
||||
agHelper.ClickButton("Update");
|
||||
agHelper.AssertElementVisible(locator._spanButton("Run UpdateQuery"));
|
||||
table.ReadTableRowColumnData(2, 0, 2000).then(($cellData) => {
|
||||
expect($cellData).to.eq("3"); //asserting serial column is inserting fine in sequence
|
||||
});
|
||||
table.ReadTableRowColumnData(2, 1, 200).then(($cellData) => {
|
||||
expect($cellData).to.eq(">");
|
||||
});
|
||||
table.ReadTableRowColumnData(2, 3, 200).then(($cellData) => {
|
||||
expect($cellData).to.eq("Flig");
|
||||
});
|
||||
table.ReadTableRowColumnData(2, 5, 200).then(($cellData) => {
|
||||
expect(Number($cellData)).to.be.greaterThan(0);
|
||||
});
|
||||
table.ReadTableRowColumnData(2, 6, 200).then(($cellData) => {
|
||||
expect(Number($cellData)).to.eq(0);
|
||||
});
|
||||
});
|
||||
|
||||
it("12. Deleting records - chartypes", () => {
|
||||
table.SelectTableRow(1);
|
||||
agHelper.ClickButton("DeleteQuery", 1);
|
||||
agHelper.ValidateNetworkStatus("@postExecute", 200);
|
||||
agHelper.ValidateNetworkStatus("@postExecute", 200);
|
||||
agHelper.Sleep(2500);//Allwowing time for delete to be success
|
||||
table.ReadTableRowColumnData(1, 0, 2000).then(($cellData) => {
|
||||
expect($cellData).not.to.eq("2"); //asserting 2nd record is deleted
|
||||
});
|
||||
table.ReadTableRowColumnData(1, 0, 200).then(($cellData) => {
|
||||
expect($cellData).to.eq("3");
|
||||
});
|
||||
});
|
||||
|
||||
it("13. Updating record (null inserted record) - chartypes", () => {
|
||||
agHelper.ClickButton("Run UpdateQuery");
|
||||
agHelper.AssertElementVisible(locator._modal);
|
||||
//agHelper.EnterInputText("One_1_", "&");
|
||||
agHelper.EnterInputText(
|
||||
"AsMany",
|
||||
"First electric tram in England was opened in 1885 in Blackpool!",
|
||||
);
|
||||
agHelper.EnterInputText("Limited_4_", "Trams");
|
||||
agHelper.EnterInputText(
|
||||
"Unlimited",
|
||||
"The word tram is used mainly outside North America, while within North America these vehicles are called streetcars or trolleys as they run mainly on streets.The word tram is used mainly outside North America, while within North America these vehicles are called streetcars or trolleys as they run mainly on streets.",
|
||||
false,
|
||||
false,
|
||||
);
|
||||
agHelper.ClickButton("Update");
|
||||
agHelper.AssertElementVisible(locator._spanButton("Run UpdateQuery"));
|
||||
table.ReadTableRowColumnData(1, 0, 2000).then(($cellData) => {
|
||||
//since record updated is moving to last row in table - BUg 14347!
|
||||
expect($cellData).to.eq("1"); //asserting serial column is inserting fine in sequence
|
||||
});
|
||||
table.ReadTableRowColumnData(1, 1, 200).then(($cellData) => {
|
||||
expect($cellData).to.eq(" "); //Not updating one column
|
||||
});
|
||||
table.ReadTableRowColumnData(1, 3, 200).then(($cellData) => {
|
||||
expect($cellData).to.eq("Tram");
|
||||
});
|
||||
table.ReadTableRowColumnData(1, 5, 200).then(($cellData) => {
|
||||
expect(Number($cellData)).to.be.greaterThan(0);
|
||||
});
|
||||
table.ReadTableRowColumnData(1, 6, 200).then(($cellData) => {
|
||||
expect(Number($cellData)).to.be.greaterThan(0);
|
||||
});
|
||||
});
|
||||
|
||||
it("14. Inserting another record (+ve record - to check serial column) - chartypes", () => {
|
||||
agHelper.ClickButton("Run InsertQuery");
|
||||
agHelper.AssertElementVisible(locator._modal);
|
||||
agHelper.EnterInputText("One_1_", "e");
|
||||
agHelper.EnterInputText(
|
||||
"AsMany",
|
||||
"Sailing ships were used for thousands of years!",
|
||||
);
|
||||
agHelper.EnterInputText(
|
||||
"Unlimited",
|
||||
"At one time, the steamships Titanic, Olympic, and Britannic were the largest ships in the world, Titanic sank on her maiden voyage after hitting an iceberg, becoming one of the most famous shipwrecks of all time",
|
||||
false,
|
||||
false,
|
||||
);
|
||||
agHelper.ClickButton("Insert");
|
||||
agHelper.AssertElementVisible(locator._spanButton("Run InsertQuery"));
|
||||
table.ReadTableRowColumnData(2, 0, 2000).then(($cellData) => {
|
||||
expect($cellData).to.eq("4"); //asserting serial column is inserting fine in sequence
|
||||
});
|
||||
table.ReadTableRowColumnData(2, 1, 200).then(($cellData) => {
|
||||
expect($cellData).to.eq("e");
|
||||
});
|
||||
table.ReadTableRowColumnData(2, 3, 200).then(($cellData) => {
|
||||
expect($cellData).to.eq(""); //asserting empty field inserted
|
||||
});
|
||||
table.ReadTableRowColumnData(2, 5, 200).then(($cellData) => {
|
||||
expect(Number($cellData)).to.be.greaterThan(0); //asserting length columns
|
||||
});
|
||||
table.ReadTableRowColumnData(2, 6, 200).then(($cellData) => {
|
||||
expect(Number($cellData)).to.be.greaterThan(0); //asserting length columns
|
||||
});
|
||||
});
|
||||
|
||||
it("15. Deleting records - chartypes", () => {
|
||||
table.SelectTableRow(1);
|
||||
agHelper.ClickButton("DeleteQuery", 1);
|
||||
agHelper.AssertElementVisible(locator._spanButton("Run InsertQuery"));
|
||||
table.ReadTableRowColumnData(1, 0, 2000).then(($cellData) => {
|
||||
expect($cellData).not.to.eq("3"); //asserting 3rd record is deleted
|
||||
});
|
||||
table.ReadTableRowColumnData(1, 0, 2000).then(($cellData) => {
|
||||
expect($cellData).to.eq("4");
|
||||
});
|
||||
});
|
||||
|
||||
it("16. Deleting all records from table - chartypes", () => {
|
||||
agHelper.GetNClick(locator._deleteIcon);
|
||||
agHelper.AssertElementVisible(locator._spanButton("Run InsertQuery"));
|
||||
agHelper.Sleep(2000);
|
||||
table.WaitForTableEmpty();
|
||||
});
|
||||
|
||||
it("17. Inserting record (null record - to check serial column) - chartypes", () => {
|
||||
agHelper.ClickButton("Run InsertQuery");
|
||||
agHelper.AssertElementVisible(locator._modal);
|
||||
agHelper.ClickButton("Insert");
|
||||
agHelper.AssertElementVisible(locator._spanButton("Run InsertQuery"));
|
||||
table.ReadTableRowColumnData(0, 0, 2000).then(($cellData) => {
|
||||
expect($cellData).to.eq("5"); //asserting serial column is inserting fine in sequence
|
||||
});
|
||||
table.ReadTableRowColumnData(0, 1, 200).then(($cellData) => {
|
||||
expect($cellData).to.eq(" ");
|
||||
});
|
||||
table.ReadTableRowColumnData(0, 3, 200).then(($cellData) => {
|
||||
expect($cellData).to.eq("");
|
||||
});
|
||||
table.ReadTableRowColumnData(0, 5, 200).then(($cellData) => {
|
||||
expect(Number($cellData)).to.eq(0);
|
||||
});
|
||||
table.ReadTableRowColumnData(0, 6, 200).then(($cellData) => {
|
||||
expect(Number($cellData)).to.eq(0);
|
||||
});
|
||||
});
|
||||
|
||||
it("18. Validate Drop of the Newly Created - Vessels - Table from Postgres datasource", () => {
|
||||
deployMode.NavigateBacktoEditor();
|
||||
ee.ExpandCollapseEntity("QUERIES/JS");
|
||||
ee.SelectEntityByName("dropTable");
|
||||
dataSources.RunQuery();
|
||||
dataSources.ReadQueryTableResponse(0).then(($cellData) => {
|
||||
expect($cellData).to.eq("0"); //Success response for dropped table!
|
||||
});
|
||||
ee.ExpandCollapseEntity("QUERIES/JS", false);
|
||||
ee.ExpandCollapseEntity("DATASOURCES");
|
||||
ee.ExpandCollapseEntity(dsName);
|
||||
ee.ActionContextMenuByEntityName(dsName, "Refresh");
|
||||
agHelper.AssertElementAbsence(ee._entityNameInExplorer("public.chartypes"));
|
||||
ee.ExpandCollapseEntity(dsName, false);
|
||||
ee.ExpandCollapseEntity("DATASOURCES", false);
|
||||
});
|
||||
|
||||
it("19. Verify Deletion of the datasource after all created queries are Deleted", () => {
|
||||
dataSources.DeleteDatasouceFromWinthinDS(dsName, 409); //Since all queries exists
|
||||
ee.ExpandCollapseEntity("QUERIES/JS");
|
||||
ee.ActionContextMenuByEntityName("createTable", "Delete", "Are you sure?");
|
||||
ee.ActionContextMenuByEntityName(
|
||||
"deleteAllRecords",
|
||||
"Delete",
|
||||
"Are you sure?",
|
||||
);
|
||||
ee.ActionContextMenuByEntityName("deleteRecord", "Delete", "Are you sure?");
|
||||
ee.ActionContextMenuByEntityName("dropTable", "Delete", "Are you sure?");
|
||||
ee.ActionContextMenuByEntityName("insertRecord", "Delete", "Are you sure?");
|
||||
ee.ActionContextMenuByEntityName(
|
||||
"selectRecords",
|
||||
"Delete",
|
||||
"Are you sure?",
|
||||
);
|
||||
ee.ActionContextMenuByEntityName("updateRecord", "Delete", "Are you sure?");
|
||||
deployMode.DeployApp();
|
||||
deployMode.NavigateBacktoEditor();
|
||||
ee.ExpandCollapseEntity("QUERIES/JS");
|
||||
dataSources.DeleteDatasouceFromWinthinDS(dsName, 200); //ProductLines, Employees pages are still using this ds
|
||||
});
|
||||
});
|
||||
|
|
@ -0,0 +1,326 @@
|
|||
import { ObjectsRegistry } from "../../../../support/Objects/Registry";
|
||||
|
||||
let guid: any, dsName: any, query: string;
|
||||
const agHelper = ObjectsRegistry.AggregateHelper,
|
||||
ee = ObjectsRegistry.EntityExplorer,
|
||||
dataSources = ObjectsRegistry.DataSources,
|
||||
propPane = ObjectsRegistry.PropertyPane,
|
||||
table = ObjectsRegistry.Table,
|
||||
locator = ObjectsRegistry.CommonLocators,
|
||||
deployMode = ObjectsRegistry.DeployMode;
|
||||
|
||||
describe("Postgres - Datatype DateTime tests", function() {
|
||||
before(() => {
|
||||
cy.fixture("DateTimeDTdsl").then((val: any) => {
|
||||
agHelper.AddDsl(val);
|
||||
});
|
||||
propPane.ChangeColor(22, "Primary");
|
||||
propPane.ChangeColor(32, "Background");
|
||||
});
|
||||
|
||||
it("1. Create Postgress DS", function() {
|
||||
agHelper.GenerateUUID();
|
||||
cy.get("@guid").then((uid) => {
|
||||
dataSources.NavigateToDSCreateNew();
|
||||
dataSources.CreatePlugIn("PostgreSQL");
|
||||
guid = uid;
|
||||
agHelper.RenameWithInPane("Postgres " + guid, false);
|
||||
dataSources.FillPostgresDSForm();
|
||||
dataSources.TestSaveDatasource();
|
||||
cy.wrap("Postgres " + guid).as("dsName");
|
||||
});
|
||||
cy.get("@dsName").then(($dsName) => {
|
||||
dsName = $dsName;
|
||||
});
|
||||
});
|
||||
|
||||
it("2. Creating table - datetimetypes", () => {
|
||||
query = `CREATE TABLE datetimeTypes (serialId serial primary key, ts TIMESTAMP not null DEFAULT NOW(),
|
||||
tstz TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP, dater date NOT NULL, timer time NOT NULL,
|
||||
timertz time with time zone not null default now(), intervaler interval not null);`;
|
||||
dataSources.NavigateFromActiveDS(dsName, true);
|
||||
agHelper.GetNClick(dataSources._templateMenu);
|
||||
agHelper.RenameWithInPane("createTable");
|
||||
agHelper.EnterValue(query);
|
||||
cy.get(".CodeMirror textarea").focus();
|
||||
dataSources.RunQuery();
|
||||
ee.ExpandCollapseEntity(dsName);
|
||||
ee.ActionContextMenuByEntityName(dsName, "Refresh");
|
||||
agHelper.AssertElementVisible(
|
||||
ee._entityNameInExplorer("public.datetimetypes"),
|
||||
);
|
||||
});
|
||||
|
||||
it("3. Creating SELECT query - datetimetypes + Bug 14493", () => {
|
||||
query = `SELECT *, TO_CHAR(datetimeT.dater , 'dd.mm.yyyy') as "dd.mm.yyyy",
|
||||
TO_CHAR (datetimeT.ts, 'MM/DD/YYYY HH12:MI:SS AM') as "MM/DD/YYYY",
|
||||
TO_CHAR (datetimeT.ts, 'YYYY')||' / ' || TO_CHAR (datetimeT.dater, 'YYY') as "YYYY/YYY",
|
||||
TO_CHAR (datetimeT.ts, 'MONTH') ||' / ' || TO_CHAR(datetimeT.dater, 'Month') as "MONTH/Month",
|
||||
TO_CHAR (datetimeT.dater, 'D') ||' / ' || TO_CHAR(datetimeT.dater, 'day') as "Day of the week/Weekday",
|
||||
TO_CHAR (datetimeT.dater, 'W') as "Week of Month" FROM public."datetimetypes" as datetimeT;`;
|
||||
ee.ActionTemplateMenuByEntityName("public.datetimetypes", "SELECT");
|
||||
agHelper.RenameWithInPane("selectRecords");
|
||||
dataSources.RunQuery();
|
||||
agHelper
|
||||
.GetText(dataSources._noRecordFound)
|
||||
.then(($noRecMsg) => expect($noRecMsg).to.eq("No data records to show"));
|
||||
agHelper.EnterValue(query);
|
||||
});
|
||||
|
||||
it("4. Creating INSERT query - datetimetypes", () => {
|
||||
query = `INSERT INTO public."datetimetypes" (ts, tstz, dater, timer, intervaler)
|
||||
VALUES('{{Insertts.text}}', '{{Inserttstz.text}}', '{{Insertdater.text}}', '{{Inserttimer.text}}', '{{Insertintervaler.text}}');`;
|
||||
ee.ActionTemplateMenuByEntityName("public.datetimetypes", "INSERT");
|
||||
agHelper.RenameWithInPane("insertRecord");
|
||||
agHelper.EnterValue(query);
|
||||
dataSources.ToggleUsePreparedStatement(false);
|
||||
});
|
||||
|
||||
it("5. Creating UPDATE query - datetimetypes", () => {
|
||||
query = `UPDATE public."datetimetypes" SET
|
||||
"ts" = '{{Updatets.text}}', "tstz" = '{{Updatetstz.text}}', "dater" = '{{Updatedater.text}}', "timer" = '{{Updatetimer.text}}',
|
||||
"intervaler" = '{{Updateintervaler.text}}' WHERE serialid = {{Table1.selectedRow.serialid}};`;
|
||||
ee.ActionTemplateMenuByEntityName("public.datetimetypes", "UPDATE");
|
||||
agHelper.RenameWithInPane("updateRecord");
|
||||
agHelper.EnterValue(query);
|
||||
dataSources.ToggleUsePreparedStatement(false);
|
||||
});
|
||||
|
||||
it("6. Creating DELETE query with condition - datetimetypes", () => {
|
||||
query = `DELETE FROM public."datetimetypes"
|
||||
WHERE serialId = {{Table1.selectedRow.serialid}};`;
|
||||
ee.ActionTemplateMenuByEntityName("public.datetimetypes", "DELETE");
|
||||
agHelper.RenameWithInPane("deleteRecord");
|
||||
agHelper.EnterValue(query);
|
||||
});
|
||||
|
||||
it("7. Creating DELETE query for complete table empty - datetimetypes", () => {
|
||||
query = `DELETE FROM public."datetimetypes"`;
|
||||
ee.ActionTemplateMenuByEntityName("public.datetimetypes", "DELETE");
|
||||
agHelper.RenameWithInPane("deleteAllRecords");
|
||||
agHelper.EnterValue(query);
|
||||
});
|
||||
|
||||
it("8. Creating DROP table query - datetimetypes", () => {
|
||||
query = `drop table public."datetimetypes"`;
|
||||
ee.ActionTemplateMenuByEntityName("public.datetimetypes", "DELETE");
|
||||
agHelper.RenameWithInPane("dropTable");
|
||||
agHelper.EnterValue(query);
|
||||
ee.ExpandCollapseEntity("QUERIES/JS", false);
|
||||
ee.ExpandCollapseEntity(dsName, false);
|
||||
});
|
||||
|
||||
it("9. Inserting record - datetimetypes", () => {
|
||||
ee.SelectEntityByName("Page1");
|
||||
deployMode.DeployApp();
|
||||
table.WaitForTableEmpty(); //asserting table is empty before inserting!
|
||||
agHelper.ClickButton("Run InsertQuery");
|
||||
agHelper.AssertElementVisible(locator._modal);
|
||||
|
||||
agHelper.EnterInputText("Ts", "2016-06-22 19:10:25-07");
|
||||
agHelper.EnterInputText("Tstz", "2016-06-22 19:10:25-07");
|
||||
agHelper.EnterInputText("Dater", "January 19, 1989");
|
||||
agHelper.EnterInputText("Timer", "04:05 PM");
|
||||
agHelper.EnterInputText("Intervaler", "P6Y5M4DT3H2M1S");
|
||||
|
||||
agHelper.ClickButton("Insert");
|
||||
agHelper.AssertElementVisible(locator._spanButton("Run InsertQuery"));
|
||||
table.ReadTableRowColumnData(0, 0, 2000).then(($cellData) => {
|
||||
expect($cellData).to.eq("1"); //asserting serial column is inserting fine in sequence
|
||||
});
|
||||
table.ReadTableRowColumnData(0, 1, 200).then(($ts) => {
|
||||
table.ReadTableRowColumnData(0, 2, 200).then(($tstz) => {
|
||||
expect($ts).to.not.eq($tstz); //ts & tstz not equal since tstz is time zone applied
|
||||
});
|
||||
});
|
||||
table.ReadTableRowColumnData(0, 3, 200).then(($cellData) => {
|
||||
expect($cellData).to.eq("1989-01-19"); //date format!
|
||||
});
|
||||
table.ReadTableRowColumnData(0, 4, 200).then(($cellData) => {
|
||||
expect($cellData).to.eq("16:05:00"); //time format
|
||||
});
|
||||
table.ReadTableRowColumnData(0, 6, 200).then(($cellData) => {
|
||||
expect($cellData).to.eq("6 years 5 mons 4 days 3 hours 2 mins 1.0 secs"); //Interval format!
|
||||
});
|
||||
table.ReadTableRowColumnData(0, 7, 200).then(($cellData) => {
|
||||
expect($cellData).to.eq("19.01.1989");
|
||||
});
|
||||
agHelper
|
||||
.GetText(table._showPageItemsCount)
|
||||
.then(($count) => expect($count).contain("1"));
|
||||
});
|
||||
|
||||
it("10. Inserting another format of record - datetimetypes", () => {
|
||||
agHelper.ClickButton("Run InsertQuery");
|
||||
agHelper.AssertElementVisible(locator._modal);
|
||||
|
||||
agHelper.EnterInputText("Ts", "2020-10-05 14:01:10-08");
|
||||
agHelper.EnterInputText("Tstz", "2020-10-05 14:01:10-08");
|
||||
agHelper.EnterInputText("Dater", "20451229");
|
||||
agHelper.EnterInputText("Timer", "04:05 AM");
|
||||
agHelper.EnterInputText("Intervaler", "3 4:05:06");
|
||||
|
||||
agHelper.ClickButton("Insert");
|
||||
agHelper.AssertElementVisible(locator._spanButton("Run InsertQuery"));
|
||||
|
||||
table.ReadTableRowColumnData(1, 0, 2000).then(($cellData) => {
|
||||
expect($cellData).to.eq("2"); //asserting serial column is inserting fine in sequence
|
||||
});
|
||||
table.ReadTableRowColumnData(1, 1, 200).then(($ts) => {
|
||||
table.ReadTableRowColumnData(1, 2, 200).then(($tstz) => {
|
||||
expect($ts).to.not.eq($tstz); //ts & tstz not equal since tstz is time zone applied
|
||||
});
|
||||
});
|
||||
table.ReadTableRowColumnData(1, 3, 200).then(($cellData) => {
|
||||
expect($cellData).to.eq("2045-12-29");
|
||||
});
|
||||
table.ReadTableRowColumnData(1, 4, 200).then(($cellData) => {
|
||||
expect($cellData).to.eq("04:05:00");
|
||||
});
|
||||
table.ReadTableRowColumnData(1, 6, 200).then(($cellData) => {
|
||||
expect($cellData).to.eq("0 years 0 mons 3 days 4 hours 5 mins 6.0 secs");
|
||||
});
|
||||
table.ReadTableRowColumnData(1, 7, 200).then(($cellData) => {
|
||||
expect($cellData).to.eq("29.12.2045");
|
||||
});
|
||||
agHelper
|
||||
.GetText(table._showPageItemsCount)
|
||||
.then(($count) => expect($count).contain("2"));
|
||||
});
|
||||
|
||||
it("11. Updating record (emtying some field) - datetimetypes", () => {
|
||||
table.SelectTableRow(1);
|
||||
agHelper.ClickButton("Run UpdateQuery");
|
||||
agHelper.AssertElementVisible(locator._modal);
|
||||
|
||||
agHelper.EnterInputText("Ts", "2019-07-01", true);
|
||||
agHelper.EnterInputText("Tstz", "2019-07-01 00:00:00+11", true);
|
||||
agHelper.EnterInputText("Dater", "17-Mar-2014", true);
|
||||
agHelper.EnterInputText("Timer", "04:05:06.789", true);
|
||||
agHelper.EnterInputText("Intervaler", "P0001-03-02T06:04:05", true);
|
||||
|
||||
agHelper.ClickButton("Update");
|
||||
agHelper.AssertElementVisible(locator._spanButton("Run UpdateQuery"));
|
||||
table.ReadTableRowColumnData(1, 0, 2000).then(($cellData) => {
|
||||
expect($cellData).to.eq("2"); //asserting serial column is same
|
||||
});
|
||||
table.ReadTableRowColumnData(1, 1, 200).then(($ts) => {
|
||||
table.ReadTableRowColumnData(1, 2, 200).then(($tstz) => {
|
||||
expect($ts).to.not.eq($tstz);
|
||||
});
|
||||
});
|
||||
table.ReadTableRowColumnData(1, 3, 200).then(($cellData) => {
|
||||
expect($cellData).to.eq("2014-03-17");
|
||||
});
|
||||
table.ReadTableRowColumnData(1, 4, 200).then(($cellData) => {
|
||||
expect($cellData).to.eq("04:05:06.789");
|
||||
});
|
||||
table.ReadTableRowColumnData(1, 6, 200).then(($cellData) => {
|
||||
expect($cellData).to.eq("1 years 3 mons 2 days 6 hours 4 mins 5.0 secs");
|
||||
});
|
||||
table.ReadTableRowColumnData(1, 7, 200).then(($cellData) => {
|
||||
expect($cellData).to.eq("17.03.2014");
|
||||
});
|
||||
agHelper
|
||||
.GetText(table._showPageItemsCount)
|
||||
.then(($count) => expect($count).contain("2"));
|
||||
});
|
||||
|
||||
it("12. Deleting records - datetimetypes", () => {
|
||||
agHelper.ClickButton("DeleteQuery", 1);
|
||||
agHelper.ValidateNetworkStatus("@postExecute", 200);
|
||||
agHelper.ValidateNetworkStatus("@postExecute", 200);
|
||||
agHelper.Sleep(2500);//Allwowing time for delete to be success
|
||||
agHelper
|
||||
.GetText(table._showPageItemsCount)
|
||||
.then(($count) => expect($count).contain("1")); //asserting 2nd record is deleted
|
||||
});
|
||||
|
||||
it("13. Inserting another record (+ve record - to check serial column) - datetimetypes", () => {
|
||||
agHelper.ClickButton("Run InsertQuery");
|
||||
agHelper.AssertElementVisible(locator._modal);
|
||||
|
||||
agHelper.EnterInputText("Ts", "February 8 04:05:06 1999");
|
||||
agHelper.EnterInputText("Tstz", "February 10 04:05:06 1999 PST");
|
||||
agHelper.EnterInputText("Dater", "J2451187"); // 20451229
|
||||
agHelper.EnterInputText("Timer", "181416");
|
||||
agHelper.EnterInputText("Intervaler", "1-2");
|
||||
|
||||
agHelper.ClickButton("Insert");
|
||||
agHelper.AssertElementVisible(locator._spanButton("Run InsertQuery"));
|
||||
|
||||
table.ReadTableRowColumnData(1, 0, 2000).then(($cellData) => {
|
||||
expect($cellData).to.eq("3"); //asserting serial column is inserting fine in sequence
|
||||
});
|
||||
table.ReadTableRowColumnData(1, 1, 200).then(($ts) => {
|
||||
table.ReadTableRowColumnData(1, 2, 200).then(($tstz) => {
|
||||
expect($ts).to.not.eq($tstz); //ts & tstz not equal since tstz is time zone applied
|
||||
});
|
||||
});
|
||||
table.ReadTableRowColumnData(1, 3, 200).then(($cellData) => {
|
||||
expect($cellData).to.eq("1999-01-08");
|
||||
});
|
||||
table.ReadTableRowColumnData(1, 4, 200).then(($cellData) => {
|
||||
expect($cellData).to.eq("18:14:16");
|
||||
});
|
||||
table.ReadTableRowColumnData(1, 6, 200).then(($cellData) => {
|
||||
expect($cellData).to.eq("1 years 2 mons 0 days 0 hours 0 mins 0.0 secs");
|
||||
});
|
||||
table.ReadTableRowColumnData(1, 7, 200).then(($cellData) => {
|
||||
expect($cellData).to.eq("08.01.1999");
|
||||
});
|
||||
agHelper
|
||||
.GetText(table._showPageItemsCount)
|
||||
.then(($count) => expect($count).contain("2"));
|
||||
});
|
||||
|
||||
it("14. Deleting all records from table - datetimetypes", () => {
|
||||
agHelper.GetNClick(locator._deleteIcon);
|
||||
agHelper.AssertElementVisible(locator._spanButton("Run InsertQuery"));
|
||||
agHelper.Sleep(2000);
|
||||
table.WaitForTableEmpty();
|
||||
});
|
||||
|
||||
it("15. Validate Drop of the Newly Created - Vessels - Table from Postgres datasource", () => {
|
||||
deployMode.NavigateBacktoEditor();
|
||||
ee.ExpandCollapseEntity("QUERIES/JS");
|
||||
ee.SelectEntityByName("dropTable");
|
||||
dataSources.RunQuery();
|
||||
dataSources.ReadQueryTableResponse(0).then(($cellData) => {
|
||||
expect($cellData).to.eq("0"); //Success response for dropped table!
|
||||
});
|
||||
ee.ExpandCollapseEntity("QUERIES/JS", false);
|
||||
ee.ExpandCollapseEntity("DATASOURCES");
|
||||
ee.ExpandCollapseEntity(dsName);
|
||||
ee.ActionContextMenuByEntityName(dsName, "Refresh");
|
||||
agHelper.AssertElementAbsence(
|
||||
ee._entityNameInExplorer("public.datetimetypes"),
|
||||
);
|
||||
ee.ExpandCollapseEntity(dsName, false);
|
||||
ee.ExpandCollapseEntity("DATASOURCES", false);
|
||||
});
|
||||
|
||||
it("16. Verify Deletion of the datasource after all created queries are Deleted", () => {
|
||||
dataSources.DeleteDatasouceFromWinthinDS(dsName, 409); //Since all queries exists
|
||||
ee.ExpandCollapseEntity("QUERIES/JS");
|
||||
ee.ActionContextMenuByEntityName("createTable", "Delete", "Are you sure?");
|
||||
ee.ActionContextMenuByEntityName(
|
||||
"deleteAllRecords",
|
||||
"Delete",
|
||||
"Are you sure?",
|
||||
);
|
||||
ee.ActionContextMenuByEntityName("deleteRecord", "Delete", "Are you sure?");
|
||||
ee.ActionContextMenuByEntityName("dropTable", "Delete", "Are you sure?");
|
||||
ee.ActionContextMenuByEntityName("insertRecord", "Delete", "Are you sure?");
|
||||
ee.ActionContextMenuByEntityName(
|
||||
"selectRecords",
|
||||
"Delete",
|
||||
"Are you sure?",
|
||||
);
|
||||
ee.ActionContextMenuByEntityName("updateRecord", "Delete", "Are you sure?");
|
||||
deployMode.DeployApp();
|
||||
deployMode.NavigateBacktoEditor();
|
||||
ee.ExpandCollapseEntity("QUERIES/JS");
|
||||
dataSources.DeleteDatasouceFromWinthinDS(dsName, 200); //ProductLines, Employees pages are still using this ds
|
||||
});
|
||||
});
|
||||
|
|
@ -0,0 +1,337 @@
|
|||
import { ObjectsRegistry } from "../../../../support/Objects/Registry";
|
||||
|
||||
let guid: any, dsName: any, query: string;
|
||||
const agHelper = ObjectsRegistry.AggregateHelper,
|
||||
ee = ObjectsRegistry.EntityExplorer,
|
||||
dataSources = ObjectsRegistry.DataSources,
|
||||
propPane = ObjectsRegistry.PropertyPane,
|
||||
table = ObjectsRegistry.Table,
|
||||
locator = ObjectsRegistry.CommonLocators,
|
||||
deployMode = ObjectsRegistry.DeployMode;
|
||||
|
||||
describe("Postgres - Datatype Numeric tests", function() {
|
||||
before(() => {
|
||||
cy.fixture("NumericDTdsl").then((val: any) => {
|
||||
agHelper.AddDsl(val);
|
||||
});
|
||||
propPane.ChangeTheme("Modern");
|
||||
});
|
||||
|
||||
it("1. Create Postgress DS", function() {
|
||||
agHelper.GenerateUUID();
|
||||
cy.get("@guid").then((uid) => {
|
||||
dataSources.NavigateToDSCreateNew();
|
||||
dataSources.CreatePlugIn("PostgreSQL");
|
||||
guid = uid;
|
||||
agHelper.RenameWithInPane("Postgres " + guid, false);
|
||||
dataSources.FillPostgresDSForm();
|
||||
dataSources.TestSaveDatasource();
|
||||
cy.wrap("Postgres " + guid).as("dsName");
|
||||
});
|
||||
cy.get("@dsName").then(($dsName) => {
|
||||
dsName = $dsName;
|
||||
});
|
||||
});
|
||||
|
||||
it("2. Creating table - numerictypes", () => {
|
||||
query = `create table numerictypes (serialId SERIAL not null primary key, bigintId bigint not null, decimalId decimal not null, numericId numeric not null)`;
|
||||
dataSources.NavigateFromActiveDS(dsName, true);
|
||||
agHelper.GetNClick(dataSources._templateMenu);
|
||||
agHelper.RenameWithInPane("createTable");
|
||||
agHelper.EnterValue(query);
|
||||
cy.get(".CodeMirror textarea").focus();
|
||||
dataSources.RunQuery();
|
||||
ee.ExpandCollapseEntity(dsName);
|
||||
ee.ActionContextMenuByEntityName(dsName, "Refresh");
|
||||
agHelper.AssertElementVisible(
|
||||
ee._entityNameInExplorer("public.numerictypes"),
|
||||
);
|
||||
});
|
||||
|
||||
it("3. Creating SELECT query - numerictypes + Bug 14493", () => {
|
||||
ee.ActionTemplateMenuByEntityName("public.numerictypes", "SELECT");
|
||||
agHelper.RenameWithInPane("selectRecords");
|
||||
dataSources.RunQuery();
|
||||
agHelper
|
||||
.GetText(dataSources._noRecordFound)
|
||||
.then(($noRecMsg) => expect($noRecMsg).to.eq("No data records to show"));
|
||||
});
|
||||
|
||||
it("4. Creating INSERT query - numerictypes", () => {
|
||||
query = `INSERT INTO public."numerictypes" ("bigintid", "decimalid", "numericid")
|
||||
VALUES ({{Insertbigint.text}}, {{Insertdecimal.text}}, {{Insertnumeric.text}})`;
|
||||
ee.ActionTemplateMenuByEntityName("public.numerictypes", "INSERT");
|
||||
agHelper.RenameWithInPane("insertRecord");
|
||||
agHelper.EnterValue(query);
|
||||
});
|
||||
|
||||
it("5. Creating UPDATE query - numerictypes", () => {
|
||||
query = `UPDATE public."numerictypes" SET
|
||||
"bigintid" = {{Updatebigint.text}},
|
||||
"decimalid" = {{Updatedecimal.text}},
|
||||
"numericid" = {{Updatenumeric.text}}
|
||||
WHERE serialid = {{Table1.selectedRow.serialid}};`;
|
||||
ee.ActionTemplateMenuByEntityName("public.numerictypes", "UPDATE");
|
||||
agHelper.RenameWithInPane("updateRecord");
|
||||
agHelper.EnterValue(query);
|
||||
});
|
||||
|
||||
it("5. Creating DELETE query with condition - numerictypes", () => {
|
||||
query = `DELETE FROM public."numerictypes"
|
||||
WHERE serialId ={{Table1.selectedRow.serialid}}`;
|
||||
ee.ActionTemplateMenuByEntityName("public.numerictypes", "DELETE");
|
||||
agHelper.RenameWithInPane("deleteRecord");
|
||||
agHelper.EnterValue(query);
|
||||
});
|
||||
|
||||
it("6. Creating DELETE query for complete table empty - numerictypes", () => {
|
||||
query = `DELETE FROM public."numerictypes"`;
|
||||
ee.ActionTemplateMenuByEntityName("public.numerictypes", "DELETE");
|
||||
agHelper.RenameWithInPane("deleteAllRecords");
|
||||
agHelper.EnterValue(query);
|
||||
});
|
||||
|
||||
it("7. Creating DROP table query - numerictypes", () => {
|
||||
query = `drop table public."numerictypes"`;
|
||||
ee.ActionTemplateMenuByEntityName("public.numerictypes", "DELETE");
|
||||
agHelper.RenameWithInPane("dropTable");
|
||||
agHelper.EnterValue(query);
|
||||
ee.ExpandCollapseEntity("QUERIES/JS", false);
|
||||
ee.ExpandCollapseEntity(dsName, false);
|
||||
});
|
||||
|
||||
it("8. Inserting record (+ve limit) - numerictypes + Bug 14516", () => {
|
||||
ee.SelectEntityByName("Page1");
|
||||
deployMode.DeployApp();
|
||||
table.WaitForTableEmpty(); //asserting table is empty before inserting!
|
||||
agHelper.ClickButton("Run InsertQuery");
|
||||
agHelper.AssertElementVisible(locator._modal);
|
||||
agHelper.EnterInputText("Bigintid", "922337203685477"); //9223372036854775807
|
||||
agHelper.EnterInputText("Decimalid", "865456.987654567");
|
||||
agHelper.EnterInputText("Numericid", "2147483647.2147484"); //2147483647.2147483647
|
||||
agHelper.ClickButton("Insert");
|
||||
agHelper.AssertElementVisible(locator._spanButton("Run InsertQuery"));
|
||||
table.ReadTableRowColumnData(0, 0, 2000).then(($cellData) => {
|
||||
expect($cellData).to.eq("1"); //asserting serial column is inserting fine in sequence
|
||||
});
|
||||
table.ReadTableRowColumnData(0, 1, 200).then(($cellData) => {
|
||||
expect($cellData).to.eq("922337203685477");
|
||||
});
|
||||
table.ReadTableRowColumnData(0, 2, 200).then(($cellData) => {
|
||||
expect($cellData).to.eq("865456.987654567");
|
||||
});
|
||||
table.ReadTableRowColumnData(0, 3, 200).then(($cellData) => {
|
||||
expect($cellData).to.eq("2147483647.2147484");
|
||||
});
|
||||
});
|
||||
|
||||
it("9. Inserting record (-ve limit) - numerictypes + Bug 14516", () => {
|
||||
agHelper.ClickButton("Run InsertQuery");
|
||||
agHelper.AssertElementVisible(locator._modal);
|
||||
agHelper.EnterInputText("Bigintid", "-922337203685477"); //-9223372036854775808
|
||||
agHelper.EnterInputText("Decimalid", "232143455655456.34"); //232143455655456.3434456565
|
||||
agHelper.EnterInputText("Numericid", "9877700000.143423"); //9877700000.14342340008876
|
||||
agHelper.ClickButton("Insert");
|
||||
agHelper.AssertElementVisible(locator._spanButton("Run InsertQuery"));
|
||||
table.ReadTableRowColumnData(1, 0, 2000).then(($cellData) => {
|
||||
expect($cellData).to.eq("2"); //asserting serial column is inserting fine in sequence
|
||||
});
|
||||
table.ReadTableRowColumnData(1, 1, 200).then(($cellData) => {
|
||||
expect($cellData).to.eq("-922337203685477"); //-9223372036854775808
|
||||
});
|
||||
table.ReadTableRowColumnData(1, 2, 200).then(($cellData) => {
|
||||
expect($cellData).to.eq("232143455655456.34");
|
||||
});
|
||||
table.ReadTableRowColumnData(1, 3, 200).then(($cellData) => {
|
||||
expect($cellData).to.eq("9877700000.143423");
|
||||
});
|
||||
});
|
||||
|
||||
it("10. Inserting another record (+ve record) - numerictypes", () => {
|
||||
agHelper.ClickButton("Run InsertQuery");
|
||||
agHelper.AssertElementVisible(locator._modal);
|
||||
agHelper.EnterInputText("Bigintid", "12233720368547758");
|
||||
agHelper.EnterInputText("Decimalid", "877675655441232.1"); //877675655441232.00998765 , 877675655441232.111
|
||||
agHelper.EnterInputText("Numericid", "86542300099.1"); //86542300099.1000099999876
|
||||
agHelper.ClickButton("Insert");
|
||||
agHelper.AssertElementVisible(locator._spanButton("Run InsertQuery"));
|
||||
table.ReadTableRowColumnData(2, 0, 2000).then(($cellData) => {
|
||||
expect($cellData).to.eq("3"); //asserting serial column is inserting fine in sequence
|
||||
});
|
||||
table.ReadTableRowColumnData(2, 1, 200).then(($cellData) => {
|
||||
expect($cellData).to.eq("12233720368547758");
|
||||
});
|
||||
table.ReadTableRowColumnData(2, 2, 200).then(($cellData) => {
|
||||
expect($cellData).to.eq("877675655441232.1");
|
||||
});
|
||||
table.ReadTableRowColumnData(2, 3, 200).then(($cellData) => {
|
||||
expect($cellData).to.eq("86542300099.1");
|
||||
});
|
||||
});
|
||||
|
||||
it("11. Updating record (permissible value) - numerictypes", () => {
|
||||
table.SelectTableRow(2);
|
||||
agHelper.ClickButton("Run UpdateQuery");
|
||||
agHelper.AssertElementVisible(locator._modal);
|
||||
agHelper.EnterInputText("Bigintid", "11233720368547758", true);
|
||||
agHelper.EnterInputText("Decimalid", "777675655441232.1", true); //777675655441232.00998765 , 777675655441232.111
|
||||
agHelper.EnterInputText("Numericid", "76542300099.10988", true); //76542300099.109876788
|
||||
agHelper.ClickButton("Update");
|
||||
agHelper.AssertElementVisible(locator._spanButton("Run UpdateQuery"));
|
||||
table.ReadTableRowColumnData(2, 0, 2000).then(($cellData) => {
|
||||
expect($cellData).to.eq("3"); //asserting serial column is inserting fine in sequence
|
||||
});
|
||||
table.ReadTableRowColumnData(2, 1, 200).then(($cellData) => {
|
||||
expect($cellData).to.eq("11233720368547758");
|
||||
});
|
||||
table.ReadTableRowColumnData(2, 2, 200).then(($cellData) => {
|
||||
expect($cellData).to.eq("777675655441232.1");
|
||||
});
|
||||
table.ReadTableRowColumnData(2, 3, 200).then(($cellData) => {
|
||||
expect($cellData).to.eq("76542300099.10988");
|
||||
});
|
||||
});
|
||||
|
||||
it("12. Deleting records - numerictypes", () => {
|
||||
table.SelectTableRow(1);
|
||||
agHelper.ClickButton("DeleteQuery", 1);
|
||||
agHelper.ValidateNetworkStatus("@postExecute", 200);
|
||||
agHelper.ValidateNetworkStatus("@postExecute", 200);
|
||||
agHelper.Sleep(2500);//Allwowing time for delete to be success
|
||||
table.ReadTableRowColumnData(1, 0, 2000).then(($cellData) => {
|
||||
expect($cellData).not.to.eq("2"); //asserting 2nd record is deleted
|
||||
});
|
||||
table.ReadTableRowColumnData(1, 0, 200).then(($cellData) => {
|
||||
expect($cellData).to.eq("3");
|
||||
});
|
||||
});
|
||||
|
||||
it("13. Updating record again - numerictypes", () => {
|
||||
table.SelectTableRow(1);
|
||||
agHelper.ClickButton("Run UpdateQuery");
|
||||
agHelper.AssertElementVisible(locator._modal);
|
||||
agHelper.EnterInputText("Bigintid", "11133720368547700", true);
|
||||
agHelper.EnterInputText("Decimalid", "777575655441232.1", true); //777575655441232.716716716716 , 777575655441232.1115
|
||||
agHelper.EnterInputText("Numericid", "66542300099.00088", true); //66542300099.0008767675
|
||||
agHelper.ClickButton("Update");
|
||||
agHelper.AssertElementVisible(locator._spanButton("Run UpdateQuery"));
|
||||
table.ReadTableRowColumnData(1, 0, 2000).then(($cellData) => {
|
||||
expect($cellData).to.eq("3"); //asserting serial column is inserting fine in sequence
|
||||
});
|
||||
table.ReadTableRowColumnData(1, 1, 200).then(($cellData) => {
|
||||
expect($cellData).to.eq("11133720368547700");
|
||||
});
|
||||
table.ReadTableRowColumnData(1, 2, 200).then(($cellData) => {
|
||||
expect($cellData).to.eq("777575655441232.1");
|
||||
});
|
||||
table.ReadTableRowColumnData(1, 3, 200).then(($cellData) => {
|
||||
expect($cellData).to.eq("66542300099.00088");
|
||||
});
|
||||
});
|
||||
|
||||
it("14. Inserting another record (+ve record - to check serial column) - numerictypes", () => {
|
||||
agHelper.ClickButton("Run InsertQuery");
|
||||
agHelper.AssertElementVisible(locator._modal);
|
||||
agHelper.EnterInputText("Bigintid", "11111720368547700");
|
||||
agHelper.EnterInputText("Decimalid", "8765456.987654345"); //8765456.98765434567
|
||||
agHelper.EnterInputText("Numericid", "87654356.98765436"); // 87654356.987654356
|
||||
agHelper.ClickButton("Insert");
|
||||
agHelper.AssertElementVisible(locator._spanButton("Run InsertQuery"));
|
||||
table.ReadTableRowColumnData(2, 0, 2000).then(($cellData) => {
|
||||
expect($cellData).to.eq("4"); //asserting serial column is inserting fine in sequence
|
||||
});
|
||||
table.ReadTableRowColumnData(2, 1, 200).then(($cellData) => {
|
||||
expect($cellData).to.eq("11111720368547700");
|
||||
});
|
||||
table.ReadTableRowColumnData(2, 2, 200).then(($cellData) => {
|
||||
expect($cellData).to.eq("8765456.987654345");
|
||||
});
|
||||
table.ReadTableRowColumnData(2, 3, 200).then(($cellData) => {
|
||||
expect($cellData).to.eq("87654356.98765436");
|
||||
});
|
||||
});
|
||||
|
||||
it("15. Deleting records - numerictypes", () => {
|
||||
table.SelectTableRow(1);
|
||||
agHelper.ClickButton("DeleteQuery", 1);
|
||||
agHelper.AssertElementVisible(locator._spanButton("Run InsertQuery"));
|
||||
table.ReadTableRowColumnData(1, 0, 2000).then(($cellData) => {
|
||||
expect($cellData).not.to.eq("3"); //asserting 3rd record is deleted
|
||||
});
|
||||
table.ReadTableRowColumnData(1, 0, 2000).then(($cellData) => {
|
||||
expect($cellData).to.eq("4");
|
||||
});
|
||||
});
|
||||
|
||||
it("16. Deleting all records from table - numerictypes", () => {
|
||||
agHelper.GetNClick(locator._deleteIcon);
|
||||
agHelper.AssertElementVisible(locator._spanButton("Run InsertQuery"));
|
||||
agHelper.Sleep(2000);
|
||||
table.WaitForTableEmpty();
|
||||
});
|
||||
|
||||
it("17. Inserting record (+ve record - to check serial column) - numerictypes", () => {
|
||||
agHelper.ClickButton("Run InsertQuery");
|
||||
agHelper.AssertElementVisible(locator._modal);
|
||||
agHelper.EnterInputText("Bigintid", "11111720368547700");
|
||||
agHelper.EnterInputText("Decimalid", "8765456.987654345");
|
||||
agHelper.EnterInputText("Numericid", "87654356.98765436"); // 87654356.9876543567
|
||||
agHelper.ClickButton("Insert");
|
||||
agHelper.AssertElementVisible(locator._spanButton("Run InsertQuery"));
|
||||
table.ReadTableRowColumnData(0, 0, 2000).then(($cellData) => {
|
||||
expect($cellData).to.eq("5"); //asserting serial column is inserting fine in sequence
|
||||
});
|
||||
table.ReadTableRowColumnData(0, 1, 200).then(($cellData) => {
|
||||
expect($cellData).to.eq("11111720368547700");
|
||||
});
|
||||
table.ReadTableRowColumnData(0, 2, 200).then(($cellData) => {
|
||||
expect($cellData).to.eq("8765456.987654345");
|
||||
});
|
||||
table.ReadTableRowColumnData(0, 3, 200).then(($cellData) => {
|
||||
expect($cellData).to.eq("87654356.98765436");
|
||||
});
|
||||
});
|
||||
|
||||
it("18. Validate Drop of the Newly Created - Vessels - Table from Postgres datasource", () => {
|
||||
deployMode.NavigateBacktoEditor();
|
||||
ee.ExpandCollapseEntity("QUERIES/JS");
|
||||
ee.SelectEntityByName("dropTable");
|
||||
dataSources.RunQuery();
|
||||
dataSources.ReadQueryTableResponse(0).then(($cellData) => {
|
||||
expect($cellData).to.eq("0"); //Success response for dropped table!
|
||||
});
|
||||
ee.ExpandCollapseEntity("QUERIES/JS", false);
|
||||
ee.ExpandCollapseEntity("DATASOURCES");
|
||||
ee.ExpandCollapseEntity(dsName);
|
||||
ee.ActionContextMenuByEntityName(dsName, "Refresh");
|
||||
agHelper.AssertElementAbsence(
|
||||
ee._entityNameInExplorer("public.numerictypes"),
|
||||
);
|
||||
ee.ExpandCollapseEntity(dsName, false);
|
||||
ee.ExpandCollapseEntity("DATASOURCES", false);
|
||||
});
|
||||
|
||||
it("19. Verify Deletion of the datasource after all created queries are Deleted", () => {
|
||||
dataSources.DeleteDatasouceFromWinthinDS(dsName, 409); //Since all queries exists
|
||||
ee.ExpandCollapseEntity("QUERIES/JS");
|
||||
ee.ActionContextMenuByEntityName("createTable", "Delete", "Are you sure?");
|
||||
ee.ActionContextMenuByEntityName(
|
||||
"deleteAllRecords",
|
||||
"Delete",
|
||||
"Are you sure?",
|
||||
);
|
||||
ee.ActionContextMenuByEntityName("deleteRecord", "Delete", "Are you sure?");
|
||||
ee.ActionContextMenuByEntityName("dropTable", "Delete", "Are you sure?");
|
||||
ee.ActionContextMenuByEntityName("insertRecord", "Delete", "Are you sure?");
|
||||
ee.ActionContextMenuByEntityName(
|
||||
"selectRecords",
|
||||
"Delete",
|
||||
"Are you sure?",
|
||||
);
|
||||
ee.ActionContextMenuByEntityName("updateRecord", "Delete", "Are you sure?");
|
||||
deployMode.DeployApp();
|
||||
deployMode.NavigateBacktoEditor();
|
||||
ee.ExpandCollapseEntity("QUERIES/JS");
|
||||
dataSources.DeleteDatasouceFromWinthinDS(dsName, 200); //ProductLines, Employees pages are still using this ds
|
||||
});
|
||||
});
|
||||
|
|
@ -1,18 +1,22 @@
|
|||
const testdata = require("../../../../fixtures/testdata.json");
|
||||
import { ObjectsRegistry } from "../../../../support/Objects/Registry";
|
||||
|
||||
let agHelper = ObjectsRegistry.AggregateHelper;
|
||||
|
||||
describe("Create a rest datasource", function() {
|
||||
beforeEach(() => {
|
||||
cy.startRoutesForDatasource();
|
||||
});
|
||||
|
||||
it("Create a rest datasource", function() {
|
||||
it("Create a rest datasource + Bug 14566", function() {
|
||||
cy.NavigateToAPI_Panel();
|
||||
cy.CreateAPI("Testapi");
|
||||
cy.enterDatasourceAndPath(testdata.baseUrl, testdata.methods);
|
||||
cy.assertPageSave();
|
||||
cy.get(".t--store-as-datasource")
|
||||
.trigger("click")
|
||||
.wait(500);
|
||||
.wait(1000);
|
||||
agHelper.ValidateToastMessage("datasource created"); //verifying there is no error toast, Bug 14566
|
||||
cy.saveDatasource();
|
||||
cy.contains(".datasource-highlight", "https://mock-api.appsmith.com");
|
||||
cy.SaveAndRunAPI();
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
import { ObjectsRegistry } from "../../../../support/Objects/Registry"
|
||||
|
||||
let agHelper = ObjectsRegistry.AggregateHelper,
|
||||
ee = ObjectsRegistry.EntityExplorer,
|
||||
let ee = ObjectsRegistry.EntityExplorer,
|
||||
jsEditor = ObjectsRegistry.JSEditor;
|
||||
|
||||
describe("Validate basic operations on Entity explorer JSEditor structure", () => {
|
||||
|
|
@ -9,15 +8,15 @@ describe("Validate basic operations on Entity explorer JSEditor structure", () =
|
|||
|
||||
it("1. Validate JSObject creation & Run", () => {
|
||||
jsEditor.CreateJSObject('return "Hello World";');
|
||||
ee.expandCollapseEntity("QUERIES/JS");
|
||||
ee.ExpandCollapseEntity("QUERIES/JS");
|
||||
ee.AssertEntityPresenceInExplorer("JSObject1");
|
||||
jsEditor.validateDefaultJSObjProperties("JSObject1");
|
||||
jsEditor.ValidateDefaultJSObjProperties("JSObject1");
|
||||
});
|
||||
|
||||
it("2. Validate Rename JSObject from Form Header", function() {
|
||||
jsEditor.RenameJSObjFromForm("RenamedJSObject");
|
||||
jsEditor.RenameJSObjFromPane("RenamedJSObject");
|
||||
ee.AssertEntityPresenceInExplorer("RenamedJSObject");
|
||||
jsEditor.validateDefaultJSObjProperties("RenamedJSObject");
|
||||
jsEditor.ValidateDefaultJSObjProperties("RenamedJSObject");
|
||||
});
|
||||
|
||||
it("3. Validate Copy JSObject", function() {
|
||||
|
|
@ -32,13 +31,13 @@ describe("Validate basic operations on Entity explorer JSEditor structure", () =
|
|||
201,
|
||||
);
|
||||
ee.AssertEntityPresenceInExplorer("RenamedJSObjectCopy");
|
||||
jsEditor.validateDefaultJSObjProperties("RenamedJSObjectCopy");
|
||||
jsEditor.ValidateDefaultJSObjProperties("RenamedJSObjectCopy");
|
||||
});
|
||||
|
||||
it("4. Validate Rename JSObject from Entity Explorer", function() {
|
||||
jsEditor.RenameJSObjFromExplorer("RenamedJSObject", "ExplorerRenamed");
|
||||
ee.AssertEntityPresenceInExplorer("ExplorerRenamed");
|
||||
jsEditor.validateDefaultJSObjProperties("ExplorerRenamed");
|
||||
jsEditor.ValidateDefaultJSObjProperties("ExplorerRenamed");
|
||||
});
|
||||
|
||||
it("5. Validate Move JSObject", function() {
|
||||
|
|
@ -46,7 +45,7 @@ describe("Validate basic operations on Entity explorer JSEditor structure", () =
|
|||
ee.AddNewPage();
|
||||
ee.AssertEntityPresenceInExplorer(newPageId);
|
||||
ee.SelectEntityByName(pageId);
|
||||
ee.expandCollapseEntity("QUERIES/JS");
|
||||
ee.ExpandCollapseEntity("QUERIES/JS");
|
||||
ee.ActionContextMenuByEntityName(
|
||||
"RenamedJSObjectCopy",
|
||||
"Move to page",
|
||||
|
|
@ -54,12 +53,12 @@ describe("Validate basic operations on Entity explorer JSEditor structure", () =
|
|||
);
|
||||
ee.SelectEntityByName(newPageId);
|
||||
ee.AssertEntityPresenceInExplorer("RenamedJSObjectCopy");
|
||||
jsEditor.validateDefaultJSObjProperties("RenamedJSObjectCopy");
|
||||
jsEditor.ValidateDefaultJSObjProperties("RenamedJSObjectCopy");
|
||||
});
|
||||
|
||||
it("6. Validate Deletion of JSObject", function() {
|
||||
ee.SelectEntityByName(pageId);
|
||||
ee.expandCollapseEntity("QUERIES/JS");
|
||||
ee.ExpandCollapseEntity("QUERIES/JS");
|
||||
ee.ActionContextMenuByEntityName(
|
||||
"ExplorerRenamed",
|
||||
"Delete",
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ describe("JSObjects OnLoad Actions tests", function() {
|
|||
table.ReadTableRowColumnData(0, 0).then((cellData) => {
|
||||
expect(cellData).to.be.equal("8");
|
||||
});
|
||||
agHelper.NavigateBacktoEditor();
|
||||
deployMode.NavigateBacktoEditor();
|
||||
});
|
||||
|
||||
it("3. Tc 54, 55 - Verify OnPage Load - auto enabled from above case for JSOBject", function() {
|
||||
|
|
@ -92,7 +92,7 @@ describe("JSObjects OnLoad Actions tests", function() {
|
|||
jsEditor.EnableDisableAsyncFuncSettings("getId", false, true);
|
||||
deployMode.DeployApp(locator._widgetInDeployed("tablewidget"), false);
|
||||
agHelper.WaitUntilToastDisappear('The action "GetUser" has failed');
|
||||
agHelper.NavigateBacktoEditor();
|
||||
deployMode.NavigateBacktoEditor();
|
||||
agHelper.WaitUntilToastDisappear('The action "GetUser" has failed');
|
||||
});
|
||||
|
||||
|
|
@ -110,7 +110,7 @@ describe("JSObjects OnLoad Actions tests", function() {
|
|||
table.ReadTableRowColumnData(0, 0).then((cellData) => {
|
||||
expect(cellData).to.be.equal("8");
|
||||
});
|
||||
agHelper.NavigateBacktoEditor();
|
||||
deployMode.NavigateBacktoEditor();
|
||||
});
|
||||
|
||||
it("6. Tc 55 - Verify OnPage Load - Enabling & Before Function calling Enabling for JSOBject", function() {
|
||||
|
|
@ -123,11 +123,11 @@ describe("JSObjects OnLoad Actions tests", function() {
|
|||
);
|
||||
agHelper.ClickButton("Yes");
|
||||
agHelper.AssertElementAbsence(locator._toastMsg);
|
||||
agHelper.ValidateNetworkExecutionSuccess("@postExecute");
|
||||
table.ReadTableRowColumnData(0, 0).then((cellData) => {
|
||||
table.ReadTableRowColumnData(0, 0, 2000).then((cellData) => {
|
||||
expect(cellData).to.be.equal("8");
|
||||
});
|
||||
agHelper.NavigateBacktoEditor();
|
||||
agHelper.ValidateNetworkExecutionSuccess("@postExecute");
|
||||
deployMode.NavigateBacktoEditor();
|
||||
agHelper.AssertElementVisible(jsEditor._dialog("Confirmation Dialog"));
|
||||
agHelper.AssertElementVisible(
|
||||
jsEditor._dialogBody((jsName as string) + ".getId"),
|
||||
|
|
@ -156,7 +156,7 @@ describe("JSObjects OnLoad Actions tests", function() {
|
|||
table.ReadTableRowColumnData(0, 0).then((cellData) => {
|
||||
expect(cellData).to.be.equal("8");
|
||||
});
|
||||
agHelper.NavigateBacktoEditor();
|
||||
deployMode.NavigateBacktoEditor();
|
||||
agHelper.AssertElementVisible(jsEditor._dialog("Confirmation Dialog"));
|
||||
agHelper.AssertElementVisible(
|
||||
jsEditor._dialogBody((jsName as string) + ".getId"),
|
||||
|
|
@ -229,18 +229,18 @@ describe("JSObjects OnLoad Actions tests", function() {
|
|||
agHelper.AddDsl(val, locator._widgetInCanvas("imagewidget"));
|
||||
});
|
||||
|
||||
ee.expandCollapseEntity("QUERIES/JS");
|
||||
ee.ExpandCollapseEntity("QUERIES/JS");
|
||||
apiPage.CreateAndFillApi(
|
||||
"https://api.forismatic.com/api/1.0/?method=getQuote&lang=en&format=json",
|
||||
"Quotes",
|
||||
);
|
||||
apiPage.ConfirmBeforeRunningApi(true);
|
||||
apiPage.ToggleConfirmBeforeRunningApi(true);
|
||||
|
||||
apiPage.CreateAndFillApi(
|
||||
"https://api.whatdoestrumpthink.com/api/v1/quotes/random",
|
||||
"WhatTrumpThinks",
|
||||
);
|
||||
apiPage.ConfirmBeforeRunningApi(true);
|
||||
apiPage.ToggleConfirmBeforeRunningApi(true);
|
||||
|
||||
jsEditor.CreateJSObject(
|
||||
`export default {
|
||||
|
|
@ -348,7 +348,7 @@ describe("JSObjects OnLoad Actions tests", function() {
|
|||
});
|
||||
|
||||
it("10. API with OnPageLoad & Confirmation both enabled & called directly & setting previous Api's confirmation to false", () => {
|
||||
agHelper.NavigateBacktoEditor();
|
||||
deployMode.NavigateBacktoEditor();
|
||||
agHelper.AssertElementVisible(jsEditor._dialogBody("Quotes"));
|
||||
agHelper.ClickButton("No");
|
||||
agHelper.ValidateToastMessage('The action "Quotes" has failed');
|
||||
|
|
@ -364,10 +364,10 @@ describe("JSObjects OnLoad Actions tests", function() {
|
|||
agHelper.ClickButton("No");
|
||||
agHelper.ValidateToastMessage("Failed to execute actions during page load");
|
||||
|
||||
ee.expandCollapseEntity("QUERIES/JS");
|
||||
ee.ExpandCollapseEntity("QUERIES/JS");
|
||||
apiPage.CreateAndFillApi("https://catfact.ninja/fact", "CatFacts");
|
||||
apiPage.OnPageLoadRun(true);
|
||||
apiPage.ConfirmBeforeRunningApi(true);
|
||||
apiPage.ToggleOnPageLoadRun(true);
|
||||
apiPage.ToggleConfirmBeforeRunningApi(true);
|
||||
|
||||
ee.SelectEntityByName("Image1", "WIDGETS");
|
||||
jsEditor.EnterJSContext(
|
||||
|
|
@ -378,9 +378,9 @@ describe("JSObjects OnLoad Actions tests", function() {
|
|||
);
|
||||
|
||||
ee.SelectEntityByName("Quotes", "QUERIES/JS");
|
||||
apiPage.OnPageLoadRun(false);
|
||||
apiPage.ToggleOnPageLoadRun(false);
|
||||
ee.SelectEntityByName("WhatTrumpThinks");
|
||||
apiPage.OnPageLoadRun(false);
|
||||
apiPage.ToggleOnPageLoadRun(false);
|
||||
|
||||
ee.SelectEntityByName(jsName as string, "QUERIES/JS");
|
||||
jsEditor.EnableDisableAsyncFuncSettings("callQuotes", false, false); //OnPageLoad made true once mapped with widget
|
||||
|
|
@ -403,13 +403,13 @@ describe("JSObjects OnLoad Actions tests", function() {
|
|||
homePage.ImportApp("JSObjOnLoadApp.json");
|
||||
homePage.AssertImport();
|
||||
|
||||
ee.expandCollapseEntity("QUERIES/JS");
|
||||
ee.ExpandCollapseEntity("QUERIES/JS");
|
||||
apiPage.CreateAndFillApi(
|
||||
"https://anapioficeandfire.com/api/books/{{this.params.id}}",
|
||||
"getBooks",
|
||||
);
|
||||
//apiPage.OnPageLoadRun(true); //OnPageLoad made true after mapping to JSONForm
|
||||
apiPage.ConfirmBeforeRunningApi(true);
|
||||
apiPage.ToggleConfirmBeforeRunningApi(true);
|
||||
|
||||
dataSources.NavigateFromActiveDS(guid, true);
|
||||
agHelper.GetNClick(dataSources._templateMenu);
|
||||
|
|
@ -540,7 +540,7 @@ describe("JSObjects OnLoad Actions tests", function() {
|
|||
.GetText(locator._jsonFormInputField("url"), "val")
|
||||
.then(($url) => expect($url).not.be.empty);
|
||||
|
||||
agHelper.NavigateBacktoEditor();
|
||||
deployMode.NavigateBacktoEditor();
|
||||
agHelper.AssertElementVisible(jsEditor._dialogBody("getBooks"));
|
||||
agHelper.ClickButton("No");
|
||||
agHelper.ValidateToastMessage('The action "getBooks" has failed');
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ describe("Layout OnLoad Actions tests", function() {
|
|||
//apiPage.RunAPI();
|
||||
|
||||
//Adding dependency in right order matters!
|
||||
ee.expandCollapseEntity("WIDGETS");
|
||||
ee.ExpandCollapseEntity("WIDGETS");
|
||||
ee.SelectEntityByName("Image1");
|
||||
jsEditor.EnterJSContext("Image", `{{RandomFlora.data}}`, true);
|
||||
|
||||
|
|
@ -162,7 +162,7 @@ describe("Layout OnLoad Actions tests", function() {
|
|||
);
|
||||
});
|
||||
|
||||
agHelper.NavigateBacktoEditor();
|
||||
deployMode.NavigateBacktoEditor();
|
||||
});
|
||||
|
||||
it("3. Bug 10049, 10055: Dependency not executed in expected order in layoutOnLoadActions when dependency added via URL", function() {
|
||||
|
|
|
|||
|
|
@ -1,25 +0,0 @@
|
|||
/// <reference types="Cypress" />
|
||||
|
||||
describe("Create org and a new app / delete and recreate app", function() {
|
||||
let orgid;
|
||||
let appid;
|
||||
let newOrganizationName;
|
||||
|
||||
it("create app within an org and delete and re-create another app with same name", function() {
|
||||
cy.NavigateToHome();
|
||||
cy.generateUUID().then((uid) => {
|
||||
orgid = uid;
|
||||
appid = uid;
|
||||
localStorage.setItem("OrgName", orgid);
|
||||
cy.createOrg();
|
||||
cy.wait("@createOrg").then((interception) => {
|
||||
newOrganizationName = interception.response.body.data.name;
|
||||
cy.renameOrg(newOrganizationName, orgid);
|
||||
});
|
||||
cy.CreateAppForOrg(orgid, appid);
|
||||
cy.DeleteAppByApi();
|
||||
cy.NavigateToHome();
|
||||
cy.CreateAppForOrg(orgid, appid);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
@ -1,44 +0,0 @@
|
|||
/// <reference types="Cypress" />
|
||||
|
||||
describe("Create app same name in different org", function() {
|
||||
let orgid;
|
||||
let appid;
|
||||
let newOrganizationName;
|
||||
|
||||
it("create app within a new org", function() {
|
||||
cy.NavigateToHome();
|
||||
cy.generateUUID().then((uid) => {
|
||||
orgid = uid;
|
||||
appid = uid;
|
||||
localStorage.setItem("OrgName", orgid);
|
||||
cy.createOrg();
|
||||
// stub the response and
|
||||
// find app name
|
||||
cy.wait("@createOrg").then((interception) => {
|
||||
newOrganizationName = interception.response.body.data.name;
|
||||
cy.renameOrg(newOrganizationName, orgid);
|
||||
cy.CreateAppForOrg(orgid, appid);
|
||||
cy.NavigateToHome();
|
||||
cy.LogOut();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
it("create app with same name in a different org", function() {
|
||||
cy.LoginFromAPI(Cypress.env("USERNAME"), Cypress.env("PASSWORD"));
|
||||
cy.visit("/applications");
|
||||
cy.wait("@applications").should(
|
||||
"have.nested.property",
|
||||
"response.body.responseMeta.status",
|
||||
200,
|
||||
);
|
||||
const newOrgName = orgid + "1";
|
||||
cy.createOrg();
|
||||
cy.wait("@createOrg").then((interception) => {
|
||||
console.log("createOrganization response: ", interception);
|
||||
newOrganizationName = interception.response.body.data.name;
|
||||
cy.renameOrg(newOrganizationName, newOrgName);
|
||||
cy.CreateAppForOrg(newOrgName, appid);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
@ -1,80 +0,0 @@
|
|||
import { ObjectsRegistry } from "../../../../support/Objects/Registry"
|
||||
|
||||
let orgid: any, appid: any;
|
||||
let agHelper = ObjectsRegistry.AggregateHelper,
|
||||
homePage = ObjectsRegistry.HomePage;
|
||||
|
||||
describe("Create new org and invite user & validate all roles", () => {
|
||||
it("1. Create new Organization, Share with a user from UI & verify", () => {
|
||||
homePage.NavigateToHome()
|
||||
agHelper.GenerateUUID()
|
||||
cy.get("@guid").then(uid => {
|
||||
orgid = uid;
|
||||
appid = uid;
|
||||
//localStorage.setItem("OrgName", orgid);
|
||||
homePage.CreateNewOrg(orgid)
|
||||
homePage.CheckOrgShareUsersCount(orgid, 1);
|
||||
homePage.InviteUserToOrg(orgid, Cypress.env("TESTUSERNAME1"), 'App Viewer');
|
||||
cy.xpath(homePage._visibleTextSpan('MANAGE USERS')).click({ force: true })
|
||||
homePage.NavigateToHome()
|
||||
homePage.CheckOrgShareUsersCount(orgid, 2);
|
||||
homePage.CreateAppInOrg(orgid, appid);
|
||||
})
|
||||
homePage.LogOutviaAPI()
|
||||
});
|
||||
|
||||
it("2. Login as Invited user and validate Viewer role", function () {
|
||||
homePage.LogintoApp(Cypress.env("TESTUSERNAME1"), Cypress.env("TESTPASSWORD1"), 'App Viewer')
|
||||
homePage.FilterApplication(appid, orgid)
|
||||
cy.get(homePage._applicationCard).first().trigger("mouseover");
|
||||
cy.get(homePage._appHoverIcon('edit')).should("not.exist");
|
||||
homePage.LaunchAppFromAppHover()
|
||||
homePage.LogOutviaAPI()
|
||||
});
|
||||
|
||||
it("3. Login as Org owner and Update the Invited user role to Developer", function () {
|
||||
homePage.LogintoApp(Cypress.env("USERNAME"), Cypress.env("PASSWORD"))
|
||||
homePage.FilterApplication(appid, orgid)
|
||||
homePage.UpdateUserRoleInOrg(orgid, Cypress.env("TESTUSERNAME1"), 'App Viewer', 'Developer');
|
||||
homePage.LogOutviaAPI()
|
||||
});
|
||||
|
||||
it("4. Login as Invited user and validate Developer role", function () {
|
||||
homePage.LogintoApp(Cypress.env("TESTUSERNAME1"), Cypress.env("TESTPASSWORD1"), 'Developer')
|
||||
homePage.FilterApplication(appid, orgid)
|
||||
cy.get(homePage._applicationCard).first().trigger("mouseover");
|
||||
cy.get(homePage._appHoverIcon('edit')).first()
|
||||
.click({ force: true });
|
||||
cy.xpath(homePage._editPageLanding).should("exist");
|
||||
homePage.LogOutviaAPI()
|
||||
});
|
||||
|
||||
it("5. Login as Org owner and Update the Invited user role to Administrator", function () {
|
||||
homePage.LogintoApp(Cypress.env("USERNAME"), Cypress.env("PASSWORD"))
|
||||
homePage.FilterApplication(appid, orgid)
|
||||
homePage.UpdateUserRoleInOrg(orgid, Cypress.env("TESTUSERNAME1"), 'Developer', 'Administrator');
|
||||
homePage.LogOutviaAPI()
|
||||
});
|
||||
|
||||
it("6. Login as Invited user and validate Administrator role", function () {
|
||||
homePage.LogintoApp(Cypress.env("TESTUSERNAME1"), Cypress.env("TESTPASSWORD1"), 'Administrator')
|
||||
homePage.FilterApplication(appid, orgid)
|
||||
cy.get(homePage._applicationCard).first().trigger("mouseover");
|
||||
homePage.InviteUserToOrg(orgid, Cypress.env("TESTUSERNAME2"), 'App Viewer');
|
||||
homePage.LogOutviaAPI()
|
||||
});
|
||||
|
||||
it("7. Login as Org owner and verify all 3 users are present", function () {
|
||||
homePage.LogintoApp(Cypress.env("USERNAME"), Cypress.env("PASSWORD"))
|
||||
homePage.FilterApplication(appid, orgid)
|
||||
homePage.OpenMembersPageForOrg(orgid)
|
||||
cy.get(homePage._usersEmailList).then(function ($list) {
|
||||
expect($list).to.have.length(3);
|
||||
expect($list.eq(0)).to.contain(Cypress.env("USERNAME"));
|
||||
expect($list.eq(1)).to.contain(Cypress.env("TESTUSERNAME1"));
|
||||
expect($list.eq(2)).to.contain(Cypress.env("TESTUSERNAME2"));
|
||||
});
|
||||
homePage.NavigateToHome()
|
||||
});
|
||||
|
||||
});
|
||||
|
|
@ -1,89 +0,0 @@
|
|||
import homePage from "../../../../locators/HomePage";
|
||||
|
||||
describe("Update Organization", function() {
|
||||
let orgid;
|
||||
let newOrganizationName;
|
||||
|
||||
it("Open the org general settings and update org name. The update should reflect in the org. It should also reflect in the org names on the left side and the org dropdown. ", function() {
|
||||
cy.NavigateToHome();
|
||||
cy.generateUUID().then((uid) => {
|
||||
orgid = uid;
|
||||
localStorage.setItem("OrgName", orgid);
|
||||
cy.createOrg();
|
||||
cy.wait("@createOrg").then((interception) => {
|
||||
newOrganizationName = interception.response.body.data.name;
|
||||
cy.renameOrg(newOrganizationName, orgid);
|
||||
cy.get(homePage.orgSettingOption).click({ force: true });
|
||||
});
|
||||
});
|
||||
cy.generateUUID().then((uid) => {
|
||||
orgid = uid;
|
||||
localStorage.setItem("OrgName", orgid);
|
||||
cy.get(homePage.orgNameInput).click({ force: true });
|
||||
cy.get(homePage.orgNameInput).clear();
|
||||
cy.get(homePage.orgNameInput).type(orgid);
|
||||
// eslint-disable-next-line cypress/no-unnecessary-waiting
|
||||
cy.wait(2000);
|
||||
cy.get(homePage.orgHeaderName).should("have.text", orgid);
|
||||
});
|
||||
cy.NavigateToHome();
|
||||
cy.get(homePage.leftPanelContainer).within(() => {
|
||||
cy.get("span").should((item) => {
|
||||
expect(item).to.contain.text(orgid);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
it("Open the org general settings and update org email. The update should reflect in the org.", function() {
|
||||
cy.createOrg();
|
||||
cy.wait("@createOrg").then((interception) => {
|
||||
newOrganizationName = interception.response.body.data.name;
|
||||
cy.renameOrg(newOrganizationName, orgid);
|
||||
cy.get(homePage.orgSettingOption).click({ force: true });
|
||||
});
|
||||
cy.get(homePage.orgEmailInput).clear();
|
||||
cy.get(homePage.orgEmailInput).type(Cypress.env("TESTUSERNAME2"));
|
||||
cy.wait("@updateOrganization").should(
|
||||
"have.nested.property",
|
||||
"response.body.responseMeta.status",
|
||||
200,
|
||||
);
|
||||
cy.get(homePage.orgEmailInput).should(
|
||||
"have.value",
|
||||
Cypress.env("TESTUSERNAME2"),
|
||||
);
|
||||
});
|
||||
|
||||
it("Upload logo / delete logo and validate", function() {
|
||||
const fixturePath = "appsmithlogo.png";
|
||||
cy.xpath(homePage.uploadLogo).attachFile(fixturePath);
|
||||
cy.wait("@updateLogo").should(
|
||||
"have.nested.property",
|
||||
"response.body.responseMeta.status",
|
||||
200,
|
||||
);
|
||||
cy.xpath(homePage.membersTab).click({ force: true });
|
||||
cy.xpath(homePage.generalTab).click({ force: true });
|
||||
cy.get(homePage.removeLogo)
|
||||
.last()
|
||||
.should("be.hidden")
|
||||
.invoke("show")
|
||||
.click({ force: true });
|
||||
cy.wait("@deleteLogo").should(
|
||||
"have.nested.property",
|
||||
"response.body.responseMeta.status",
|
||||
200,
|
||||
);
|
||||
});
|
||||
|
||||
it("Open the org general settings and update org website. The update should reflect in the org.", function() {
|
||||
cy.get(homePage.orgWebsiteInput).clear();
|
||||
cy.get(homePage.orgWebsiteInput).type("demowebsite");
|
||||
cy.wait("@updateOrganization").should(
|
||||
"have.nested.property",
|
||||
"response.body.responseMeta.status",
|
||||
200,
|
||||
);
|
||||
cy.get(homePage.orgWebsiteInput).should("have.value", "demowebsite");
|
||||
});
|
||||
});
|
||||
|
|
@ -57,7 +57,7 @@ describe("[Bug] - 10784 - Passing params from JS to SQL query should not break",
|
|||
jsEditor.EnterJSContext("Table Data", "{{ParamsTest.data}}");
|
||||
|
||||
ee.SelectEntityByName("ParamsTest", "QUERIES/JS");
|
||||
apiPage.OnPageLoadRun(false); //Bug 12476
|
||||
apiPage.ToggleOnPageLoadRun(false); //Bug 12476
|
||||
|
||||
deployMode.DeployApp(locator._spanButton("Submit"));
|
||||
agHelper.SelectDropDown("7");
|
||||
|
|
@ -67,7 +67,7 @@ describe("[Bug] - 10784 - Passing params from JS to SQL query should not break",
|
|||
expect(cellData).to.be.equal("7");
|
||||
});
|
||||
|
||||
agHelper.NavigateBacktoEditor();
|
||||
deployMode.NavigateBacktoEditor();
|
||||
});
|
||||
|
||||
it("2. With Optional chaining : {{ (function() { return this?.params?.condition })() }}", function() {
|
||||
|
|
@ -82,7 +82,7 @@ describe("[Bug] - 10784 - Passing params from JS to SQL query should not break",
|
|||
table.ReadTableRowColumnData(0, 0, 2000).then((cellData) => {
|
||||
expect(cellData).to.be.equal("9");
|
||||
});
|
||||
agHelper.NavigateBacktoEditor();
|
||||
deployMode.NavigateBacktoEditor();
|
||||
});
|
||||
|
||||
it("3. With Optional chaining : {{ (() => { return this?.params?.condition })() }}", function() {
|
||||
|
|
@ -97,7 +97,7 @@ describe("[Bug] - 10784 - Passing params from JS to SQL query should not break",
|
|||
table.ReadTableRowColumnData(0, 0, 2000).then((cellData) => {
|
||||
expect(cellData).to.be.equal("7");
|
||||
});
|
||||
agHelper.NavigateBacktoEditor();
|
||||
deployMode.NavigateBacktoEditor();
|
||||
});
|
||||
|
||||
it("4. With Optional chaining : {{ this?.params.condition }}", function() {
|
||||
|
|
@ -112,7 +112,7 @@ describe("[Bug] - 10784 - Passing params from JS to SQL query should not break",
|
|||
table.ReadTableRowColumnData(0, 0, 2000).then((cellData) => {
|
||||
expect(cellData).to.be.equal("9");
|
||||
});
|
||||
agHelper.NavigateBacktoEditor();
|
||||
deployMode.NavigateBacktoEditor();
|
||||
});
|
||||
|
||||
it("5. With Optional chaining : {{ (function() { return this?.params.condition })() }}", function() {
|
||||
|
|
@ -127,7 +127,7 @@ describe("[Bug] - 10784 - Passing params from JS to SQL query should not break",
|
|||
table.ReadTableRowColumnData(0, 0, 2000).then((cellData) => {
|
||||
expect(cellData).to.be.equal("7");
|
||||
});
|
||||
agHelper.NavigateBacktoEditor();
|
||||
deployMode.NavigateBacktoEditor();
|
||||
});
|
||||
|
||||
it("6. With Optional chaining : {{ (() => { return this?.params.condition })() }}", function() {
|
||||
|
|
@ -142,7 +142,7 @@ describe("[Bug] - 10784 - Passing params from JS to SQL query should not break",
|
|||
table.ReadTableRowColumnData(0, 0, 2000).then((cellData) => {
|
||||
expect(cellData).to.be.equal("9");
|
||||
});
|
||||
agHelper.NavigateBacktoEditor();
|
||||
deployMode.NavigateBacktoEditor();
|
||||
});
|
||||
|
||||
it("7. With No Optional chaining : {{ this.params.condition }}", function() {
|
||||
|
|
@ -157,7 +157,7 @@ describe("[Bug] - 10784 - Passing params from JS to SQL query should not break",
|
|||
table.ReadTableRowColumnData(0, 0, 2000).then((cellData) => {
|
||||
expect(cellData).to.be.equal("7");
|
||||
});
|
||||
agHelper.NavigateBacktoEditor();
|
||||
deployMode.NavigateBacktoEditor();
|
||||
});
|
||||
|
||||
it("8. With No Optional chaining : {{ (function() { return this.params.condition })() }}", function() {
|
||||
|
|
@ -172,7 +172,7 @@ describe("[Bug] - 10784 - Passing params from JS to SQL query should not break",
|
|||
table.ReadTableRowColumnData(0, 0, 2000).then((cellData) => {
|
||||
expect(cellData).to.be.equal("8");
|
||||
});
|
||||
agHelper.NavigateBacktoEditor();
|
||||
deployMode.NavigateBacktoEditor();
|
||||
});
|
||||
|
||||
it("9. With No Optional chaining : {{ (() => { return this.params.condition })() }}", function() {
|
||||
|
|
@ -187,7 +187,7 @@ describe("[Bug] - 10784 - Passing params from JS to SQL query should not break",
|
|||
table.ReadTableRowColumnData(0, 0, 2000).then((cellData) => {
|
||||
expect(cellData).to.be.equal("9");
|
||||
});
|
||||
agHelper.NavigateBacktoEditor();
|
||||
deployMode.NavigateBacktoEditor();
|
||||
});
|
||||
|
||||
it("10. With Optional chaining : {{ this.params.condition }} && direct paramter passed", function() {
|
||||
|
|
@ -206,7 +206,7 @@ describe("[Bug] - 10784 - Passing params from JS to SQL query should not break",
|
|||
table.ReadTableRowColumnData(0, 0, 2000).then((cellData) => {
|
||||
expect(cellData).to.be.equal("7");
|
||||
});
|
||||
agHelper.NavigateBacktoEditor();
|
||||
deployMode.NavigateBacktoEditor();
|
||||
});
|
||||
|
||||
it("11. With Optional chaining : {{ this.params.condition }} && no optional paramter passed", function() {
|
||||
|
|
@ -220,11 +220,11 @@ describe("[Bug] - 10784 - Passing params from JS to SQL query should not break",
|
|||
table.ReadTableRowColumnData(0, 0, 2000).then((cellData) => {
|
||||
expect(cellData).to.be.equal("8");
|
||||
});
|
||||
agHelper.NavigateBacktoEditor();
|
||||
deployMode.NavigateBacktoEditor();
|
||||
});
|
||||
|
||||
it("12. Delete all entities - Query, JSObjects, Datasource + Bug 12532", () => {
|
||||
ee.expandCollapseEntity("QUERIES/JS");
|
||||
ee.ExpandCollapseEntity("QUERIES/JS");
|
||||
ee.ActionContextMenuByEntityName("ParamsTest", "Delete", "Are you sure?");
|
||||
agHelper.ValidateNetworkStatus("@deleteAction", 200);
|
||||
ee.ActionContextMenuByEntityName(
|
||||
|
|
|
|||
|
|
@ -228,7 +228,7 @@ describe("Create a query with a mongo datasource, run, save and then delete the
|
|||
|
||||
it("9. Bug 7399: Validate Form based & Raw command based templates", function() {
|
||||
let id;
|
||||
ee.expandCollapseEntity(`${datasourceName}`);
|
||||
ee.ExpandCollapseEntity(`${datasourceName}`);
|
||||
cy.xpath(queryLocators.listingAndReviewContext)
|
||||
.invoke("show")
|
||||
.click({ force: true });
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ describe("Validate Mongo Query Pane Validations", () => {
|
|||
11,
|
||||
);
|
||||
|
||||
agHelper.NavigateBacktoEditor();
|
||||
deployMode.NavigateBacktoEditor();
|
||||
cy.get("@dsName").then(($dsName) => {
|
||||
dsName = $dsName;
|
||||
});
|
||||
|
|
@ -315,8 +315,8 @@ describe("Validate Mongo Query Pane Validations", () => {
|
|||
});
|
||||
agHelper.ActionContextMenuWithInPane("Delete");
|
||||
|
||||
ee.expandCollapseEntity("DATASOURCES");
|
||||
ee.expandCollapseEntity(dsName);
|
||||
ee.ExpandCollapseEntity("DATASOURCES");
|
||||
ee.ExpandCollapseEntity(dsName);
|
||||
ee.ActionContextMenuByEntityName(dsName, "Refresh");
|
||||
agHelper.AssertElementVisible(ee._entityNameInExplorer("AuthorNAwards"));
|
||||
});
|
||||
|
|
@ -626,10 +626,10 @@ describe("Validate Mongo Query Pane Validations", () => {
|
|||
});
|
||||
|
||||
it("16. Validate Deletion of the Newly Created Page - AuthorNAwards", () => {
|
||||
agHelper.NavigateBacktoEditor();
|
||||
deployMode.NavigateBacktoEditor();
|
||||
table.WaitUntilTableLoad();
|
||||
//Delete the test data
|
||||
ee.expandCollapseEntity("PAGES");
|
||||
ee.ExpandCollapseEntity("PAGES");
|
||||
ee.ActionContextMenuByEntityName(
|
||||
"AuthorNAwards",
|
||||
"Delete",
|
||||
|
|
@ -652,7 +652,7 @@ describe("Validate Mongo Query Pane Validations", () => {
|
|||
|
||||
dataSources.RunQuery();
|
||||
agHelper.ActionContextMenuWithInPane("Delete");
|
||||
ee.expandCollapseEntity(dsName);
|
||||
ee.ExpandCollapseEntity(dsName);
|
||||
ee.ActionContextMenuByEntityName(dsName, "Refresh");
|
||||
agHelper.AssertElementAbsence(ee._entityNameInExplorer("AuthorNAwards"));
|
||||
});
|
||||
|
|
@ -680,7 +680,7 @@ describe("Validate Mongo Query Pane Validations", () => {
|
|||
// ee.ActionContextMenuByEntityName("Page1", "Delete", "Are you sure?"); //Cant be deleted since this is the Home page!
|
||||
// agHelper.ValidateNetworkStatus("@deletePage", 200);
|
||||
deployMode.DeployApp();
|
||||
agHelper.NavigateBacktoEditor();
|
||||
deployMode.NavigateBacktoEditor();
|
||||
dataSources.DeleteDatasouceFromWinthinDS(dsName, 409); //Friends pages are still using this ds
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,25 @@
|
|||
/// <reference types="Cypress" />
|
||||
|
||||
describe("Create workspace and a new app / delete and recreate app", function() {
|
||||
let workspaceId;
|
||||
let appid;
|
||||
let newWorkspaceName;
|
||||
|
||||
it("create app within an workspace and delete and re-create another app with same name", function() {
|
||||
cy.NavigateToHome();
|
||||
cy.generateUUID().then((uid) => {
|
||||
workspaceId = uid;
|
||||
appid = uid;
|
||||
localStorage.setItem("OrgName", workspaceId);
|
||||
cy.createWorkspace();
|
||||
cy.wait("@createWorkspace").then((interception) => {
|
||||
newWorkspaceName = interception.response.body.data.name;
|
||||
cy.renameWorkspace(newWorkspaceName, workspaceId);
|
||||
});
|
||||
cy.CreateAppForWorkspace(workspaceId, appid);
|
||||
cy.DeleteAppByApi();
|
||||
cy.NavigateToHome();
|
||||
cy.CreateAppForWorkspace(workspaceId, appid);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
/// <reference types="Cypress" />
|
||||
|
||||
describe("Create app same name in different workspace", function() {
|
||||
let workspaceId;
|
||||
let appid;
|
||||
let newWorkspaceName;
|
||||
|
||||
it("create app within a new workspace", function() {
|
||||
cy.NavigateToHome();
|
||||
cy.generateUUID().then((uid) => {
|
||||
workspaceId = uid;
|
||||
appid = uid;
|
||||
localStorage.setItem("OrgName", workspaceId);
|
||||
cy.createWorkspace();
|
||||
// stub the response and
|
||||
// find app name
|
||||
cy.wait("@createWorkspace").then((interception) => {
|
||||
newWorkspaceName = interception.response.body.data.name;
|
||||
cy.renameWorkspace(newWorkspaceName, workspaceId);
|
||||
cy.CreateAppForWorkspace(workspaceId, appid);
|
||||
cy.NavigateToHome();
|
||||
cy.LogOut();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
it("create app with same name in a different workspace", function() {
|
||||
cy.LoginFromAPI(Cypress.env("USERNAME"), Cypress.env("PASSWORD"));
|
||||
cy.visit("/applications");
|
||||
cy.wait("@applications").should(
|
||||
"have.nested.property",
|
||||
"response.body.responseMeta.status",
|
||||
200,
|
||||
);
|
||||
const newWSName = workspaceId + "1";
|
||||
cy.createWorkspace();
|
||||
cy.wait("@createWorkspace").then((interception) => {
|
||||
console.log("createWorkspace response: ", interception);
|
||||
newWorkspaceName = interception.response.body.data.name;
|
||||
cy.renameWorkspace(newWorkspaceName, newWSName);
|
||||
cy.CreateAppForWorkspace(newWSName, appid);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
@ -0,0 +1,114 @@
|
|||
import { ObjectsRegistry } from "../../../../support/Objects/Registry";
|
||||
|
||||
let workspaceId: any, appid: any;
|
||||
let agHelper = ObjectsRegistry.AggregateHelper,
|
||||
homePage = ObjectsRegistry.HomePage;
|
||||
|
||||
describe("Create new workspace and invite user & validate all roles", () => {
|
||||
it("1. Create new Workspace, Share with a user from UI & verify", () => {
|
||||
homePage.NavigateToHome();
|
||||
agHelper.GenerateUUID();
|
||||
cy.get("@guid").then((uid) => {
|
||||
workspaceId = uid;
|
||||
appid = uid;
|
||||
//localStorage.setItem("OrgName", workspaceId);
|
||||
homePage.CreateNewWorkspace(workspaceId);
|
||||
homePage.CheckWorkspaceShareUsersCount(workspaceId, 1);
|
||||
homePage.InviteUserToWorkspace(
|
||||
workspaceId,
|
||||
Cypress.env("TESTUSERNAME1"),
|
||||
"App Viewer",
|
||||
);
|
||||
cy.xpath(homePage._visibleTextSpan("MANAGE USERS")).click({
|
||||
force: true,
|
||||
});
|
||||
homePage.NavigateToHome();
|
||||
homePage.CheckWorkspaceShareUsersCount(workspaceId, 2);
|
||||
homePage.CreateAppInWorkspace(workspaceId, appid);
|
||||
});
|
||||
homePage.LogOutviaAPI();
|
||||
});
|
||||
|
||||
it("2. Login as Invited user and validate Viewer role", function() {
|
||||
homePage.LogintoApp(
|
||||
Cypress.env("TESTUSERNAME1"),
|
||||
Cypress.env("TESTPASSWORD1"),
|
||||
"App Viewer",
|
||||
);
|
||||
homePage.FilterApplication(appid, workspaceId);
|
||||
cy.get(homePage._applicationCard)
|
||||
.first()
|
||||
.trigger("mouseover");
|
||||
cy.get(homePage._appHoverIcon("edit")).should("not.exist");
|
||||
homePage.LaunchAppFromAppHover();
|
||||
homePage.LogOutviaAPI();
|
||||
});
|
||||
|
||||
it("3. Login as Workspace owner and Update the Invited user role to Developer", function() {
|
||||
homePage.LogintoApp(Cypress.env("USERNAME"), Cypress.env("PASSWORD"));
|
||||
homePage.FilterApplication(appid, workspaceId);
|
||||
homePage.UpdateUserRoleInWorkspace(
|
||||
workspaceId,
|
||||
Cypress.env("TESTUSERNAME1"),
|
||||
"App Viewer",
|
||||
"Developer",
|
||||
);
|
||||
homePage.LogOutviaAPI();
|
||||
});
|
||||
|
||||
it("4. Login as Invited user and validate Developer role", function() {
|
||||
homePage.LogintoApp(
|
||||
Cypress.env("TESTUSERNAME1"),
|
||||
Cypress.env("TESTPASSWORD1"),
|
||||
"Developer",
|
||||
);
|
||||
homePage.FilterApplication(appid, workspaceId);
|
||||
cy.get(homePage._applicationCard)
|
||||
.first()
|
||||
.trigger("mouseover");
|
||||
cy.get(homePage._appHoverIcon("edit"))
|
||||
.first()
|
||||
.click({ force: true });
|
||||
cy.xpath(homePage._editPageLanding).should("exist");
|
||||
homePage.LogOutviaAPI();
|
||||
});
|
||||
|
||||
it("5. Login as Workspace owner and Update the Invited user role to Administrator", function() {
|
||||
homePage.LogintoApp(Cypress.env("USERNAME"), Cypress.env("PASSWORD"));
|
||||
homePage.FilterApplication(appid, workspaceId);
|
||||
homePage.UpdateUserRoleInWorkspace(
|
||||
workspaceId,
|
||||
Cypress.env("TESTUSERNAME1"),
|
||||
"Developer",
|
||||
"Administrator",
|
||||
);
|
||||
homePage.LogOutviaAPI();
|
||||
});
|
||||
|
||||
it("6. Login as Invited user and validate Administrator role", function() {
|
||||
homePage.LogintoApp(
|
||||
Cypress.env("TESTUSERNAME1"),
|
||||
Cypress.env("TESTPASSWORD1"),
|
||||
"Administrator",
|
||||
);
|
||||
homePage.FilterApplication(appid, workspaceId);
|
||||
cy.get(homePage._applicationCard)
|
||||
.first()
|
||||
.trigger("mouseover");
|
||||
homePage.InviteUserToWorkspace(workspaceId, Cypress.env("TESTUSERNAME2"), "App Viewer");
|
||||
homePage.LogOutviaAPI();
|
||||
});
|
||||
|
||||
it("7. Login as Workspace owner and verify all 3 users are present", function() {
|
||||
homePage.LogintoApp(Cypress.env("USERNAME"), Cypress.env("PASSWORD"));
|
||||
homePage.FilterApplication(appid, workspaceId);
|
||||
homePage.OpenMembersPageForWorkspace(workspaceId);
|
||||
cy.get(homePage._usersEmailList).then(function($list) {
|
||||
expect($list).to.have.length(3);
|
||||
expect($list.eq(0)).to.contain(Cypress.env("USERNAME"));
|
||||
expect($list.eq(1)).to.contain(Cypress.env("TESTUSERNAME1"));
|
||||
expect($list.eq(2)).to.contain(Cypress.env("TESTUSERNAME2"));
|
||||
});
|
||||
homePage.NavigateToHome();
|
||||
});
|
||||
});
|
||||
|
|
@ -3,24 +3,24 @@
|
|||
import homePage from "../../../../locators/HomePage";
|
||||
const publish = require("../../../../locators/publishWidgetspage.json");
|
||||
|
||||
describe("Create new org and share with a user", function() {
|
||||
let orgid;
|
||||
describe("Create new workspace and share with a user", function() {
|
||||
let workspaceId;
|
||||
let appid;
|
||||
let currentUrl;
|
||||
let newOrganizationName;
|
||||
let newWorkspaceName;
|
||||
|
||||
it("1. Create org and then share with a user from Application share option within application", function() {
|
||||
it("1. Create workspace and then share with a user from Application share option within application", function() {
|
||||
cy.NavigateToHome();
|
||||
cy.generateUUID().then((uid) => {
|
||||
orgid = uid;
|
||||
workspaceId = uid;
|
||||
appid = uid;
|
||||
localStorage.setItem("OrgName", orgid);
|
||||
cy.createOrg();
|
||||
cy.wait("@createOrg").then((interception) => {
|
||||
newOrganizationName = interception.response.body.data.name;
|
||||
cy.renameOrg(newOrganizationName, orgid);
|
||||
localStorage.setItem("OrgName", workspaceId);
|
||||
cy.createWorkspace();
|
||||
cy.wait("@createWorkspace").then((interception) => {
|
||||
newWorkspaceName = interception.response.body.data.name;
|
||||
cy.renameWorkspace(newWorkspaceName, workspaceId);
|
||||
});
|
||||
cy.CreateAppForOrg(orgid, appid);
|
||||
cy.CreateAppForWorkspace(workspaceId, appid);
|
||||
cy.wait("@getPagesForCreateApp").should(
|
||||
"have.nested.property",
|
||||
"response.body.responseMeta.status",
|
||||
|
|
@ -38,7 +38,7 @@ describe("Create new org and share with a user", function() {
|
|||
cy.get(homePage.searchInput).type(appid);
|
||||
// eslint-disable-next-line cypress/no-unnecessary-waiting
|
||||
cy.wait(2000);
|
||||
cy.get(homePage.appsContainer).contains(orgid);
|
||||
cy.get(homePage.appsContainer).contains(workspaceId);
|
||||
cy.xpath(homePage.ShareBtn)
|
||||
.first()
|
||||
.should("be.visible");
|
||||
|
|
@ -0,0 +1,89 @@
|
|||
import homePage from "../../../../locators/HomePage";
|
||||
|
||||
describe("Update Workspace", function() {
|
||||
let workspaceId;
|
||||
let newWorkspaceName;
|
||||
|
||||
it("Open the workspace general settings and update workspace name. The update should reflect in the workspace. It should also reflect in the workspace names on the left side and the workspace dropdown. ", function() {
|
||||
cy.NavigateToHome();
|
||||
cy.generateUUID().then((uid) => {
|
||||
workspaceId = uid;
|
||||
localStorage.setItem("OrgName", workspaceId);
|
||||
cy.createWorkspace();
|
||||
cy.wait("@createWorkspace").then((interception) => {
|
||||
newWorkspaceName = interception.response.body.data.name;
|
||||
cy.renameWorkspace(newWorkspaceName, workspaceId);
|
||||
cy.get(homePage.workspaceSettingOption).click({ force: true });
|
||||
});
|
||||
});
|
||||
cy.generateUUID().then((uid) => {
|
||||
workspaceId = uid;
|
||||
localStorage.setItem("OrgName", workspaceId);
|
||||
cy.get(homePage.workspaceNameInput).click({ force: true });
|
||||
cy.get(homePage.workspaceNameInput).clear();
|
||||
cy.get(homePage.workspaceNameInput).type(workspaceId);
|
||||
// eslint-disable-next-line cypress/no-unnecessary-waiting
|
||||
cy.wait(2000);
|
||||
cy.get(homePage.workspaceHeaderName).should("have.text", workspaceId);
|
||||
});
|
||||
cy.NavigateToHome();
|
||||
cy.get(homePage.leftPanelContainer).within(() => {
|
||||
cy.get("span").should((item) => {
|
||||
expect(item).to.contain.text(workspaceId);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
it("Open the workspace general settings and update workspace email. The update should reflect in the workspace.", function() {
|
||||
cy.createWorkspace();
|
||||
cy.wait("@createWorkspace").then((interception) => {
|
||||
newWorkspaceName = interception.response.body.data.name;
|
||||
cy.renameWorkspace(newWorkspaceName, workspaceId);
|
||||
cy.get(homePage.workspaceSettingOption).click({ force: true });
|
||||
});
|
||||
cy.get(homePage.workspaceEmailInput).clear();
|
||||
cy.get(homePage.workspaceEmailInput).type(Cypress.env("TESTUSERNAME2"));
|
||||
cy.wait("@updateWorkspace").should(
|
||||
"have.nested.property",
|
||||
"response.body.responseMeta.status",
|
||||
200,
|
||||
);
|
||||
cy.get(homePage.workspaceEmailInput).should(
|
||||
"have.value",
|
||||
Cypress.env("TESTUSERNAME2"),
|
||||
);
|
||||
});
|
||||
|
||||
it("Upload logo / delete logo and validate", function() {
|
||||
const fixturePath = "appsmithlogo.png";
|
||||
cy.xpath(homePage.uploadLogo).attachFile(fixturePath);
|
||||
cy.wait("@updateLogo").should(
|
||||
"have.nested.property",
|
||||
"response.body.responseMeta.status",
|
||||
200,
|
||||
);
|
||||
cy.xpath(homePage.membersTab).click({ force: true });
|
||||
cy.xpath(homePage.generalTab).click({ force: true });
|
||||
cy.get(homePage.removeLogo)
|
||||
.last()
|
||||
.should("be.hidden")
|
||||
.invoke("show")
|
||||
.click({ force: true });
|
||||
cy.wait("@deleteLogo").should(
|
||||
"have.nested.property",
|
||||
"response.body.responseMeta.status",
|
||||
200,
|
||||
);
|
||||
});
|
||||
|
||||
it("Open the workspace general settings and update workspace website. The update should reflect in the workspace.", function() {
|
||||
cy.get(homePage.workspaceWebsiteInput).clear();
|
||||
cy.get(homePage.workspaceWebsiteInput).type("demowebsite");
|
||||
cy.wait("@updateWorkspace").should(
|
||||
"have.nested.property",
|
||||
"response.body.responseMeta.status",
|
||||
200,
|
||||
);
|
||||
cy.get(homePage.workspaceWebsiteInput).should("have.value", "demowebsite");
|
||||
});
|
||||
});
|
||||
|
|
@ -13,7 +13,7 @@ export default {
|
|||
duplicateApp: "[data-cy=t--duplicate]",
|
||||
forkAppFromMenu: "[data-cy=t--fork-app]",
|
||||
exportAppFromMenu: "[data-cy=t--export-app]",
|
||||
forkAppOrgButton: ".t--fork-app-to-org-button",
|
||||
forkAppWorkspaceButton: ".t--fork-app-to-workspace-button",
|
||||
selectAction: "#Base",
|
||||
deleteApp: "[data-cy=t--delete]",
|
||||
createNewAppButton: ".t--new-button",
|
||||
|
|
@ -21,13 +21,13 @@ export default {
|
|||
homeIcon: ".t--appsmith-logo",
|
||||
inputAppName: "input[name=applicationName]",
|
||||
createNew: ".createnew",
|
||||
createOrg: "span:contains('New Organization')",
|
||||
inputOrgName: "//input[@name='name']",
|
||||
createWorkspace: "span:contains('New Organization')",
|
||||
inputWorkspaceName: "//input[@name='name']",
|
||||
submitBtn: "//span[text()='Submit']",
|
||||
orgMenu: "//span[text()='TestShareOrg']",
|
||||
workspaceMenu: "//span[text()='TestShareOrg']",
|
||||
members: "//span[contains(text(),'Members')]",
|
||||
share: "//span[contains(text(),'Share')]",
|
||||
OrgSettings: "//span[contains(text(),'Organization Settings')]",
|
||||
WorkspaceSettings: "//span[contains(text(),'Organization Settings')]",
|
||||
MemberSettings: "//span[contains(text(),'Members')]",
|
||||
inviteUser: "//span[text()='Invite Users']",
|
||||
inviteUserMembersPage: "[data-cy=t--invite-users]",
|
||||
|
|
@ -49,11 +49,11 @@ export default {
|
|||
appsContainer: ".t--applications-container",
|
||||
appHome: "//a[@href='/applications']",
|
||||
emailList: "[data-colindex='0']",
|
||||
orgList: ".t--org-section:contains(",
|
||||
orgSectionBtn: ".t--org-section .bp3-button",
|
||||
shareOrg: ") button:contains('Share')",
|
||||
orgSection: "a:contains(",
|
||||
createAppFrOrg: ") .t--new-button",
|
||||
workspaceList: ".t--workspace-section:contains(",
|
||||
workspaceSectionBtn: ".t--workspace-section .bp3-button",
|
||||
shareWorkspace: ") button:contains('Share')",
|
||||
workspaceSection: "a:contains(",
|
||||
createAppFrWorkspace: ") .t--new-button",
|
||||
shareApp: ".t--application-share-btn",
|
||||
enablePublicAccess: ".t--share-public-toggle .slider",
|
||||
closeBtn: ".bp3-dialog-close-button",
|
||||
|
|
@ -68,20 +68,20 @@ export default {
|
|||
applicationIconSelector: ".t--icon-not-selected",
|
||||
applicationColorSelector: ".t--color-not-selected",
|
||||
applicationBackgroundColor: ".t--application-card-background",
|
||||
orgSettingOption: "[data-cy=t--org-setting]",
|
||||
orgImportAppOption: "[data-cy=t--org-import-app]",
|
||||
orgImportAppModal: ".t--import-application-modal",
|
||||
orgImportAppButton: "[data-cy=t--org-import-app-button]",
|
||||
leaveOrgConfirmModal: ".t--member-delete-confirmation-modal",
|
||||
leaveOrgConfirmButton: "[data-cy=t--org-leave-button]",
|
||||
orgNameInput: "[data-cy=t--org-name-input]",
|
||||
renameOrgInput: "[data-cy=t--org-rename-input]",
|
||||
orgEmailInput: "[data-cy=t--org-email-input]",
|
||||
orgWebsiteInput: "[data-cy=t--org-website-input]",
|
||||
orgHeaderName: ".t--organization-header",
|
||||
workspaceSettingOption: "[data-cy=t--workspace-setting]",
|
||||
workspaceImportAppOption: "[data-cy=t--workspace-import-app]",
|
||||
workspaceImportAppModal: ".t--import-application-modal",
|
||||
workspaceImportAppButton: "[data-cy=t--workspace-import-app-button]",
|
||||
leaveWorkspaceConfirmModal: ".t--member-delete-confirmation-modal",
|
||||
leaveWorkspaceConfirmButton: "[data-cy=t--workspace-leave-button]",
|
||||
workspaceNameInput: "[data-cy=t--workspace-name-input]",
|
||||
renameWorkspaceInput: "[data-cy=t--workspace-rename-input]",
|
||||
workspaceEmailInput: "[data-cy=t--workspace-email-input]",
|
||||
workspaceWebsiteInput: "[data-cy=t--workspace-website-input]",
|
||||
workspaceHeaderName: ".t--workspace-header",
|
||||
leftPanelContainer: "[data-cy=t--left-panel]",
|
||||
themeText: "label div",
|
||||
shareUserIcons: ".org-share-user-icons",
|
||||
shareUserIcons: ".workspace-share-user-icons",
|
||||
toastMessage: ".t--toast-action",
|
||||
uploadLogo: "//div/form/input",
|
||||
removeLogo: ".remove-button a span",
|
||||
|
|
@ -89,10 +89,10 @@ export default {
|
|||
membersTab: "//li//span[text()='Members']",
|
||||
cancelBtn: "//span[text()='Cancel']",
|
||||
submit: "button:contains('Submit')",
|
||||
orgNamePopover: ".t--org-name",
|
||||
orgNamePopoverContent: ".bp3-popover-content",
|
||||
orgCompleteSection: ".t--org-section",
|
||||
orgNameText: ".t--org-name-text",
|
||||
workspaceNamePopover: ".t--workspace-name",
|
||||
workspaceNamePopoverContent: ".bp3-popover-content",
|
||||
workspaceCompleteSection: ".t--workspace-section",
|
||||
workspaceNameText: ".t--workspace-name-text",
|
||||
optionsIcon: ".t--options-icon",
|
||||
reconnectDatasourceModal: ".reconnect-datasource-modal",
|
||||
importAppProgressWrapper: ".t-import-app-progress-wrapper",
|
||||
|
|
|
|||
|
|
@ -750,7 +750,7 @@
|
|||
|
||||
// //Resetting back to theme
|
||||
// ee.NavigateToSwitcher('explorer')
|
||||
// ee.expandCollapseEntity("WIDGETS")//to expand widgets
|
||||
// ee.ExpandCollapseEntity("WIDGETS")//to expand widgets
|
||||
// ee.SelectEntityByName("Button2")
|
||||
// cy.get(".t--property-control-buttoncolor .reset-button")
|
||||
// .then($elem => {
|
||||
|
|
|
|||
|
|
@ -43,6 +43,6 @@ describe("Duplicate an application must duplicate every API ,Query widget and Da
|
|||
// Ensure App is created with App name prefixed with Copy
|
||||
// Click on Delete option of Duplicate Application
|
||||
// Click on "Are You Sure?" option
|
||||
// Ensure only Duplicate Application is deleted and not the Orginal application
|
||||
// Ensure only Duplicate Application is deleted and not the Workspace application
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -14,20 +14,20 @@ describe("adding role without Email Id", function() {
|
|||
// Select the "Role"
|
||||
// Ensure the "Invite" option is "Inactive" and error message is displayed to user
|
||||
});
|
||||
it("Clicking on the organisation list the user must be lead to organisation Station ", function() {
|
||||
it("Clicking on the workspace list the user must be lead to workspace Station ", function() {
|
||||
// Navigate to Home Page
|
||||
// Navigate to Organisation list
|
||||
// Click on one of the organisation name
|
||||
// Ensure user is directed to the organisation
|
||||
// Navigate to Workspace list
|
||||
// Click on one of the workspace name
|
||||
// Ensure user is directed to the workspace
|
||||
});
|
||||
it("Admin can only assign another Admin ", function() {
|
||||
// Navigate to Organisation Setting
|
||||
// Navigate to Workspace Setting
|
||||
// Navigate to Members
|
||||
// Navigate to roles
|
||||
// Ensure your also an "Admin"
|
||||
// Change the role "Admin"
|
||||
});
|
||||
it("Ensure the user can not delete or create an application in the organisation", function() {
|
||||
it("Ensure the user can not delete or create an application in the workspace", function() {
|
||||
// Navigate to Home page
|
||||
// Navigate to Members
|
||||
// Navigate to roles
|
||||
|
|
|
|||
|
|
@ -1,14 +0,0 @@
|
|||
import homePage from "../../../locators/HomePage";
|
||||
|
||||
describe("Deletion of organisational Logo ", function() {
|
||||
it(" org logo upload ", function() {
|
||||
//Click on the dropdown next to organisational Name
|
||||
// Navigate between tabs
|
||||
// Naviagte to General Tab
|
||||
// Add an Organisational Logo
|
||||
// Wait until it loads
|
||||
// Switch between Tabs
|
||||
// Click on the remove Icon
|
||||
//Ensure the organisational Logo is deleted
|
||||
});
|
||||
});
|
||||
14
app/client/cypress/manual_TestSuite/Workspace_Logo_Del.js
Normal file
14
app/client/cypress/manual_TestSuite/Workspace_Logo_Del.js
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
import homePage from "../../../locators/HomePage";
|
||||
|
||||
describe("Deletion of workspace Logo ", function() {
|
||||
it(" workspace logo upload ", function() {
|
||||
//Click on the dropdown next to workspace Name
|
||||
// Navigate between tabs
|
||||
// Naviagte to General Tab
|
||||
// Add an workspace Logo
|
||||
// Wait until it loads
|
||||
// Switch between Tabs
|
||||
// Click on the remove Icon
|
||||
//Ensure the workspace Logo is deleted
|
||||
});
|
||||
});
|
||||
|
|
@ -1,11 +1,11 @@
|
|||
import homePage from "../../../locators/HomePage";
|
||||
|
||||
describe("insert organisational Logo ", function() {
|
||||
it(" org logo upload ", function() {
|
||||
//Click on the dropdown next to organisational Name
|
||||
describe("insert workspace Logo ", function() {
|
||||
it(" workspace logo upload ", function() {
|
||||
//Click on the dropdown next to workspace Name
|
||||
// Navigate between tabs
|
||||
// Naviagte to General Tab
|
||||
// Add an Organisational Logo
|
||||
// Add an workspace Logo
|
||||
//Wait until it loads
|
||||
// Switch between Tabs
|
||||
// Navigate to General Tab and ensure the logo exsits
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
import homePage from "../../../locators/HomePage";
|
||||
|
||||
describe("Checking for error message on Organisation Name ", function() {
|
||||
describe("Checking for error message on Workspace Name ", function() {
|
||||
it("Ensure of Inactive Submit button ", function() {
|
||||
// Navigate to home Page
|
||||
// Click on Create Organisation
|
||||
// Click on Create workspace
|
||||
// Type "Space" as first character
|
||||
// Ensure "Submit" button does not get Active
|
||||
// Now click on "X" (Close icon) ensure the pop up closes
|
||||
|
|
@ -14,35 +14,35 @@ describe("Checking for error message on Organisation Name ", function() {
|
|||
// Add some widgets
|
||||
// Navigate back to the application
|
||||
// Delete the Application
|
||||
// Click on "Create New" option under same organisation
|
||||
// Click on "Create New" option under same workspace
|
||||
// Enter the name "XYZ"
|
||||
// Ensure the application can be created with the same name
|
||||
});
|
||||
it("Adding Special Character ", function() {
|
||||
// Navigate to home Page
|
||||
// Click on Create Organisation
|
||||
// Click on Create workspace
|
||||
// Add special as first character
|
||||
// Ensure "Submit" get Active
|
||||
// Now click outside and ensure the pop up closes
|
||||
});
|
||||
it("Reuse the name of the deleted application name on the other organisation", function() {
|
||||
it("Reuse the name of the deleted application name on the other workspace", function() {
|
||||
// Navigate to home Page
|
||||
// Create an Application by name "XYZ"
|
||||
// Add some widgets
|
||||
// Navigate back to the application
|
||||
// Delete the Application
|
||||
// Click on "Create New" option under different organisation
|
||||
// Click on "Create New" option under different workspace
|
||||
// Enter the name "XYZ"
|
||||
// Ensure the application can be created with the same name
|
||||
});
|
||||
it("User must not be able to add empty organisation name", function() {
|
||||
it("User must not be able to add empty workspace name", function() {
|
||||
// Navigate to home Page
|
||||
// Click on the "Create Organisation" button
|
||||
// Ensure "Organisation Name" field is empty
|
||||
// Ensure "Submit" is inactive
|
||||
});
|
||||
|
||||
it("Cancel creating an Organisation when the Organisation name is empty", function() {
|
||||
it("Cancel creating an Workspace when the Workspace name is empty", function() {
|
||||
// Navigate to home Page
|
||||
// Click on the "Create Organisation" button
|
||||
// Ensure "Organisation Name" field is empty
|
||||
|
|
@ -50,7 +50,7 @@ describe("Checking for error message on Organisation Name ", function() {
|
|||
// Observe the organisation is not created
|
||||
});
|
||||
|
||||
it("Cancel creating an Organisation when the Organisation name is dually filled", function() {
|
||||
it("Cancel creating an Workspace when the Workspace name is dually filled", function() {
|
||||
// Navigate to home Page
|
||||
// Click on the "Create Organisation" button
|
||||
// Ensure "Organisation Name" field is enterd respectively
|
||||
|
|
@ -71,4 +71,7 @@ export class CommonLocators {
|
|||
_jsonFormWidget = ".t--widget-jsonformwidget"
|
||||
_lintErrorElement = `span.CodeMirror-lint-mark-error`
|
||||
_datePicker = (date: number) => "//div[@class ='bp3-datepicker']//div[@class = 'DayPicker-Day']//div[text()='" + date + "']";
|
||||
_inputWidgetValueField= (fieldName: string, input : boolean = true) => `//label[contains(@class, 't--input-widget-label')][text()='${fieldName}']/ancestor::div[@data-testid='input-container']//${input ? "input" : "textarea"}`
|
||||
_deleteIcon = "button .bp3-icon-delete";
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,19 +17,19 @@ const DEFAULT_ENTERVALUE_OPTIONS = {
|
|||
export class AggregateHelper {
|
||||
private locator = ObjectsRegistry.CommonLocators;
|
||||
|
||||
public saveLocalStorageCache() {
|
||||
public SaveLocalStorageCache() {
|
||||
Object.keys(localStorage).forEach((key) => {
|
||||
LOCAL_STORAGE_MEMORY[key] = localStorage[key];
|
||||
});
|
||||
}
|
||||
|
||||
public restoreLocalStorageCache() {
|
||||
public RestoreLocalStorageCache() {
|
||||
Object.keys(LOCAL_STORAGE_MEMORY).forEach((key) => {
|
||||
localStorage.setItem(key, LOCAL_STORAGE_MEMORY[key]);
|
||||
});
|
||||
}
|
||||
|
||||
public clearLocalStorageCache() {
|
||||
public ClearLocalStorageCache() {
|
||||
localStorage.clear();
|
||||
LOCAL_STORAGE_MEMORY = {};
|
||||
}
|
||||
|
|
@ -417,11 +417,11 @@ export class AggregateHelper {
|
|||
}
|
||||
}
|
||||
|
||||
public NavigateBacktoEditor() {
|
||||
cy.get(this.locator._backToEditor).click();
|
||||
this.Sleep(2000);
|
||||
localStorage.setItem("inDeployedMode", "false");
|
||||
}
|
||||
// public NavigateBacktoEditor() {
|
||||
// cy.get(this.locator._backToEditor).click();
|
||||
// this.Sleep(2000);
|
||||
// localStorage.setItem("inDeployedMode", "false");
|
||||
// }
|
||||
|
||||
public GenerateUUID() {
|
||||
let id = uuid.v4();
|
||||
|
|
@ -511,6 +511,18 @@ export class AggregateHelper {
|
|||
this.AssertAutoSave();
|
||||
}
|
||||
|
||||
public EnterInputText(name: string, input: string, toClear = false, isInput = true) {
|
||||
toClear && this.ClearInputText(name)
|
||||
cy.xpath(this.locator._inputWidgetValueField(name, isInput))
|
||||
.trigger('click')
|
||||
.type(input);
|
||||
}
|
||||
|
||||
public ClearInputText(name: string, isInput = true) {
|
||||
cy.xpath(this.locator._inputWidgetValueField(name, isInput))
|
||||
.clear();
|
||||
}
|
||||
|
||||
public UpdateCodeInput(selector: string, value: string) {
|
||||
cy.wrap(selector)
|
||||
.find(".CodeMirror")
|
||||
|
|
|
|||
|
|
@ -170,7 +170,7 @@ export class ApiPage {
|
|||
this.SelectPaneTab("Headers");
|
||||
}
|
||||
|
||||
OnPageLoadRun(enable = true || false) {
|
||||
ToggleOnPageLoadRun(enable = true || false) {
|
||||
this.SelectPaneTab("Settings");
|
||||
if (enable)
|
||||
cy.get(this._onPageLoad).check({
|
||||
|
|
@ -182,7 +182,7 @@ export class ApiPage {
|
|||
});
|
||||
}
|
||||
|
||||
ConfirmBeforeRunningApi(enable = true || false) {
|
||||
ToggleConfirmBeforeRunningApi(enable = true || false) {
|
||||
this.SelectPaneTab("Settings");
|
||||
if (enable)
|
||||
cy.get(this._confirmBeforeRunningAPI).check({
|
||||
|
|
|
|||
|
|
@ -57,6 +57,9 @@ export class DataSources {
|
|||
"//div/span[text()='Result:']/span[contains(text(),'" +
|
||||
recordCount +
|
||||
" Record')]";
|
||||
_noRecordFound = "span[data-testid='no-data-table-message']";
|
||||
_usePreparedStatement =
|
||||
"input[name='actionConfiguration.pluginSpecifiedTemplates[0].value'][type='checkbox']";
|
||||
|
||||
public StartDataSourceRoutes() {
|
||||
cy.intercept("PUT", "/api/v1/datasources/*").as("saveDatasource");
|
||||
|
|
@ -352,4 +355,17 @@ export class DataSources {
|
|||
.then(($header: any) => expect($header).to.eq(jsonHeaderString));
|
||||
});
|
||||
}
|
||||
|
||||
public ToggleUsePreparedStatement(enable = true || false) {
|
||||
if (enable)
|
||||
cy.get(this._usePreparedStatement).check({
|
||||
force: true,
|
||||
});
|
||||
else
|
||||
cy.get(this._usePreparedStatement).uncheck({
|
||||
force: true,
|
||||
});
|
||||
|
||||
this.agHelper.AssertAutoSave();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,6 +54,12 @@ export class DeployMode {
|
|||
});
|
||||
}
|
||||
|
||||
public NavigateBacktoEditor() {
|
||||
cy.get(this.locator._backToEditor).click();
|
||||
this.agHelper.Sleep(2000);
|
||||
localStorage.setItem("inDeployedMode", "false");
|
||||
}
|
||||
|
||||
public EnterJSONInputValue(fieldName: string, value: string, index = 0) {
|
||||
cy.xpath(this._jsonFormFieldByName(fieldName))
|
||||
.eq(index)
|
||||
|
|
|
|||
|
|
@ -40,12 +40,17 @@ export class EntityExplorer {
|
|||
"']/ancestor::div[contains(@class, 't--entity-item')]//div[contains(@class, 't--template-menu-trigger')]";
|
||||
private _templateMenuItem = (menuItem: string) =>
|
||||
"//div[contains(@class, 'bp3-popover-dismiss')][text()='" + menuItem + "']";
|
||||
private _moreOptionsPopover =
|
||||
"//*[local-name()='g' and @id='Icon/Outline/more-vertical']";
|
||||
private _pageClone = ".single-select >div:contains('Clone')";
|
||||
private getPageLocator = (pageName: string) =>
|
||||
`.t--entity-name:contains(${pageName})`;
|
||||
|
||||
public SelectEntityByName(
|
||||
entityNameinLeftSidebar: string,
|
||||
section: "WIDGETS" | "QUERIES/JS" | "DATASOURCES" | "" = "",
|
||||
) {
|
||||
if (section) this.expandCollapseEntity(section); //to expand respective section
|
||||
if (section) this.ExpandCollapseEntity(section); //to expand respective section
|
||||
cy.xpath(this._entityNameInExplorer(entityNameinLeftSidebar))
|
||||
.last()
|
||||
.click({ multiple: true });
|
||||
|
|
@ -76,7 +81,7 @@ export class EntityExplorer {
|
|||
);
|
||||
}
|
||||
|
||||
public expandCollapseEntity(entityName: string, expand = true) {
|
||||
public ExpandCollapseEntity(entityName: string, expand = true) {
|
||||
cy.xpath(this._expandCollapseArrow(entityName))
|
||||
.invoke("attr", "name")
|
||||
.then((arrow) => {
|
||||
|
|
@ -134,4 +139,18 @@ export class EntityExplorer {
|
|||
this.agHelper.AssertAutoSave(); //settling time for widget on canvas!
|
||||
cy.get(this.locator._widgetInCanvas(widgetType)).should("exist");
|
||||
}
|
||||
|
||||
public ClonePage(pageName = "Page1") {
|
||||
this.ExpandCollapseEntity("PAGES")
|
||||
cy.get(this.getPageLocator(pageName))
|
||||
.trigger("mouseover")
|
||||
.click({ force: true });
|
||||
cy.xpath(this._moreOptionsPopover)
|
||||
.first()
|
||||
.should("be.hidden")
|
||||
.invoke("show")
|
||||
.click({ force: true });
|
||||
cy.get(this._pageClone).click({ force: true });
|
||||
this.agHelper.ValidateNetworkStatus("@clonePage", 201);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,276 +1,343 @@
|
|||
import { ObjectsRegistry } from "../Objects/Registry"
|
||||
import { ObjectsRegistry } from "../Objects/Registry";
|
||||
export class HomePage {
|
||||
private agHelper = ObjectsRegistry.AggregateHelper;
|
||||
private locator = ObjectsRegistry.CommonLocators;
|
||||
|
||||
private agHelper = ObjectsRegistry.AggregateHelper;
|
||||
private locator = ObjectsRegistry.CommonLocators;
|
||||
private _username = "input[name='username']";
|
||||
private _password = "input[name='password']";
|
||||
private _submitBtn = "button[type='submit']";
|
||||
private _workspaceCompleteSection = ".t--workspace-section";
|
||||
private _workspaceName = ".t--workspace-name";
|
||||
private _optionsIcon = ".t--options-icon";
|
||||
private _renameWorkspaceInput = "[data-cy=t--workspace-rename-input]";
|
||||
private _workspaceList = (workspaceName: string) =>
|
||||
".t--workspace-section:contains(" + workspaceName + ")";
|
||||
private _workspaceShareUsersIcon = (workspaceName: string) =>
|
||||
".t--workspace-section:contains(" +
|
||||
workspaceName +
|
||||
") .workspace-share-user-icons";
|
||||
private _shareWorkspace = (workspaceName: string) =>
|
||||
".t--workspace-section:contains(" +
|
||||
workspaceName +
|
||||
") button:contains('Share')";
|
||||
private _email = "//input[@type='email']";
|
||||
_visibleTextSpan = (spanText: string) => "//span[text()='" + spanText + "']";
|
||||
private _userRole = (role: string) =>
|
||||
"//div[contains(@class, 'label-container')]//span[1][text()='" +
|
||||
role +
|
||||
"']";
|
||||
private _manageUsers = ".manageUsers";
|
||||
private _appHome = "//a[@href='/applications']";
|
||||
_applicationCard = ".t--application-card";
|
||||
private _homeIcon = ".t--appsmith-logo";
|
||||
private _appContainer = ".t--applications-container";
|
||||
private _homePageAppCreateBtn = this._appContainer + " .createnew";
|
||||
private _newWorkspaceCreateNewApp = (newWorkspaceName: string) =>
|
||||
"//span[text()='" +
|
||||
newWorkspaceName +
|
||||
"']/ancestor::div[contains(@class, 't--workspace-name-text')]/parent::div/following-sibling::div//button[contains(@class, 't--new-button')]";
|
||||
private _existingWorkspaceCreateNewApp = (existingWorkspaceName: string) =>
|
||||
"//span[text()='" +
|
||||
existingWorkspaceName +
|
||||
"']/ancestor::div[contains(@class, 't--workspace-name-text')]/following-sibling::div//button[contains(@class, 't--new-button')]";
|
||||
private _applicationName = ".t--application-name";
|
||||
private _editAppName = "bp3-editable-text-editing";
|
||||
private _appMenu = ".t--editor-appname-menu-portal .bp3-menu-item";
|
||||
private _buildFromScratchActionCard = ".t--BuildFromScratch";
|
||||
_buildFromDataTableActionCard = ".t--GenerateCRUDPage";
|
||||
private _selectRole = "//span[text()='Select a role']/ancestor::div";
|
||||
private _searchInput = "input[type='text']";
|
||||
_appHoverIcon = (action: string) => ".t--application-" + action + "-link";
|
||||
private _deleteUser = (email: string) =>
|
||||
"//td[text()='" +
|
||||
email +
|
||||
"']/following-sibling::td//span[contains(@class, 't--deleteUser')]";
|
||||
private _userRoleDropDown = (email: string, role: string) =>
|
||||
"//td[text()='" +
|
||||
email +
|
||||
"']/following-sibling::td//span[text()='" +
|
||||
role +
|
||||
"']";
|
||||
//private _userRoleDropDown = (email: string) => "//td[text()='" + email + "']/following-sibling::td"
|
||||
private _leaveWorkspaceConfirmModal = ".t--member-delete-confirmation-modal";
|
||||
private _workspaceImportAppModal = ".t--import-application-modal";
|
||||
private _leaveWorkspaceConfirmButton =
|
||||
"[data - cy= t--workspace-leave - button]";
|
||||
private _lastWorkspaceInHomePage =
|
||||
"//div[contains(@class, 't--workspace-section')][last()]//span/span";
|
||||
_editPageLanding = "//h2[text()='Drag and drop a widget here']";
|
||||
_usersEmailList = "[data-colindex='1']";
|
||||
private _workspaceImport = "[data-cy=t--workspace-import-app]";
|
||||
private _uploadFile = "//div/form/input";
|
||||
|
||||
private _username = "input[name='username']"
|
||||
private _password = "input[name='password']"
|
||||
private _submitBtn = "button[type='submit']"
|
||||
private _orgCompleteSection = ".t--org-section"
|
||||
private _orgName = ".t--org-name"
|
||||
private _optionsIcon = ".t--options-icon"
|
||||
private _renameOrgInput = "[data-cy=t--org-rename-input]"
|
||||
private _orgList = (orgName: string) => ".t--org-section:contains(" + orgName + ")"
|
||||
private _orgShareUsersIcon = (orgName: string) => ".t--org-section:contains(" + orgName + ") .org-share-user-icons"
|
||||
private _shareOrg = (orgName: string) => ".t--org-section:contains(" + orgName + ") button:contains('Share')"
|
||||
private _email = "//input[@type='email']"
|
||||
_visibleTextSpan = (spanText: string) => "//span[text()='" + spanText + "']"
|
||||
private _userRole = (role: string) => "//div[contains(@class, 'label-container')]//span[1][text()='" + role + "']"
|
||||
private _manageUsers = ".manageUsers"
|
||||
private _appHome = "//a[@href='/applications']"
|
||||
_applicationCard = ".t--application-card"
|
||||
private _homeIcon = ".t--appsmith-logo"
|
||||
private _appContainer = ".t--applications-container"
|
||||
private _homePageAppCreateBtn = this._appContainer + " .createnew"
|
||||
private _newOrganizationCreateNewApp = (newOrgName: string) => "//span[text()='" + newOrgName + "']/ancestor::div[contains(@class, 't--org-name-text')]/parent::div/following-sibling::div//button[contains(@class, 't--new-button')]"
|
||||
private _existingOrganizationCreateNewApp = (existingOrgName: string) => "//span[text()='" + existingOrgName + "']/ancestor::div[contains(@class, 't--org-name-text')]/following-sibling::div//button[contains(@class, 't--new-button')]"
|
||||
private _applicationName = ".t--application-name"
|
||||
private _editAppName = "bp3-editable-text-editing"
|
||||
private _appMenu = ".t--editor-appname-menu-portal .bp3-menu-item"
|
||||
private _buildFromScratchActionCard = ".t--BuildFromScratch"
|
||||
_buildFromDataTableActionCard = ".t--GenerateCRUDPage"
|
||||
private _selectRole = "//span[text()='Select a role']/ancestor::div"
|
||||
private _searchInput = "input[type='text']"
|
||||
_appHoverIcon = (action: string) => ".t--application-" + action + "-link"
|
||||
private _deleteUser = (email: string) => "//td[text()='" + email + "']/following-sibling::td//span[contains(@class, 't--deleteUser')]"
|
||||
private _userRoleDropDown = (email: string, role: string) => "//td[text()='" + email + "']/following-sibling::td//span[text()='" + role + "']"
|
||||
//private _userRoleDropDown = (email: string) => "//td[text()='" + email + "']/following-sibling::td"
|
||||
private _leaveOrgConfirmModal = ".t--member-delete-confirmation-modal"
|
||||
private _orgImportAppModal = ".t--import-application-modal"
|
||||
private _leaveOrgConfirmButton = "[data - cy= t--org-leave - button]"
|
||||
private _lastOrgInHomePage = "//div[contains(@class, 't--org-section')][last()]//span/span"
|
||||
_editPageLanding = "//h2[text()='Drag and drop a widget here']"
|
||||
_usersEmailList = "[data-colindex='1']"
|
||||
private _orgImport = "[data-cy=t--org-import-app]"
|
||||
private _uploadFile = "//div/form/input"
|
||||
public CreateNewWorkspace(workspaceNewName: string) {
|
||||
let oldName: string = "";
|
||||
cy.xpath(this._visibleTextSpan("New Organization"))
|
||||
.should("be.visible")
|
||||
.first()
|
||||
.click({ force: true });
|
||||
cy.wait("@createWorkspace");
|
||||
this.agHelper.Sleep(2000);
|
||||
cy.xpath(this._lastWorkspaceInHomePage)
|
||||
.first()
|
||||
.then(($ele) => {
|
||||
oldName = $ele.text();
|
||||
cy.log("oldName is : " + oldName);
|
||||
this.RenameWorkspace(oldName, workspaceNewName);
|
||||
});
|
||||
}
|
||||
|
||||
public CreateNewOrg(orgNewName: string) {
|
||||
let oldName: string = ""
|
||||
cy.xpath(this._visibleTextSpan('New Organization'))
|
||||
.should("be.visible")
|
||||
.first()
|
||||
.click({ force: true });
|
||||
cy.wait("@createOrg")
|
||||
this.agHelper.Sleep(2000)
|
||||
cy.xpath(this._lastOrgInHomePage).first().then($ele => {
|
||||
oldName = $ele.text();
|
||||
cy.log("oldName is : " + oldName);
|
||||
this.RenameOrg(oldName, orgNewName);
|
||||
})
|
||||
}
|
||||
public RenameWorkspace(workspaceName: string, newWorkspaceName: string) {
|
||||
cy.contains(workspaceName)
|
||||
.closest(this._workspaceCompleteSection)
|
||||
.find(this._workspaceName)
|
||||
.find(this._optionsIcon)
|
||||
.click({ force: true });
|
||||
cy.get(this._renameWorkspaceInput)
|
||||
.should("be.visible")
|
||||
.type(newWorkspaceName.concat("{enter}"));
|
||||
this.agHelper.Sleep(2000);
|
||||
cy.wait("@updateWorkspace").should(
|
||||
"have.nested.property",
|
||||
"response.body.responseMeta.status",
|
||||
200,
|
||||
);
|
||||
cy.contains(newWorkspaceName);
|
||||
}
|
||||
|
||||
public RenameOrg(orgName: string, newOrgName: string) {
|
||||
cy.contains(orgName)
|
||||
.closest(this._orgCompleteSection)
|
||||
.find(this._orgName)
|
||||
.find(this._optionsIcon)
|
||||
.click({ force: true });
|
||||
cy.get(this._renameOrgInput)
|
||||
.should("be.visible")
|
||||
.type(newOrgName.concat("{enter}"));
|
||||
this.agHelper.Sleep(2000)
|
||||
cy.wait("@updateOrganization").should(
|
||||
"have.nested.property",
|
||||
"response.body.responseMeta.status",
|
||||
200,
|
||||
);
|
||||
cy.contains(newOrgName);
|
||||
}
|
||||
//Maps to CheckShareIcon in command.js
|
||||
public CheckWorkspaceShareUsersCount(workspaceName: string, count: number) {
|
||||
cy.get(this._workspaceList(workspaceName))
|
||||
.scrollIntoView()
|
||||
.should("be.visible");
|
||||
cy.get(this._workspaceShareUsersIcon(workspaceName)).should(
|
||||
"have.length",
|
||||
count,
|
||||
);
|
||||
}
|
||||
|
||||
//Maps to CheckShareIcon in command.js
|
||||
public CheckOrgShareUsersCount(orgName: string, count: number) {
|
||||
cy.get(this._orgList(orgName))
|
||||
.scrollIntoView()
|
||||
.should("be.visible");
|
||||
cy.get(this._orgShareUsersIcon(orgName)).should("have.length", count);
|
||||
}
|
||||
//Maps to inviteUserForWorkspace in command.js
|
||||
public InviteUserToWorkspace(
|
||||
workspaceName: string,
|
||||
email: string,
|
||||
role: string,
|
||||
) {
|
||||
const successMessage = "The user has been invited successfully";
|
||||
this.StubPostHeaderReq();
|
||||
cy.get(this._workspaceList(workspaceName))
|
||||
.scrollIntoView()
|
||||
.should("be.visible");
|
||||
cy.get(this._shareWorkspace(workspaceName))
|
||||
.first()
|
||||
.should("be.visible")
|
||||
.click({ force: true });
|
||||
cy.xpath(this._email)
|
||||
.click({ force: true })
|
||||
.type(email);
|
||||
cy.xpath(this._selectRole)
|
||||
.first()
|
||||
.click({ force: true });
|
||||
this.agHelper.Sleep(500);
|
||||
cy.xpath(this._userRole(role)).click({ force: true });
|
||||
this.agHelper.ClickButton("Invite");
|
||||
cy.wait("@mockPostInvite")
|
||||
.its("request.headers")
|
||||
.should("have.property", "origin", "Cypress");
|
||||
cy.contains(email, { matchCase: false });
|
||||
cy.contains(successMessage);
|
||||
}
|
||||
|
||||
//Maps to inviteUserForOrg in command.js
|
||||
public InviteUserToOrg(orgName: string, email: string, role: string) {
|
||||
const successMessage = "The user has been invited successfully";
|
||||
this.stubPostHeaderReq();
|
||||
cy.get(this._orgList(orgName))
|
||||
.scrollIntoView()
|
||||
.should("be.visible");
|
||||
cy.get(this._shareOrg(orgName))
|
||||
.first()
|
||||
.should("be.visible")
|
||||
.click({ force: true });
|
||||
cy.xpath(this._email)
|
||||
.click({ force: true })
|
||||
.type(email);
|
||||
cy.xpath(this._selectRole).first().click({ force: true });
|
||||
this.agHelper.Sleep(500)
|
||||
cy.xpath(this._userRole(role)).click({ force: true });
|
||||
this.agHelper.ClickButton('Invite')
|
||||
cy.wait("@mockPostInvite")
|
||||
.its("request.headers")
|
||||
.should("have.property", "origin", "Cypress");
|
||||
cy.contains(email, { matchCase: false });
|
||||
cy.contains(successMessage);
|
||||
}
|
||||
public StubPostHeaderReq() {
|
||||
cy.intercept("POST", "/api/v1/users/invite", (req) => {
|
||||
req.headers["origin"] = "Cypress";
|
||||
}).as("mockPostInvite");
|
||||
}
|
||||
|
||||
public stubPostHeaderReq() {
|
||||
cy.intercept("POST", "/api/v1/users/invite", (req) => { req.headers["origin"] = "Cypress"; }).as("mockPostInvite");
|
||||
}
|
||||
public NavigateToHome() {
|
||||
cy.get(this._homeIcon).click({ force: true });
|
||||
this.agHelper.Sleep(3000);
|
||||
//cy.wait("@applications"); this randomly fails & introduces flakyness hence commenting!
|
||||
cy.get(this._homePageAppCreateBtn)
|
||||
.should("be.visible")
|
||||
.should("be.enabled");
|
||||
}
|
||||
|
||||
public NavigateToHome() {
|
||||
cy.get(this._homeIcon).click({ force: true });
|
||||
this.agHelper.Sleep(3000)
|
||||
//cy.wait("@applications"); this randomly fails & introduces flakyness hence commenting!
|
||||
cy.get(this._homePageAppCreateBtn).should("be.visible").should("be.enabled");
|
||||
}
|
||||
public CreateNewApplication() {
|
||||
cy.get(this._homePageAppCreateBtn)
|
||||
.first()
|
||||
.click({ force: true });
|
||||
this.agHelper.ValidateNetworkStatus("@createNewApplication", 201);
|
||||
cy.get(this.locator._loading).should("not.exist");
|
||||
}
|
||||
|
||||
public CreateNewApplication() {
|
||||
cy.get(this._homePageAppCreateBtn).first().click({ force: true })
|
||||
this.agHelper.ValidateNetworkStatus("@createNewApplication", 201)
|
||||
cy.get(this.locator._loading).should("not.exist");
|
||||
}
|
||||
//Maps to CreateAppForWorkspace in command.js
|
||||
public CreateAppInWorkspace(workspaceName: string, appname: string) {
|
||||
cy.xpath(this._newWorkspaceCreateNewApp(workspaceName))
|
||||
.scrollIntoView()
|
||||
.should("be.visible")
|
||||
.click({ force: true });
|
||||
cy.wait("@createNewApplication").should(
|
||||
"have.nested.property",
|
||||
"response.body.responseMeta.status",
|
||||
201,
|
||||
);
|
||||
cy.get(this.locator._loading).should("not.exist");
|
||||
this.agHelper.Sleep(2000);
|
||||
this.RenameApplication(appname);
|
||||
cy.get(this._buildFromScratchActionCard).click();
|
||||
cy.wait("@updateApplication").should(
|
||||
"have.nested.property",
|
||||
"response.body.responseMeta.status",
|
||||
200,
|
||||
);
|
||||
}
|
||||
|
||||
//Maps to CreateAppForOrg in command.js
|
||||
public CreateAppInOrg(orgName: string, appname: string) {
|
||||
cy.xpath(this._newOrganizationCreateNewApp(orgName))
|
||||
.scrollIntoView()
|
||||
.should("be.visible")
|
||||
.click({ force: true });
|
||||
cy.wait("@createNewApplication").should(
|
||||
"have.nested.property",
|
||||
"response.body.responseMeta.status",
|
||||
201,
|
||||
);
|
||||
cy.get(this.locator._loading).should("not.exist");
|
||||
this.agHelper.Sleep(2000)
|
||||
this.RenameApplication(appname)
|
||||
cy.get(this._buildFromScratchActionCard).click();
|
||||
cy.wait("@updateApplication").should(
|
||||
"have.nested.property",
|
||||
"response.body.responseMeta.status",
|
||||
200,
|
||||
);
|
||||
}
|
||||
//Maps to AppSetupForRename in command.js
|
||||
public RenameApplication(appName: string) {
|
||||
cy.get(this._applicationName).then(($appName) => {
|
||||
if (!$appName.hasClass(this._editAppName)) {
|
||||
cy.get(this._applicationName).click();
|
||||
cy.get(this._appMenu)
|
||||
.contains("Edit Name", { matchCase: false })
|
||||
.click();
|
||||
}
|
||||
});
|
||||
cy.get(this._applicationName).type(appName + "{enter}");
|
||||
}
|
||||
|
||||
//Maps to AppSetupForRename in command.js
|
||||
public RenameApplication(appName: string) {
|
||||
cy.get(this._applicationName).then(($appName) => {
|
||||
if (!$appName.hasClass(this._editAppName)) {
|
||||
cy.get(this._applicationName).click();
|
||||
cy.get(this._appMenu)
|
||||
.contains("Edit Name", { matchCase: false })
|
||||
.click();
|
||||
}
|
||||
});
|
||||
cy.get(this._applicationName).type(appName + "{enter}");
|
||||
}
|
||||
//Maps to LogOut in command.js
|
||||
public LogOutviaAPI() {
|
||||
cy.request("POST", "/api/v1/logout");
|
||||
this.agHelper.Sleep(); //for logout to complete!
|
||||
}
|
||||
|
||||
//Maps to LogOut in command.js
|
||||
public LogOutviaAPI() {
|
||||
cy.request("POST", "/api/v1/logout");
|
||||
this.agHelper.Sleep()//for logout to complete!
|
||||
}
|
||||
public LogintoApp(
|
||||
uname: string,
|
||||
pswd: string,
|
||||
role: "App Viewer" | "Developer" | "Administrator" = "Administrator",
|
||||
) {
|
||||
this.agHelper.Sleep(); //waiting for window to load
|
||||
cy.window()
|
||||
.its("store")
|
||||
.invoke("dispatch", { type: "LOGOUT_USER_INIT" });
|
||||
cy.wait("@postLogout");
|
||||
cy.visit("/user/login");
|
||||
cy.get(this._username)
|
||||
.should("be.visible")
|
||||
.type(uname);
|
||||
cy.get(this._password).type(pswd, { log: false });
|
||||
cy.get(this._submitBtn).click();
|
||||
cy.wait("@getMe");
|
||||
this.agHelper.Sleep(3000);
|
||||
if (role != "App Viewer")
|
||||
cy.get(this._homePageAppCreateBtn)
|
||||
.should("be.visible")
|
||||
.should("be.enabled");
|
||||
}
|
||||
|
||||
public LogintoApp(uname: string, pswd: string, role: 'App Viewer' | 'Developer' | 'Administrator' = 'Administrator') {
|
||||
this.agHelper.Sleep() //waiting for window to load
|
||||
cy.window().its("store").invoke("dispatch", { type: "LOGOUT_USER_INIT" });
|
||||
cy.wait("@postLogout");
|
||||
cy.visit("/user/login");
|
||||
cy.get(this._username).should("be.visible").type(uname)
|
||||
cy.get(this._password).type(pswd, {log: false});
|
||||
cy.get(this._submitBtn).click();
|
||||
cy.wait("@getMe");
|
||||
this.agHelper.Sleep(3000)
|
||||
if (role != 'App Viewer')
|
||||
cy.get(this._homePageAppCreateBtn).should("be.visible").should("be.enabled");
|
||||
}
|
||||
public FilterApplication(appName: string, workspaceId: string) {
|
||||
cy.get(this._searchInput).type(appName);
|
||||
this.agHelper.Sleep(2000);
|
||||
cy.get(this._appContainer).contains(workspaceId);
|
||||
cy.xpath(this.locator._spanButton("Share"))
|
||||
.first()
|
||||
.should("be.visible");
|
||||
}
|
||||
|
||||
public FilterApplication(appName: string, orgId: string) {
|
||||
cy.get(this._searchInput).type(appName);
|
||||
this.agHelper.Sleep(2000)
|
||||
cy.get(this._appContainer).contains(orgId);
|
||||
cy.xpath(this.locator._spanButton('Share'))
|
||||
.first()
|
||||
.should("be.visible")
|
||||
}
|
||||
//Maps to launchApp in command.js
|
||||
public LaunchAppFromAppHover() {
|
||||
cy.get(this._appHoverIcon("view"))
|
||||
.should("be.visible")
|
||||
.first()
|
||||
.click();
|
||||
cy.get(this.locator._loading).should("not.exist");
|
||||
cy.wait("@getPagesForViewApp").should(
|
||||
"have.nested.property",
|
||||
"response.body.responseMeta.status",
|
||||
200,
|
||||
);
|
||||
}
|
||||
|
||||
//Maps to launchApp in command.js
|
||||
public LaunchAppFromAppHover() {
|
||||
cy.get(this._appHoverIcon('view'))
|
||||
.should("be.visible")
|
||||
.first()
|
||||
.click();
|
||||
cy.get(this.locator._loading).should("not.exist");
|
||||
cy.wait("@getPagesForViewApp").should(
|
||||
"have.nested.property",
|
||||
"response.body.responseMeta.status",
|
||||
200,
|
||||
);
|
||||
}
|
||||
//Maps to deleteUserFromWorkspace in command.js
|
||||
public DeleteUserFromWorkspace(workspaceName: string, email: string) {
|
||||
cy.get(this._workspaceList(workspaceName))
|
||||
.scrollIntoView()
|
||||
.should("be.visible");
|
||||
cy.contains(workspaceName)
|
||||
.closest(this._workspaceCompleteSection)
|
||||
.find(this._workspaceName)
|
||||
.find(this._optionsIcon)
|
||||
.click({ force: true });
|
||||
cy.xpath(this._visibleTextSpan("Members")).click({ force: true });
|
||||
cy.wait("@getMembers").should(
|
||||
"have.nested.property",
|
||||
"response.body.responseMeta.status",
|
||||
200,
|
||||
);
|
||||
cy.get(this._deleteUser(email))
|
||||
.last()
|
||||
.click({ force: true });
|
||||
cy.get(this._leaveWorkspaceConfirmModal).should("be.visible");
|
||||
cy.get(this._leaveWorkspaceConfirmButton).click({ force: true });
|
||||
this.NavigateToHome();
|
||||
}
|
||||
|
||||
//Maps to deleteUserFromOrg in command.js
|
||||
public DeleteUserFromOrg(orgName: string, email: string) {
|
||||
cy.get(this._orgList(orgName))
|
||||
.scrollIntoView()
|
||||
.should("be.visible");
|
||||
cy.contains(orgName)
|
||||
.closest(this._orgCompleteSection)
|
||||
.find(this._orgName)
|
||||
.find(this._optionsIcon)
|
||||
.click({ force: true });
|
||||
cy.xpath(this._visibleTextSpan('Members')).click({ force: true });
|
||||
cy.wait("@getMembers").should(
|
||||
"have.nested.property",
|
||||
"response.body.responseMeta.status",
|
||||
200,
|
||||
);
|
||||
cy.get(this._deleteUser(email))
|
||||
.last()
|
||||
.click({ force: true });
|
||||
cy.get(this._leaveOrgConfirmModal).should("be.visible");
|
||||
cy.get(this._leaveOrgConfirmButton).click({ force: true });
|
||||
this.NavigateToHome()
|
||||
}
|
||||
public OpenMembersPageForWorkspace(workspaceName: string) {
|
||||
cy.get(this._appContainer)
|
||||
.contains(workspaceName)
|
||||
.scrollIntoView()
|
||||
.should("be.visible");
|
||||
cy.get(this._appContainer)
|
||||
.contains(workspaceName)
|
||||
.closest(this._workspaceCompleteSection)
|
||||
.find(this._workspaceName)
|
||||
.find(this._optionsIcon)
|
||||
.click({ force: true });
|
||||
cy.xpath(this._visibleTextSpan("Members"))
|
||||
.last()
|
||||
.click({ force: true });
|
||||
cy.wait("@getMembers").should(
|
||||
"have.nested.property",
|
||||
"response.body.responseMeta.status",
|
||||
200,
|
||||
);
|
||||
this.agHelper.Sleep(2500); //wait for members page to load!
|
||||
}
|
||||
|
||||
public OpenMembersPageForOrg(orgName: string) {
|
||||
cy.get(this._appContainer).contains(orgName)
|
||||
.scrollIntoView()
|
||||
.should("be.visible");
|
||||
cy.get(this._appContainer).contains(orgName)
|
||||
.closest(this._orgCompleteSection)
|
||||
.find(this._orgName)
|
||||
.find(this._optionsIcon)
|
||||
.click({ force: true });
|
||||
cy.xpath(this._visibleTextSpan('Members')).last().click({ force: true });
|
||||
cy.wait("@getMembers").should(
|
||||
"have.nested.property",
|
||||
"response.body.responseMeta.status",
|
||||
200,
|
||||
);
|
||||
this.agHelper.Sleep(2500)//wait for members page to load!
|
||||
}
|
||||
public UpdateUserRoleInWorkspace(
|
||||
workspaceName: string,
|
||||
email: string,
|
||||
currentRole: string,
|
||||
newRole: string,
|
||||
) {
|
||||
this.OpenMembersPageForWorkspace(workspaceName);
|
||||
cy.xpath(this._userRoleDropDown(email, currentRole))
|
||||
.first()
|
||||
.trigger("click");
|
||||
//cy.xpath(this._userRoleDropDown(email)).first().click({force: true});
|
||||
cy.xpath(this._visibleTextSpan(newRole))
|
||||
.last()
|
||||
.click({ force: true });
|
||||
this.agHelper.Sleep();
|
||||
this.NavigateToHome();
|
||||
}
|
||||
|
||||
public UpdateUserRoleInOrg(orgName: string, email: string, currentRole: string, newRole: string) {
|
||||
this.OpenMembersPageForOrg(orgName)
|
||||
cy.xpath(this._userRoleDropDown(email, currentRole)).first().trigger('click');
|
||||
//cy.xpath(this._userRoleDropDown(email)).first().click({force: true});
|
||||
cy.xpath(this._visibleTextSpan(newRole)).last().click({ force: true });
|
||||
this.agHelper.Sleep()
|
||||
this.NavigateToHome()
|
||||
}
|
||||
public ImportApp(fixtureJson: string) {
|
||||
cy.get(this._homeIcon).click();
|
||||
cy.get(this._optionsIcon)
|
||||
.first()
|
||||
.click();
|
||||
cy.get(this._workspaceImport).click({ force: true });
|
||||
cy.get(this._workspaceImportAppModal).should("be.visible");
|
||||
cy.xpath(this._uploadFile)
|
||||
.attachFile(fixtureJson)
|
||||
.wait(500);
|
||||
cy.get(this._workspaceImportAppModal).should("not.exist");
|
||||
}
|
||||
|
||||
public ImportApp(fixtureJson: string) {
|
||||
cy.get(this._homeIcon).click();
|
||||
cy.get(this._optionsIcon).first().click();
|
||||
cy.get(this._orgImport).click({ force: true });
|
||||
cy.get(this._orgImportAppModal).should("be.visible");
|
||||
cy.xpath(this._uploadFile).attachFile(fixtureJson).wait(500);
|
||||
cy.get(this._orgImportAppModal).should("not.exist");
|
||||
}
|
||||
|
||||
public AssertImport() {
|
||||
this.agHelper.ValidateToastMessage("Application imported successfully")
|
||||
this.agHelper.Sleep(5000)//for imported app to settle!
|
||||
cy.get(this.locator._loading).should("not.exist");
|
||||
}
|
||||
public AssertImport() {
|
||||
this.agHelper.ValidateToastMessage("Application imported successfully");
|
||||
this.agHelper.Sleep(5000); //for imported app to settle!
|
||||
cy.get(this.locator._loading).should("not.exist");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -19,9 +19,9 @@ export class JSEditor {
|
|||
public ee = ObjectsRegistry.EntityExplorer;
|
||||
|
||||
//#region Element locators
|
||||
private _runButton = "button.run-js-action";
|
||||
private _settingsTab = ".tab-title:contains('Settings')";
|
||||
private _codeTab = ".tab-title:contains('Code')";
|
||||
_runButton = "button.run-js-action";
|
||||
_settingsTab = ".tab-title:contains('Settings')";
|
||||
_codeTab = ".tab-title:contains('Code')";
|
||||
private _jsObjectParseErrorCallout =
|
||||
"div.t--js-response-parse-error-call-out";
|
||||
private _jsFunctionExecutionParseErrorCallout =
|
||||
|
|
@ -78,7 +78,9 @@ export class JSEditor {
|
|||
"')]";
|
||||
_funcDropdown = ".t--formActionButtons div[role='listbox']";
|
||||
_funcDropdownOptions = ".ads-dropdown-options-wrapper div > div";
|
||||
|
||||
_getJSFunctionSettingsId = (JSFunctionName: string) =>
|
||||
`${JSFunctionName}-settings`;
|
||||
_asyncJSFunctionSettings = `.t--async-js-function-settings`;
|
||||
//#endregion
|
||||
|
||||
//#region constants
|
||||
|
|
@ -282,7 +284,7 @@ export class JSEditor {
|
|||
this.agHelper.AssertAutoSave();
|
||||
}
|
||||
|
||||
public RenameJSObjFromForm(renameVal: string) {
|
||||
public RenameJSObjFromPane(renameVal: string) {
|
||||
cy.get(this._jsObjName).click({ force: true });
|
||||
cy.get(this._jsObjTxt)
|
||||
.clear()
|
||||
|
|
@ -307,7 +309,7 @@ export class JSEditor {
|
|||
.then((text) => cy.wrap(text).as("jsObjName"));
|
||||
}
|
||||
|
||||
public validateDefaultJSObjProperties(jsObjName: string) {
|
||||
public ValidateDefaultJSObjProperties(jsObjName: string) {
|
||||
this.ee.ActionContextMenuByEntityName(jsObjName, "Show Bindings");
|
||||
cy.get(this._propertyList).then(function($lis) {
|
||||
const bindingsLength = $lis.length;
|
||||
|
|
@ -381,8 +383,8 @@ export class JSEditor {
|
|||
// Return to code tab
|
||||
this.agHelper.GetNClick(this._codeTab);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
There are two types of parse errors in the JS Editor
|
||||
1. Parse errors that render the JS Object invalid and all functions unrunnable
|
||||
2. Parse errors within functions that throw errors when executing those functions
|
||||
|
|
@ -403,5 +405,12 @@ export class JSEditor {
|
|||
).should(exists ? "exist" : "not.exist");
|
||||
}
|
||||
|
||||
public SelectFunctionDropdown(funName: string) {
|
||||
cy.get(this._funcDropdown).click();
|
||||
cy.get(this.locator._dropdownText)
|
||||
.contains(funName)
|
||||
.click();
|
||||
}
|
||||
|
||||
//#endregion
|
||||
}
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user