Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
a7bf302
chore: Update markdown component + create avatar component + refactor…
jsartisan Oct 14, 2024
299cc42
feat: editable ide tabs (#36665)
alex-golovanov Oct 14, 2024
dfd5a5a
chore: Refactor UpdateSuperUserMigrationHelperCE for re-use in EE (#3…
trishaanand Oct 14, 2024
348a58f
chore: Add polling for embedded pg start to create appsmith DB (#36854)
abhvsn Oct 14, 2024
97f2560
chore: move chat widget to EE repo (#36845)
KelvinOm Oct 14, 2024
f572d6d
feat: adding branch persistence (#36622)
Oct 14, 2024
add9808
chore: Use Lettuce client to run clear keys across Redis nodes (#36862)
nidhi-nair Oct 14, 2024
e094bf2
chore: remove unused chat files (#36861)
KelvinOm Oct 14, 2024
ee6178b
chore: Add server artifacts in ad hoc image builder (#36869)
abhvsn Oct 14, 2024
e0fb8f9
Fix: Fix for GHSL-2024-277 (#36836)
sagar-qa007 Oct 14, 2024
e382460
chore: remove console errors on dev (#36639)
Oct 14, 2024
3032adc
chore: heartbeat code removed (#36837)
ApekshaBhosale Oct 15, 2024
a8e6252
chore: cache dependencyMap computation on client (#35965)
Oct 15, 2024
d1176de
fix: Open settings button not working in response pane (#36887)
albinAppsmith Oct 16, 2024
16c4a27
chore: Docs in Plugin Action Toolbar (#36881)
hetunandu Oct 16, 2024
00c16e8
chore: unskip redis test (#36863)
sneha122 Oct 16, 2024
4f7fd12
fix: Updating the permission check for run button in response pane (#…
ankitakinger Oct 16, 2024
6a1441f
chore: Prep work for adding Mixpanel session recording (#36895)
hetunandu Oct 16, 2024
24d989d
chore: add soft token + add subtle button variant (#36899)
jsartisan Oct 16, 2024
641e419
feat: remove isFocus from meta state in InputWidgetV2 (#36843)
jacquesikot Oct 16, 2024
b50ae99
chore: Enable coderabbit on pg PRs (#36891)
abhvsn Oct 16, 2024
85371be
chore: Styles fixes for suffix in textarea chat (#36911)
jsartisan Oct 16, 2024
060cf92
chore: sync changes from pg branch (#36556)
AnaghHegde Oct 16, 2024
7ff703c
chore: Migrate sub components into Plugin Action Editor (#36844)
hetunandu Oct 16, 2024
81b2146
fix: Fix server side skip test cases (#36572)
sagar-qa007 Oct 17, 2024
9719e92
chore: Update tinymce version to 6.8.3 in package.json and yarn.lock …
rahulbarwal Oct 17, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .coderabbit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ reviews:
auto_review:
enabled: true
drafts: false
base_branches: ["pg", "release"]
path_instructions:
- path: "app/client/cypress/**/**.*"
instructions: |
Expand All @@ -34,4 +35,4 @@ reviews:
- Do not use duplicate filenames even with different paths.
- Avoid using agHelper.Sleep, this.Sleep in any file in code.
chat:
auto_reply: true
auto_reply: true
10 changes: 10 additions & 0 deletions .github/workflows/ad-hoc-docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,16 @@ jobs:
scripts/generate_info_json.sh
fi

- name: Place server artifacts-es
run: |
run: |
if [[ -f scripts/prepare_server_artifacts.sh ]]; then
scripts/prepare_server_artifacts.sh
else
echo "No script found to prepare server artifacts"
exit 1
fi

- name: Set up Depot CLI
uses: depot/setup-action@v1

Expand Down
14 changes: 8 additions & 6 deletions .github/workflows/ci-test-limited-with-count.yml
Original file line number Diff line number Diff line change
Expand Up @@ -266,16 +266,18 @@ jobs:
- name: Set Commit Message
env:
EVENT_COMMITS: ${{ toJson(github.event.commits[0].message) }}
COMMIT_INFO_AUTHOR: ${{ github.event.commits[0].author.name }}
run: |
if [[ ${{ inputs.pr }} -ne 0 && ${{github.event_name}} == 'repository_dispatch' ]]; then
echo "COMMIT_INFO_MESSAGE=${{ env.COMMIT_INFO_MESSAGE }}" >> $GITHUB_ENV
elif [[ ${{ inputs.pr }} -ne 0 && ${{github.event_name}} == 'workflow_dispatch' ]]; then
if [[ ${{ inputs.pr }} -ne 0 && ${{ github.event_name }} == 'repository_dispatch' ]]; then
echo "COMMIT_INFO_MESSAGE=$COMMIT_INFO_MESSAGE" >> $GITHUB_ENV
elif [[ ${{ inputs.pr }} -ne 0 && ${{ github.event_name }} == 'workflow_dispatch' ]]; then
echo "COMMIT_INFO_MESSAGE=Workflow run on PR# ${{ inputs.pr }}" >> $GITHUB_ENV
else
if [[ '${{env.EVENT_COMMITS}}' == 'null' ]]; then
echo "COMMIT_INFO_MESSAGE=${{ github.event_name }} by ${{ env.COMMIT_INFO_AUTHOR }}" >> $GITHUB_ENV
if [[ "$EVENT_COMMITS" == "null" ]]; then
echo "COMMIT_INFO_MESSAGE=${{ github.event_name }} by $COMMIT_INFO_AUTHOR" >> $GITHUB_ENV
else
echo "COMMIT_INFO_MESSAGE=$(echo \"${{ env.EVENT_COMMITS }}\" | awk -F '\\\\n' '{print $1}' | sed 's/^\"//')" >> $GITHUB_ENV
COMMIT_FIRST_LINE=$(echo "$EVENT_COMMITS" | awk -F '\\\\n' '{print $1}' | sed 's/^\"//')
echo "COMMIT_INFO_MESSAGE=$COMMIT_FIRST_LINE" >> $GITHUB_ENV
fi
fi

Expand Down
14 changes: 8 additions & 6 deletions .github/workflows/ci-test-limited.yml
Original file line number Diff line number Diff line change
Expand Up @@ -256,16 +256,18 @@ jobs:
- name: Set Commit Message
env:
EVENT_COMMITS: ${{ toJson(github.event.commits[0].message) }}
COMMIT_INFO_AUTHOR: ${{ github.event.commits[0].author.name }}
run: |
if [[ ${{ inputs.pr }} -ne 0 && ${{github.event_name}} == 'repository_dispatch' ]]; then
echo "COMMIT_INFO_MESSAGE=${{ env.COMMIT_INFO_MESSAGE }}" >> $GITHUB_ENV
elif [[ ${{ inputs.pr }} -ne 0 && ${{github.event_name}} == 'workflow_dispatch' ]]; then
if [[ ${{ inputs.pr }} -ne 0 && ${{ github.event_name }} == 'repository_dispatch' ]]; then
echo "COMMIT_INFO_MESSAGE=$COMMIT_INFO_MESSAGE" >> $GITHUB_ENV
elif [[ ${{ inputs.pr }} -ne 0 && ${{ github.event_name }} == 'workflow_dispatch' ]]; then
echo "COMMIT_INFO_MESSAGE=Workflow run on PR# ${{ inputs.pr }}" >> $GITHUB_ENV
else
if [[ '${{env.EVENT_COMMITS}}' == 'null' ]]; then
echo "COMMIT_INFO_MESSAGE=${{ github.event_name }} by ${{ env.COMMIT_INFO_AUTHOR }}" >> $GITHUB_ENV
if [[ "$EVENT_COMMITS" == "null" ]]; then
echo "COMMIT_INFO_MESSAGE=${{ github.event_name }} by $COMMIT_INFO_AUTHOR" >> $GITHUB_ENV
else
echo "COMMIT_INFO_MESSAGE=$(echo \"${{ env.EVENT_COMMITS }}\" | awk -F '\\\\n' '{print $1}' | sed 's/^\"//')" >> $GITHUB_ENV
COMMIT_FIRST_LINE=$(echo "$EVENT_COMMITS" | awk -F '\\\\n' '{print $1}' | sed 's/^\"//')
echo "COMMIT_INFO_MESSAGE=$COMMIT_FIRST_LINE" >> $GITHUB_ENV
fi
fi

Expand Down
125 changes: 95 additions & 30 deletions .github/workflows/server-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -178,39 +178,104 @@ jobs:
APPSMITH_ENVFILE_PATH: /tmp/dummy.env
APPSMITH_VERBOSE_LOGGING_ENABLED: false
run: |
if [[ "${{ inputs.is-pg-build }}" == "true" ]]; then
export APPSMITH_DB_URL="postgresql://postgres:password@localhost:5432/postgres"
else
export APPSMITH_DB_URL="mongodb://localhost:27017/mobtools"
fi
args=()
if [[ "${{ steps.run_result.outputs.run_result }}" == "failedtest" ]]; then
failed_tests="${{ steps.failed_tests.outputs.tests }}"
args+=("-DfailIfNoTests=false" "-Dsurefire.failIfNoSpecifiedTests=false" "-Dtest=${failed_tests}")
fi
if ! mvn test "${args[@]}"; then
echo "Generating failed test list:"
failed_tests_file="$PWD/failed-server-tests.txt"
if [[ "${{ inputs.is-pg-build }}" == "true" ]]; then
export APPSMITH_DB_URL="postgresql://postgres:password@localhost:5432/postgres"
else
export APPSMITH_DB_URL="mongodb://localhost:27017/mobtools"
fi

args=()
if [[ "${{ steps.run_result.outputs.run_result }}" == "failedtest" ]]; then
failed_tests="${{ steps.failed_tests.outputs.tests }}"
args+=("-DfailIfNoTests=false" "-Dsurefire.failIfNoSpecifiedTests=false" "-Dtest=${failed_tests}")
fi

# Run tests and capture logs
mvn test "${args[@]}" | tee mvn_test.log

# Check for "BUILD FAILURE" in the mvn_test.log
if grep -q "BUILD FAILURE" mvn_test.log; then
test_result="failed"
else
test_result="passed"
fi

echo "test_result variable value: ${test_result}"

# Prepare output file for failed tests and ensure a fresh file is created
OUTPUT_FILE="failed-server-tests.txt"
rm -f "$OUTPUT_FILE"
touch "$OUTPUT_FILE"

failed_modules=()
skipped_modules=()

# Process mvn_test.log for FAILURE and SKIPPED statuses
while IFS= read -r line; do
if [[ $line == *"FAILURE"* ]]; then
module_name=$(echo "$line" | awk '{print $2}')
failed_modules+=("$module_name")
elif [[ $line == *"SKIPPED"* ]]; then
module_name=$(echo "$line" | awk '{print $2}')
skipped_modules+=("$module_name")
fi
done < mvn_test.log

echo "Failed Modules: ${failed_modules[*]}"
echo "Skipped Modules: ${skipped_modules[*]}"

# Handle older approach for reading failed tests from XML files
failed_tests_from_xml="$PWD/failed-tests-from-xml.txt"
gawk -F\" '/<testcase / {cur_test = $4 "#" $2} /<(failure|error) / {print cur_test}' $(find . -type f -name 'TEST-*.xml') \
| sort -u \
| tee "$failed_tests_file"
echo "Saved to $failed_tests_file"
if [[ -s $failed_tests_file ]]; then
content="$(
echo "## Failed server tests"
echo
sed 's/^/- /' "$failed_tests_file"
)"
echo "$content" >> "$GITHUB_STEP_SUMMARY"
# Add a comment to the PR with the list of failed tests.
curl --silent --show-error \
--header "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
--data "$(jq -n --arg body "$content" '$ARGS.named')" \
"https://api.github.com/repos/$GITHUB_REPOSITORY/issues/${{ inputs.pr }}/comments" \
> /dev/null
| tee "$failed_tests_from_xml"

# Filter out failed modules and add only relevant tests to the final failed list
for module in "${failed_modules[@]}"; do
grep -v "$module" "$failed_tests_from_xml" > temp_file && mv temp_file "$failed_tests_from_xml"
done

# Include all skipped module test files in the final list
for module in "${skipped_modules[@]}"; do
module_directories=$(find . -path "*/${module}*/src/test/java/*" -type f -name "*Test.java" -exec dirname {} \; | sort -u)
for module_directory in $module_directories; do
test_classes=$(find "$module_directory" -type f -name "*Test.java" | sed 's|.*/src/test/java/||; s|\.java$||; s|/|.|g')
for class_name in $test_classes; do
if [[ ${#class_name} -le 240 ]] && ! grep -Fxq "$class_name#" "$OUTPUT_FILE"; then
echo "${class_name}#" >> "$OUTPUT_FILE"
fi
done
done
done

# Combine the XML file test cases and skipped module test files into the final output file
cat "$failed_tests_from_xml" >> "$OUTPUT_FILE"

# Print the final output
cat "$OUTPUT_FILE"

if [[ -s $OUTPUT_FILE ]]; then
content="$(
echo "## Failed server tests"
echo
sed 's/^/- /' "$OUTPUT_FILE"
)"
echo "$content" >> "$GITHUB_STEP_SUMMARY"

# Post a comment to the PR
curl --silent --show-error \
--header "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
--data "$(jq -n --arg body "$content" '$ARGS.named')" \
"https://api.github.com/repos/$GITHUB_REPOSITORY/issues/${{ inputs.pr }}/comments" \
> /dev/null
fi
exit 1
fi

# Fail the script if tests did not pass
if [[ "$test_result" == "failed" ]]; then
echo "Tests failed, exiting with status 1."
exit 1
fi


# Set status = failedtest
- name: Set fail if there are test failures
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
import { featureFlagIntercept } from "../../../../support/Objects/FeatureFlags";
import {
agHelper,
gitSync,
homePage,
} from "../../../../support/Objects/ObjectsCore";

let wsName: string;
let appName: string;
let repoName: string;

describe(
"Git Persist Branch",
{
tags: ["@tag.Git", "@tag.GitPersistBranch"],
},
function () {
before(() => {
agHelper.GenerateUUID();
cy.get("@guid").then((uid) => {
wsName = "GitPB-" + uid;
appName = "GitPB1-" + uid;
homePage.CreateNewWorkspace(wsName, true);
homePage.CreateAppInWorkspace(wsName, appName);
gitSync.CreateNConnectToGit("test-git-perssit-branch", true, true);
cy.get("@gitRepoName").then((resRepoName) => {
repoName = resRepoName.toString();
homePage.NavigateToHome();
});
});
});
it("Check if branch persist after changing branch and exiting the app", function () {
featureFlagIntercept({ release_git_persist_branch_enabled: true }, true);
homePage.EditAppFromAppHover(appName);
gitSync.CreateGitBranch("b1", false);
cy.get("@gitbranchName").then((resBranchName) => {
const branchName = resBranchName.toString();
homePage.NavigateToHome();
homePage.EditAppFromAppHover(appName);
gitSync.AssertBranchName(branchName);
gitSync.AssertBranchNameInUrl(branchName);
});
});
},
);
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { featureFlagIntercept } from "../../../../../support/Objects/FeatureFlags";
import * as _ from "../../../../../support/Objects/ObjectsCore";
import EditorNavigation, {
EntityType,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ describe(
});

it("3. Verify applying style in one line should be observed in next line", function () {
agHelper.GetNClick(locators._richText_Text_Color);
agHelper.GetNClick(locators._richText_Text_Color("Black"));
agHelper.GetNClick(locators._richText_color("Red"));
agHelper
.GetElement(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,18 +137,18 @@ describe(
cy.get('[aria-label="Underline"]').should("exist");

//Check if button for Background Color is rendered only once within the Toolbar of RTE widget
cy.get('[data-mce-name="backcolor"]').should("have.length", 1);
cy.get('[aria-label="Background color Black"]').should("have.length", 1);

//Check if button for Text Color is rendered only once within the Toolbar of RTE widget
cy.get('[data-mce-name="forecolor"]').should("have.length", 1);
cy.get('[aria-label="Text color Black"]').should("have.length", 1);
});

it("6. Check if able to add an emoji through toolbar", () => {
cy.get('[data-mce-name="overflow-button"]').click({ force: true });
cy.wait(500);
cy.get('[data-mce-name="emoticons"]').click({ force: true });
cy.wait(500);
cy.get('[data-mce-tooltip="grinning"]').click({ force: true });
cy.get('[aria-label="Reveal or hide additional toolbar items"]').click({
force: true,
});
cy.get('[aria-label="Emojis"]').click({ force: true });
cy.get('[aria-label="grinning"]').click({ force: true });
const getEditorContent = (win) => {
const tinyMceId = "rte-component-vw4zehojqt";
const editor = win.tinymce.EditorManager.get(tinyMceId);
Expand Down
10 changes: 5 additions & 5 deletions app/client/cypress/support/Objects/CommonLocators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -316,12 +316,12 @@ export class CommonLocators {
`.uppy-Informer p:contains('${msg}')`;
_fileUploadAddMore = ".uppy-DashboardContent-addMore";
_buttonText = ".bp3-button-text";
_richText_TitleBlock = "[data-mce-name='blocks']";
_richText_Heading = "[aria-label='Heading 1']";
_richText_TitleBlock = "[aria-label='Block Paragraph']";
_richText_Heading = "[title='Heading 1']";
_richText_Label_Text = ".tox-tbtn__select-label";
_richText_Text_Color =
'[data-mce-name="forecolor"] .tox-split-button__chevron';
_richText_color = (value: string) => `[data-mce-name="${value}"]`;
_richText_Text_Color = (color: string) =>
`[aria-label="Text color ${color}"] .tox-split-button__chevron`;
_richText_color = (value: string) => `[title="${value}"]`;
_richText_line = "#tinymce p span";
_treeSelectedContent = ".rc-tree-select-selection-item-content";
_switcherIcon = ".switcher-icon";
Expand Down
12 changes: 12 additions & 0 deletions app/client/cypress/support/Pages/GitSync.ts
Original file line number Diff line number Diff line change
Expand Up @@ -453,4 +453,16 @@ export class GitSync {
}
this.CloseGitSyncModal();
}

public AssertBranchName(branch: string) {
this.agHelper.AssertElementVisibility(this._branchButton);
this.agHelper.AssertContains(branch);
}

public AssertBranchNameInUrl(branch: string) {
cy.location("search")
.then((searchParams) => new URLSearchParams(searchParams))
.invoke("get", "branch")
.should("equal", branch);
}
}
13 changes: 10 additions & 3 deletions app/client/jest.config.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
function parseConfig() {
return "";
}

const LOG_LEVELS = ["debug", "error"];
const CONFIG_LOG_LEVEL_INDEX = 1;

module.exports = {
setupFiles: ["jest-canvas-mock", "<rootDir>/test/__mocks__/reactMarkdown.tsx"],
setupFiles: [
"jest-canvas-mock",
"<rootDir>/test/__mocks__/reactMarkdown.tsx",
],
roots: ["<rootDir>/src"],
transform: {
"^.+\\.(png|js|ts|tsx)$": "ts-jest",
Expand All @@ -17,7 +21,7 @@ module.exports = {
moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node", "css"],
moduleDirectories: ["node_modules", "src", "test"],
transformIgnorePatterns: [
"<rootDir>/node_modules/(?!codemirror|konva|react-dnd|dnd-core|@babel|(@blueprintjs)|@github|lodash-es|@draft-js-plugins|react-documents|linkedom|assert-never|axios)",
"<rootDir>/node_modules/(?!codemirror|konva|react-dnd|dnd-core|@babel|(@blueprintjs)|@github|lodash-es|@draft-js-plugins|react-documents|linkedom|assert-never|axios|usehooks-ts)",
],
moduleNameMapper: {
"\\.(css|less)$": "<rootDir>/test/__mocks__/styleMock.js",
Expand Down Expand Up @@ -98,7 +102,10 @@ module.exports = {
fusioncharts: {
licenseKey: parseConfig("__APPSMITH_FUSIONCHARTS_LICENSE_KEY__"),
},
enableMixpanel: parseConfig("__APPSMITH_SEGMENT_KEY__"),
mixpanel: {
enabled: parseConfig("__APPSMITH_SEGMENT_KEY__"),
apiKey: parseConfig("__APPSMITH_MIXPANEL_KEY__"),
},
algolia: {
apiId: parseConfig("__APPSMITH_ALGOLIA_API_ID__"),
apiKey: parseConfig("__APPSMITH_ALGOLIA_API_KEY__"),
Expand Down
Loading