fix: Don't show schema for schema-less plugins (#25460)
This PR hides schemas for actions of schema-less plugins in the query editor. Fixes #25413 - Bug fix (non-breaking change which fixes an issue) #### How Has This Been Tested? > Please describe the tests that you ran to verify your changes. Also list any relevant details for your test configuration. > Delete anything that is not relevant - [x] Manual - [ ] Jest - [x] Cypress > > #### Test Plan > Add Testsmith test cases links that relate to this PR > > #### Issues raised during DP testing > Link issues raised during DP testing for better visiblity and tracking (copy link from comments dropped on this PR) > > > ## Checklist: #### Dev activity - [ ] My code follows the style guidelines of this project - [ ] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [ ] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] New and existing unit tests pass locally with my changes - [ ] PR is being merged under a feature flag #### QA activity: - [x] [Speedbreak features](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans#speedbreakers-) have been covered - [x] Test plan covers all impacted features and [areas of interest](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans#areas-of-interest-) - [ ] Test plan has been peer reviewed by project stakeholders and other QA members - [x] Manually tested functionality on DP - [ ] We had an implementation alignment call with stakeholders post QA Round 2 - [ ] Cypress test cases have been added and approved by SDET/manual QA - [ ] Added `Test Plan Approved` label after Cypress tests were reviewed - [ ] Added `Test Plan Approved` label after JUnit tests were reviewed
This commit is contained in:
parent
370748a2e5
commit
c89346f1e0
|
|
@ -70,4 +70,18 @@ describe("Datasource form related tests", function () {
|
|||
);
|
||||
},
|
||||
);
|
||||
|
||||
// the full list for schema-less plugins can be found here. https://www.notion.so/appsmith/Don-t-show-schema-section-for-plugins-that-don-t-support-it-78f82b6abf7948c5a7d596ae583ed8a4?pvs=4#3862343ca2564f7e83a2c8279965ca61
|
||||
it("4. Verify schema does not show up in schema-less plugins", () => {
|
||||
featureFlagIntercept(
|
||||
{
|
||||
ab_ds_schema_enabled: true,
|
||||
},
|
||||
false,
|
||||
);
|
||||
agHelper.RefreshPage();
|
||||
dataSources.CreateDataSource("Redis", true, false);
|
||||
dataSources.CreateQueryAfterDSSaved();
|
||||
dataSources.VerifySchemaAbsenceInQueryEditor();
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -233,6 +233,7 @@ export class DataSources {
|
|||
private _reconnectModalDSToopTipIcon = ".t--ds-list .ads-v2-icon";
|
||||
private _datasourceTableSchemaInQueryEditor =
|
||||
".datasourceStructure-query-editor";
|
||||
private _datasourceStructureHeader = ".datasourceStructure-header";
|
||||
private _datasourceColumnSchemaInQueryEditor = ".t--datasource-column";
|
||||
private _datasourceStructureSearchInput = ".datasourceStructure-search input";
|
||||
|
||||
|
|
@ -1262,6 +1263,10 @@ export class DataSources {
|
|||
.contains(schema);
|
||||
}
|
||||
|
||||
public VerifySchemaAbsenceInQueryEditor() {
|
||||
this.agHelper.AssertElementAbsence(this._datasourceStructureHeader);
|
||||
}
|
||||
|
||||
public VerifyColumnSchemaOnQueryEditor(schema: string, index = 0) {
|
||||
this.agHelper
|
||||
.GetElement(this._datasourceColumnSchemaInQueryEditor)
|
||||
|
|
|
|||
|
|
@ -36,7 +36,10 @@ import {
|
|||
import { builderURL } from "RouteBuilder";
|
||||
import { hasManagePagePermission } from "@appsmith/utils/permissionHelpers";
|
||||
import DatasourceStructureHeader from "pages/Editor/Explorer/Datasources/DatasourceStructureHeader";
|
||||
import { DatasourceStructureContainer as DataStructureList } from "pages/Editor/Explorer/Datasources/DatasourceStructureContainer";
|
||||
import {
|
||||
DatasourceStructureContainer as DataStructureList,
|
||||
SCHEMALESS_PLUGINS,
|
||||
} from "pages/Editor/Explorer/Datasources/DatasourceStructureContainer";
|
||||
import { DatasourceStructureContext } from "pages/Editor/Explorer/Datasources/DatasourceStructureContainer";
|
||||
import { selectFeatureFlagCheck } from "@appsmith/selectors/featureFlagsSelectors";
|
||||
import {
|
||||
|
|
@ -56,7 +59,6 @@ import {
|
|||
isUserSignedUpFlagSet,
|
||||
setFeatureFlagShownStatus,
|
||||
} from "utils/storage";
|
||||
import { PluginName } from "entities/Action";
|
||||
import { getCurrentUser } from "selectors/usersSelectors";
|
||||
import { Tooltip } from "design-system";
|
||||
import { ASSETS_CDN_URL } from "constants/ThirdPartyConstants";
|
||||
|
|
@ -414,7 +416,7 @@ function ActionSidebar({
|
|||
const showSchema =
|
||||
isEnabledForDSSchema &&
|
||||
pluginDatasourceForm !== DatasourceComponentTypes.RestAPIDatasourceForm &&
|
||||
pluginName !== PluginName.SMTP;
|
||||
!SCHEMALESS_PLUGINS.includes(pluginName);
|
||||
|
||||
useEffect(() => {
|
||||
if (showSchema) {
|
||||
|
|
|
|||
|
|
@ -41,6 +41,13 @@ export enum PluginName {
|
|||
ARANGODB = "ArangoDB",
|
||||
REDSHIFT = "Redshift",
|
||||
SMTP = "SMTP",
|
||||
REST_API = "REST API",
|
||||
REDIS = "Redis",
|
||||
AIRTABLE = "Airtable",
|
||||
TWILIO = "Twilio",
|
||||
HUBSPOT = "HubSpot",
|
||||
ELASTIC_SEARCH = "Elasticsearch",
|
||||
GRAPHQL = "Authenticated GraphQL API",
|
||||
}
|
||||
|
||||
export enum PaginationType {
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ import type { AppState } from "@appsmith/reducers";
|
|||
import DatasourceStructureLoadingContainer from "./DatasourceStructureLoadingContainer";
|
||||
import DatasourceStructureNotFound from "./DatasourceStructureNotFound";
|
||||
import AnalyticsUtil from "utils/AnalyticsUtil";
|
||||
import { PluginName } from "entities/Action";
|
||||
|
||||
type Props = {
|
||||
datasourceId: string;
|
||||
|
|
@ -37,6 +38,19 @@ export enum DatasourceStructureContext {
|
|||
API_EDITOR = "api-editor",
|
||||
}
|
||||
|
||||
// leaving out DynamoDB and Firestore because they have a schema but not templates
|
||||
export const SCHEMALESS_PLUGINS: Array<string> = [
|
||||
PluginName.SMTP,
|
||||
PluginName.TWILIO,
|
||||
PluginName.HUBSPOT,
|
||||
PluginName.ELASTIC_SEARCH,
|
||||
PluginName.AIRTABLE,
|
||||
PluginName.GRAPHQL,
|
||||
PluginName.REST_API,
|
||||
PluginName.REDIS,
|
||||
PluginName.GOOGLE_SHEETS,
|
||||
];
|
||||
|
||||
const DatasourceStructureSearchContainer = styled.div`
|
||||
margin-bottom: 8px;
|
||||
position: sticky;
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ export default function DatasourceStructureHeader(props: Props) {
|
|||
);
|
||||
|
||||
return (
|
||||
<HeaderWrapper>
|
||||
<HeaderWrapper className="datasourceStructure-header">
|
||||
<Text kind="heading-xs" renderAs="h3">
|
||||
{createMessage(SCHEMA_LABEL)}
|
||||
</Text>
|
||||
|
|
|
|||
|
|
@ -10,6 +10,8 @@ const Wrapper = styled.div<{ step: number }>`
|
|||
display: flex;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
word-wrap: break-word;
|
||||
width: 100%;
|
||||
`;
|
||||
|
||||
export function EntityPlaceholder(props: {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user