Skip to content

Commit

Permalink
Merge pull request #24053 from appsmithorg/ci/fix-ci-v1.9.21
Browse files Browse the repository at this point in the history
fix: ci failures fixes
  • Loading branch information
nidhi-nair authored Jun 6, 2023
2 parents 349049f + a5bd34c commit fc633dd
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 36 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ jobs:
docker run -d --name appsmith -p 80:80 -p 9001:9001 \
-v "$PWD/stacks:/appsmith-stacks" \
-e APPSMITH_DISABLE_TELEMETRY=true \
-e APPSMITH_INTERCOM_APP_ID=DUMMY_VALUE \
-e APPSMITH_CLOUD_SERVICES_BASE_URL=http://host.docker.internal:5001 \
--add-host=host.docker.internal:host-gateway --add-host=api.segment.io:host-gateway --add-host=t.appsmith.com:host-gateway \
cicontainer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ describe("Fork application across workspaces", function () {
);
cy.wait("@importNewApplication").then((interception) => {
const { isPartialImport } = interception.response.body.data;
cy.log("isPartialImport : ", isPartialImport);
if (isPartialImport) {
cy.wait(2000);
cy.get(reconnectDatasourceModal.SkipToAppBtn).click({
force: true,
});
Expand All @@ -85,8 +87,7 @@ describe("Fork application across workspaces", function () {

cy.url().then((url) => {
forkableAppUrl = url;
cy.get(homePage.profileMenu).click();
cy.get(homePage.signOutIcon).click();
cy.LogOut();

cy.visit(forkableAppUrl);
//cy.reload();
Expand Down
34 changes: 17 additions & 17 deletions app/client/cypress/e2e/Sanity/Datasources/Airtable_Basic_Spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ describe("excludeForAirgap", "Validate Airtable Ds", () => {
_.dataSources.ValidateNSelectDropdown(
"Commands",
"Please select an option",
"List Records",
"List records",
);

_.agHelper.EnterValue(datasourceFormData.AirtableBase, {
Expand All @@ -29,7 +29,7 @@ describe("excludeForAirgap", "Validate Airtable Ds", () => {
_.agHelper.EnterValue(datasourceFormData.AirtableTable, {
propFieldName: "",
directInput: false,
inputFieldName: "Table Name",
inputFieldName: "Table name",
});

_.dataSources.RunQuery();
Expand Down Expand Up @@ -70,12 +70,12 @@ describe("excludeForAirgap", "Validate Airtable Ds", () => {
_.agHelper.EnterValue("11", {
propFieldName: "",
directInput: false,
inputFieldName: "Max Records",
inputFieldName: "Max records",
});
_.agHelper.EnterValue("", {
propFieldName: "",
directInput: false,
inputFieldName: "Page Size",
inputFieldName: "Page size",
});
_.dataSources.RunQuery();
cy.get("@postExecute").then((resObj: any) => {
Expand All @@ -87,7 +87,7 @@ describe("excludeForAirgap", "Validate Airtable Ds", () => {
_.agHelper.EnterValue("6", {
propFieldName: "",
directInput: false,
inputFieldName: "Page Size",
inputFieldName: "Page size",
});
_.dataSources.RunQuery();
cy.get("@postExecute").then((resObj: any) => {
Expand Down Expand Up @@ -119,7 +119,7 @@ describe("excludeForAirgap", "Validate Airtable Ds", () => {
_.agHelper.EnterValue('NOT({Taxa} = "Rodent")', {
propFieldName: "",
directInput: false,
inputFieldName: "Filter by Formula",
inputFieldName: "Filter by formula",
});
_.dataSources.RunQuery();

Expand All @@ -137,17 +137,17 @@ describe("excludeForAirgap", "Validate Airtable Ds", () => {
_.agHelper.EnterValue("", {
propFieldName: "",
directInput: false,
inputFieldName: "Page Size",
inputFieldName: "Page size",
}); //Removing Page Size
_.agHelper.EnterValue("", {
propFieldName: "",
directInput: false,
inputFieldName: "Filter by Formula",
inputFieldName: "Filter by formula",
}); //Removing Filter by Formula
_.agHelper.EnterValue("10", {
propFieldName: "",
directInput: false,
inputFieldName: "Max Records",
inputFieldName: "Max records",
});
_.agHelper.EnterValue("sort%5B0%5D%5Bfield%5D=Species_ID", {
propFieldName: "",
Expand Down Expand Up @@ -256,8 +256,8 @@ describe("excludeForAirgap", "Validate Airtable Ds", () => {
//Create
_.dataSources.ValidateNSelectDropdown(
"Commands",
"List Records",
"Create Records",
"List records",
"Create records",
);
_.agHelper.EnterValue(createReq, {
propFieldName: "",
Expand All @@ -277,8 +277,8 @@ describe("excludeForAirgap", "Validate Airtable Ds", () => {
insertedRecordId = jsonSpecies.records[0].id;
_.dataSources.ValidateNSelectDropdown(
"Commands",
"Create Records",
"Retrieve A Record",
"Create records",
"Retrieve a record",
);
_.agHelper.EnterValue(insertedRecordId, {
propFieldName: "",
Expand All @@ -304,8 +304,8 @@ describe("excludeForAirgap", "Validate Airtable Ds", () => {
//Update Records
_.dataSources.ValidateNSelectDropdown(
"Commands",
"Retrieve A Record",
"Update Records",
"Retrieve a record",
"Update records",
);
_.agHelper.EnterValue(
`[{ "id" : ${insertedRecordId},
Expand Down Expand Up @@ -341,8 +341,8 @@ describe("excludeForAirgap", "Validate Airtable Ds", () => {
//insertedRecordId = jsonSpecies.id;
_.dataSources.ValidateNSelectDropdown(
"Commands",
"Update Records",
"Delete A Record",
"Update records",
"Delete a record",
);

_.dataSources.RunQuery();
Expand Down
6 changes: 3 additions & 3 deletions app/client/cypress/support/Pages/DataSources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -494,12 +494,12 @@ export class DataSources {

public FillAirtableDSForm() {
this.ValidateNSelectDropdown(
"Authentication Type",
"Authentication type",
"Please select an option",
"Bearer Token",
"Bearer token",
);
this.agHelper.UpdateInput(
this.locator._inputFieldByName("Bearer Token"),
this.locator._inputFieldByName("Bearer token"),
Cypress.env("AIRTABLE_BEARER"),
);
this.agHelper.Sleep();
Expand Down
35 changes: 21 additions & 14 deletions app/client/src/pages/Editor/gitSync/ReconnectDatasourceModal.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useCallback, useEffect, useState } from "react";
import React, { useCallback, useEffect, useMemo, useState } from "react";

import {
getImportedApplication,
Expand Down Expand Up @@ -252,10 +252,12 @@ function ReconnectDatasourceModal() {
const unconfiguredDatasourceIds = unconfiguredDatasources.map(
(ds: Datasource) => ds.id,
);
let datasources = useSelector(getDatasources);
datasources = datasources.filter((ds: Datasource) =>
unconfiguredDatasourceIds.includes(ds.id),
);
const datasourcesList = useSelector(getDatasources);
const datasources = useMemo(() => {
return datasourcesList.filter((ds: Datasource) =>
unconfiguredDatasourceIds.includes(ds.id),
);
}, [datasourcesList, unconfiguredDatasourceIds]);
const pluginsArray = useSelector(getDatasourcePlugins);
const plugins = keyBy(pluginsArray, "id");
const isLoading = useSelector(getIsListing);
Expand Down Expand Up @@ -490,15 +492,20 @@ function ReconnectDatasourceModal() {
.find((ds: Datasource) => !ds.isConfigured);
}
next = next || pending[0];
setSelectedDatasourceId(next.id);
setDatasource(next);
// when refresh, it should be opened.
const appInfo = {
appId: appId,
pageId: pageId,
datasourceId: next.id,
};
localStorage.setItem("importedAppPendingInfo", JSON.stringify(appInfo));
if (next && next.id) {
setSelectedDatasourceId(next.id);
setDatasource(next);
// when refresh, it should be opened.
const appInfo = {
appId: appId,
pageId: pageId,
datasourceId: next.id,
};
localStorage.setItem(
"importedAppPendingInfo",
JSON.stringify(appInfo),
);
}
} else if (appURL) {
// open application import successfule
localStorage.setItem("importApplicationSuccess", "true");
Expand Down

0 comments on commit fc633dd

Please sign in to comment.