Merge branch 'main' into merge-back/2.6.0

pull/6507/head
Sherfin Shamsudeen 2023-05-23 16:00:10 +05:30
commit 0fbfd12bbe
34 zmienionych plików z 377 dodań i 231 usunięć

Wyświetl plik

@ -1 +1 @@
2.5.0
2.6.0

Wyświetl plik

@ -13,7 +13,7 @@ module.exports = defineConfig({
requestTimeout: 10000,
pageLoadTimeout: 20000,
responseTimeout: 10000,
viewportWidth: 1200,
viewportWidth: 1440,
viewportHeight: 960,
chromeWebSecurity: false,
trashAssetsBeforeRuns: true,
@ -76,22 +76,26 @@ module.exports = defineConfig({
experimentalRunAllSpecs: true,
baseUrl: "http://localhost:8082",
specPattern: [
// "cypress/e2e/selfHost/*.cy.js",
"cypress/e2e/selfHost/*.cy.js",
// "cypress/e2e/authentication/*.cy.js",
// "cypress/e2e/workspace/*.cy.js",
"cypress/e2e/editor/data-source/*.cy.js",
// "cypress/e2e/editor/app-version/version.cy.js",
// "cypress/e2e/exportImport/export.cy.js",
// "cypress/e2e/exportImport/import.cy.js",
// "cypress/e2e/database/database.cy.js",
// "cypress/e2e/editor/widget/*.cy.js",
// "cypress/e2e/editor/multipage/*.cy.js",
// "cypress/e2e/editor/data-source/*.cy.js",
"cypress/e2e/editor/app-version/version.cy.js",
"cypress/e2e/exportImport/export.cy.js",
"cypress/e2e/exportImport/import.cy.js",
"cypress/e2e/database/database.cy.js",
"cypress/e2e/editor/widget/*.cy.js",
"cypress/e2e/editor/multipage/*.cy.js",
],
numTestsKeptInMemory: 1,
redirectionLimit: 10,
redirectionLimit: 7,
experimentalRunAllSpecs: true,
experimentalMemoryManagement: true,
video: true,
video: false,
videoUploadOnPasses: false,
retries: {
runMode: 2,
openMode: 0,
},
},
});

Wyświetl plik

@ -1,11 +1,18 @@
import { fake } from "Fixtures/fake";
import { postgreSqlSelector } from "Selectors/postgreSql";
import { postgreSqlText } from "Texts/postgreSql";
import { bigqueryText } from "Texts/bigquery";
import { firestoreText } from "Texts/firestore";
import { commonSelectors } from "Selectors/common";
import {fillDataSourceTextField,selectDataSource} from "Support/utils/postgreSql";
import {
fillDataSourceTextField,
selectDataSource,
} from "Support/utils/postgreSql";
import { commonText } from "Texts/common";
import { closeDSModal,deleteDatasource } from "Support/utils/dataSource";
import { closeDSModal, deleteDatasource } from "Support/utils/dataSource";
const data = {};
data.lastName = fake.lastName.toLowerCase().replaceAll("[^A-Za-z]", "");
describe("Data source BigQuery", () => {
beforeEach(() => {
@ -15,7 +22,7 @@ describe("Data source BigQuery", () => {
it("Should verify elements on BigQuery connection form", () => {
cy.get(commonSelectors.globalDataSourceIcon).click();
closeDSModal()
closeDSModal();
cy.get(commonSelectors.addNewDataSourceButton)
.verifyVisibleElement("have.text", commonText.addNewDataSourceButton)
.click();
@ -93,7 +100,7 @@ describe("Data source BigQuery", () => {
cy.clearAndType(
'[data-cy="data-source-name-input-filed"]',
bigqueryText.cypressBigQuery
`cypress-${data.lastName}-bigquery`
);
fillDataSourceTextField(
@ -115,11 +122,10 @@ describe("Data source BigQuery", () => {
);
cy.get(commonSelectors.globalDataSourceIcon).click();
cy.get('[data-cy="cypress-bigquery-button"]').verifyVisibleElement(
"have.text",
bigqueryText.cypressBigQuery
);
cy.get(
`[data-cy="cypress-${data.lastName}-bigquery-button"]`
).verifyVisibleElement("have.text", `cypress-${data.lastName}-bigquery`);
deleteDatasource("cypress-bigquery");
deleteDatasource(`cypress-${data.lastName}-bigquery`);
});
});

Wyświetl plik

@ -1,9 +1,10 @@
import { fake } from "Fixtures/fake";
import { postgreSqlSelector } from "Selectors/postgreSql";
import { postgreSqlText } from "Texts/postgreSql";
import { commonWidgetText } from "Texts/common";
import { commonSelectors, commonWidgetSelector } from "Selectors/common";
import { commonText } from "Texts/common";
import { closeDSModal,deleteDatasource } from "Support/utils/dataSource";
import { closeDSModal, deleteDatasource } from "Support/utils/dataSource";
import {
addQuery,
fillDataSourceTextField,
@ -15,6 +16,9 @@ import {
addWidgetsToAddUser,
} from "Support/utils/postgreSql";
const data = {};
data.lastName = fake.lastName.toLowerCase().replaceAll("[^A-Za-z]", "");
describe("Data sources", () => {
beforeEach(() => {
cy.appUILogin();
@ -22,7 +26,7 @@ describe("Data sources", () => {
it("Should verify elements on connection form", () => {
cy.get(commonSelectors.globalDataSourceIcon).click();
closeDSModal()
closeDSModal();
cy.get(commonSelectors.addNewDataSourceButton)
.verifyVisibleElement("have.text", commonText.addNewDataSourceButton)
.click();
@ -129,7 +133,7 @@ describe("Data sources", () => {
cy.clearAndType(
'[data-cy="data-source-name-input-filed"]',
"cypress-clickhouse"
`cypress-${data.lastName}-clickhouse`
);
fillDataSourceTextField(
@ -165,10 +169,9 @@ describe("Data sources", () => {
postgreSqlText.toastDSAdded
);
cy.get('[data-cy="cypress-clickhouse-button"]').verifyVisibleElement(
"have.text",
"cypress-clickhouse"
);
deleteDatasource("cypress-clickhouse");
cy.get(
`[data-cy="cypress-${data.lastName}-clickhouse-button"]`
).verifyVisibleElement("have.text", `cypress-${data.lastName}-clickhouse`);
deleteDatasource(`cypress-${data.lastName}-clickhouse`);
});
});

Wyświetl plik

@ -1,9 +1,10 @@
import { fake } from "Fixtures/fake";
import { postgreSqlSelector } from "Selectors/postgreSql";
import { postgreSqlText } from "Texts/postgreSql";
import { commonWidgetText } from "Texts/common";
import { commonSelectors, commonWidgetSelector } from "Selectors/common";
import { commonText } from "Texts/common";
import { closeDSModal,deleteDatasource } from "Support/utils/dataSource";
import { closeDSModal, deleteDatasource } from "Support/utils/dataSource";
import {
addQuery,
fillDataSourceTextField,
@ -15,6 +16,9 @@ import {
addWidgetsToAddUser,
} from "Support/utils/postgreSql";
const data = {};
data.lastName = fake.lastName.toLowerCase().replaceAll("[^A-Za-z]", "");
describe("Data sources", () => {
beforeEach(() => {
cy.appUILogin();
@ -22,10 +26,10 @@ describe("Data sources", () => {
it("Should verify elements on connection form", () => {
cy.get(commonSelectors.globalDataSourceIcon).click();
closeDSModal()
closeDSModal();
cy.get(commonSelectors.addNewDataSourceButton)
.verifyVisibleElement("have.text", commonText.addNewDataSourceButton)
.click();
.verifyVisibleElement("have.text", commonText.addNewDataSourceButton)
.click();
cy.get(postgreSqlSelector.allDatasourceLabelAndCount).should(
"have.text",
postgreSqlText.allDataSources
@ -94,7 +98,7 @@ describe("Data sources", () => {
selectDataSource("CosmosDB");
cy.clearAndType(
'[data-cy="data-source-name-input-filed"]',
"cypress-cosmosdb"
`cypress-${data.lastName}-cosmosdb`
);
fillDataSourceTextField(
@ -119,10 +123,9 @@ describe("Data sources", () => {
postgreSqlText.toastDSAdded
);
cy.get('[data-cy="cypress-cosmosdb-button"]').verifyVisibleElement(
"have.text",
"cypress-cosmosdb"
);
deleteDatasource("cypress-cosmosdb");
cy.get(
`[data-cy="cypress-${data.lastName}-cosmosdb-button"]`
).verifyVisibleElement("have.text", `cypress-${data.lastName}-cosmosdb`);
deleteDatasource(`cypress-${data.lastName}-cosmosdb`);
});
});

Wyświetl plik

@ -1,9 +1,10 @@
import { fake } from "Fixtures/fake";
import { postgreSqlSelector } from "Selectors/postgreSql";
import { postgreSqlText } from "Texts/postgreSql";
import { commonWidgetText } from "Texts/common";
import { commonSelectors, commonWidgetSelector } from "Selectors/common";
import { commonText } from "Texts/common";
import { closeDSModal,deleteDatasource } from "Support/utils/dataSource";
import { closeDSModal, deleteDatasource } from "Support/utils/dataSource";
import {
addQuery,
@ -16,6 +17,9 @@ import {
addWidgetsToAddUser,
} from "Support/utils/postgreSql";
const data = {};
data.lastName = fake.lastName.toLowerCase().replaceAll("[^A-Za-z]", "");
describe("Data sources", () => {
beforeEach(() => {
cy.appUILogin();
@ -116,7 +120,7 @@ describe("Data sources", () => {
cy.clearAndType(
'[data-cy="data-source-name-input-filed"]',
"cypress-couchDb"
`cypress-${data.lastName}-couchdb`
);
fillDataSourceTextField(
@ -135,9 +139,7 @@ describe("Data sources", () => {
"username for couchDB",
Cypress.env("couchdb_user")
);
cy.get(".react-select__input-container").type(
"HTTP{enter}"
);
cy.get(".react-select__input-container").type("HTTP{enter}");
cy.get(postgreSqlSelector.passwordTextField).type(
Cypress.env("couchdb_password"),
@ -155,10 +157,9 @@ describe("Data sources", () => {
postgreSqlText.toastDSAdded
);
cy.get('[data-cy="cypress-couchdb-button"]').verifyVisibleElement(
"have.text",
"cypress-couchDb"
);
deleteDatasource("cypress-couchdb");
cy.get(
`[data-cy="cypress-${data.lastName}-couchdb-button"]`
).verifyVisibleElement("have.text", `cypress-${data.lastName}-couchdb`);
deleteDatasource(`cypress-${data.lastName}-couchdb`);
});
});

Wyświetl plik

@ -1,3 +1,4 @@
import { fake } from "Fixtures/fake";
import { postgreSqlSelector } from "Selectors/postgreSql";
import { postgreSqlText } from "Texts/postgreSql";
import { dynamoDbText } from "Texts/dynamodb";
@ -14,6 +15,9 @@ import {
deleteDatasource,
} from "Support/utils/dataSource";
const data = {};
data.lastName = fake.lastName.toLowerCase().replaceAll("[^A-Za-z]", "");
describe("Data source DynamoDB", () => {
beforeEach(() => {
cy.appUILogin();
@ -106,7 +110,7 @@ describe("Data source DynamoDB", () => {
cy.clearAndType(
postgreSqlSelector.dataSourceNameInputField,
dynamoDbText.cypressDynamoDb
`cypress-${data.lastName}-dynamodb`
);
cy.get('[data-cy="label-region"]')
@ -159,11 +163,10 @@ describe("Data source DynamoDB", () => {
postgreSqlText.toastDSAdded
);
cy.get('[data-cy="cypress-dynamodb-button"]').verifyVisibleElement(
"have.text",
dynamoDbText.cypressDynamoDb
);
cy.get(
`[data-cy="cypress-${data.lastName}-dynamodb-button"]`
).verifyVisibleElement("have.text", `cypress-${data.lastName}-dynamodb`);
deleteDatasource("cypress-dynamodb");
deleteDatasource(`cypress-${data.lastName}-dynamodb`);
});
});

Wyświetl plik

@ -1,3 +1,4 @@
import { fake } from "Fixtures/fake";
import { postgreSqlSelector } from "Selectors/postgreSql";
import { postgreSqlText } from "Texts/postgreSql";
import { elasticsearchText } from "Texts/elasticsearch";
@ -7,7 +8,14 @@ import {
fillDataSourceTextField,
selectDataSource,
} from "Support/utils/postgreSql";
import { verifyCouldnotConnectWithAlert,deleteDatasource,closeDSModal } from "Support/utils/dataSource";
import {
verifyCouldnotConnectWithAlert,
deleteDatasource,
closeDSModal,
} from "Support/utils/dataSource";
const data = {};
data.lastName = fake.lastName.toLowerCase().replaceAll("[^A-Za-z]", "");
describe("Data source Elasticsearch", () => {
beforeEach(() => {
@ -112,7 +120,7 @@ describe("Data source Elasticsearch", () => {
cy.clearAndType(
postgreSqlSelector.dataSourceNameInputField,
elasticsearchText.cypressElasticsearch
`cypress-${data.lastName}-elasticsearch`
);
fillDataSourceTextField(
@ -181,11 +189,13 @@ describe("Data source Elasticsearch", () => {
postgreSqlText.toastDSAdded
);
cy.get('[data-cy="cypress-elasticsearch-button"]').verifyVisibleElement(
"have.text",
elasticsearchText.cypressElasticsearch
);
deleteDatasource("cypress-elasticsearch");
cy.get(
`[data-cy="cypress-${data.lastName}-elasticsearch-button"]`
).verifyVisibleElement(
"have.text",
`cypress-${data.lastName}-elasticsearch`
);
deleteDatasource(`cypress-${data.lastName}-elasticsearch`);
});
});

Wyświetl plik

@ -1,14 +1,20 @@
import { fake } from "Fixtures/fake";
import { postgreSqlSelector } from "Selectors/postgreSql";
import { postgreSqlText } from "Texts/postgreSql";
import { firestoreText } from "Texts/firestore";
import { commonSelectors } from "Selectors/common";
import { commonText } from "Texts/common";
import { verifyCouldnotConnectWithAlert,deleteDatasource,closeDSModal } from "Support/utils/dataSource";
import {
verifyCouldnotConnectWithAlert,
deleteDatasource,
closeDSModal,
} from "Support/utils/dataSource";
import {
fillDataSourceTextField,
selectDataSource,
} from "Support/utils/postgreSql";
const data = {};
data.lastName = fake.lastName.toLowerCase().replaceAll("[^A-Za-z]", "");
describe("Data source Firestore", () => {
beforeEach(() => {
@ -95,7 +101,7 @@ describe("Data source Firestore", () => {
cy.clearAndType(
'[data-cy="data-source-name-input-filed"]',
firestoreText.cypressFirestore
`cypress-${data.lastName}-firestore`
);
fillDataSourceTextField(
@ -116,11 +122,10 @@ describe("Data source Firestore", () => {
postgreSqlText.toastDSAdded
);
cy.get('[data-cy="cypress-firestore-button"]').verifyVisibleElement(
"have.text",
firestoreText.cypressFirestore
);
deleteDatasource("cypress-firestore");
cy.get(
`[data-cy="cypress-${data.lastName}-firestore-button"]`
).verifyVisibleElement("have.text", `cypress-${data.lastName}-firestore`);
deleteDatasource(`cypress-${data.lastName}-firestore`);
});
});

Wyświetl plik

@ -1,3 +1,4 @@
import { fake } from "Fixtures/fake";
import { postgreSqlSelector } from "Selectors/postgreSql";
import { postgreSqlText } from "Texts/postgreSql";
import { commonWidgetText, commonText } from "Texts/common";
@ -12,7 +13,14 @@ import {
addGuiQuery,
addWidgetsToAddUser,
} from "Support/utils/postgreSql";
import { verifyCouldnotConnectWithAlert,deleteDatasource,closeDSModal } from "Support/utils/dataSource";
import {
verifyCouldnotConnectWithAlert,
deleteDatasource,
closeDSModal,
} from "Support/utils/dataSource";
const data = {};
data.lastName = fake.lastName.toLowerCase().replaceAll("[^A-Za-z]", "");
describe("Data sources", () => {
beforeEach(() => {
@ -105,10 +113,11 @@ describe("Data sources", () => {
cy.clearAndType(
'[data-cy="data-source-name-input-filed"]',
"cypress-influxdb"
`cypress-${data.lastName}-influxdb`
);
cy.clearAndType('[data-cy="api-token-text-field"]',
cy.clearAndType(
'[data-cy="api-token-text-field"]',
Cypress.env("influxdb_token")
);
@ -118,9 +127,7 @@ describe("Data sources", () => {
Cypress.env("influxdb_host")
);
fillDataSourceTextField(postgreSqlText.labelPort, "8086 ", "8086");
cy.get(".react-select__input-container")
.click()
.type("HTTP{enter}");
cy.get(".react-select__input-container").click().type("HTTP{enter}");
cy.get(postgreSqlSelector.buttonTestConnection).click();
cy.get(postgreSqlSelector.textConnectionVerified, {
@ -133,11 +140,10 @@ describe("Data sources", () => {
postgreSqlText.toastDSAdded
);
cy.get('[data-cy="cypress-influxdb-button"]').verifyVisibleElement(
"have.text",
"cypress-influxdb"
);
deleteDatasource("cypress-influxdb");
cy.get(
`[data-cy="cypress-${data.lastName}-influxdb-button"]`
).verifyVisibleElement("have.text", `cypress-${data.lastName}-influxdb`);
deleteDatasource(`cypress-${data.lastName}-influxdb`);
});
});

Wyświetl plik

@ -1,3 +1,4 @@
import { fake } from "Fixtures/fake";
import { postgreSqlSelector } from "Selectors/postgreSql";
import { postgreSqlText } from "Texts/postgreSql";
import { mongoDbText } from "Texts/mongoDb";
@ -22,6 +23,9 @@ import {
addInput,
} from "Support/utils/dataSource";
const data = {};
data.lastName = fake.lastName.toLowerCase().replaceAll("[^A-Za-z]", "");
describe("Data source MongoDB", () => {
beforeEach(() => {
cy.appUILogin();
@ -162,7 +166,7 @@ describe("Data source MongoDB", () => {
cy.clearAndType(
'[data-cy="data-source-name-input-filed"]',
mongoDbText.cypressMongoDb
`cypress-${data.lastName}-mongodb`
);
cy.get('[data-cy="query-select-dropdown"]').type(
@ -187,20 +191,12 @@ describe("Data source MongoDB", () => {
postgreSqlText.toastDSAdded
);
cy.get(postgreSqlSelector.datasourceLabelOnList)
.should("have.text", mongoDbText.cypressMongoDb)
.find("button")
.invoke("show")
.should("be.visible");
cy.get(commonSelectors.globalDataSourceIcon).click();
cy.get(
`[data-cy="cypress-${data.lastName}-mongodb-button"]`
).verifyVisibleElement("have.text", `cypress-${data.lastName}-mongodb`);
cy.get(commonSelectors.globalDataSourceIcon).click();
cy.get('[data-cy="cypress-mongodb-button"]').verifyVisibleElement(
"have.text",
mongoDbText.cypressMongoDb
);
deleteDatasource("cypress-mongodb");
deleteDatasource(`cypress-${data.lastName}-mongodb`);
});
it.skip("Should verify the queries of MongoDB.", () => {

Wyświetl plik

@ -1,3 +1,4 @@
import { fake } from "Fixtures/fake";
import { postgreSqlSelector } from "Selectors/postgreSql";
import { postgreSqlText } from "Texts/postgreSql";
import { mySqlText } from "Texts/mysql";
@ -13,9 +14,16 @@ import {
addGuiQuery,
addWidgetsToAddUser,
} from "Support/utils/postgreSql";
import { closeDSModal, deleteDatasource, verifyCouldnotConnectWithAlert } from "Support/utils/dataSource";
import {
closeDSModal,
deleteDatasource,
verifyCouldnotConnectWithAlert,
} from "Support/utils/dataSource";
import { realHover } from "cypress-real-events/commands/realHover";
const data = {};
data.lastName = fake.lastName.toLowerCase().replaceAll("[^A-Za-z]", "");
describe("Data sources MySql", () => {
beforeEach(() => {
cy.appUILogin();
@ -23,9 +31,10 @@ describe("Data sources MySql", () => {
it("Should verify elements on MySQL connection form", () => {
cy.get(commonSelectors.globalDataSourceIcon).click();
closeDSModal()
cy.get(commonSelectors.addNewDataSourceButton).verifyVisibleElement(
"have.text", commonText.addNewDataSourceButton).click();
closeDSModal();
cy.get(commonSelectors.addNewDataSourceButton)
.verifyVisibleElement("have.text", commonText.addNewDataSourceButton)
.click();
cy.get(postgreSqlSelector.allDatasourceLabelAndCount).should(
"have.text",
@ -108,7 +117,7 @@ describe("Data sources MySql", () => {
cy.clearAndType(
'[data-cy="data-source-name-input-filed"]',
mySqlText.cypressMySql
`cypress-${data.lastName}-mysql`
);
fillDataSourceTextField(
@ -149,7 +158,9 @@ describe("Data sources MySql", () => {
"admin1"
);
cy.get(postgreSqlSelector.buttonTestConnection).click();
verifyCouldnotConnectWithAlert('ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by server; consider upgrading MySQL client');
verifyCouldnotConnectWithAlert(
"ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by server; consider upgrading MySQL client"
);
fillDataSourceTextField(
postgreSqlText.labelUserName,
@ -159,9 +170,12 @@ describe("Data sources MySql", () => {
cy.get(postgreSqlSelector.passwordTextField).type("testpassword");
cy.get(postgreSqlSelector.buttonTestConnection).click();
verifyCouldnotConnectWithAlert("ER_ACCESS_DENIED_ERROR: Access denied for user 'root'@'103.171.99.42' (using password: YES)");
verifyCouldnotConnectWithAlert(
"ER_ACCESS_DENIED_ERROR: Access denied for user 'root'@'103.171.99.42' (using password: YES)"
);
cy.get(postgreSqlSelector.passwordTextField).type(
`{selectAll}{backspace}${Cypress.env("mysql_password")}`, {log:false}
`{selectAll}{backspace}${Cypress.env("mysql_password")}`,
{ log: false }
);
cy.get(postgreSqlSelector.buttonTestConnection).click();
@ -175,17 +189,16 @@ describe("Data sources MySql", () => {
postgreSqlText.toastDSAdded
);
cy.get(commonSelectors.globalDataSourceIcon).click();
cy.get('[data-cy="cypress-mysql-button"]').verifyVisibleElement(
"have.text",
mySqlText.cypressMySql
);
deleteDatasource("cypress-mysql");
cy.get(commonSelectors.globalDataSourceIcon).click();
cy.get(
`[data-cy="cypress-${data.lastName}-mysql-button"]`
).verifyVisibleElement("have.text", `cypress-${data.lastName}-mysql`);
deleteDatasource(`cypress-${data.lastName}-mysql`);
});
it.skip("Should verify elements of the Query section.", () => {
cy.viewport(1200, 1300)
cy.viewport(1200, 1300);
selectDataSource("MySQL");
fillConnectionForm({
Host: Cypress.env("mysql_host"),
@ -239,7 +252,7 @@ describe("Data sources MySql", () => {
cy.get(`${postgreSqlSelector.querySelectDropdown}:eq(0)`)
.scrollIntoView()
.should("be.visible")
.click()
.click();
cy.contains("[id*=react-select-]", postgreSqlText.queryModeSql).should(
"have.text",
postgreSqlText.queryModeSql
@ -252,17 +265,16 @@ describe("Data sources MySql", () => {
cy.get(postgreSqlSelector.queryCreateAndRunButton)
.should("be.visible")
.click();
// cy.get('[data-cy="list-query-mysql1"]').should("be.visible").click();
// cy.get('[data-cy="list-query-mysql1"]').should("be.visible").click();
cy.get(postgreSqlSelector.labelTransformation)
.scrollIntoView()
.verifyVisibleElement("have.text", postgreSqlText.headerTransformations);
cy.wait(200)
cy.wait(200);
cy.get(postgreSqlSelector.toggleTransformation).parent().click();
cy.get(postgreSqlSelector.inputFieldTransformation).should("be.visible");
cy.get(postgreSqlSelector.toggleTransformation).parent().click();
cy.get(postgreSqlSelector.headerQueryPreview).verifyVisibleElement(
"have.text",
postgreSqlText.buttonLabelPreview
@ -296,7 +308,7 @@ describe("Data sources MySql", () => {
);
cy.get('[data-cy="label-records"]').verifyVisibleElement(
"have.text",
'Records'
"Records"
);
// cy.get(postgreSqlSelector.queryTabAdvanced)
@ -333,8 +345,15 @@ describe("Data sources MySql", () => {
postgreSqlText.labelNoEventhandler
);
cy.get('[data-cy="list-query-mysql1"]').verifyVisibleElement('have.text', 'mysql1');
cy.get('[class="row query-row query-row-selected"]').realHover().then(()=>{cy.get('[data-cy="delete-query-mysql1"]').click()})
cy.get('[data-cy="list-query-mysql1"]').verifyVisibleElement(
"have.text",
"mysql1"
);
cy.get('[class="row query-row query-row-selected"]')
.realHover()
.then(() => {
cy.get('[data-cy="delete-query-mysql1"]').click();
});
cy.get(postgreSqlSelector.deleteModalMessage).verifyVisibleElement(
"have.text",
postgreSqlText.dialogueTextDelete
@ -349,8 +368,8 @@ describe("Data sources MySql", () => {
});
it.skip("Should verify CRUD operations on SQL Query.", () => {
let dbName ='7mmplik'
selectDataSource('MySQL');
let dbName = "7mmplik";
selectDataSource("MySQL");
cy.clearAndType(
postgreSqlSelector.dataSourceNameInputField,
@ -393,7 +412,7 @@ describe("Data sources MySql", () => {
.should("be.visible", { timeout: 3000 })
.click();
cy.get('.p-3').should(
cy.get(".p-3").should(
"have.text",
`[{"Tables_in_testdb (${dbName})":"${dbName}"}]`
);
@ -413,27 +432,23 @@ describe("Data sources MySql", () => {
cy.get(postgreSqlSelector.queryPreviewButton).click();
cy.get('[class="tab-pane active"]', { timeout: 3000 }).should("be.visible");
cy.get(postgreSqlSelector.previewTabRaw).click();
cy.get('[class="tab-pane active"]').should("have.text", `{"fieldCount":0,"affectedRows":0,"insertId":0,"serverStatus":2,"warningCount":0,"message":"","protocol41":true,"changedRows":0}`);
addQuery(
"drop_table",
`DROP TABLE ${dbName}`,
mySqlText.cypressMySql
cy.get('[class="tab-pane active"]').should(
"have.text",
`{"fieldCount":0,"affectedRows":0,"insertId":0,"serverStatus":2,"warningCount":0,"message":"","protocol41":true,"changedRows":0}`
);
addQuery("drop_table", `DROP TABLE ${dbName}`, mySqlText.cypressMySql);
cy.get('[data-cy="list-query-existance_of_table"]').click();
cy.get(postgreSqlSelector.queryPreviewButton).click();
cy.get('[class="tab-pane active"]', { timeout: 3000 }).should("be.visible");
cy.get(postgreSqlSelector.previewTabRaw).click();
cy.get('[class="tab-pane active"]').should(
"have.text",
'[]'
);
cy.get('[class="tab-pane active"]').should("have.text", "[]");
// addWidgetsToAddUser();
});
it.skip("Should verify bulk update", () => {
selectDataSource('MySQL');
selectDataSource("MySQL");
cy.clearAndType(
postgreSqlSelector.dataSourceNameInputField,
mySqlText.cypressMySql
@ -448,19 +463,8 @@ describe("Data sources MySql", () => {
openQueryEditor(mySqlText.cypressMySql);
cy.get('[class="query-pane"]').invoke("css", "height", "calc(85%)");
selectQueryMode(postgreSqlText.queryModeGui,);
selectQueryMode(postgreSqlText.queryModeGui);
addGuiQuery("name", "email");
cy.get(postgreSqlSelector.queryCreateAndRunButton).click();
});
});

Wyświetl plik

@ -1,3 +1,4 @@
import { fake } from "Fixtures/fake";
import { postgreSqlSelector } from "Selectors/postgreSql";
import { postgreSqlText } from "Texts/postgreSql";
import { commonWidgetText, commonText } from "Texts/common";
@ -14,6 +15,9 @@ import {
} from "Support/utils/postgreSql";
import { deleteDatasource } from "Support/utils/dataSource";
const data = {};
data.lastName = fake.lastName.toLowerCase().replaceAll("[^A-Za-z]", "");
describe("Data sources", () => {
beforeEach(() => {
cy.appUILogin();
@ -117,7 +121,7 @@ describe("Data sources", () => {
cy.clearAndType(
'[data-cy="data-source-name-input-filed"]',
postgreSqlText.psqlName
`cypress-${data.lastName}-postgresql`
);
fillDataSourceTextField(
@ -157,13 +161,12 @@ describe("Data sources", () => {
postgreSqlText.toastDSAdded
);
cy.get(commonSelectors.globalDataSourceIcon).click();
cy.get('[data-cy="cypress-postgresql-button"]').verifyVisibleElement(
"have.text",
postgreSqlText.psqlName
);
deleteDatasource("cypress-postgresql");
cy.get(commonSelectors.globalDataSourceIcon).click();
cy.get(
`[data-cy="cypress-${data.lastName}-postgresql-button"]`
).verifyVisibleElement("have.text", `cypress-${data.lastName}-postgresql`);
deleteDatasource(`cypress-${data.lastName}-postgresql`);
});
it.skip("Should verify elements of the Query section.", () => {

Wyświetl plik

@ -1,3 +1,4 @@
import { fake } from "Fixtures/fake";
import { postgreSqlSelector } from "Selectors/postgreSql";
import { postgreSqlText } from "Texts/postgreSql";
import { redisText } from "Texts/redis";
@ -7,7 +8,14 @@ import {
fillDataSourceTextField,
selectDataSource,
} from "Support/utils/postgreSql";
import { verifyCouldnotConnectWithAlert ,deleteDatasource, closeDSModal } from "Support/utils/dataSource";
import {
verifyCouldnotConnectWithAlert,
deleteDatasource,
closeDSModal,
} from "Support/utils/dataSource";
const data = {};
data.lastName = fake.lastName.toLowerCase().replaceAll("[^A-Za-z]", "");
describe("Data source Redis", () => {
beforeEach(() => {
@ -16,7 +24,7 @@ describe("Data source Redis", () => {
it("Should verify elements on connecti Redison form", () => {
cy.get(commonSelectors.globalDataSourceIcon).click();
closeDSModal()
closeDSModal();
cy.get(commonSelectors.addNewDataSourceButton)
.verifyVisibleElement("have.text", commonText.addNewDataSourceButton)
.click();
@ -92,14 +100,17 @@ describe("Data source Redis", () => {
"have.text",
postgreSqlText.buttonTextSave
);
cy.get('[data-cy="connection-alert-text"]').should("have.text",redisText.errorMaxRetries);
cy.get('[data-cy="connection-alert-text"]').should(
"have.text",
redisText.errorMaxRetries
);
});
it("Should verify the functionality of Redis connection form.", () => {
selectDataSource(redisText.redis);
cy.clearAndType(
'[data-cy="data-source-name-input-filed"]',
redisText.cypressRedis
`cypress-${data.lastName}-redis`
);
fillDataSourceTextField(
@ -113,7 +124,6 @@ describe("Data source Redis", () => {
Cypress.env("redis_port")
);
fillDataSourceTextField(
postgreSqlText.labelUserName,
postgreSqlText.placeholderEnterUserName,
@ -124,7 +134,10 @@ describe("Data source Redis", () => {
);
cy.get(postgreSqlSelector.buttonTestConnection).click();
cy.get('[data-cy="connection-alert-text"]').should("have.text", "WRONGPASS invalid username-password pair or user is disabled.");
cy.get('[data-cy="connection-alert-text"]').should(
"have.text",
"WRONGPASS invalid username-password pair or user is disabled."
);
fillDataSourceTextField(
postgreSqlText.labelHost,
postgreSqlText.placeholderEnterHost,
@ -136,7 +149,10 @@ describe("Data source Redis", () => {
"108299"
);
cy.get(postgreSqlSelector.buttonTestConnection).click();
cy.get('[data-cy="connection-alert-text"]').should("have.text", redisText.errorPort);
cy.get('[data-cy="connection-alert-text"]').should(
"have.text",
redisText.errorPort
);
fillDataSourceTextField(
postgreSqlText.labelPort,
@ -147,7 +163,10 @@ describe("Data source Redis", () => {
`{selectAll}{backspace}"redis_password"`
);
cy.get(postgreSqlSelector.buttonTestConnection).click();
cy.get('[data-cy="connection-alert-text"]').should("have.text", "WRONGPASS invalid username-password pair or user is disabled.");
cy.get('[data-cy="connection-alert-text"]').should(
"have.text",
"WRONGPASS invalid username-password pair or user is disabled."
);
cy.get(postgreSqlSelector.passwordTextField).type(
`{selectAll}{backspace}${Cypress.env("redis_password")}`
@ -158,7 +177,10 @@ describe("Data source Redis", () => {
"redis"
);
cy.get(postgreSqlSelector.buttonTestConnection).click();
cy.get('[data-cy="connection-alert-text"]').should("have.text", "WRONGPASS invalid username-password pair or user is disabled.");
cy.get('[data-cy="connection-alert-text"]').should(
"have.text",
"WRONGPASS invalid username-password pair or user is disabled."
);
fillDataSourceTextField(
postgreSqlText.labelUserName,
@ -176,12 +198,11 @@ describe("Data source Redis", () => {
postgreSqlText.toastDSAdded
);
cy.get(commonSelectors.globalDataSourceIcon).click();
cy.get('[data-cy="cypress-redis-button"]').verifyVisibleElement(
"have.text",
redisText.cypressRedis
);
deleteDatasource("cypress-redis");
cy.get(commonSelectors.globalDataSourceIcon).click();
cy.get(
`[data-cy="cypress-${data.lastName}-redis-button"]`
).verifyVisibleElement("have.text", `cypress-${data.lastName}-redis`);
deleteDatasource(`cypress-${data.lastName}-redis`);
});
});

Wyświetl plik

@ -1,3 +1,4 @@
import { fake } from "Fixtures/fake";
import { postgreSqlSelector } from "Selectors/postgreSql";
import { s3Selector } from "Selectors/awss3";
import { postgreSqlText } from "Texts/postgreSql";
@ -8,7 +9,15 @@ import {
fillDataSourceTextField,
selectDataSource,
} from "Support/utils/postgreSql";
import { verifyCouldnotConnectWithAlert, deleteDatasource, closeDSModal } from "Support/utils/dataSource";
import {
verifyCouldnotConnectWithAlert,
deleteDatasource,
closeDSModal,
} from "Support/utils/dataSource";
const data = {};
data.lastName = fake.lastName.toLowerCase().replaceAll("[^A-Za-z]", "");
describe("Data sources AWS S3", () => {
beforeEach(() => {
cy.appUILogin();
@ -21,7 +30,6 @@ describe("Data sources AWS S3", () => {
.verifyVisibleElement("have.text", commonText.addNewDataSourceButton)
.click();
cy.get(postgreSqlSelector.allDatasourceLabelAndCount).should(
"have.text",
postgreSqlText.allDataSources
@ -91,13 +99,19 @@ describe("Data sources AWS S3", () => {
"have.text",
postgreSqlText.buttonTextSave
);
cy.get('[data-cy="connection-alert-text"]').should("have.text",s3Text.alertRegionIsMissing);
cy.get('[data-cy="connection-alert-text"]').should(
"have.text",
s3Text.alertRegionIsMissing
);
});
it("Should verify the functionality of AWS S3 connection form.", () => {
selectDataSource(s3Text.awsS3);
cy.clearAndType(s3Selector.dataSourceNameInput, s3Text.cypressAwsS3);
cy.clearAndType(
s3Selector.dataSourceNameInput,
`cypress-${data.lastName}-aws-s3`
);
fillDataSourceTextField(
s3Text.accessKey,
@ -106,7 +120,10 @@ describe("Data sources AWS S3", () => {
);
cy.get(postgreSqlSelector.buttonTestConnection).click();
cy.get('[data-cy="connection-alert-text"]').should("have.text",s3Text.alertRegionIsMissing);
cy.get('[data-cy="connection-alert-text"]').should(
"have.text",
s3Text.alertRegionIsMissing
);
fillDataSourceTextField(
"Secret key",
@ -129,7 +146,10 @@ describe("Data sources AWS S3", () => {
.click();
cy.get(postgreSqlSelector.buttonTestConnection).click();
cy.get('[data-cy="connection-alert-text"]').should("have.text",s3Text.alertInvalidUrl);
cy.get('[data-cy="connection-alert-text"]').should(
"have.text",
s3Text.alertInvalidUrl
);
cy.get(s3Selector.customEndpointLabel)
.verifyVisibleElement("have.text", s3Text.customEndpoint)
.parent()
@ -144,7 +164,10 @@ describe("Data sources AWS S3", () => {
);
cy.get(postgreSqlSelector.buttonTestConnection).click();
cy.get('[data-cy="connection-alert-text"]').should("have.text",s3Text.accessKeyError);
cy.get('[data-cy="connection-alert-text"]').should(
"have.text",
s3Text.accessKeyError
);
fillDataSourceTextField(
s3Text.accessKey,
@ -160,7 +183,10 @@ describe("Data sources AWS S3", () => {
cy.get(postgreSqlSelector.buttonTestConnection).click();
cy.get('[data-cy="connection-alert-text"]').should("have.text",s3Text.sinatureError);
cy.get('[data-cy="connection-alert-text"]').should(
"have.text",
s3Text.sinatureError
);
cy.get(postgreSqlSelector.buttonSave).click();
cy.verifyToastMessage(
@ -168,11 +194,10 @@ describe("Data sources AWS S3", () => {
postgreSqlText.toastDSAdded
);
cy.get(commonSelectors.globalDataSourceIcon).click();
cy.get('[data-cy="cypress-aws-s3-button"]').verifyVisibleElement(
"have.text",
s3Text.cypressAwsS3
);
deleteDatasource("cypress-aws-s3");
cy.get(commonSelectors.globalDataSourceIcon).click();
cy.get(
`[data-cy="cypress-${data.lastName}-aws-s3-button"]`
).verifyVisibleElement("have.text", `cypress-${data.lastName}-aws-s3`);
deleteDatasource(`cypress-${data.lastName}-aws-s3`);
});
});

Wyświetl plik

@ -1,3 +1,4 @@
import { fake } from "Fixtures/fake";
import { postgreSqlSelector } from "Selectors/postgreSql";
import { postgreSqlText } from "Texts/postgreSql";
import { commonSelectors } from "Selectors/common";
@ -8,6 +9,9 @@ import {
} from "Support/utils/postgreSql";
import { deleteDatasource, closeDSModal } from "Support/utils/dataSource";
const data = {};
data.lastName = fake.lastName.toLowerCase().replaceAll("[^A-Za-z]", "");
describe("Data source SMTP", () => {
beforeEach(() => {
cy.appUILogin();
@ -97,7 +101,7 @@ describe("Data source SMTP", () => {
cy.clearAndType(
postgreSqlSelector.dataSourceNameInputField,
"cypress-smtp"
`cypress-${data.lastName}-smtp`
);
fillDataSourceTextField(
@ -134,11 +138,10 @@ describe("Data source SMTP", () => {
postgreSqlText.toastDSAdded
);
cy.get(commonSelectors.globalDataSourceIcon).click();
cy.get('[data-cy="cypress-smtp-button"]').verifyVisibleElement(
"have.text",
"cypress-smtp"
);
deleteDatasource("cypress-smtp");
cy.get(commonSelectors.globalDataSourceIcon).click();
cy.get(
`[data-cy="cypress-${data.lastName}-smtp-button"]`
).verifyVisibleElement("have.text", `cypress-${data.lastName}-smtp`);
deleteDatasource(`cypress-${data.lastName}-smtp`);
});
});

Wyświetl plik

@ -1,8 +1,9 @@
import { fake } from "Fixtures/fake";
import { postgreSqlSelector } from "Selectors/postgreSql";
import { postgreSqlText } from "Texts/postgreSql";
import { commonWidgetText, commonText } from "Texts/common";
import { commonSelectors, commonWidgetSelector } from "Selectors/common";
import { closeDSModal,deleteDatasource } from "Support/utils/dataSource";
import { closeDSModal, deleteDatasource } from "Support/utils/dataSource";
import {
addQuery,
@ -20,6 +21,9 @@ describe("Data sources", () => {
cy.appUILogin();
});
const data = {};
data.lastName = fake.lastName.toLowerCase().replaceAll("[^A-Za-z]", "");
it("Should verify elements on connection form", () => {
cy.get(commonSelectors.globalDataSourceIcon).click();
closeDSModal();
@ -27,7 +31,6 @@ describe("Data sources", () => {
.verifyVisibleElement("have.text", commonText.addNewDataSourceButton)
.click();
cy.get(postgreSqlSelector.allDatasourceLabelAndCount).should(
"have.text",
postgreSqlText.allDataSources
@ -109,7 +112,7 @@ describe("Data sources", () => {
"have.text",
postgreSqlText.buttonTextSave
);
cy.get('[data-cy="connection-alert-text"]').should(
cy.get('[data-cy="connection-alert-text"]').should(
"have.text",
"A user name must be specified."
);
@ -120,7 +123,7 @@ describe("Data sources", () => {
cy.clearAndType(
'[data-cy="data-source-name-input-filed"]',
"cypress-snowflake"
`cypress-${data.lastName}-snowflake`
);
fillDataSourceTextField(
@ -161,12 +164,11 @@ describe("Data sources", () => {
postgreSqlText.toastDSAdded
);
cy.get(commonSelectors.globalDataSourceIcon).click();
cy.get('[data-cy="cypress-snowflake-button"]').verifyVisibleElement(
"have.text",
"cypress-snowflake"
);
deleteDatasource("cypress-snowflake");
cy.get(commonSelectors.globalDataSourceIcon).click();
cy.get(
`[data-cy="cypress-${data.lastName}-snowflake-button"]`
).verifyVisibleElement("have.text", `cypress-${data.lastName}-snowflake`);
deleteDatasource(`cypress-${data.lastName}-snowflake`);
});
});

Wyświetl plik

@ -1,8 +1,9 @@
import { fake } from "Fixtures/fake";
import { postgreSqlSelector } from "Selectors/postgreSql";
import { postgreSqlText } from "Texts/postgreSql";
import { commonWidgetText, commonText } from "Texts/common";
import { commonSelectors, commonWidgetSelector } from "Selectors/common";
import { deleteDatasource,closeDSModal } from "Support/utils/dataSource";
import { deleteDatasource, closeDSModal } from "Support/utils/dataSource";
import {
addQuery,
@ -15,6 +16,9 @@ import {
addWidgetsToAddUser,
} from "Support/utils/postgreSql";
const data = {};
data.lastName = fake.lastName.toLowerCase().replaceAll("[^A-Za-z]", "");
describe("Data sources", () => {
beforeEach(() => {
cy.appUILogin();
@ -119,7 +123,7 @@ describe("Data sources", () => {
cy.clearAndType(
'[data-cy="data-source-name-input-filed"]',
"cypress-sqlserver"
`cypress-${data.lastName}-sqlserver`
);
fillDataSourceTextField(
@ -163,11 +167,10 @@ describe("Data sources", () => {
postgreSqlText.toastDSAdded
);
cy.get(commonSelectors.globalDataSourceIcon).click();
cy.get('[data-cy="cypress-sqlserver-button"]').verifyVisibleElement(
"have.text",
"cypress-sqlserver"
);
deleteDatasource("cypress-sqlserver");
cy.get(commonSelectors.globalDataSourceIcon).click();
cy.get(
`[data-cy="cypress-${data.lastName}-sqlserver-button"]`
).verifyVisibleElement("have.text", `cypress-${data.lastName}-sqlserver`);
deleteDatasource(`cypress-${data.lastName}-sqlserver`);
});
});

Wyświetl plik

@ -1,3 +1,4 @@
import { fake } from "Fixtures/fake";
import { postgreSqlSelector } from "Selectors/postgreSql";
import { postgreSqlText } from "Texts/postgreSql";
import { commonWidgetText, commonText } from "Texts/common";
@ -15,6 +16,9 @@ import {
addWidgetsToAddUser,
} from "Support/utils/postgreSql";
const data = {};
data.lastName = fake.lastName.toLowerCase().replaceAll("[^A-Za-z]", "");
describe("Data sources", () => {
beforeEach(() => {
cy.appUILogin();
@ -106,7 +110,7 @@ describe("Data sources", () => {
cy.clearAndType(
'[data-cy="data-source-name-input-filed"]',
"cypress-typesense"
`cypress-${data.lastName}-typesense`
);
fillDataSourceTextField(
@ -120,7 +124,11 @@ describe("Data sources", () => {
postgreSqlText.placeholderEnterPort,
Cypress.env("typesense_port")
);
fillDataSourceTextField("API Key", "Enter API key", Cypress.env("typesense_api_key"));
fillDataSourceTextField(
"API Key",
"Enter API key",
Cypress.env("typesense_api_key")
);
//dropdown
cy.get(postgreSqlSelector.buttonTestConnection).click();
cy.get(postgreSqlSelector.textConnectionVerified, {
@ -134,11 +142,10 @@ describe("Data sources", () => {
);
cy.get(commonSelectors.globalDataSourceIcon).click();
cy.get('[data-cy="cypress-typesense-button"]').verifyVisibleElement(
"have.text",
"cypress-typesense"
);
cy.get(
`[data-cy="cypress-${data.lastName}-typesense-button"]`
).verifyVisibleElement("have.text", `cypress-${data.lastName}-typesense`);
deleteDatasource("cypress-typesense");
deleteDatasource(`cypress-${data.lastName}-typesense`);
});
});

Wyświetl plik

@ -313,6 +313,7 @@ describe("List view widget", () => {
cy.forceClickOnCanvas();
openEditorSidebar(data.widgetName);
verifyAndModifyParameter("Row height", "99");
cy.get('[data-cy="real-canvas"]').click("topRight", { force: true });
openEditorSidebar(data.widgetName);
cy.forceClickOnCanvas();

Wyświetl plik

@ -24,7 +24,6 @@ import {
verifyAndModifyStylePickerFx,
verifyWidgetColorCss,
selectColourFromColourPicker,
verifyLoaderColor,
fillBoxShadowParams,
verifyBoxShadowCss,
verifyLayout,
@ -422,6 +421,7 @@ describe("Modal", () => {
.find(".form-check-input")
.click();
launchModal("modal1");
cy.wait(500);
cy.notVisible('[data-cy="modal-close-button"]');
});

Wyświetl plik

@ -122,12 +122,14 @@ describe("Password Input", () => {
commonWidgetSelector.draggableWidget(data.widgetName),
data.customText
);
cy.get('[data-cy="real-canvas"]').click("topLeft", { force: true });
cy.get(
commonWidgetSelector.validationFeedbackMessage(data.widgetName)
).verifyVisibleElement(
"have.text",
commonWidgetText.maxLengthValidationError(data.maximumLength)
);
openEditorSidebar(data.widgetName);
verifyAndModifyParameter(
commonWidgetText.labelcustomValidadtion,
@ -135,9 +137,11 @@ describe("Password Input", () => {
);
cy.forceClickOnCanvas();
cy.get(commonWidgetSelector.draggableWidget(data.widgetName)).clear();
cy.get('[data-cy="real-canvas"]').click("topLeft", { force: true });
cy.get(
commonWidgetSelector.validationFeedbackMessage(data.widgetName)
).verifyVisibleElement("have.text", data.customText);
openEditorSidebar(data.widgetName);
cy.get(
commonWidgetSelector.accordion(commonWidgetText.accordionProperties)
@ -322,6 +326,7 @@ describe("Password Input", () => {
.invoke("attr", "placeholder")
.should("contain", data.customText);
cy.get('[data-cy="real-canvas"]').click("topLeft", { force: true });
cy.get(
commonWidgetSelector.validationFeedbackMessage(
passwordInputText.defaultWidgetName
@ -338,6 +343,7 @@ describe("Password Input", () => {
commonWidgetSelector.draggableWidget(commonWidgetText.text1)
).verifyVisibleElement("have.text", "t");
cy.forceClickOnCanvas();
cy.get('[data-cy="real-canvas"]').click("topLeft", { force: true });
cy.get(
commonWidgetSelector.validationFeedbackMessage(
passwordInputText.defaultWidgetName
@ -348,6 +354,7 @@ describe("Password Input", () => {
commonWidgetSelector.draggableWidget(passwordInputText.defaultWidgetName),
data.customText.toUpperCase()
);
cy.get('[data-cy="real-canvas"]').click("topLeft", { force: true });
cy.get(
commonWidgetSelector.validationFeedbackMessage(
passwordInputText.defaultWidgetName

Wyświetl plik

@ -52,6 +52,7 @@ describe("Text Input", () => {
selectCSA("text1", "Set text", "500");
addSupportCSAData("Text", "{{components.textinput1.value");
cy.get('[data-cy="real-canvas"]').click("topLeft", { force: true });
cy.clearAndType(
commonWidgetSelector.draggableWidget("textinput1"),
data.customText

Wyświetl plik

@ -289,8 +289,7 @@ export const verifyLayout = (widgetName) => {
export const verifyPropertiesGeneralAccordion = (widgetName, tooltipText) => {
openEditorSidebar(widgetName);
openAccordion(commonWidgetText.accordionGenaral);
cy.intercept("PUT", "/api/apps/**").as("apps");
cy.wait("@apps");
cy.wait(3000);
addAndVerifyTooltip(
commonWidgetSelector.draggableWidget(widgetName),
tooltipText

Wyświetl plik

@ -4,7 +4,6 @@ import { cyParamName } from "../../constants/selectors/common";
import { commonSelectors } from "Selectors/common";
import { commonText } from "Texts/common";
export const verifyCouldnotConnectWithAlert = (dangerText) => {
cy.get(postgreSqlSelector.connectionFailedText, {
timeout: 10000,
@ -50,8 +49,11 @@ export const deleteDatasource = (datasourceName) => {
export const closeDSModal = () => {
cy.get("body").then(($body) => {
if ($body.find('[data-cy="button-close-ds-connection-modal"]> img').length > 0) {
cy.get('[data-cy="button-close-ds-connection-modal"]').realClick()
cy.wait(500);
if (
$body.find('[data-cy="button-close-ds-connection-modal"]> img').length > 0
) {
cy.get('[data-cy="button-close-ds-connection-modal"]').realClick();
closeDSModal();
}
});

Wyświetl plik

@ -77,6 +77,7 @@ export const Chart = function Chart({ width, height, darkMode, properties, style
b: padding,
t: padding,
},
hoverlabel: { namelength: -1 },
};
const computeChartData = (data, dataString) => {

Wyświetl plik

@ -400,6 +400,8 @@ class EditorComponent extends React.Component {
if (version?.id === this.state.app?.current_version_id) {
(this.canUndo = false), (this.canRedo = false);
}
useAppDataStore.getState().actions.updateEditingVersion(version);
this.setState(
{
editingVersion: version,

Wyświetl plik

@ -177,10 +177,18 @@ class QueryManagerComponent extends React.Component {
}
);
};
componentDidUpdate(prevState) {
if (this.state?.selectedQuery?.id == prevState?.selectedQuery?.id) {
if (prevState?.selectedQuery?.name !== this.state?.selectedQuery?.name) {
this.setState({
queryName: this.state.selectedQuery?.name,
});
}
}
}
UNSAFE_componentWillReceiveProps(nextProps) {
if (useDataSourcesStore.getState().loadingDataSources) return;
if (nextProps.loadingDataSources) return;
if (this.props.showQueryConfirmation && !nextProps.showQueryConfirmation) {
if (this.state.isUpdating) {
this.setState({

Wyświetl plik

@ -887,7 +887,7 @@ export function previewQuery(_ref, query, editorState, calledFromQuery = false)
}
export function runQuery(_ref, queryId, queryName, confirmed = undefined, mode = 'edit') {
const query = useDataQueriesStore.getState().dataQueries.find((query) => query.name === queryName);
const query = useDataQueriesStore.getState().dataQueries.find((query) => query.id === queryId);
let dataQuery = {};
if (query) {

Wyświetl plik

@ -35,7 +35,7 @@ export default function AlertDialog({
centered
data-cy={'modal-component'}
style={{ zIndex: 9992 }}
// backdropClassName="home-modal-backdrop"
backdropClassName={!checkForBackground && 'home-modal-backdrop'}
>
{title && (
<Modal.Header>

Wyświetl plik

@ -57,7 +57,12 @@ const Content = ({ title = null, iconSrc = null, direction = 'left', dataCy }) =
) : typeof title === 'function' ? (
title()
) : (
<span data-cy={`${String(btnTitle).toLowerCase().replace(/\s+/g, '-')}-option-button`} className="mx-1">
<span
data-cy={`${String(typeof title === 'function' ? title() : title)
.toLowerCase()
.replace(/\s+/g, '-')}-option-button`}
className="mx-1"
>
{title}
</span>
);

Wyświetl plik

@ -140,6 +140,7 @@ module.exports = {
new HtmlWebpackPlugin({
template: './src/index.ejs',
favicon: './assets/images/logo.svg',
hash: environment === 'production',
}),
new CompressionPlugin({
test: /\.js(\?.*)?$/i,

Wyświetl plik

@ -179,7 +179,7 @@ export default class RestapiQueryService implements QueryService {
try {
const response = await got(url, requestOptions);
result = this.isJson(response.body) ? JSON.parse(response.body) : response.body;
result = this.getResponse(response);
requestObject = {
requestUrl: response.request.requestUrl,
method: response.request.options.method,
@ -242,6 +242,20 @@ export default class RestapiQueryService implements QueryService {
};
}
private getResponse(response) {
try {
if (this.isJson(response.body)) {
return JSON.parse(response.body);
}
if (response.rawBody && response.headers?.['content-type']?.startsWith('image/')) {
return Buffer.from(response.rawBody, 'binary').toString('base64');
}
} catch (error) {
console.error('Error while parsing response', error);
}
return response.body;
}
checkIfContentTypeIsURLenc(headers: [] = []) {
const objectHeaders = Object.fromEntries(headers);
const contentType = objectHeaders['content-type'] ?? objectHeaders['Content-Type'];

Wyświetl plik

@ -1 +1 @@
2.5.0
2.6.0