Skip to content

Commit

Permalink
Merge pull request #36985 from appsmithorg/release
Browse files Browse the repository at this point in the history
21/10 Daily Promotion
  • Loading branch information
btsgh authored Oct 21, 2024
2 parents 0a66486 + 631abe8 commit c4e4ce3
Show file tree
Hide file tree
Showing 642 changed files with 15,932 additions and 13,798 deletions.
4 changes: 3 additions & 1 deletion app/client/cypress/e2e/GSheet/AllAccess_Spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ let appName = "gsheet-app";
let spreadSheetName = "test-sheet";
describe.skip(
"GSheet-Functional Tests With All Access",
{ tags: ["@tag.Datasource", "@tag.GSheet"] },
{
tags: ["@tag.Datasource", "@tag.GSheet", "@tag.Git", "@tag.AccessControl"],
},
function () {
before("Setup app and spreadsheet", function () {
//Add a new app and an add new spreadsheet query
Expand Down
4 changes: 3 additions & 1 deletion app/client/cypress/e2e/GSheet/GsheetMisc_Spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ let appName = "gsheet-app";
let spreadSheetName = "test-sheet";
describe.skip(
"GSheet Miscellaneous Tests",
{ tags: ["@tag.Datasource", "@tag.GSheet"] },
{
tags: ["@tag.Datasource", "@tag.GSheet", "@tag.Git", "@tag.AccessControl"],
},
function () {
const columnHeaders = [
"uniq_id",
Expand Down
4 changes: 3 additions & 1 deletion app/client/cypress/e2e/GSheet/ReadNWrite_Access_Spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ import {

describe.skip(
"GSheet-Functional Tests With Read/Write Access",
{ tags: ["@tag.Datasource", "@tag.GSheet"] },
{
tags: ["@tag.Datasource", "@tag.GSheet", "@tag.Git", "@tag.AccessControl"],
},
function () {
const workspaceName = "gsheet apps";
const dataSourceName = {
Expand Down
4 changes: 3 additions & 1 deletion app/client/cypress/e2e/GSheet/ReadOnly_Access_Spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ import {

describe.skip(
"GSheet-Functional Tests With Read Access",
{ tags: ["@tag.Datasource", "@tag.GSheet"] },
{
tags: ["@tag.Datasource", "@tag.GSheet", "@tag.Git", "@tag.AccessControl"],
},
function () {
const workspaceName = "gsheet apps";
const dataSourceName = {
Expand Down
4 changes: 3 additions & 1 deletion app/client/cypress/e2e/GSheet/SelectedSheet_Access_Spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ let appName = "gsheet-app";
let spreadSheetName = "test-sheet-automation-selected";
describe(
"GSheet-Functional Tests With Selected Access",
{ tags: ["@tag.Datasource", "@tag.GSheet"] },
{
tags: ["@tag.Datasource", "@tag.GSheet", "@tag.Git", "@tag.AccessControl"],
},
function () {
before("Setup app", function () {
//Setting up app name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ let appName = "gsheet-app";
let spreadSheetName = "test-sheet";
describe.skip(
"GSheet-widget binding",
{ tags: ["@tag.Datasource", "@tag.GSheet"] },
{
tags: ["@tag.Datasource", "@tag.GSheet", "@tag.Git", "@tag.AccessControl"],
},
function () {
before("Setup app and spreadsheet", function () {
//Setting up the app name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ let appName = "gsheet-app";
let spreadSheetName = "test-sheet-automation-selected";
describe(
"GSheet-widget binding for selected sheet access",
{ tags: ["@tag.Datasource", "@tag.GSheet"] },
{
tags: ["@tag.Datasource", "@tag.GSheet", "@tag.Git", "@tag.AccessControl"],
},
function () {
before("Setup app and spreadsheet", function () {
//Setting up the app name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import EditorNavigation, {

describe(
"AForce - Community Issues page validations",
{ tags: ["@tag.Widget", "@tag.Table"] },
{ tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] },
function () {
before(function () {
agHelper.ClearLocalStorageCache();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const widgetInput = `${wiggetClass} input`;
describe("Currency Input Issue", function () {
it(
"1. Import application json &should check that the widget input is not showing any error",
{ tags: ["@tag.Widget", "@tag.CurrencyInput"] },
{ tags: ["@tag.Widget", "@tag.CurrencyInput", "@tag.Binding"] },
function () {
agHelper.VisitNAssert("/applications", "getAllWorkspaces");
homePage.ImportApp("CurrencyInputIssueExport.json");
Expand Down
2 changes: 1 addition & 1 deletion app/client/cypress/e2e/Regression/Apps/EchoApiCMS_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import EditorNavigation, {

describe(
"Content Management System App",
{ tags: ["@tag.Datasource"] },
{ tags: ["@tag.Datasource", "@tag.Git", "@tag.AccessControl"] },
function () {
before(() => {
homePage.RenameApplication("EchoApiCMSApp");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {

describe(
"Import, Export and Fork application and validate data binding",
{ tags: ["@tag.ImportExport", "@tag.Sanity"] },
{ tags: ["@tag.ImportExport", "@tag.Sanity", "@tag.Git"] },
function () {
let workspaceId;
let newWorkspaceName;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ import {

describe(
"Shopping cart App",
{ tags: ["@tag.Datasource", "@tag.Sanity"] },
{
tags: ["@tag.Datasource", "@tag.Sanity", "@tag.Git", "@tag.AccessControl"],
},
function () {
let datasourceName: string, repoName: any;

Expand Down
167 changes: 87 additions & 80 deletions app/client/cypress/e2e/Regression/Apps/PgAdmin_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,92 +9,99 @@ import {
const widgetsPage = require("../../../locators/Widgets.json");
const appPage = require("../../../locators/PgAdminlocators.json");

describe("PgAdmin Clone App", { tags: ["@tag.Datasource"] }, function () {
let datasourceName, tableName;
describe(
"PgAdmin Clone App",
{ tags: ["@tag.Datasource", "@tag.Git", "@tag.AccessControl"] },
function () {
let datasourceName, tableName;

before("Add dsl and create datasource", () => {
agHelper.AddDsl("PgAdmindsl");
dataSources.CreateDataSource("Postgres");
cy.get("@dsName").then(($dsName) => {
datasourceName = $dsName;
before("Add dsl and create datasource", () => {
agHelper.AddDsl("PgAdmindsl");
dataSources.CreateDataSource("Postgres");
cy.get("@dsName").then(($dsName) => {
datasourceName = $dsName;
});
});
});

it("1. Create queries", function () {
// writing query to get all schema
dataSources.CreateQueryAfterDSSaved(
"SELECT schema_name FROM information_schema.schemata;",
"get_schema",
);
// switching off Use Prepared Statement toggle
dataSources.ToggleUsePreparedStatement(false);
dataSources.RunQuery();
it("1. Create queries", function () {
// writing query to get all schema
dataSources.CreateQueryAfterDSSaved(
"SELECT schema_name FROM information_schema.schemata;",
"get_schema",
);
// switching off Use Prepared Statement toggle
dataSources.ToggleUsePreparedStatement(false);
dataSources.RunQuery();

// writing query to get all the tables
dataSources.CreateQueryFromOverlay(
datasourceName,
`select * from pg_catalog.pg_tables where schemaname = {{schema_select.selectedOptionValue || "public"}};`,
"get_tables",
2000,
);
dataSources.RunQuery();
// writing query to get all the tables
dataSources.CreateQueryFromOverlay(
datasourceName,
`select * from pg_catalog.pg_tables where schemaname = {{schema_select.selectedOptionValue || "public"}};`,
"get_tables",
2000,
);
dataSources.RunQuery();

// writing query to get all the columns
dataSources.CreateQueryFromOverlay(
datasourceName,
`SELECT column_name, data_type, table_name, ordinal_position, is_nullable FROM information_schema.COLUMNS`,
"get_columns",
);
dataSources.RunQuery();
// writing query to get all the columns
dataSources.CreateQueryFromOverlay(
datasourceName,
`SELECT column_name, data_type, table_name, ordinal_position, is_nullable FROM information_schema.COLUMNS`,
"get_columns",
);
dataSources.RunQuery();

// writing query to get create table
dataSources.CreateQueryFromOverlay(
datasourceName,
`CREATE TABLE {{schema_select.selectedOptionValue}}.{{nt_name.text.replaceAll(" ","_")}}({{appsmith.store.nt_col.map((c)=> c.name.replaceAll(" ","_") + " " + c.dtype + (c.nnull ? " NOT NULL " : "") + (c.pkey ? " PRIMARY KEY " : "")).join(" , ")}})`,
"create_table",
);
dataSources.ToggleUsePreparedStatement(false);
// writing query to get create table
dataSources.CreateQueryFromOverlay(
datasourceName,
`CREATE TABLE {{schema_select.selectedOptionValue}}.{{nt_name.text.replaceAll(" ","_")}}({{appsmith.store.nt_col.map((c)=> c.name.replaceAll(" ","_") + " " + c.dtype + (c.nnull ? " NOT NULL " : "") + (c.pkey ? " PRIMARY KEY " : "")).join(" , ")}})`,
"create_table",
);
dataSources.ToggleUsePreparedStatement(false);

// writing query to get drop table
dataSources.CreateQueryFromOverlay(
datasourceName,
`DROP TABLE {{schema_select.selectedOptionValue}}.{{nt_name.text.replaceAll(" ","_")}}({{appsmith.store.nt_col.map((c)=>c.name.replaceAll(" ","_") + " " + c.dtype + (c.nnull ? " NOT NULL " : "") + (c.pkey ? " PRIMARY KEY " : "")).join(" , ")}});`,
"drop_table",
);
});
// writing query to get drop table
dataSources.CreateQueryFromOverlay(
datasourceName,
`DROP TABLE {{schema_select.selectedOptionValue}}.{{nt_name.text.replaceAll(" ","_")}}({{appsmith.store.nt_col.map((c)=>c.name.replaceAll(" ","_") + " " + c.dtype + (c.nnull ? " NOT NULL " : "") + (c.pkey ? " PRIMARY KEY " : "")).join(" , ")}});`,
"drop_table",
);
});

it("2. Add new table from app page, View and Delete table", function () {
deployMode.DeployApp(locators._widgetInDeployed(draggableWidgets.BUTTON));
// adding new table
agHelper.GetNClick(appPage.addNewtable, 0, true);
agHelper.AssertElementAbsence(appPage.loadButton, 40000); //for CI
agHelper.WaitUntilEleAppear(appPage.addTablename);
cy.generateUUID().then((UUID) => {
cy.xpath(appPage.addTablename).clear().type(`table${UUID}`);
tableName = `table${UUID}`;
it("2. Add new table from app page, View and Delete table", function () {
deployMode.DeployApp(locators._widgetInDeployed(draggableWidgets.BUTTON));
// adding new table
agHelper.GetNClick(appPage.addNewtable, 0, true);
agHelper.AssertElementAbsence(appPage.loadButton, 40000); //for CI
agHelper.WaitUntilEleAppear(appPage.addTablename);
cy.generateUUID().then((UUID) => {
cy.xpath(appPage.addTablename).clear().type(`table${UUID}`);
tableName = `table${UUID}`;
});
// adding column to the table
cy.xpath(appPage.addColumn).click({ force: true });
cy.xpath(appPage.columnNamefield).should("be.visible");
cy.xpath(appPage.datatypefield).should("be.visible");
agHelper.GetNClick(appPage.addColumnName);
agHelper.TypeText(
appPage.addColumnName + " " + locators._inputField,
"ID",
);
agHelper.SelectFromDropDown("Varchar", "", 1);
// switching on the Primary Key toggle
cy.get(widgetsPage.switchWidgetInactive).first().click();
// switching on the Not Null toggle
cy.get(widgetsPage.switchWidgetInactive).last().click();
cy.xpath(appPage.submitButton).click({ force: true });
agHelper.AssertElementVisibility(appPage.addColumn);
cy.xpath(appPage.submitButton).first().click({ force: true });
assertHelper.AssertNetworkStatus("@postExecute");
cy.xpath(appPage.closeButton).click({ force: true });
cy.xpath(appPage.addNewtable).should("be.visible");
// viewing the table's columns by clicking on view button
cy.xpath(appPage.viewButton).first().click({ force: true });
// deleting the table through modal
cy.xpath(appPage.deleteButton).last().click({ force: true });
cy.xpath(appPage.confirmButton).click({ force: true });
cy.xpath(appPage.closeButton).click({ force: true });
});
// adding column to the table
cy.xpath(appPage.addColumn).click({ force: true });
cy.xpath(appPage.columnNamefield).should("be.visible");
cy.xpath(appPage.datatypefield).should("be.visible");
agHelper.GetNClick(appPage.addColumnName);
agHelper.TypeText(appPage.addColumnName + " " + locators._inputField, "ID");
agHelper.SelectFromDropDown("Varchar", "", 1);
// switching on the Primary Key toggle
cy.get(widgetsPage.switchWidgetInactive).first().click();
// switching on the Not Null toggle
cy.get(widgetsPage.switchWidgetInactive).last().click();
cy.xpath(appPage.submitButton).click({ force: true });
agHelper.AssertElementVisibility(appPage.addColumn);
cy.xpath(appPage.submitButton).first().click({ force: true });
assertHelper.AssertNetworkStatus("@postExecute");
cy.xpath(appPage.closeButton).click({ force: true });
cy.xpath(appPage.addNewtable).should("be.visible");
// viewing the table's columns by clicking on view button
cy.xpath(appPage.viewButton).first().click({ force: true });
// deleting the table through modal
cy.xpath(appPage.deleteButton).last().click({ force: true });
cy.xpath(appPage.confirmButton).click({ force: true });
cy.xpath(appPage.closeButton).click({ force: true });
});
});
},
);
2 changes: 1 addition & 1 deletion app/client/cypress/e2e/Regression/Apps/PromisesApp_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const commonlocators = require("../../../locators/commonlocators.json");

describe(
"Promises App tests",
{ tags: ["@tag.Widget", "@tag.JS"] },
{ tags: ["@tag.Widget", "@tag.JS", "@tag.Binding"] },
function () {
before(() => {
agHelper.AddDsl("promisesStoreValueDsl");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import EditorNavigation, {

describe(
"Creations via action selector should bind to the property",
{ tags: ["@tag.JS", "@tag.PropertyPane"] },
{ tags: ["@tag.JS", "@tag.PropertyPane", "@tag.Binding"] },
() => {
it.skip("binds newly created query / api to the button onClick", () => {
entityExplorer.DragDropWidgetNVerify(draggableWidgets.BUTTON);
Expand Down
Loading

0 comments on commit c4e4ce3

Please sign in to comment.