Skip to content

Commit

Permalink
Merge pull request #31373 from appsmithorg/release
Browse files Browse the repository at this point in the history
29/02 Daily promotion
  • Loading branch information
yatinappsmith authored Feb 29, 2024
2 parents 54a72a8 + 45b81f9 commit 4f203f5
Show file tree
Hide file tree
Showing 130 changed files with 1,195 additions and 1,329 deletions.
2 changes: 1 addition & 1 deletion .github/config.json

Large diffs are not rendered by default.

10 changes: 8 additions & 2 deletions .github/workflows/server-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -178,10 +178,16 @@ jobs:
args=()
if [[ "${{ steps.run_result.outputs.run_result }}" == "failedtest" ]]; then
failed_tests="${{ steps.failed_tests.outputs.tests }}"
args+=("-DfailIfNoTests=false" "-Dtest=${failed_tests}")
args+=("-DfailIfNoTests=false" "-Dsurefire.failIfNoSpecifiedTests=false" "-Dtest=${failed_tests}")
fi
args+=("-DtestResultFile=$PWD/failed-server-tests.txt")
if ! mvn test "${args[@]}"; then
gawk -F\" '/<testcase / {cur_test = $4 "#" $2} /<failure / {print cur_test}' $(find . -type f -name 'TEST-*.xml') \
> failed-server-tests.txt
echo "Report files found:"
find . -type f -name 'TEST-*.xml'
echo "Test case and failure lines:"
grep -E 'testcase|failure' $(find . -type f -name 'TEST-*.xml')
echo "No failed tests found"
if [[ -s failed-server-tests.txt ]]; then
content="$(
echo "## Failed server tests"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ describe(
debuggerHelper.ClicklogEntityLink();

agHelper.AssertElementVisibility(apiPage._nextCursorValue);
debuggerHelper.CloseBottomBar();
entityExplorer.ActionContextMenuByEntityName({
entityNameinLeftSidebar: "Api1",
entityType: entityItems.Api,
Expand All @@ -51,11 +50,9 @@ describe(
apiPage.SelectPaneTab("Headers");
EditorNavigation.ShowCanvas();
debuggerHelper.AssertErrorCount(1);
debuggerHelper.ClickDebuggerIcon();
debuggerHelper.ClicklogEntityLink();

agHelper.AssertElementVisibility(apiPage._bodyValue(0));
debuggerHelper.CloseBottomBar();
entityExplorer.ActionContextMenuByEntityName({
entityNameinLeftSidebar: "Api2",
entityType: entityItems.Api,
Expand All @@ -69,12 +66,11 @@ describe(

apiPage.SelectPaneTab("Pagination");
EditorNavigation.ShowCanvas();
debuggerHelper.ClickDebuggerIcon();
// The Debugger should already be open here as it was opened before
debuggerHelper.ClickLogsTab();
debuggerHelper.ClicklogEntityLink(true);

agHelper.AssertElementVisibility(dataSources._queryTimeout);
debuggerHelper.CloseBottomBar();
entityExplorer.ActionContextMenuByEntityName({
entityNameinLeftSidebar: "Api3",
entityType: entityItems.Api,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as _ from "../../../../support/Objects/ObjectsCore";
import { PageType } from "../../../../support/Pages/DebuggerHelper";
import EditorNavigation from "../../../../support/Pages/EditorNavigation";

describe("Entity bottom bar", () => {
describe("Entity bottom bar", { tags: ["@tag.Debugger"] }, () => {
it("1. Debugger should be closable", () => {
//Verify if bottom bar is closed.
_.debuggerHelper.AssertClosed();
Expand Down Expand Up @@ -32,17 +32,14 @@ describe("Entity bottom bar", () => {
_.debuggerHelper.AssertSelectedTab("Response");
//verify if bottom bar is closed on switching to canvas page.
EditorNavigation.ShowCanvas();
_.debuggerHelper.AssertSelectedTab("Errors");
_.debuggerHelper.AssertClosed();
});

it("3. Api bottom pane should be collapsable", () => {
_.apiPage.CreateAndFillApi(
_.dataManager.dsValues[_.dataManager.defaultEnviorment].mockApiUrl,
);
//Verify that the errors tab is still open.
_.debuggerHelper.AssertSelectedTab("Errors");
//Verify if bottom bar is closed on clicking close icon in API page.
_.debuggerHelper.CloseBottomBar();
//Verify that the errors tab is still closed.
_.debuggerHelper.AssertClosed();
//Verify if bottom bar opens on clicking debugger icon in api page.
_.debuggerHelper.ClickDebuggerIcon();
Expand All @@ -60,12 +57,11 @@ describe("Entity bottom bar", () => {
it("4. Bottom bar in Datasource", () => {
//Verify if bottom bar remain open on shifting to create new datasource page.
_.dataSources.NavigateToDSCreateNew();
//Expecting errors tab to be closed as previous selected tab was response.
//And response tab is not part of datasource page.
//Expecting errors tab to be closed as this is now a datasource
_.debuggerHelper.AssertClosed();
//Verify if bottom bar opens on clicking debugger icon in datasource page.
_.debuggerHelper.ClickDebuggerIcon();
_.debuggerHelper.AssertClosed();
_.debuggerHelper.AssertOpen(PageType.DataSources);
});

it(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const generateTestLogString = () => {
return logString;
};

describe("Debugger logs", function () {
describe("Debugger logs", { tags: ["@tag.Debugger"] }, function () {
this.beforeEach(() => {
logString = generateTestLogString();
});
Expand Down Expand Up @@ -285,7 +285,8 @@ describe("Debugger logs", function () {
});

EditorNavigation.SelectEntityByName("Page1", EntityType.Page);
_.agHelper.GetNClick(_.locators._errorTab);
_.agHelper.AssertElementVisibility(".t--debugger-count");
_.debuggerHelper.ClickDebuggerIcon();

_.debuggerHelper.ClicklogEntityLink();

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import {
agHelper,
homePage,
locators,
templates,
} from "../../../../support/Objects/ObjectsCore";
import reconnectDatasourceLocators from "../../../../locators/ReconnectLocators.js";

describe(
"Create new application from template",
{ tags: ["@tag.excludeForAirgap", "@tag.Workspace", "@tag.Templates"] },
function () {
beforeEach(() => {
homePage.NavigateToHome();
homePage.OpenTemplatesDialogInStartFromTemplates();
});

it("1. Should be able to create new app from template list page", () => {
agHelper.GetNClick(templates.locators._templatesCardForkButton);

agHelper.AssertElementVisibility(locators._sidebar);
agHelper.AssertElementAbsence(locators._loading);
});

it("2. Should be able to create new app from template detail page", () => {
agHelper.GetNClick(templates.locators._templateCard);
agHelper.GetNClick(templates.locators._templateViewForkButton);

agHelper.AssertElementVisibility(locators._sidebar);
agHelper.AssertElementAbsence(locators._loading);
});

it("3. When reconnect modal is shown, `start with templates` dialog should not be visible", () => {
agHelper.GetNClick("//h1[text()='Customer Messaging Tool']");
agHelper.GetNClick(templates.locators._templateViewForkButton);

agHelper.AssertElementVisibility(reconnectDatasourceLocators.Modal, true);
agHelper.AssertElementAbsence(homePage._createAppFromTemplatesDialog);
agHelper.GetNClick(reconnectDatasourceLocators.SkipToAppBtn, 0, true);
agHelper.WaitUntilEleDisappear(reconnectDatasourceLocators.SkipToAppBtn);
});
},
);
15 changes: 14 additions & 1 deletion app/client/cypress/support/Pages/HomePage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { REPO, CURRENT_REPO } from "../../fixtures/REPO";
import HomePageLocators from "../../locators/HomePage";
import SignupPageLocators from "../../locators/SignupPage.json";
import { AppSidebar, PageLeftPane } from "./EditorNavigation";

import { featureFlagIntercept } from "../Objects/FeatureFlags";
export class HomePage {
private agHelper = ObjectsRegistry.AggregateHelper;
private locator = ObjectsRegistry.CommonLocators;
Expand Down Expand Up @@ -60,6 +60,10 @@ export class HomePage {
_appContainer = ".t--applications-container";
_homePageAppCreateBtn = " .createnew";
_newButtonCreateApplication = "[data-testid=t--workspace-action-create-app]";
_newButtonCreateApplicationFromTemplates =
"[data-testid=t--workspace-action-create-app-from-template]";
_createAppFromTemplatesDialog =
"[data-testid=t--create-app-from-templates-dialog-component]";
_existingWorkspaceCreateNewApp = (existingWorkspaceName: string) =>
`//span[text()='${existingWorkspaceName}']/ancestor::div[contains(@class, 't--workspace-section')]//button[contains(@class, 't--new-button')]`;
_applicationName = ".t--application-name";
Expand Down Expand Up @@ -325,6 +329,15 @@ export class HomePage {
if (appname) this.RenameApplication(appname);
}

public OpenTemplatesDialogInStartFromTemplates() {
featureFlagIntercept({
release_show_create_app_from_templates_enabled: true,
});
this.agHelper.GetNClick(this._homePageAppCreateBtn, 0, true);
this.agHelper.GetNClick(this._newButtonCreateApplicationFromTemplates);
this.agHelper.AssertElementVisibility(this._createAppFromTemplatesDialog);
}

//Maps to AppSetupForRename in command.js
public RenameApplication(appName: string) {
this.onboarding.closeIntroModal();
Expand Down
2 changes: 2 additions & 0 deletions app/client/cypress/support/Pages/Templates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export class Templates {
_templatesTab: ".t--templates-tab",
_forkApp: ".t--fork-template",
_templateCard: "[data-testid='template-card']",
_templateViewForkButton: "[data-testid='template-fork-button']",
_buildingBlockCardOnCanvas: "[data-testid='t--canvas-building-block-item']",
_datasourceConnectPromptSubmitBtn:
"[data-testid='t--datasource-connect-prompt-submit-btn']",
Expand All @@ -19,6 +20,7 @@ export class Templates {
_requestForTemplateBtn: "span:contains('Request for a template')",
_tempaltesFilterItem: "[data-testid='t--templates-filter-item']",
_templateFilterItemSelectedIcon: `[data-testid="t--templates-filter-item-selected-icon"]`,
_templatesCardForkButton: "[data-testid='t--fork-template-button']",
};

FilterTemplatesByName(query: string) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
justify-content: center;
background: var(--color-bg-neutral-opacity);
z-index: var(--z-index-99);
contain: strict;
}

.overlay .content {
Expand Down
42 changes: 8 additions & 34 deletions app/client/src/actions/apiPaneActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import type { ReduxAction } from "@appsmith/constants/ReduxActionConstants";
import { ReduxActionTypes } from "@appsmith/constants/ReduxActionConstants";
import type { EventLocation } from "@appsmith/utils/analyticsUtilTypes";
import type { SlashCommandPayload } from "entities/Action";
import type { ApiPaneDebuggerState } from "@appsmith/reducers/uiReducers/apiPaneReducer";

export const changeApi = (
id: string,
Expand All @@ -14,40 +15,6 @@ export const changeApi = (
};
};

export const initApiPane = (urlId?: string): ReduxAction<{ id?: string }> => {
return {
type: ReduxActionTypes.INIT_API_PANE,
payload: { id: urlId },
};
};

export const setCurrentCategory = (
category: string,
): ReduxAction<{ category: string }> => {
return {
type: ReduxActionTypes.SET_CURRENT_CATEGORY,
payload: { category },
};
};

export const setLastUsedEditorPage = (
path: string,
): ReduxAction<{ path: string }> => {
return {
type: ReduxActionTypes.SET_LAST_USED_EDITOR_PAGE,
payload: { path },
};
};

export const setLastSelectedPage = (
selectedPageId: string,
): ReduxAction<{ selectedPageId: string }> => {
return {
type: ReduxActionTypes.SET_LAST_SELECTED_PAGE_PAGE,
payload: { selectedPageId },
};
};

export const createNewApiAction = (
pageId: string,
from: EventLocation,
Expand Down Expand Up @@ -109,3 +76,10 @@ export const setApiRightPaneSelectedTab: (
type: ReduxActionTypes.SET_API_RIGHT_PANE_SELECTED_TAB,
payload: { selectedTab: payload },
});

export const setApiPaneDebuggerState = (
payload: Partial<ApiPaneDebuggerState>,
) => ({
type: ReduxActionTypes.SET_API_PANE_DEBUGGER_STATE,
payload,
});
14 changes: 13 additions & 1 deletion app/client/src/actions/debuggerActions.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import { ReduxActionTypes } from "@appsmith/constants/ReduxActionConstants";
import type { Log, Message, SourceEntity } from "entities/AppsmithConsole";
import type { ENTITY_TYPE } from "@appsmith/entities/AppsmithConsole/utils";
import type { DebuggerContext } from "reducers/uiReducers/debuggerReducer";
import type {
CanvasDebuggerState,
DebuggerContext,
} from "reducers/uiReducers/debuggerReducer";
import type { EventName } from "@appsmith/utils/analyticsUtilTypes";
import type { APP_MODE } from "entities/App";

Expand Down Expand Up @@ -126,3 +129,12 @@ export const setDebuggerContext = (context: DebuggerContext) => {
payload: { context },
};
};

export const setCanvasDebuggerState = (
payload: Partial<CanvasDebuggerState>,
) => {
return {
type: ReduxActionTypes.SET_CANVAS_DEBUGGER_STATE,
payload,
};
};
12 changes: 11 additions & 1 deletion app/client/src/actions/jsPaneActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ import type {
SetFunctionPropertyPayload,
} from "@appsmith/api/JSActionAPI";
import type { EventLocation } from "@appsmith/utils/analyticsUtilTypes";
import type { JSEditorTab } from "reducers/uiReducers/jsPaneReducer";
import type {
JSEditorTab,
JSPaneDebuggerState,
} from "reducers/uiReducers/jsPaneReducer";

export const createNewJSCollection = (
pageId: string,
Expand Down Expand Up @@ -111,3 +114,10 @@ export const setJsPaneConfigSelectedTab: (
type: ReduxActionTypes.SET_JS_PANE_CONFIG_SELECTED_TAB,
payload: { selectedTab: payload },
});

export const setJsPaneDebuggerState = (
payload: Partial<JSPaneDebuggerState>,
) => ({
type: ReduxActionTypes.SET_JS_PANE_DEBUGGER_STATE,
payload,
});
10 changes: 10 additions & 0 deletions app/client/src/actions/queryPaneActions.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type { ReduxAction } from "@appsmith/constants/ReduxActionConstants";
import { ReduxActionTypes } from "@appsmith/constants/ReduxActionConstants";
import type { Action } from "entities/Action";
import type { QueryPaneDebuggerState } from "@appsmith/reducers/uiReducers/queryPaneReducer";

export interface ChangeQueryPayload {
id: string;
Expand All @@ -26,3 +27,12 @@ export const setQueryPaneConfigSelectedTabIndex: (
type: ReduxActionTypes.SET_QUERY_PANE_CONFIG_SELECTED_TAB,
payload: { selectedTabIndex: payload },
});

export const setQueryPaneDebuggerState = (
payload: Partial<QueryPaneDebuggerState>,
) => {
return {
type: ReduxActionTypes.SET_QUERY_PANE_DEBUGGER_STATE,
payload,
};
};
5 changes: 4 additions & 1 deletion app/client/src/ce/constants/ReduxActionConstants.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,6 @@ const ActionTypes = {
FETCH_ALL_PUBLISHED_PAGES: "FETCH_ALL_PUBLISHED_PAGES",
CREATE_NEW_API_ACTION: "CREATE_NEW_API_ACTION",
CREATE_NEW_QUERY_ACTION: "CREATE_NEW_QUERY_ACTION",
SET_CURRENT_CATEGORY: "SET_CURRENT_CATEGORY",
SET_LAST_USED_EDITOR_PAGE: "SET_LAST_USED_EDITOR_PAGE",
SET_LAST_SELECTED_PAGE_PAGE: "SET_LAST_SELECTED_PAGE_PAGE",
FETCH_PROVIDER_DETAILS_BY_PROVIDER_ID_INIT:
Expand Down Expand Up @@ -911,6 +910,10 @@ const ActionTypes = {
END_CONSOLIDATED_PAGE_LOAD: "END_CONSOLIDATED_PAGE_LOAD",
FETCH_ENVIRONMENT_SUCCESS: "FETCH_ENVIRONMENT_SUCCESS",
SET_SHOW_CREATE_NEW_MODAL: "SET_SHOW_CREATE_NEW_MODAL",
SET_QUERY_PANE_DEBUGGER_STATE: "SET_QUERY_PANE_DEBUGGER_STATE",
SET_API_PANE_DEBUGGER_STATE: "SET_API_PANE_DEBUGGER_STATE",
SET_JS_PANE_DEBUGGER_STATE: "SET_JS_PANE_DEBUGGER_STATE",
SET_CANVAS_DEBUGGER_STATE: "SET_CANVAS_DEBUGGER_STATE",
};

export const ReduxActionTypes = {
Expand Down
Loading

0 comments on commit 4f203f5

Please sign in to comment.