forked from appsmithorg/appsmith
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'release' of github.com:appsmithorg/appsmith into chore/…
…git-mod-10
- Loading branch information
Showing
66 changed files
with
34,874 additions
and
432 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
name: Server Integrations Tests Workflow | ||
|
||
on: | ||
# This line enables manual triggering of this workflow. | ||
workflow_dispatch: | ||
workflow_call: | ||
inputs: | ||
pr: | ||
description: "This is the PR number in case the workflow is being called in a pull request" | ||
required: false | ||
type: number | ||
is-pg-build: | ||
description: "Flag for PG build" | ||
required: false | ||
type: string | ||
default: "false" | ||
|
||
jobs: | ||
run-tests: | ||
runs-on: ubuntu-latest-8-cores | ||
if: | | ||
github.event.pull_request.head.repo.full_name == github.repository || | ||
github.event_name == 'workflow_dispatch' | ||
defaults: | ||
run: | ||
shell: bash | ||
# Service containers to run with this job. Required for running tests | ||
services: | ||
# Label used to access the service container | ||
redis: | ||
# Docker Hub image for Redis | ||
image: redis | ||
ports: | ||
# Opens tcp port 6379 on the host and service container | ||
- 6379:6379 | ||
|
||
steps: | ||
# Check out merge commit | ||
- name: Fork based /ok-to-test checkout | ||
if: inputs.pr != 0 | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: "refs/pull/${{ inputs.pr }}/merge" | ||
|
||
# Checkout the code in the current branch in case the workflow is called because of a branch push event | ||
- name: Checkout the head commit of the branch | ||
if: inputs.pr == 0 | ||
uses: actions/checkout@v4 | ||
|
||
# Setup Java | ||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: "temurin" | ||
java-version: "17" | ||
|
||
- name: Conditionally start PostgreSQL | ||
if: | | ||
inputs.is-pg-build == 'true' | ||
run: | | ||
docker run --name appsmith-pg -p 5432:5432 -d -e POSTGRES_PASSWORD=password postgres:alpine postgres -N 1500 | ||
- name: Download the server build artifact | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: server-build | ||
path: app/server/dist/ | ||
|
||
- name: Download the rts build artifact | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: rts-dist | ||
path: app/client/packages/rts/dist | ||
|
||
- name: Un-tar the rts folder | ||
run: | | ||
tar -xvf app/client/packages/rts/dist/rts-dist.tar -C app/client/packages/rts/ | ||
echo "Cleaning up the rts tar files" | ||
rm app/client/packages/rts/dist/rts-dist.tar | ||
- name: Run rts using the untarred files | ||
run: | | ||
nohup -- node app/client/packages/rts/dist/bundle/server.js & | ||
- name: Run only integration tests on server | ||
env: | ||
ACTIVE_PROFILE: test | ||
APPSMITH_CLOUD_SERVICES_BASE_URL: "https://release-cs.appsmith.com" | ||
APPSMITH_CLOUD_SERVICES_TEMPLATE_UPLOAD_AUTH: ${{ secrets.APPSMITH_CLOUD_SERVICES_TEMPLATE_UPLOAD_AUTH }} | ||
APPSMITH_REDIS_URL: "redis://127.0.0.1:6379" | ||
APPSMITH_ENCRYPTION_PASSWORD: "password" | ||
APPSMITH_ENCRYPTION_SALT: "salt" | ||
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=() | ||
# Run tests and capture logs | ||
cd app/server | ||
mvn verify -DskipUTs=true "${args[@]}" | tee mvn_integration_test.log | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
59 changes: 59 additions & 0 deletions
59
app/client/cypress/e2e/Regression/ClientSide/JSObject/JSObject_ForkApp_spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
import { | ||
agHelper, | ||
assertHelper, | ||
entityExplorer, | ||
homePage, | ||
jsEditor, | ||
locators, | ||
} from "../../../../support/Objects/ObjectsCore"; | ||
import HomePage from "../../../../locators/HomePage"; | ||
import { | ||
PageLeftPane, | ||
PagePaneSegment, | ||
} from "../../../../support/Pages/EditorNavigation"; | ||
|
||
describe("Fork application with Jsobjects", {}, function () { | ||
//https://github.com/appsmithorg/appsmith/issues/36277 | ||
it("1. Fork app and verify all the elements", () => { | ||
homePage.ImportApp("jsObjectTesting.json"); | ||
agHelper.GetNClick(homePage._applicationName); | ||
agHelper.GetNClickByContains; | ||
agHelper.GetNClickByContains( | ||
HomePage.applicationEditMenu, | ||
"Fork application", | ||
); | ||
agHelper.GetNClick(locators._forkAppToWorkspaceBtn); | ||
agHelper.FailIfErrorToast(""); | ||
assertHelper.AssertNetworkStatus("@postForkAppWorkspace", 200); | ||
agHelper.WaitUntilEleDisappear(homePage._forkModal); | ||
homePage.NavigateToHome(); | ||
agHelper.AssertElementExist( | ||
`${homePage._applicationCard}:contains('JS object testing upto 1.5 MB (1)')`, | ||
); | ||
homePage.EditAppFromAppHover("JS object testing upto 1.5 MB (1)"); | ||
PageLeftPane.switchSegment(PagePaneSegment.JS); | ||
for (let i = 1; i <= 11; i++) { | ||
agHelper.GetNClick(locators._entityTestId(`JS${i}`)); | ||
agHelper.FailIfErrorToast(""); | ||
agHelper.AssertClassExists(locators._entityTestId(`JS${i}`), "active"); | ||
} | ||
for (let i = 12; i <= 17; i++) { | ||
agHelper.GetNClick(locators._entityTestId(`J${i}`)); | ||
agHelper.FailIfErrorToast(""); | ||
agHelper.AssertClassExists(locators._entityTestId(`J${i}`), "active"); | ||
} | ||
|
||
jsEditor.CreateJSObject('"MiddleName": "Test",\n', { | ||
paste: false, | ||
toRun: false, | ||
completeReplace: false, | ||
shouldCreateNewJSObj: false, | ||
lineNumber: 5, | ||
}); | ||
agHelper.GetNClick(locators._entityTestId("J16")); | ||
agHelper.AssertClassExists(locators._entityTestId("J16"), "active"); | ||
agHelper.GetNClick(locators._entityTestId("J17")); | ||
agHelper.AssertClassExists(locators._entityTestId("J17"), "active"); | ||
agHelper.GetNAssertContains(".CodeMirror-line ", '"MiddleName": "Test"'); | ||
}); | ||
}); |
Oops, something went wrong.