Skip to content

Commit

Permalink
Merge pull request #35064 from appsmithorg/release
Browse files Browse the repository at this point in the history
22/07 Daily Promotion
  • Loading branch information
yatinappsmith authored Jul 22, 2024
2 parents ad47157 + 57decce commit 6168e1f
Show file tree
Hide file tree
Showing 9 changed files with 89 additions and 109 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/rts-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ defaults:

jobs:
build:
runs-on: appsmith-self-hosted-deployment-runner
runs-on: ubuntu-latest
# Only run this workflow for internally triggered events
if: |
github.event.pull_request.head.repo.full_name == github.repository ||
Expand Down
95 changes: 0 additions & 95 deletions app/client/.husky/pre-push

This file was deleted.

2 changes: 1 addition & 1 deletion app/client/cypress/support/Pages/IDE/Sidebar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export class Sidebar {
);
}

assertVisible(timeout: number = 4000) {
assertVisible(timeout: number = 10000) {
cy.get(this.locators.sidebar, { timeout }).should("be.visible");
}
}
10 changes: 8 additions & 2 deletions app/client/src/ce/sagas/InferAffectedJSObjects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,20 @@ import type { JSCollection } from "entities/JSCollection";
export function getAffectedJSObjectIdsFromJSAction(
action: ReduxAction<unknown> | BufferedReduxAction<unknown>,
): AffectedJSObjects {
if (action.type === ReduxActionTypes.FETCH_ALL_PAGE_ENTITY_COMPLETION) {
return {
ids: [],
isAllAffected: true,
};
}

if (!JS_ACTIONS.includes(action.type)) {
return {
ids: [],
isAllAffected: false,
};
}
// only JS actions here
action as ReduxAction<unknown>;

// When fetching JSActions fails, we need to diff all JSObjects because the reducer updates it
// to empty collection
if (
Expand Down
10 changes: 2 additions & 8 deletions app/client/src/pages/Editor/IDE/EditorTabs/Editortabs.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ describe("EditorTabs render checks", () => {
`/app/applicationSlug/pageSlug-${page.pageId}/edit`,
state,
);
// check toggle is active
expect(container.firstChild).toBeNull();
});

Expand All @@ -49,11 +48,6 @@ describe("EditorTabs render checks", () => {
`/app/applicationSlug/pageSlug-${page.pageId}/edit/queries`,
state,
);
// check toggle is active
expect(getByTestId("t--list-toggle")).toHaveAttribute(
"data-selected",
"true",
);
// check tabs is empty
const tabsContainer = getByTestId("t--tabs-container");
expect(tabsContainer.firstChild).toBeNull();
Expand All @@ -74,7 +68,7 @@ describe("EditorTabs render checks", () => {
`/app/applicationSlug/pageSlug-${page.pageId}/edit/queries`,
state,
);
// check toggle is active
// check toggle
expect(queryByTestId("t--list-toggle")).toBeNull();

// check tabs is empty
Expand Down Expand Up @@ -143,7 +137,7 @@ describe("EditorTabs render checks", () => {
state,
);

// check toggle is not active
// check toggle
expect(queryByTestId("t--list-toggle")).toBeNull();

// check tabs is not empty
Expand Down
4 changes: 2 additions & 2 deletions app/client/src/pages/Editor/IDE/EditorTabs/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,15 @@ const EditorTabs = () => {
return (
<>
<Container>
{ideViewMode === EditorViewMode.SplitScreen && (
{ideViewMode === EditorViewMode.SplitScreen && files.length > 0 ? (
<ToggleButton
data-testid="t--list-toggle"
icon="hamburger"
isSelected={showListView}
onClick={handleHamburgerClick}
size="md"
/>
)}
) : null}
<ScrollArea
className="h-[32px] top-[0.5px]"
data-testid="t--editor-tabs"
Expand Down
18 changes: 18 additions & 0 deletions app/server/scripts/start-dev-server.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/usr/bin/env bash

# Change to the parent directory of the directory containing this script.
cd "$(cd "$(dirname "$0")" && pwd)/.."

# Ref: <https://stackoverflow.com/a/30969768/151048>.
if [[ -f .env ]]; then
echo "Found a .env file, loading environment variables from that file."
set -o allexport
source .env
fi

source ../util/is_wsl.sh
if [ $IS_WSL ]; then
_JAVA_OPTIONS="-Djava.net.preferIPv4Stack=true $_JAVA_OPTIONS"
fi

(cd dist && exec java -jar server-*.jar)
13 changes: 13 additions & 0 deletions app/util/is_wsl.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env bash

IS_WSL=

proc_version="$(cat /proc/version)"
case "$proc_version" in
*icrosoft*)
IS_WSL=true
;;
*WSL*)
IS_WSL=true
;;
esac
44 changes: 44 additions & 0 deletions app/util/is_wsl_test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#!/usr/bin/env bash

set -e

DIR="$(cd "$(dirname "$0")" && pwd)"

distro=

cat() {
echo $distro
}

fail() {
local reason=$1

echo "${reason}
context: ${distro}"

exit 1
}

stub_distro() {
local name=$1

distro=$name
source $DIR/is_wsl.sh
}

stub_distro "Linux Computer 4.19.104-microsoft-standard #1 SMP Wed Feb 19 06:37:35 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux"
if [ ! $IS_WSL ]; then
fail "Failed: Detected lack of WSL where it should have."
fi

stub_distro "Linux Computer 4.19.104-WSL-standard #1 SMP Wed Feb 19 06:37:35 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux"
if [ ! $IS_WSL ]; then
fail "Failed: Detected lack of WSL where it should have."
fi

stub_distro "Linux pop-os 5.3.0-22-generic #24+system76~1573659475~19.04~26b2022-Ubuntu SMP Wed Nov 13 20:0 x86_64 x86_64 x86_64 GNU/Linux"
if [ $IS_WSL ]; then
fail "Failed: Detected WSL where it shouldn't have."
fi

echo "All Tests Pass!"

0 comments on commit 6168e1f

Please sign in to comment.