Merge pull request #28094 from appsmithorg/release_v1.9.41
chore: Release v1.9.41
2
.github/config.json
vendored
7
.github/workflows/ci-test-custom-script.yml
vendored
|
|
@ -168,6 +168,7 @@ jobs:
|
|||
-e APPSMITH_DISABLE_TELEMETRY=true \
|
||||
-e APPSMITH_INTERCOM_APP_ID=DUMMY_VALUE \
|
||||
-e APPSMITH_CLOUD_SERVICES_BASE_URL=http://host.docker.internal:5001 \
|
||||
-e APPSMITH_CLOUD_SERVICES_SIGNATURE_BASE_URL=http://host.docker.internal:8090 \
|
||||
--add-host=host.docker.internal:host-gateway --add-host=api.segment.io:host-gateway --add-host=t.appsmith.com:host-gateway \
|
||||
cicontainer
|
||||
|
||||
|
|
@ -291,7 +292,7 @@ jobs:
|
|||
if [[ ${{ inputs.pr }} -ne 0 ]]; then
|
||||
echo "COMMIT_INFO_MESSAGE=${{ env.COMMIT_INFO_MESSAGE }}" >> $GITHUB_ENV
|
||||
else
|
||||
if [[ '$eventCommit' == 'null' ]]; then
|
||||
if [[ '$eventCommit' == 'null' ]]; then
|
||||
echo "COMMIT_INFO_MESSAGE=$(echo ${{ github.event_name }} | perl -pe 's/(^|_)./uc($&)/ge;s/_//g')" >> $GITHUB_ENV
|
||||
echo "COMMIT_INFO_MESSAGE=${{ env.COMMIT_INFO_MESSAGE}} by ${{ env.COMMIT_INFO_AUTHOR }}" >> $GITHUB_ENV
|
||||
else
|
||||
|
|
@ -300,7 +301,7 @@ jobs:
|
|||
fi
|
||||
|
||||
- name: Run the cypress test
|
||||
uses: cypress-io/github-action@v5
|
||||
uses: cypress-io/github-action@v6
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
CYPRESS_USERNAME: ${{ secrets.CYPRESS_USERNAME }}
|
||||
|
|
@ -373,7 +374,7 @@ jobs:
|
|||
if: failure()
|
||||
run: |
|
||||
find ${{ github.workspace }}/app/client/cypress/cypress-logs -name '*.json' -type f | tail -n +11 | xargs -I {} rm -- {}
|
||||
|
||||
|
||||
- name: Upload failed test cypress logs artifact
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@v3
|
||||
|
|
|
|||
9
.github/workflows/ci-test-hosted.yml
vendored
|
|
@ -230,7 +230,7 @@ jobs:
|
|||
fi
|
||||
|
||||
- name: Run the cypress test
|
||||
uses: cypress-io/github-action@v5
|
||||
uses: cypress-io/github-action@v6
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
CYPRESS_USERNAME: ${{ secrets.CYPRESS_USERNAME }}
|
||||
|
|
@ -311,6 +311,13 @@ jobs:
|
|||
name: results-${{github.run_attempt}}
|
||||
path: ~/results
|
||||
|
||||
- name: Upload cypress snapshots
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: snapshots
|
||||
path: ${{ github.workspace }}/app/client/cypress/snapshots
|
||||
|
||||
# Set status = failedtest
|
||||
- name: Set fail if there are test failures
|
||||
id: test_status
|
||||
|
|
|
|||
2
.github/workflows/ci-test-limited.yml
vendored
|
|
@ -336,7 +336,7 @@ jobs:
|
|||
fi
|
||||
|
||||
- name: Run the cypress test
|
||||
uses: cypress-io/github-action@v5
|
||||
uses: cypress-io/github-action@v6
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
CYPRESS_USERNAME: ${{ secrets.CYPRESS_USERNAME }}
|
||||
|
|
|
|||
47
.github/workflows/client-build.yml
vendored
|
|
@ -21,6 +21,11 @@ on:
|
|||
description: "This is the branch to be used for the build."
|
||||
required: false
|
||||
type: string
|
||||
ads-compliant-check:
|
||||
description: "This is a boolean value in case the workflow is being called in build deploy-preview"
|
||||
required: false
|
||||
type: string
|
||||
default: "true"
|
||||
|
||||
|
||||
# Change the working directory for all the jobs in this workflow
|
||||
|
|
@ -93,7 +98,7 @@ jobs:
|
|||
done
|
||||
echo "non_ts_files=${non_ts_files[@]}" >> $GITHUB_OUTPUT
|
||||
echo "non_ts_files_count=${#non_ts_files[@]}" >> $GITHUB_OUTPUT
|
||||
|
||||
|
||||
# Comment in PR if test files are not written in ts and fail the workflow
|
||||
- name: Comment in PR if test files are not written in ts
|
||||
if: steps.check_files.outputs.non_ts_files_count != 0 && inputs.check-test-files == 'true' && inputs.pr != 0
|
||||
|
|
@ -106,6 +111,46 @@ jobs:
|
|||
<ol>${{ steps.check_files.outputs.non_ts_files }}</ol>
|
||||
- if: steps.check_files.outputs.non_ts_files_count != 0 && inputs.check-test-files == 'true' && inputs.pr != 0
|
||||
run: exit 1
|
||||
|
||||
- name: Get all the added or changed files in client/src folder
|
||||
if: inputs.ads-compliant-check == 'true' && inputs.pr != 0 && github.pull_request.base.ref == 'release'
|
||||
id: client_files
|
||||
uses: umani/changed-files@v4.0.0
|
||||
with:
|
||||
repo-token: ${{ secrets.APPSMITH_CI_TEST_PAT }}
|
||||
pattern: 'app/client/src/.*'
|
||||
pr-number: ${{ inputs.pr }}
|
||||
|
||||
# Check all the newly added files are in ts
|
||||
- name: ADS compliant check
|
||||
if: inputs.ads-compliant-check == 'true' && inputs.pr != 0 && github.pull_request.base.ref == 'release'
|
||||
id: ads_check
|
||||
run: |
|
||||
comment_files=""
|
||||
files=(${{steps.client_files.outputs.files_created}}${{steps.client_files.outputs.files_updated}})
|
||||
for file in "${files[@]}"; do
|
||||
while IFS= read -r line; do
|
||||
if echo "$line" | grep -q -E '(color|Color).*#|border.*#|(color|Color).*"'; then
|
||||
comment_files+=("$file")
|
||||
break
|
||||
fi
|
||||
done < ${file#app/client/}
|
||||
done
|
||||
unique_files=$(echo "${comment_files[@]}" | sort -u | sed '/^[[:space:]]*$/d' | sed 's/ / <li>/g')
|
||||
echo "ads_non_compliant_files=$unique_files" >> $GITHUB_OUTPUT
|
||||
echo "ads_non_compliant_count=${#unique_files[@]}" >> $GITHUB_OUTPUT
|
||||
|
||||
# Comment in PR if test files are not written in ts and fail the workflow
|
||||
- name: Comment in PR if test files are not written in ts
|
||||
if: steps.ads_check.outputs.ads_non_compliant_count != 0 && inputs.ads-compliant-check == 'true' && inputs.pr != 0 && github.pull_request.base.ref == 'release'
|
||||
uses: peter-evans/create-or-update-comment@v1
|
||||
with:
|
||||
issue-number: ${{ inputs.pr }}
|
||||
body: |
|
||||
<b> 🔴 Below files are not compliant with ADS. Please fix and re-trigger ok-to-test </b>
|
||||
<ol>${{steps.ads_check.outputs.ads_non_compliant_files}}</ol>
|
||||
- if: steps.ads_check.outputs.ads_non_compliant_count != 0 && inputs.ads-compliant-check == 'true' && inputs.pr != 0 && github.pull_request.base.ref == 'release'
|
||||
run: exit 1
|
||||
|
||||
# Create a run record exactly at the time of merge to release to
|
||||
# ensure we compare run details with code at this point
|
||||
|
|
|
|||
6
.github/workflows/perf-test-v2.yml
vendored
|
|
@ -29,6 +29,11 @@ jobs:
|
|||
run:
|
||||
working-directory: app/client
|
||||
shell: bash
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
job: [0, 1]
|
||||
|
||||
# Service containers to run with this job. Required for running tests
|
||||
services:
|
||||
|
|
@ -222,6 +227,7 @@ jobs:
|
|||
POSTGRES_PASSWORD: postgres
|
||||
NODE_TLS_REJECT_UNAUTHORIZED: "0"
|
||||
MACHINE: ubuntu-latest-4-cores
|
||||
JOB: ${{ matrix.job }}
|
||||
|
||||
run: ./start-test.sh
|
||||
|
||||
|
|
|
|||
21
Dockerfile
|
|
@ -23,17 +23,14 @@ RUN apt-get update \
|
|||
&& apt-get remove --yes git python3-pip python3-venv \
|
||||
&& apt-get autoremove --yes
|
||||
|
||||
# Install MongoDB v5.0.14, Redis, NodeJS - Service Layer, PostgreSQL v13
|
||||
# Install MongoDB v5.0.14, Redis, PostgreSQL v13
|
||||
RUN curl --silent --show-error --location https://www.mongodb.org/static/pgp/server-5.0.asc | apt-key add - \
|
||||
&& echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-5.0.list \
|
||||
&& curl --silent --show-error --location https://deb.nodesource.com/setup_18.x | bash - \
|
||||
&& echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" | tee /etc/apt/sources.list.d/pgdg.list \
|
||||
&& echo "deb http://apt.postgresql.org/pub/repos/apt $(grep CODENAME /etc/lsb-release | cut -d= -f2)-pgdg main" | tee /etc/apt/sources.list.d/pgdg.list \
|
||||
&& curl --silent --show-error --location https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - \
|
||||
&& apt update \
|
||||
&& apt-get install --no-install-recommends --yes mongodb-org nodejs redis postgresql-13 \
|
||||
&& apt-get clean \
|
||||
# This is to get semver 7.5.2, for a CVE fix, might be able to remove it with later versions on NodeJS.
|
||||
&& npm install -g npm@9.7.2
|
||||
&& apt-get install --no-install-recommends --yes mongodb-org redis postgresql-13 \
|
||||
&& apt-get clean
|
||||
|
||||
# Install Java
|
||||
RUN set -o xtrace \
|
||||
|
|
@ -43,6 +40,12 @@ RUN set -o xtrace \
|
|||
&& curl --location --output /tmp/java.tar.gz "https://github.com/adoptium/temurin17-binaries/releases/download/jdk-$version/OpenJDK17U-jdk_$(uname -m | sed s/x86_64/x64/)_linux_hotspot_$(echo $version | tr + _).tar.gz" \
|
||||
&& tar -xzf /tmp/java.tar.gz -C /opt/java --strip-components 1
|
||||
|
||||
# Install NodeJS
|
||||
RUN set -o xtrace \
|
||||
&& mkdir -p /opt/node \
|
||||
&& file="$(curl -sS 'https://nodejs.org/dist/latest-v18.x/' | awk -F\" '$2 ~ /linux-'"$(uname -m | sed 's/x86_64/x64/; s/aarch64/arm64/')"'.tar.gz/ {print $2}')" \
|
||||
&& curl "https://nodejs.org/dist/latest-v18.x/$file" | tar -xz -C /opt/node --strip-components 1
|
||||
|
||||
# Clean up cache file - Service layer
|
||||
RUN rm -rf \
|
||||
/root/.cache \
|
||||
|
|
@ -85,6 +88,8 @@ COPY ./app/client/build editor/
|
|||
# Add RTS - Application Layer
|
||||
COPY ./app/client/packages/rts/dist rts/
|
||||
|
||||
ENV PATH /opt/appsmith/utils/node_modules/.bin:/opt/java/bin:/opt/node/bin:$PATH
|
||||
|
||||
RUN cd ./utils && npm install --only=prod && npm install --only=prod -g . && cd - \
|
||||
&& chmod 0644 /etc/cron.d/* \
|
||||
&& chmod +x entrypoint.sh renew-certificate.sh healthcheck.sh templates/nginx-app.conf.sh /watchtower-hooks/*.sh \
|
||||
|
|
@ -92,8 +97,6 @@ RUN cd ./utils && npm install --only=prod && npm install --only=prod -g . && cd
|
|||
&& find / \( -path /proc -prune \) -o \( \( -perm -2000 -o -perm -4000 \) -print -exec chmod -s '{}' + \) || true \
|
||||
&& node prepare-image.mjs
|
||||
|
||||
ENV PATH /opt/appsmith/utils/node_modules/.bin:/opt/java/bin:$PATH
|
||||
|
||||
LABEL com.centurylinklabs.watchtower.lifecycle.pre-check=/watchtower-hooks/pre-check.sh
|
||||
LABEL com.centurylinklabs.watchtower.lifecycle.pre-update=/watchtower-hooks/pre-update.sh
|
||||
|
||||
|
|
|
|||
14
README.md
|
|
@ -80,8 +80,8 @@ Let's build great software together.
|
|||
[](https://github.com/AnaghHegde)
|
||||
[](https://github.com/arunvjn)
|
||||
[](https://github.com/NandanAnantharamu)
|
||||
[](https://github.com/nayan-rafiq)
|
||||
[](https://github.com/abhvsn)
|
||||
[](https://github.com/nayan-rafiq)
|
||||
[](https://github.com/ankitakinger)
|
||||
[](https://github.com/jsartisan)
|
||||
[](https://github.com/Rishabh-Rathod)
|
||||
|
|
@ -94,20 +94,19 @@ Let's build great software together.
|
|||
[](https://github.com/ayushpahwa)
|
||||
[](https://github.com/yatinappsmith)
|
||||
[](https://github.com/Parthvi12)
|
||||
[](https://github.com/somangshu)
|
||||
[](https://github.com/ApekshaBhosale)
|
||||
[](https://github.com/somangshu)
|
||||
[](https://github.com/pratapaprasanna)
|
||||
[](https://github.com/pranavkanade)
|
||||
[](https://github.com/sneha122)
|
||||
[](https://github.com/pratapaprasanna)
|
||||
[](https://github.com/albinAppsmith)
|
||||
[](https://github.com/sum35h)
|
||||
[](https://github.com/marks0351)
|
||||
[](https://github.com/ashit-rath)
|
||||
[](https://github.com/nsarupr)
|
||||
[](https://github.com/rajatagrawal)
|
||||
[](https://github.com/sondermanish)
|
||||
[](https://github.com/NilanshBansal)
|
||||
[](https://github.com/dhruvikn)
|
||||
[](https://github.com/sondermanish)
|
||||
[](https://github.com/KelvinOm)
|
||||
[](https://github.com/areyabhishek)
|
||||
[](https://github.com/Druthi)
|
||||
|
|
@ -121,11 +120,11 @@ Let's build great software together.
|
|||
[](https://github.com/sharanya-appsmith)
|
||||
[](https://github.com/brayn003)
|
||||
[](https://github.com/shubham7saxena7)
|
||||
[](https://github.com/ramsaptami)
|
||||
[](https://github.com/dvj1988)
|
||||
[](https://github.com/ramsaptami)
|
||||
[](https://github.com/vivonk)
|
||||
[](https://github.com/gitstart-appsmith)
|
||||
[](https://github.com/rohan-arthur)
|
||||
[](https://github.com/gitstart-appsmith)
|
||||
[](https://github.com/danciaclara)
|
||||
[](https://github.com/kocharrahul7)
|
||||
[](https://github.com/riteshkew)
|
||||
|
|
@ -186,6 +185,7 @@ Let's build great software together.
|
|||
[](https://github.com/Vijetha-Kaja)
|
||||
[](https://github.com/haojin111)
|
||||
[](https://github.com/berzerkeer)
|
||||
[](https://github.com/sum35h)
|
||||
[](https://github.com/ChandanBalajiBP)
|
||||
[](https://github.com/devrk96)
|
||||
[](https://github.com/keyurparalkar)
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@
|
|||
"project": "./tsconfig.json"
|
||||
},
|
||||
"rules": {
|
||||
"@typescript-eslint/consistent-type-definitions": "error",
|
||||
"@typescript-eslint/prefer-nullish-coalescing": "error",
|
||||
"@typescript-eslint/promise-function-async": "error",
|
||||
"@typescript-eslint/strict-boolean-expressions": "error",
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ is_merge_commit=$(git rev-parse -q --verify MERGE_HEAD)
|
|||
|
||||
if [ "$is_merge_commit" ]; then
|
||||
echo "Skipping server and client checks for merge commit"
|
||||
else
|
||||
else
|
||||
if [ "$is_server_change" -ge 1 ]; then
|
||||
echo "Running Spotless check ..."
|
||||
pushd app/server > /dev/null
|
||||
|
|
@ -23,7 +23,7 @@ else
|
|||
|
||||
if [ "$is_client_change" -ge 1 ]; then
|
||||
echo "Running client check ..."
|
||||
npx lint-staged --cwd app/client && git-secrets --scan --untracked && git-secrets --scan -r
|
||||
npx lint-staged --cwd app/client
|
||||
else
|
||||
echo "Skipping client side check..."
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -1,8 +0,0 @@
|
|||
{
|
||||
"src/**/*.{js,ts,tsx}": ["npx eslint --fix"],
|
||||
"src/**/*.{js,ts,tsx,css,md,json}": ["npx prettier --write"],
|
||||
"cypress/**/*.{js,ts}": ["cd ./cypress && npx eslint -c .eslintrc.json --fix"],
|
||||
"cypress/**/*.{js,ts,json}": ["npx prettier --write"],
|
||||
"packages/**/*.{js,ts,tsx}": ["npx eslint --fix"],
|
||||
"packages/**/*.{js,ts,tsx,css,mdx,json}": ["npx prettier --write"]
|
||||
}
|
||||
11
app/client/.lintstagedrc.json
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"src/**/*.{js,ts,tsx}": ["eslint --fix --cache"],
|
||||
"src/**/*.{css,md,json}": ["prettier --write --cache"],
|
||||
"cypress/**/*.{js,ts}": [
|
||||
"cd ./cypress && eslint -c .eslintrc.json --fix --cache"
|
||||
],
|
||||
"cypress/**/*.json": ["prettier --write --cache"],
|
||||
"packages/**/*.{js,ts,tsx}": ["eslint --fix --cache"],
|
||||
"packages/**/*.{css,mdx,json}": ["prettier --write --cache"],
|
||||
"*": ["git-secrets --scan --cached"]
|
||||
}
|
||||
|
|
@ -49,8 +49,6 @@ module.exports = {
|
|||
"postcss-nesting",
|
||||
"postcss-import",
|
||||
"postcss-at-rules-variables",
|
||||
"postcss-conditionals",
|
||||
"postcss-for",
|
||||
"postcss-each",
|
||||
"postcss-url",
|
||||
"postcss-modules-values",
|
||||
|
|
|
|||
|
|
@ -6,6 +6,9 @@ import {
|
|||
dataSources,
|
||||
agHelper,
|
||||
entityExplorer,
|
||||
table,
|
||||
assertHelper,
|
||||
appSettings,
|
||||
} from "../../support/Objects/ObjectsCore";
|
||||
|
||||
const workspaceName = "gsheet apps";
|
||||
|
|
@ -22,8 +25,7 @@ describe("GSheet-Functional Tests With All Access", function () {
|
|||
|
||||
//Adding query to insert a new spreadsheet
|
||||
homePage.NavigateToHome();
|
||||
homePage.CreateAppInWorkspace(workspaceName);
|
||||
homePage.RenameApplication(appName);
|
||||
homePage.CreateAppInWorkspace(workspaceName, appName);
|
||||
gsheetHelper.AddNewSpreadsheetQuery(
|
||||
dataSourceName,
|
||||
spreadSheetName,
|
||||
|
|
@ -285,8 +287,44 @@ describe("GSheet-Functional Tests With All Access", function () {
|
|||
});
|
||||
});
|
||||
|
||||
it("8. Import an app with all access sheet", function () {
|
||||
homePage.NavigateToHome();
|
||||
homePage.ImportApp("ImportAppAllAccess.json", workspaceName);
|
||||
assertHelper.WaitForNetworkCall("importNewApplication").then(() => {
|
||||
agHelper.Sleep();
|
||||
//Validate table is not empty!
|
||||
table.WaitUntilTableLoad(0, 0, "v2");
|
||||
});
|
||||
// Assert table data
|
||||
table.ReadTableRowColumnData(0, 0, "v2").then((cellData) => {
|
||||
expect(cellData).to.eq("eac7efa5dbd3d667f26eb3d3ab504464");
|
||||
});
|
||||
homePage.NavigateToHome();
|
||||
homePage.DeleteApplication("ImportAppAllAccess");
|
||||
});
|
||||
|
||||
it("9. App level import of app with all access gsheet", function () {
|
||||
homePage.CreateAppInWorkspace(workspaceName, "AppLevelImport");
|
||||
appSettings.OpenAppSettings();
|
||||
appSettings.GoToImport();
|
||||
agHelper.ClickButton("Import");
|
||||
homePage.ImportApp("ImportAppAllAccess.json", "", true);
|
||||
cy.wait("@importNewApplication").then(() => {
|
||||
agHelper.Sleep();
|
||||
agHelper.RefreshPage();
|
||||
table.WaitUntilTableLoad(0, 0, "v2");
|
||||
});
|
||||
// Assert table data
|
||||
table.ReadTableRowColumnData(0, 0, "v2").then((cellData) => {
|
||||
expect(cellData).to.eq("eac7efa5dbd3d667f26eb3d3ab504464");
|
||||
});
|
||||
homePage.NavigateToHome();
|
||||
homePage.DeleteApplication("AppLevelImport");
|
||||
});
|
||||
|
||||
after("Delete spreadsheet and app", function () {
|
||||
// Delete spreadsheet and app
|
||||
homePage.SearchAndOpenApp(appName);
|
||||
gsheetHelper.DeleteSpreadsheetQuery(dataSourceName, spreadSheetName);
|
||||
cy.get("@postExecute").then((interception: any) => {
|
||||
expect(interception.response.body.data.body.message).to.deep.equal(
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ import {
|
|||
deployMode,
|
||||
locators,
|
||||
draggableWidgets,
|
||||
appSettings,
|
||||
} from "../../support/Objects/ObjectsCore";
|
||||
|
||||
const workspaceName = "gsheet apps";
|
||||
|
|
@ -45,6 +46,7 @@ describe("GSheet Miscellaneous Tests", function () {
|
|||
JSON.stringify(GSHEET_DATA),
|
||||
);
|
||||
cy.get("@postExecute").then((interception: any) => {
|
||||
agHelper.Sleep();
|
||||
expect(
|
||||
interception.response.body.data.body.properties.title,
|
||||
).to.deep.equal(spreadSheetName);
|
||||
|
|
@ -212,8 +214,62 @@ describe("GSheet Miscellaneous Tests", function () {
|
|||
table.WaitUntilTableLoad();
|
||||
});
|
||||
|
||||
it("6. Bug: 16391 - Verify placeholder texts for insert one/many queries", function () {
|
||||
// Verify place holder text for Insert one query
|
||||
let placeholderText =
|
||||
'{\n "name": {{nameInput.text}},\n "dob": {{dobPicker.formattedDate}},\n "gender": {{genderSelect.selectedOptionValue}} \n}';
|
||||
gsheetHelper.EnterBasicQueryValues(
|
||||
"Insert One",
|
||||
dataSourceName,
|
||||
spreadSheetName,
|
||||
false,
|
||||
);
|
||||
agHelper.AssertText(
|
||||
dataSources._gSheetQueryPlaceholder,
|
||||
"text",
|
||||
placeholderText,
|
||||
);
|
||||
|
||||
// Verify place holder text for Insert many query
|
||||
placeholderText =
|
||||
'[{\n "name": {{nameInput.text}},\n "dob": {{dobPicker.formattedDate}},\n "gender": {{genderSelect.selectedOptionValue}} \n}]';
|
||||
|
||||
gsheetHelper.EnterBasicQueryValues(
|
||||
"Insert Many",
|
||||
dataSourceName,
|
||||
spreadSheetName,
|
||||
false,
|
||||
);
|
||||
agHelper.AssertText(
|
||||
dataSources._gSheetQueryPlaceholder,
|
||||
"text",
|
||||
placeholderText,
|
||||
);
|
||||
});
|
||||
|
||||
// This test is commented since we can't use Cypress to go to the Google authorization screen. We will uncomment it whenever we figure out how to do it.
|
||||
// it("7. Bug#26024 App level import of gsheet app", function () {
|
||||
// homePage.NavigateToHome();
|
||||
// homePage.CreateNewWorkspace("AppLevelImport");
|
||||
// homePage.CreateAppInWorkspace("AppLevelImport", "AppLevelImportCheck");
|
||||
// appSettings.OpenAppSettings();
|
||||
// appSettings.GoToImport();
|
||||
// agHelper.ClickButton("Import");
|
||||
// homePage.ImportApp("ImportAppAllAccess.json", "", true);
|
||||
// cy.wait("@importNewApplication").then(() => {
|
||||
// agHelper.Sleep();
|
||||
// agHelper.ClickButton("Save and authorize");
|
||||
// });
|
||||
// cy.url().should("contain", "accounts.google.com");
|
||||
// homePage.NavigateToHome();
|
||||
// homePage.DeleteApplication("AppLevelImportCheck");
|
||||
// homePage.DeleteWorkspace("AppLevelImport");
|
||||
// });
|
||||
|
||||
after("Delete spreadsheet and app", function () {
|
||||
// Delete spreadsheet and app
|
||||
homePage.NavigateToHome();
|
||||
homePage.SearchAndOpenApp(appName);
|
||||
gsheetHelper.DeleteSpreadsheetQuery(dataSourceName, spreadSheetName);
|
||||
cy.get("@postExecute").then((interception: any) => {
|
||||
expect(interception.response.body.data.body.message).to.deep.equal(
|
||||
|
|
|
|||
|
|
@ -6,6 +6,9 @@ import {
|
|||
dataSources,
|
||||
agHelper,
|
||||
entityExplorer,
|
||||
assertHelper,
|
||||
table,
|
||||
appSettings,
|
||||
} from "../../support/Objects/ObjectsCore";
|
||||
|
||||
describe("GSheet-Functional Tests With Read/Write Access", function () {
|
||||
|
|
@ -26,8 +29,7 @@ describe("GSheet-Functional Tests With Read/Write Access", function () {
|
|||
|
||||
//Adding query to insert a new spreadsheet
|
||||
homePage.NavigateToHome();
|
||||
homePage.CreateAppInWorkspace(workspaceName);
|
||||
homePage.RenameApplication(appName);
|
||||
homePage.CreateAppInWorkspace(workspaceName, appName);
|
||||
gsheetHelper.AddNewSpreadsheetQuery(
|
||||
dataSourceName.readNWrite,
|
||||
spreadSheetName,
|
||||
|
|
@ -296,8 +298,44 @@ describe("GSheet-Functional Tests With Read/Write Access", function () {
|
|||
});
|
||||
});
|
||||
|
||||
it("9. Import an app with read write access sheet", function () {
|
||||
homePage.NavigateToHome();
|
||||
homePage.ImportApp("ImportAppReadWriteAccess.json", workspaceName);
|
||||
assertHelper.WaitForNetworkCall("importNewApplication").then(() => {
|
||||
agHelper.Sleep();
|
||||
//Validate table is not empty!
|
||||
table.WaitUntilTableLoad(0, 0, "v2");
|
||||
});
|
||||
// Assert table data
|
||||
table.ReadTableRowColumnData(0, 0, "v2").then((cellData) => {
|
||||
expect(cellData).to.eq("eac7efa5dbd3d667f26eb3d3ab504464");
|
||||
});
|
||||
homePage.NavigateToHome();
|
||||
homePage.DeleteApplication("ImportAppReadWriteAccess");
|
||||
});
|
||||
|
||||
it("10. App level import of app with read and write access gsheet", function () {
|
||||
homePage.CreateAppInWorkspace(workspaceName, "AppLevelImportReadNWrite");
|
||||
appSettings.OpenAppSettings();
|
||||
appSettings.GoToImport();
|
||||
agHelper.ClickButton("Import");
|
||||
homePage.ImportApp("ImportAppReadWriteAccess.json", "", true);
|
||||
cy.wait("@importNewApplication").then(() => {
|
||||
agHelper.Sleep();
|
||||
agHelper.RefreshPage();
|
||||
table.WaitUntilTableLoad(0, 0, "v2");
|
||||
});
|
||||
// Assert table data
|
||||
table.ReadTableRowColumnData(0, 0, "v2").then((cellData) => {
|
||||
expect(cellData).to.eq("eac7efa5dbd3d667f26eb3d3ab504464");
|
||||
});
|
||||
homePage.NavigateToHome();
|
||||
homePage.DeleteApplication("AppLevelImportReadNWrite");
|
||||
});
|
||||
|
||||
after("Delete spreadsheet and app", function () {
|
||||
// Delete spreadsheet and app
|
||||
homePage.SearchAndOpenApp(appName);
|
||||
gsheetHelper.DeleteSpreadsheetQuery(
|
||||
dataSourceName.allAccess,
|
||||
spreadSheetName,
|
||||
|
|
|
|||
|
|
@ -6,6 +6,9 @@ import {
|
|||
dataSources,
|
||||
agHelper,
|
||||
entityExplorer,
|
||||
assertHelper,
|
||||
table,
|
||||
appSettings,
|
||||
} from "../../support/Objects/ObjectsCore";
|
||||
|
||||
describe("GSheet-Functional Tests With Read Access", function () {
|
||||
|
|
@ -26,8 +29,7 @@ describe("GSheet-Functional Tests With Read Access", function () {
|
|||
|
||||
//Adding query to insert a new spreadsheet
|
||||
homePage.NavigateToHome();
|
||||
homePage.CreateAppInWorkspace(workspaceName);
|
||||
homePage.RenameApplication(appName);
|
||||
homePage.CreateAppInWorkspace(workspaceName, appName);
|
||||
gsheetHelper.AddNewSpreadsheetQuery(
|
||||
dataSourceName.allAccess,
|
||||
spreadSheetName,
|
||||
|
|
@ -278,8 +280,47 @@ describe("GSheet-Functional Tests With Read Access", function () {
|
|||
});
|
||||
});
|
||||
|
||||
it("8. Import an app with read only access sheet", function () {
|
||||
homePage.NavigateToHome();
|
||||
homePage.ImportApp("ImportAppReadAccess.json", workspaceName);
|
||||
assertHelper.WaitForNetworkCall("importNewApplication").then(() => {
|
||||
agHelper.Sleep();
|
||||
//Validate table is not empty!
|
||||
table.WaitUntilTableLoad(0, 0, "v2");
|
||||
});
|
||||
// Assert table data
|
||||
table.ReadTableRowColumnData(0, 0, "v2").then((cellData) => {
|
||||
expect(cellData).to.eq("eac7efa5dbd3d667f26eb3d3ab504464");
|
||||
});
|
||||
homePage.NavigateToHome();
|
||||
homePage.DeleteApplication("ImportAppReadAccess");
|
||||
});
|
||||
|
||||
it("9. App level import of app with read only access gsheet", function () {
|
||||
homePage.CreateAppInWorkspace(
|
||||
workspaceName,
|
||||
"AppLevelImportReadOnlyAccess",
|
||||
);
|
||||
appSettings.OpenAppSettings();
|
||||
appSettings.GoToImport();
|
||||
agHelper.ClickButton("Import");
|
||||
homePage.ImportApp("ImportAppReadAccess.json", "", true);
|
||||
cy.wait("@importNewApplication").then(() => {
|
||||
agHelper.Sleep();
|
||||
agHelper.RefreshPage();
|
||||
table.WaitUntilTableLoad(0, 0, "v2");
|
||||
});
|
||||
// Assert table data
|
||||
table.ReadTableRowColumnData(0, 0, "v2").then((cellData) => {
|
||||
expect(cellData).to.eq("eac7efa5dbd3d667f26eb3d3ab504464");
|
||||
});
|
||||
homePage.NavigateToHome();
|
||||
homePage.DeleteApplication("AppLevelImportReadOnlyAccess");
|
||||
});
|
||||
|
||||
after("Delete spreadsheet and app", function () {
|
||||
// Delete spreadsheet and app
|
||||
homePage.SearchAndOpenApp(appName);
|
||||
gsheetHelper.DeleteSpreadsheetQuery(
|
||||
dataSourceName.allAccess,
|
||||
spreadSheetName,
|
||||
|
|
|
|||
|
|
@ -6,6 +6,9 @@ import {
|
|||
dataSources,
|
||||
agHelper,
|
||||
entityExplorer,
|
||||
assertHelper,
|
||||
table,
|
||||
appSettings,
|
||||
} from "../../support/Objects/ObjectsCore";
|
||||
|
||||
const workspaceName = "gsheet apps";
|
||||
|
|
@ -20,8 +23,7 @@ describe("GSheet-Functional Tests With Selected Access", function () {
|
|||
|
||||
//Adding app
|
||||
homePage.NavigateToHome();
|
||||
homePage.CreateAppInWorkspace(workspaceName);
|
||||
homePage.RenameApplication(appName);
|
||||
homePage.CreateAppInWorkspace(workspaceName, appName);
|
||||
});
|
||||
|
||||
it("1. Add and verify fetch details query", () => {
|
||||
|
|
@ -290,9 +292,46 @@ describe("GSheet-Functional Tests With Selected Access", function () {
|
|||
});
|
||||
});
|
||||
|
||||
it("8. Import an app with selected access sheet", function () {
|
||||
homePage.NavigateToHome();
|
||||
homePage.ImportApp("ImportAppSelectedAccess.json", workspaceName);
|
||||
assertHelper.WaitForNetworkCall("importNewApplication").then(() => {
|
||||
agHelper.Sleep();
|
||||
//Validate table is not empty!
|
||||
table.WaitUntilTableLoad(0, 0, "v2");
|
||||
});
|
||||
// Assert table data
|
||||
table.ReadTableRowColumnData(0, 0, "v2").then((cellData) => {
|
||||
expect(cellData).to.eq("eac7efa5dbd3d667f26eb3d3ab504464");
|
||||
});
|
||||
homePage.NavigateToHome();
|
||||
homePage.DeleteApplication("ImportAppSelectedAccess");
|
||||
});
|
||||
|
||||
it("9. App level import of app with Selected sheet access gsheet", function () {
|
||||
homePage.CreateAppInWorkspace(
|
||||
workspaceName,
|
||||
"AppLevelImportSelectedAccess",
|
||||
);
|
||||
appSettings.OpenAppSettings();
|
||||
appSettings.GoToImport();
|
||||
agHelper.ClickButton("Import");
|
||||
homePage.ImportApp("ImportAppSelectedAccess.json", "", true);
|
||||
cy.wait("@importNewApplication").then(() => {
|
||||
agHelper.Sleep();
|
||||
agHelper.RefreshPage();
|
||||
table.WaitUntilTableLoad(0, 0, "v2");
|
||||
});
|
||||
// Assert table data
|
||||
table.ReadTableRowColumnData(0, 0, "v2").then((cellData) => {
|
||||
expect(cellData).to.eq("eac7efa5dbd3d667f26eb3d3ab504464");
|
||||
});
|
||||
homePage.NavigateToHome();
|
||||
homePage.DeleteApplication("AppLevelImportSelectedAccess");
|
||||
});
|
||||
|
||||
after("Delete app", function () {
|
||||
// Delete app
|
||||
homePage.NavigateToHome();
|
||||
homePage.DeleteApplication(appName);
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -51,6 +51,7 @@ describe("GSheet-widget binding", function () {
|
|||
|
||||
// Adding suggested widgets and verify
|
||||
dataSources.AddSuggestedWidget(Widgets.Table);
|
||||
agHelper.RefreshPage();
|
||||
table.ReadTableRowColumnData(0, 0, "v2").then((cellData) => {
|
||||
expect(cellData).to.eq("eac7efa5dbd3d667f26eb3d3ab504464");
|
||||
});
|
||||
|
|
|
|||
|
|
@ -51,6 +51,7 @@ describe("GSheet-widget binding for selected sheet access", function () {
|
|||
|
||||
// Adding suggested widgets and verify
|
||||
dataSources.AddSuggestedWidget(Widgets.Table);
|
||||
agHelper.RefreshPage();
|
||||
table.ReadTableRowColumnData(0, 0, "v2").then((cellData) => {
|
||||
expect(cellData).to.eq("eac7efa5dbd3d667f26eb3d3ab504464");
|
||||
});
|
||||
|
|
|
|||
|
|
@ -62,8 +62,8 @@ describe("Admin settings page", function () {
|
|||
cy.url().should("contain", "/settings/authentication");
|
||||
cy.get(adminsSettings.emailTab).click();
|
||||
cy.url().should("contain", "/settings/email");
|
||||
cy.get(adminsSettings.googleMapsTab).click();
|
||||
cy.url().should("contain", "/settings/google-maps");
|
||||
cy.get(adminsSettings.developerSettingsTab).click();
|
||||
cy.url().should("contain", "/settings/developer-settings");
|
||||
cy.get(adminsSettings.versionTab).click();
|
||||
cy.url().should("contain", "/settings/version");
|
||||
},
|
||||
|
|
@ -90,7 +90,7 @@ describe("Admin settings page", function () {
|
|||
cy.url().should("contain", "/settings/authentication");
|
||||
cy.get(adminsSettings.emailTab).click();
|
||||
cy.url().should("contain", "/settings/email");
|
||||
cy.get(adminsSettings.googleMapsTab).should("not.exist");
|
||||
cy.get(adminsSettings.developerSettingsTab).should("not.exist");
|
||||
cy.get(adminsSettings.versionTab).click();
|
||||
cy.url().should("contain", "/settings/version");
|
||||
},
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ const routes = {
|
|||
SETTINGS: "/settings",
|
||||
GENERAL: "/settings/general",
|
||||
EMAIL: "/settings/email",
|
||||
GOOGLE_MAPS: "/settings/google-maps",
|
||||
DEVELOPER_SETTINGS: "/settings/developer-settings",
|
||||
AUTHENTICATION: "/settings/authentication",
|
||||
GOOGLEAUTH: "/settings/authentication/google-auth",
|
||||
GITHUBAUTH: "/settings/authentication/github-auth",
|
||||
|
|
@ -45,8 +45,8 @@ describe("Admin settings page", function () {
|
|||
|
||||
it("2. should test that page header is visible", () => {
|
||||
cy.get(adminsSettings.appsmithHeader).should("be.visible");
|
||||
cy.visit(routes.GOOGLE_MAPS, { timeout: 60000 });
|
||||
cy.url().should("contain", "/google-maps");
|
||||
cy.visit(routes.DEVELOPER_SETTINGS, { timeout: 60000 });
|
||||
cy.url().should("contain", "/developer-settings");
|
||||
cy.wait(2000); //page to load properly
|
||||
cy.get(adminsSettings.appsmithHeader).should("be.visible");
|
||||
cy.visit(routes.GOOGLEAUTH, { timeout: 60000 });
|
||||
|
|
@ -84,8 +84,8 @@ describe("Admin settings page", function () {
|
|||
cy.url().should("contain", routes.AUTHENTICATION);
|
||||
cy.get(adminsSettings.emailTab).click();
|
||||
cy.url().should("contain", routes.EMAIL);
|
||||
cy.get(adminsSettings.googleMapsTab).click();
|
||||
cy.url().should("contain", routes.GOOGLE_MAPS);
|
||||
cy.get(adminsSettings.developerSettingsTab).click();
|
||||
cy.url().should("contain", routes.DEVELOPER_SETTINGS);
|
||||
cy.get(adminsSettings.versionTab).click();
|
||||
cy.url().should("contain", routes.VERSION);
|
||||
},
|
||||
|
|
@ -105,7 +105,7 @@ describe("Admin settings page", function () {
|
|||
cy.get(adminsSettings.authenticationTab).click();
|
||||
cy.url().should("contain", routes.AUTHENTICATION);
|
||||
cy.get(adminsSettings.emailTab).click();
|
||||
cy.get(adminsSettings.googleMapsTab).should("not.exist");
|
||||
cy.get(adminsSettings.developerSettingsTab).should("not.exist");
|
||||
cy.url().should("contain", routes.EMAIL);
|
||||
cy.get(adminsSettings.versionTab).click();
|
||||
cy.url().should("contain", routes.VERSION);
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ const routes = {
|
|||
SETTINGS: "/settings",
|
||||
GENERAL: "/settings/general",
|
||||
EMAIL: "/settings/email",
|
||||
GOOGLE_MAPS: "/settings/google-maps",
|
||||
DEVELOPER_SETTINGS: "/settings/developer-settings",
|
||||
AUTHENTICATION: "/settings/authentication",
|
||||
GOOGLEAUTH: "/settings/authentication/google-auth",
|
||||
GITHUBAUTH: "/settings/authentication/github-auth",
|
||||
|
|
@ -23,7 +23,7 @@ const routes = {
|
|||
|
||||
describe("Admin settings page", function () {
|
||||
it("1. should test that configure link redirects to google maps setup doc", () => {
|
||||
cy.visit(routes.GOOGLE_MAPS, { timeout: 60000 });
|
||||
cy.visit(routes.DEVELOPER_SETTINGS, { timeout: 60000 });
|
||||
cy.get(adminsSettings.readMoreLink).within(() => {
|
||||
cy.get("a")
|
||||
.should("have.attr", "target", "_blank")
|
||||
|
|
|
|||
|
|
@ -221,7 +221,7 @@ describe("Git sync modal: connect tab", function () {
|
|||
});
|
||||
|
||||
cy.get(gitSyncLocators.connectSubmitBtn).scrollIntoView().click();
|
||||
cy.get(gitSyncLocators.connetStatusbar).should("exist");
|
||||
// cy.get(gitSyncLocators.connetStatusbar).should("exist");
|
||||
cy.wait("@connectGitLocalRepo").then((interception) => {
|
||||
const status = interception.response.body.responseMeta.status;
|
||||
expect(status).to.be.gte(400);
|
||||
|
|
|
|||
|
|
@ -92,26 +92,10 @@ describe("Repo Limit Exceeded Error Modal", function () {
|
|||
});
|
||||
|
||||
after(() => {
|
||||
cy.request({
|
||||
method: "DELETE",
|
||||
url: "api/v1/applications/" + repoName1,
|
||||
failOnStatusCode: false,
|
||||
});
|
||||
cy.request({
|
||||
method: "DELETE",
|
||||
url: "api/v1/applications/" + repoName2,
|
||||
failOnStatusCode: false,
|
||||
});
|
||||
cy.request({
|
||||
method: "DELETE",
|
||||
url: "api/v1/applications/" + repoName3,
|
||||
failOnStatusCode: false,
|
||||
});
|
||||
cy.request({
|
||||
method: "DELETE",
|
||||
url: "api/v1/applications/" + repoName4,
|
||||
failOnStatusCode: false,
|
||||
});
|
||||
homePage.DeleteAppviaAPI(repoName1);
|
||||
homePage.DeleteAppviaAPI(repoName2);
|
||||
homePage.DeleteAppviaAPI(repoName3);
|
||||
homePage.DeleteAppviaAPI(repoName4);
|
||||
gitSync.DeleteTestGithubRepo(repoName1);
|
||||
gitSync.DeleteTestGithubRepo(repoName2);
|
||||
gitSync.DeleteTestGithubRepo(repoName3);
|
||||
|
|
|
|||
|
|
@ -272,4 +272,40 @@ describe("Canvas context widget selection", function () {
|
|||
cy.get(".is-selected").should("contain", "Tab 2");
|
||||
cy.get(".t--property-pane-title").should("contain", "Button4");
|
||||
});
|
||||
|
||||
it("11. Widgets inside modal widget should open when loaded from the URL", function () {
|
||||
//select widget in page1
|
||||
_.entityExplorer.SelectEntityInModal("Modal1", "Widgets");
|
||||
|
||||
//verify the Modal1 is open and Text1 is selected in page1
|
||||
cy.get(`div[data-testid='t--selected']`).should("have.length", 1);
|
||||
cy.get(".t--modal-widget").should("have.length", 1);
|
||||
cy.get(".t--property-pane-title").should("contain", "Text1");
|
||||
|
||||
// Get the current URL
|
||||
cy.url().then((url) => {
|
||||
//switch to page2
|
||||
_.entityExplorer.SelectEntityByName(page2, "Pages");
|
||||
|
||||
//select widget in page2
|
||||
_.entityExplorer.SelectEntityByName("Text1", "Widgets");
|
||||
|
||||
//verify the widget is selected in page2
|
||||
cy.get(`div[data-testid='t--selected']`).should("have.length", 1);
|
||||
|
||||
// open the URL
|
||||
cy.visit(url);
|
||||
|
||||
// wati for the page to load
|
||||
cy.wait(4000);
|
||||
|
||||
//select widget in page1
|
||||
_.entityExplorer.SelectEntityInModal("Modal1", "Widgets");
|
||||
|
||||
//verify the Modal1 is open and Text1 is selected in page1
|
||||
cy.get(`div[data-testid='t--selected']`).should("have.length", 1);
|
||||
cy.get(".t--modal-widget").should("have.length", 1);
|
||||
cy.get(".t--property-pane-title").should("contain", "Text1");
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -217,7 +217,7 @@ describe("FirstTimeUserOnboarding", function () {
|
|||
false,
|
||||
);
|
||||
agHelper.Sleep(500);
|
||||
agHelper.GetNClick(debuggerHelper.locators._helpButton);
|
||||
agHelper.GetNClick(debuggerHelper.locators._helpButton, 0, true);
|
||||
agHelper.AssertElementVisibility(OnboardingLocator.checklistDatasourceBtn);
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,164 @@
|
|||
/// <reference types="Cypress" />
|
||||
import {
|
||||
agHelper,
|
||||
entityExplorer,
|
||||
propPane,
|
||||
draggableWidgets,
|
||||
deployMode,
|
||||
locators,
|
||||
} from "../../../../../support/Objects/ObjectsCore";
|
||||
|
||||
const location = [
|
||||
{
|
||||
lat: 28.7040592,
|
||||
long: 77.10249019999999,
|
||||
title: "Delhi, India",
|
||||
},
|
||||
{
|
||||
lat: 28.4594965,
|
||||
long: 77.0266383,
|
||||
title: "Gurugram, Haryana, India",
|
||||
},
|
||||
{
|
||||
lat: 40.7127753,
|
||||
long: -74.0059728,
|
||||
title: "New York, NY, USA",
|
||||
},
|
||||
];
|
||||
|
||||
describe("Map Widget", function () {
|
||||
it("1.Drag Map Widget and Verify the Map Widget with Initial Location", () => {
|
||||
//Add map and verify
|
||||
entityExplorer.DragDropWidgetNVerify(draggableWidgets.MAP, 200, 200);
|
||||
deployMode.DeployApp(locators._widgetInDeployed(draggableWidgets.MAP));
|
||||
agHelper.VerifySnapshot(locators._root, "mapsimple");
|
||||
deployMode.NavigateBacktoEditor();
|
||||
entityExplorer.SelectEntityByName("Map1", "Widgets");
|
||||
|
||||
// Add Initial location and verify
|
||||
propPane.TypeTextIntoField("Initial location", "New York, NY, USA");
|
||||
agHelper.PressEnter();
|
||||
deployMode.DeployApp(locators._widgetInDeployed(draggableWidgets.MAP));
|
||||
agHelper.VerifySnapshot(locators._root, "mapWithInitalLocation");
|
||||
deployMode.NavigateBacktoEditor();
|
||||
entityExplorer.SelectEntityByName("Map1", "Widgets");
|
||||
|
||||
// convert Initial location to JS, update and verify
|
||||
propPane.EnterJSContext("Initial location", JSON.stringify(location[0]));
|
||||
deployMode.DeployApp(locators._widgetInDeployed(draggableWidgets.MAP));
|
||||
agHelper.VerifySnapshot(locators._root, "mapWithinItalLocationAsJS");
|
||||
deployMode.NavigateBacktoEditor();
|
||||
entityExplorer.SelectEntityByName("Map1", "Widgets");
|
||||
});
|
||||
|
||||
it("2.Verify the Map Widget with Default markers", () => {
|
||||
// With single default marker
|
||||
propPane.TypeTextIntoField(
|
||||
"Default Markers",
|
||||
JSON.stringify(location.slice(0, 1)),
|
||||
);
|
||||
deployMode.DeployApp(locators._widgetInDeployed(draggableWidgets.MAP));
|
||||
agHelper.VerifySnapshot(locators._root, "mapWithDefaultMarker1");
|
||||
deployMode.NavigateBacktoEditor();
|
||||
entityExplorer.SelectEntityByName("Map1", "Widgets");
|
||||
|
||||
// With multiple default marker
|
||||
propPane.TypeTextIntoField(
|
||||
"Default Markers",
|
||||
JSON.stringify(location.slice(0, 2)),
|
||||
);
|
||||
deployMode.DeployApp(locators._widgetInDeployed(draggableWidgets.MAP));
|
||||
agHelper.VerifySnapshot(locators._root, "mapWithDefaultMarker2");
|
||||
deployMode.NavigateBacktoEditor();
|
||||
entityExplorer.SelectEntityByName("Map1", "Widgets");
|
||||
});
|
||||
|
||||
it("3.Verify the Map Widget with zoom level", () => {
|
||||
// With multiple default marker
|
||||
propPane.SetZoomLevel(70);
|
||||
deployMode.DeployApp(locators._widgetInDeployed(draggableWidgets.MAP));
|
||||
agHelper.VerifySnapshot(locators._root, "mapWithDefaultZoomOut");
|
||||
deployMode.NavigateBacktoEditor();
|
||||
entityExplorer.SelectEntityByName("Map1", "Widgets");
|
||||
|
||||
// Zoom in and verify
|
||||
propPane.SetZoomLevel(30);
|
||||
deployMode.DeployApp(locators._widgetInDeployed(draggableWidgets.MAP));
|
||||
agHelper.VerifySnapshot(locators._root, "mapWithDefaultZoomIn");
|
||||
deployMode.NavigateBacktoEditor();
|
||||
entityExplorer.SelectEntityByName("Map1", "Widgets");
|
||||
});
|
||||
|
||||
it("4.1 Verify the Map Widget with different general settings", () => {
|
||||
// With visibility off
|
||||
propPane.TogglePropertyState("Visible", "Off");
|
||||
deployMode.DeployApp();
|
||||
agHelper.VerifySnapshot(locators._root, "mapWithVisibilityOff");
|
||||
deployMode.NavigateBacktoEditor();
|
||||
entityExplorer.SelectEntityByName("Map1", "Widgets");
|
||||
|
||||
// Convert visibility to JS and set the visibility "On" and verify
|
||||
propPane.EnterJSContext("Visible", "true");
|
||||
deployMode.DeployApp(locators._widgetInDeployed(draggableWidgets.MAP));
|
||||
agHelper.VerifySnapshot(locators._root, "mapWithVisibilityOnWithJS");
|
||||
deployMode.NavigateBacktoEditor();
|
||||
entityExplorer.SelectEntityByName("Map1", "Widgets");
|
||||
|
||||
// Toggle off Enable pick location and verify
|
||||
propPane.TogglePropertyState("Enable pick location", "Off");
|
||||
deployMode.DeployApp(locators._widgetInDeployed(draggableWidgets.MAP));
|
||||
agHelper.VerifySnapshot(locators._root, "mapWithPickLocationOff");
|
||||
deployMode.NavigateBacktoEditor();
|
||||
entityExplorer.SelectEntityByName("Map1", "Widgets");
|
||||
|
||||
// Toggle off Map & marker centering and verify
|
||||
propPane.TogglePropertyState("Map & marker centering", "Off");
|
||||
deployMode.DeployApp(locators._widgetInDeployed(draggableWidgets.MAP));
|
||||
agHelper.VerifySnapshot(locators._root, "mapWithMapNMarkerCenteringOff");
|
||||
deployMode.NavigateBacktoEditor();
|
||||
entityExplorer.SelectEntityByName("Map1", "Widgets");
|
||||
});
|
||||
|
||||
it("4.2 Verify the Map Widget with different general settings", () => {
|
||||
// Toggle On Enabling clustering and verify
|
||||
propPane.TogglePropertyState("Enable clustering", "On");
|
||||
deployMode.DeployApp(locators._widgetInDeployed(draggableWidgets.MAP));
|
||||
agHelper.VerifySnapshot(locators._root, "mapWithEnablingClusteringON");
|
||||
deployMode.NavigateBacktoEditor();
|
||||
entityExplorer.SelectEntityByName("Map1", "Widgets");
|
||||
|
||||
// Convert Enabling clustering and disable it and verify
|
||||
propPane.EnterJSContext("Enable clustering", "false");
|
||||
deployMode.DeployApp(locators._widgetInDeployed(draggableWidgets.MAP));
|
||||
agHelper.VerifySnapshot(locators._root, "mapWithEnablingClusteringOff");
|
||||
deployMode.NavigateBacktoEditor();
|
||||
entityExplorer.SelectEntityByName("Map1", "Widgets");
|
||||
|
||||
// Toggle off Enable search location and verify
|
||||
propPane.TogglePropertyState("Enable search location", "Off");
|
||||
deployMode.DeployApp(locators._widgetInDeployed(draggableWidgets.MAP));
|
||||
agHelper.VerifySnapshot(locators._root, "mapWithEnableSearchLocationOff");
|
||||
deployMode.NavigateBacktoEditor();
|
||||
entityExplorer.SelectEntityByName("Map1", "Widgets");
|
||||
});
|
||||
|
||||
it("5 Verify the style changes", () => {
|
||||
// Change border radius and verify
|
||||
propPane.MoveToTab("Style");
|
||||
propPane.EnterJSContext("Border radius", "1.5rem");
|
||||
deployMode.DeployApp(locators._widgetInDeployed(draggableWidgets.MAP));
|
||||
agHelper.VerifySnapshot(locators._root, "mapWithBorderRadius");
|
||||
deployMode.NavigateBacktoEditor();
|
||||
entityExplorer.SelectEntityByName("Map1", "Widgets");
|
||||
|
||||
// Change box shadow and verify
|
||||
const boxShadow =
|
||||
"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)";
|
||||
propPane.MoveToTab("Style");
|
||||
propPane.EnterJSContext("Box shadow", boxShadow);
|
||||
deployMode.DeployApp(locators._widgetInDeployed(draggableWidgets.MAP));
|
||||
agHelper.VerifySnapshot(locators._root, "mapWithBoxShadow");
|
||||
deployMode.NavigateBacktoEditor();
|
||||
entityExplorer.SelectEntityByName("Map1", "Widgets");
|
||||
});
|
||||
});
|
||||
|
|
@ -1,6 +1,7 @@
|
|||
const apiwidget = require("../../../../../locators/apiWidgetslocator.json");
|
||||
const commonlocators = require("../../../../../locators/commonlocators.json");
|
||||
const widgetsPage = require("../../../../../locators/Widgets.json");
|
||||
import { featureFlagIntercept } from "../../../../../support/Objects/FeatureFlags";
|
||||
import {
|
||||
agHelper,
|
||||
entityExplorer,
|
||||
|
|
@ -42,9 +43,23 @@ describe("Test Suite to validate copy/paste table Widget V2", function () {
|
|||
});
|
||||
cy.wait(200);
|
||||
cy.get(apiwidget.propertyList).then(function ($lis) {
|
||||
expect($lis).to.have.length(23);
|
||||
expect($lis).to.have.length(22);
|
||||
expect($lis.eq(0)).to.contain("{{Table1Copy.selectedRow}}");
|
||||
expect($lis.eq(1)).to.contain("{{Table1Copy.selectedRows}}");
|
||||
});
|
||||
});
|
||||
|
||||
it("2. Should check that table binding list gets updated when .filters gets added to it", () => {
|
||||
featureFlagIntercept({ release_table_serverside_filtering_enabled: true });
|
||||
cy.CheckAndUnfoldWidgets();
|
||||
entityExplorer.ActionContextMenuByEntityName({
|
||||
entityNameinLeftSidebar: "Table1Copy",
|
||||
action: "Show bindings",
|
||||
});
|
||||
cy.wait(200);
|
||||
cy.get(apiwidget.propertyList).then(function ($lis) {
|
||||
expect($lis).to.have.length(23);
|
||||
expect($lis.last()).to.contain("{{Table1Copy.filters}}");
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import {
|
|||
} from "../../../../../support/Objects/ObjectsCore";
|
||||
import oneClickBindingLocator from "../../../../../locators/OneClickBindingLocator";
|
||||
import { expandLoadMoreOptions } from "../../OneClickBinding/spec_utility";
|
||||
import { featureFlagIntercept } from "../../../../../support/Objects/FeatureFlags";
|
||||
|
||||
const ALERT_SUCCESS_MSG = "Table data filtered";
|
||||
|
||||
|
|
@ -22,6 +23,7 @@ describe("Table widget v2: test server side filtering", function () {
|
|||
* 5. Bind it as a WHERE condition inside an SQL query
|
||||
*/
|
||||
before(() => {
|
||||
featureFlagIntercept({ release_table_serverside_filtering_enabled: true });
|
||||
entityExplorer.DragDropWidgetNVerify(draggableWidgets.TABLE, 300, 300);
|
||||
|
||||
// Create SQL data-source
|
||||
|
|
@ -110,3 +112,20 @@ describe("Table widget v2: test server side filtering", function () {
|
|||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe("Table v2: Server side filtering hidden behind feature flag", () => {
|
||||
before(() => {
|
||||
featureFlagIntercept({ release_table_serverside_filtering_enabled: false });
|
||||
entityExplorer.DragDropWidgetNVerify(draggableWidgets.TABLE, 700, 300);
|
||||
});
|
||||
|
||||
it("1. should test that server side filtering option and dtable.filters autocomplete should not be visible", () => {
|
||||
agHelper.AssertElementAbsence(
|
||||
propPane._propertyControl("serversidefiltering"),
|
||||
);
|
||||
entityExplorer.DragDropWidgetNVerify(draggableWidgets.TEXT, 300, 700);
|
||||
entityExplorer.SelectEntityByName("Text1");
|
||||
propPane.TypeTextIntoField("Text", "{{Table1.filters");
|
||||
agHelper.AssertElementAbsence(locators._hints);
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -366,13 +366,13 @@ describe("JS Function Execution", function () {
|
|||
: i === functionsLength - 1
|
||||
? `
|
||||
${functionName}: ${
|
||||
isMarkedAsync ? "async" : ""
|
||||
} ()=>"${functionName}",
|
||||
isMarkedAsync ? "async" : ""
|
||||
} ()=>"${functionName}",
|
||||
}`
|
||||
: `
|
||||
${functionName}: ${
|
||||
isMarkedAsync ? "async" : ""
|
||||
} ()=> "${functionName}",`;
|
||||
isMarkedAsync ? "async" : ""
|
||||
} ()=> "${functionName}",`;
|
||||
}
|
||||
return JS_OBJECT_BODY;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -11,47 +11,6 @@ describe(
|
|||
"Google Sheets datasource row objects placeholder",
|
||||
function () {
|
||||
let pluginName = "Google Sheets";
|
||||
let placeholderText =
|
||||
'{\n "name": {{nameInput.text}},\n "dob": {{dobPicker.formattedDate}},\n "gender": {{genderSelect.selectedOptionValue}} \n}';
|
||||
|
||||
//Skiiping due to open bug #18035: Should the Save button be renamed as "Save and Authorise" in case of Google sheets for datasource discard popup? -
|
||||
//Bug #18035: Bug is to be taken in ds experience activation phase
|
||||
it.skip("1. Bug: 16391 - Google Sheets DS, placeholder objects keys should have quotes", function () {
|
||||
// create new Google Sheets datasource
|
||||
dataSources.NavigateToDSCreateNew();
|
||||
dataSources.CreatePlugIn(pluginName);
|
||||
|
||||
// navigate to create query tab and create a new query
|
||||
// cy.get("@saveDatasource").then((httpResponse) => {
|
||||
// datasourceName = httpResponse.body.data.name;
|
||||
// // clicking on new query to write a query
|
||||
// cy.NavigateToQueryEditor();
|
||||
// cy.get(explorer.createNew).click();
|
||||
// cy.get("div:contains('" + datasourceName + " Query')")
|
||||
// .last()
|
||||
// .click();
|
||||
|
||||
// fill the create new api google sheets form
|
||||
// and check for rowobject placeholder text
|
||||
cy.get(datasource.gSheetsOperationDropdown).click();
|
||||
cy.get(datasource.gSheetsInsertOneOption).click();
|
||||
|
||||
cy.get(datasource.gSheetsEntityDropdown).click();
|
||||
cy.get(datasource.gSheetsSheetRowsOption).click();
|
||||
|
||||
cy.get(datasource.gSheetsCodeMirrorPlaceholder).should(
|
||||
"have.text",
|
||||
placeholderText,
|
||||
);
|
||||
|
||||
// delete query and datasource after test is done
|
||||
// cy.get("@createNewApi").then((httpResponse) => {
|
||||
// queryName = httpResponse.response.body.data.name;
|
||||
// cy.deleteQueryUsingContext();
|
||||
// cy.deleteDatasource(datasourceName);
|
||||
// });
|
||||
//});
|
||||
});
|
||||
|
||||
it("1. Verify GSheets dropdown options", function () {
|
||||
dataSources.NavigateToDSCreateNew();
|
||||
|
|
|
|||
1
app/client/cypress/fixtures/ImportAppAllAccess.json
Normal file
1
app/client/cypress/fixtures/ImportAppReadAccess.json
Normal file
1
app/client/cypress/fixtures/ImportAppSelectedAccess.json
Normal file
|
|
@ -4,7 +4,7 @@ export default {
|
|||
advancedTab: ".t--settings-category-advanced",
|
||||
authenticationTab: ".t--settings-category-authentication",
|
||||
emailTab: ".t--settings-category-email",
|
||||
googleMapsTab: ".t--settings-category-google-maps",
|
||||
developerSettingsTab: ".t--settings-category-developer-settings",
|
||||
googleButton: ".t--settings-sub-category-google-auth",
|
||||
githubButton: ".t--settings-sub-category-github-auth",
|
||||
formloginButton: ".t--settings-sub-category-form-login",
|
||||
|
|
|
|||
|
|
@ -45,6 +45,7 @@ export const WIDGET = {
|
|||
JSONFORM: "jsonformwidget",
|
||||
MENUBUTTON: "menubuttonwidget",
|
||||
DATEPICKER: "datepickerwidget2",
|
||||
MAP: "mapwidget",
|
||||
} as const;
|
||||
|
||||
// property pane element selector are maintained here
|
||||
|
|
|
|||
|
After Width: | Height: | Size: 261 KiB |
|
After Width: | Height: | Size: 262 KiB |
|
After Width: | Height: | Size: 190 KiB |
|
After Width: | Height: | Size: 190 KiB |
|
After Width: | Height: | Size: 246 KiB |
|
After Width: | Height: | Size: 239 KiB |
|
After Width: | Height: | Size: 259 KiB |
|
After Width: | Height: | Size: 249 KiB |
|
After Width: | Height: | Size: 248 KiB |
|
After Width: | Height: | Size: 245 KiB |
|
After Width: | Height: | Size: 252 KiB |
|
After Width: | Height: | Size: 252 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 246 KiB |
|
After Width: | Height: | Size: 194 KiB |
|
After Width: | Height: | Size: 33 KiB |
|
|
@ -319,4 +319,5 @@ export class CommonLocators {
|
|||
_richText_line = "#tinymce p span";
|
||||
_treeSelectedContent = ".rc-tree-select-selection-item-content";
|
||||
_switcherIcon = ".switcher-icon";
|
||||
_root = "#root";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ export class AdminSettings {
|
|||
public agHelper = ObjectsRegistry.AggregateHelper;
|
||||
public locator = ObjectsRegistry.CommonLocators;
|
||||
public homePage = ObjectsRegistry.HomePage;
|
||||
public assertHelper = ObjectsRegistry.AssertHelper;
|
||||
|
||||
public _adminSettingsBtn = '[data-testid="t--admin-settings-menu-option"]';
|
||||
private _settingsList = ".t--settings-category-list";
|
||||
|
|
@ -11,13 +12,13 @@ export class AdminSettings {
|
|||
public _roles = (user: string) =>
|
||||
"//span[contains(text(), '" +
|
||||
user +
|
||||
"')]/parent::div/parent::a/parent::td/following-sibling::td[1]";
|
||||
public _instanceName =
|
||||
"//label[text()='Instance name']/following-sibling::div//input";
|
||||
"')]/parent::div/parent::span/parent::a/parent::td/following-sibling::td[1]";
|
||||
public _instanceName = '[name="instanceName"]';
|
||||
|
||||
public NavigateToAdminSettings() {
|
||||
this.homePage.NavigateToHome();
|
||||
this.agHelper.GetNClick(this._adminSettingsBtn);
|
||||
this.assertHelper.AssertNetworkStatus("getEnvVariables");
|
||||
this.agHelper.AssertElementVisibility(this._settingsList);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1043,8 +1043,8 @@ export class AggregateHelper extends ReusableHelper {
|
|||
|
||||
public ActionContextMenuWithInPane({
|
||||
action = "Delete",
|
||||
subAction = "",
|
||||
entityType = EntityItems.JSObject,
|
||||
subAction = "",
|
||||
toastToValidate = "",
|
||||
}: DeleteParams) {
|
||||
cy.get(this.locator._contextMenuInPane).click();
|
||||
|
|
@ -1663,6 +1663,10 @@ export class AggregateHelper extends ReusableHelper {
|
|||
this.GetElement(selector).should("have.class", className);
|
||||
}
|
||||
|
||||
public VerifySnapshot(selector: string, identifier: string) {
|
||||
this.GetElement(selector).matchImageSnapshot(identifier);
|
||||
}
|
||||
|
||||
//Not used:
|
||||
// private xPathToCss(xpath: string) {
|
||||
// return xpath
|
||||
|
|
|
|||
|
|
@ -295,6 +295,7 @@ export class DataSources {
|
|||
`.t--datasource-tab-container ${this._entityExplorerID(tableName)}`;
|
||||
_dsPageTableTriggermenuTarget = (tableName: string) =>
|
||||
`${this._dsPageTabContainerTableName(tableName)} .t--template-menu-trigger`;
|
||||
_gSheetQueryPlaceholder = ".CodeMirror-placeholder";
|
||||
|
||||
public AssertDSEditViewMode(mode: "Edit" | "View") {
|
||||
if (mode == "Edit") this.agHelper.AssertElementAbsence(this._editButton);
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ interface EntityActionParams {
|
|||
| "Refresh"
|
||||
| "Set as home page";
|
||||
subAction?: string;
|
||||
//@ts-expect-error: type mismatch
|
||||
entityType?: EntityItems;
|
||||
toAssertAction?: boolean;
|
||||
toastToValidate?: string;
|
||||
|
|
@ -232,10 +233,10 @@ export class EntityExplorer {
|
|||
}
|
||||
|
||||
public ActionContextMenuByEntityName({
|
||||
entityNameinLeftSidebar,
|
||||
action = "Delete",
|
||||
subAction = "",
|
||||
entityNameinLeftSidebar,
|
||||
entityType = EntityItems.Query,
|
||||
subAction = "",
|
||||
toAssertAction,
|
||||
toastToValidate = "",
|
||||
}: EntityActionParams) {
|
||||
|
|
|
|||
|
|
@ -623,6 +623,17 @@ export class HomePage {
|
|||
this.agHelper.WaitUntilToastDisappear("Deleting application...");
|
||||
}
|
||||
|
||||
public DeleteAppviaAPI(appId: any) {
|
||||
cy.request({
|
||||
method: "DELETE",
|
||||
url: "api/v1/applications/" + appId,
|
||||
failOnStatusCode: false,
|
||||
headers: {
|
||||
"X-Requested-By": "Appsmith",
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
//Maps to leaveworkspace in command.js
|
||||
public LeaveWorkspace(workspaceName: string) {
|
||||
this.OpenWorkspaceOptions(workspaceName);
|
||||
|
|
|
|||
|
|
@ -53,11 +53,11 @@ export class PropertyPane {
|
|||
_mode = (modeName: string) =>
|
||||
"//span[contains(text(),'" + modeName + "')]//parent::span";
|
||||
_propertyToggle = (controlToToggle: string) =>
|
||||
".t--property-control-" +
|
||||
"//div[contains(@class,'t--property-control-" +
|
||||
controlToToggle.replace(/ +/g, "").toLowerCase() +
|
||||
" input[type='checkbox'], label:contains('" +
|
||||
"')]//input[@type='checkbox'] | //label[text()='" +
|
||||
controlToToggle +
|
||||
"') input[type='checkbox']";
|
||||
"']//input[@type='checkbox']";
|
||||
_colorPickerV2Popover = ".t--colorpicker-v2-popover";
|
||||
_colorPickerV2Color = ".t--colorpicker-v2-color";
|
||||
_colorInput = (option: string) =>
|
||||
|
|
@ -163,6 +163,10 @@ export class PropertyPane {
|
|||
_countryCodeChangeDropDown = ".t--input-country-code-change .remixicon-icon";
|
||||
_searchCountryPlaceHolder = "[placeholder='Search by ISD code or country']";
|
||||
_closeModal = "//*[contains(@class,'ads-v2-button t--close')]";
|
||||
_zoomLevelInput = ".t--property-control-zoomlevel input";
|
||||
_zoomLevelControl = (control: "start" | "end") =>
|
||||
".t--property-control-zoomlevel .ads-v2-input__input-section-icon-" +
|
||||
control;
|
||||
|
||||
_dataIcon = (icon: string) => `[data-icon="${icon}"]`;
|
||||
public OpenJsonFormFieldSettings(fieldName: string) {
|
||||
|
|
@ -636,4 +640,20 @@ export class PropertyPane {
|
|||
);
|
||||
});
|
||||
}
|
||||
|
||||
public SetZoomLevel(zoom: number) {
|
||||
this.agHelper.GetAttribute(this._zoomLevelInput, "value").then((value) => {
|
||||
const currentValue = Number(value?.replace("%", ""));
|
||||
|
||||
if (currentValue === zoom || currentValue === 100 || currentValue === 0) {
|
||||
return;
|
||||
}
|
||||
if (zoom > currentValue) {
|
||||
this.agHelper.GetElement(this._zoomLevelControl("end")).click();
|
||||
} else if (zoom < currentValue) {
|
||||
this.agHelper.GetElement(this._zoomLevelControl("start")).click();
|
||||
}
|
||||
this.SetZoomLevel(zoom);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -189,7 +189,7 @@ export class Table {
|
|||
_divFirstChild = "div:first-child abbr";
|
||||
_listPreviousPage = ".rc-pagination-prev";
|
||||
_listNavigation = (move: string) =>
|
||||
"//button[@area-label='" + move + " page']";
|
||||
"//button[@aria-label='" + move + " page']";
|
||||
_listNextPage = ".rc-pagination-next";
|
||||
_listActivePage = (version: "v1" | "v2") =>
|
||||
`.t--widget-listwidget${
|
||||
|
|
|
|||
|
|
@ -52,8 +52,8 @@ export default defineConfig({
|
|||
specPattern: [
|
||||
"cypress/e2e/Sanity/Datasources/Airtable_Basic_Spec.ts",
|
||||
"cypress/e2e/GSheet/**/**/*",
|
||||
"cypress/e2e/Regression/ServerSide/Datasources/ElasticSearch_Basic_Spec.ts",
|
||||
"cypress/e2e/Regression/ServerSide/Datasources/Oracle_Spec.ts",
|
||||
"cypress/e2e/Regression/ClientSide/Widgets/Others/MapWidget_Spec.ts",
|
||||
],
|
||||
testIsolation: false,
|
||||
excludeSpecPattern: ["cypress/e2e/**/spec_utility.ts"],
|
||||
|
|
|
|||
|
|
@ -103,8 +103,6 @@ module.exports = {
|
|||
},
|
||||
intercomAppID: "APP_ID",
|
||||
mailEnabled: parseConfig("__APPSMITH_MAIL_ENABLED__"),
|
||||
|
||||
hideWatermark: parseConfig("__APPSMITH_HIDE_WATERMARK__"),
|
||||
disableIframeWidgetSandbox: parseConfig(
|
||||
"__APPSMITH_DISABLE_IFRAME_WIDGET_SANDBOX__",
|
||||
),
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@
|
|||
"cypress-log-to-output": "^1.1.2",
|
||||
"dayjs": "^1.10.6",
|
||||
"deep-diff": "^1.0.2",
|
||||
"design-system": "npm:@appsmithorg/design-system@2.1.21",
|
||||
"design-system": "npm:@appsmithorg/design-system@2.1.23",
|
||||
"design-system-old": "npm:@appsmithorg/design-system-old@1.1.12",
|
||||
"downloadjs": "^1.4.7",
|
||||
"echarts": "^5.4.2",
|
||||
|
|
@ -282,17 +282,18 @@
|
|||
"@types/tinycolor2": "^1.4.2",
|
||||
"@types/to-json-schema": "^0.2.1",
|
||||
"@types/toposort": "^2.0.3",
|
||||
"@types/uuid": "^9.0.5",
|
||||
"@types/webfontloader": "1.6.33",
|
||||
"@types/zipcelx": "^1.5.0",
|
||||
"@typescript-eslint/eslint-plugin": "^5.54.1",
|
||||
"@typescript-eslint/parser": "^5.54.1",
|
||||
"@typescript-eslint/eslint-plugin": "^6.7.4",
|
||||
"@typescript-eslint/parser": "^6.7.4",
|
||||
"babel-plugin-lodash": "^3.3.4",
|
||||
"babel-plugin-module-resolver": "^4.1.0",
|
||||
"chalk": "^4.1.1",
|
||||
"compression-webpack-plugin": "^10.0.0",
|
||||
"cra-bundle-analyzer": "^0.1.0",
|
||||
"cy-verify-downloads": "^0.0.5",
|
||||
"cypress": "13.2.0",
|
||||
"cypress": "13.3.1",
|
||||
"cypress-file-upload": "^4.1.1",
|
||||
"cypress-image-snapshot": "^4.0.1",
|
||||
"cypress-mochawesome-reporter": "^3.5.1",
|
||||
|
|
@ -306,17 +307,17 @@
|
|||
"cypress-xpath": "^1.6.0",
|
||||
"diff": "^5.0.0",
|
||||
"dotenv": "^8.1.0",
|
||||
"eslint": "^8.42.0",
|
||||
"eslint-config-prettier": "^8.6.0",
|
||||
"eslint-import-resolver-babel-module": "^5.3.1",
|
||||
"eslint-plugin-cypress": "^2.11.2",
|
||||
"eslint-plugin-import": "^2.25.2",
|
||||
"eslint-plugin-jest": "^27.2.1",
|
||||
"eslint-plugin-prettier": "^4.2.1",
|
||||
"eslint-plugin-react": "^7.30.0",
|
||||
"eslint-plugin-react-hooks": "^2.3.0",
|
||||
"eslint-plugin-sort-destructure-keys": "^1.3.5",
|
||||
"eslint-plugin-storybook": "^0.6.11",
|
||||
"eslint": "^8.51.0",
|
||||
"eslint-config-prettier": "^9.0.0",
|
||||
"eslint-import-resolver-babel-module": "^5.3.2",
|
||||
"eslint-plugin-cypress": "^2.15.1",
|
||||
"eslint-plugin-import": "^2.28.1",
|
||||
"eslint-plugin-jest": "^27.4.2",
|
||||
"eslint-plugin-prettier": "^5.0.0",
|
||||
"eslint-plugin-react": "^7.33.2",
|
||||
"eslint-plugin-react-hooks": "^4.6.0",
|
||||
"eslint-plugin-sort-destructure-keys": "^1.5.0",
|
||||
"eslint-plugin-storybook": "^0.6.15",
|
||||
"esm": "^3.2.25",
|
||||
"factory.ts": "^0.5.1",
|
||||
"husky": "^8.0.0",
|
||||
|
|
@ -325,21 +326,19 @@
|
|||
"jest-environment-jsdom": "^27.4.1",
|
||||
"jest-styled-components": "^7.0.8",
|
||||
"json5": "^2.2.3",
|
||||
"lint-staged": "^13.2.0",
|
||||
"lint-staged": "^14.0.1",
|
||||
"msw": "^0.28.0",
|
||||
"pg": "^8.11.3",
|
||||
"plop": "^3.1.1",
|
||||
"postcss": "^8.4.31",
|
||||
"postcss": "8.4.31",
|
||||
"postcss-at-rules-variables": "^0.3.0",
|
||||
"postcss-conditionals": "^2.1.0",
|
||||
"postcss-each": "^1.1.0",
|
||||
"postcss-for": "^2.1.1",
|
||||
"postcss-import": "^15.1.0",
|
||||
"postcss-modules-values": "^4.0.0",
|
||||
"postcss-nesting": "^12.0.1",
|
||||
"postcss-url": "^10.1.3",
|
||||
"postinstall-postinstall": "^2.1.0",
|
||||
"prettier": "^2.8.6",
|
||||
"prettier": "^3.0.3",
|
||||
"prop-types": "^15.8.1",
|
||||
"raw-loader": "^4.0.2",
|
||||
"react-is": "^16.12.0",
|
||||
|
|
@ -378,6 +377,7 @@
|
|||
"@blueprintjs/core@^3.33.0": "patch:@blueprintjs/core@npm%3A3.47.0#./.yarn/patches/@blueprintjs-core-npm-3.47.0-a5bc1ea927.patch",
|
||||
"@blueprintjs/core@^3.47.0": "patch:@blueprintjs/core@npm%3A3.47.0#./.yarn/patches/@blueprintjs-core-npm-3.47.0-a5bc1ea927.patch",
|
||||
"@blueprintjs/icons": "3.22.0",
|
||||
"@types/react": "^17.0.2"
|
||||
"@types/react": "^17.0.2",
|
||||
"postcss": "8.4.31"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -142,12 +142,12 @@ export interface BlockStatementNode extends Node {
|
|||
body: [Node];
|
||||
}
|
||||
|
||||
type NodeList = {
|
||||
interface NodeList {
|
||||
references: Set<string>;
|
||||
functionalParams: Set<string>;
|
||||
variableDeclarations: Set<string>;
|
||||
identifierList: Array<IdentifierNode>;
|
||||
};
|
||||
}
|
||||
|
||||
// https://github.com/estree/estree/blob/master/es5.md#property
|
||||
export interface PropertyNode extends Node {
|
||||
|
|
@ -185,10 +185,10 @@ export type NodeWithLocation<NodeType> = NodeType & {
|
|||
|
||||
type AstOptions = Omit<Options, "ecmaVersion">;
|
||||
|
||||
type EntityRefactorResponse = {
|
||||
interface EntityRefactorResponse {
|
||||
isSuccess: boolean;
|
||||
body: { script: string; refactorCount: number } | { error: string };
|
||||
};
|
||||
}
|
||||
|
||||
/* We need these functions to typescript casts the nodes with the correct types */
|
||||
export const isIdentifierNode = (node: Node): node is IdentifierNode => {
|
||||
|
|
@ -507,7 +507,10 @@ export const entityRefactorFromCode = (
|
|||
}
|
||||
};
|
||||
|
||||
export type functionParam = { paramName: string; defaultValue: unknown };
|
||||
export interface functionParam {
|
||||
paramName: string;
|
||||
defaultValue: unknown;
|
||||
}
|
||||
|
||||
export const getFunctionalParamsFromNode = (
|
||||
node:
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ export class PeekOverlayExpressionIdentifier {
|
|||
}
|
||||
}
|
||||
|
||||
export type PeekOverlayExpressionIdentifierOptions = {
|
||||
export interface PeekOverlayExpressionIdentifierOptions {
|
||||
sourceType: SourceType;
|
||||
thisExpressionReplacement?: string;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,10 +25,10 @@ export const isTrueObject = (
|
|||
export const getNameFromPropertyNode = (node: PropertyNode): string =>
|
||||
isLiteralNode(node.key) ? String(node.key.value) : node.key.name;
|
||||
|
||||
type Position = {
|
||||
interface Position {
|
||||
line: number;
|
||||
ch: number;
|
||||
};
|
||||
}
|
||||
|
||||
export const extractContentByPosition = (
|
||||
content: string,
|
||||
|
|
|
|||
|
|
@ -15,9 +15,9 @@ import { SubtractIcon } from "./icons/SubtractIcon";
|
|||
import { Icon as HeadlessIcon } from "../../Icon";
|
||||
import type { CheckboxGroupContextType } from "./context";
|
||||
|
||||
export type InlineLabelProps = {
|
||||
export interface InlineLabelProps {
|
||||
labelPosition?: "left" | "right";
|
||||
};
|
||||
}
|
||||
|
||||
export interface CheckboxProps
|
||||
extends Omit<SpectrumCheckboxProps, keyof StyleProps>,
|
||||
|
|
@ -36,8 +36,8 @@ const _Checkbox = (props: CheckboxProps, ref: CheckboxRef) => {
|
|||
icon: Icon = CheckIcon,
|
||||
isDisabled: isDisabledProp = false,
|
||||
isIndeterminate = false,
|
||||
validationState,
|
||||
labelPosition = "right",
|
||||
validationState,
|
||||
} = props;
|
||||
const state = useToggleState(props);
|
||||
const inputRef = useRef<HTMLInputElement>(null);
|
||||
|
|
|
|||
|
|
@ -2,10 +2,10 @@ import React from "react";
|
|||
|
||||
import type { CheckboxGroupState } from "@react-stately/checkbox";
|
||||
|
||||
export type CheckboxGroupContextType = {
|
||||
export interface CheckboxGroupContextType {
|
||||
state: CheckboxGroupState;
|
||||
isDisabled?: boolean;
|
||||
};
|
||||
}
|
||||
|
||||
export const CheckboxGroupContext =
|
||||
React.createContext<CheckboxGroupContextType | null>(null);
|
||||
|
|
|
|||
|
|
@ -24,19 +24,19 @@ export type FieldRef = Ref<HTMLDivElement>;
|
|||
const _Field = (props: FieldProps, ref: FieldRef) => {
|
||||
const {
|
||||
children,
|
||||
contextualHelp,
|
||||
description,
|
||||
descriptionProps,
|
||||
elementType,
|
||||
errorMessage,
|
||||
errorMessageProps = {},
|
||||
fieldType = "field",
|
||||
isDisabled = false,
|
||||
label,
|
||||
labelProps,
|
||||
validationState,
|
||||
wrapperClassName,
|
||||
description,
|
||||
descriptionProps,
|
||||
wrapperProps = {},
|
||||
contextualHelp,
|
||||
fieldType = "field",
|
||||
} = props;
|
||||
const hasHelpText =
|
||||
Boolean(description) ||
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
import React, { useContext } from "react";
|
||||
import type { RadioGroupState } from "@react-stately/radio";
|
||||
|
||||
export type RadioGroupContext = {
|
||||
export interface RadioGroupContext {
|
||||
name?: string;
|
||||
validationState?: "valid" | "invalid";
|
||||
state: RadioGroupState;
|
||||
isDisabled?: boolean;
|
||||
};
|
||||
}
|
||||
|
||||
export const RadioContext = React.createContext<RadioGroupContext | null>(null);
|
||||
|
||||
|
|
|
|||
|
|
@ -35,14 +35,14 @@ export interface TooltipOptions {
|
|||
export function useTooltip({
|
||||
closeDelay = 0,
|
||||
initialOpen = false,
|
||||
interaction = "hover",
|
||||
offset: offsetProp = DEFAULT_TOOLTIP_OFFSET,
|
||||
onOpenChange: setControlledOpen,
|
||||
open: controlledOpen,
|
||||
openDelay = 0,
|
||||
placement = "top",
|
||||
interaction = "hover",
|
||||
offset: offsetProp = DEFAULT_TOOLTIP_OFFSET,
|
||||
shift: shiftProp = DEFAULT_TOOLTIP_SHIFT,
|
||||
padding: paddingProp = DEFAULT_TOOLTIP_PADDING,
|
||||
placement = "top",
|
||||
shift: shiftProp = DEFAULT_TOOLTIP_SHIFT,
|
||||
}: TooltipOptions = {}) {
|
||||
const [uncontrolledOpen, setUncontrolledOpen] = React.useState(initialOpen);
|
||||
|
||||
|
|
|
|||
|
|
@ -18,13 +18,13 @@ export interface ThemeProviderProps {
|
|||
style?: CSSProperties;
|
||||
}
|
||||
|
||||
export type UseThemeProps = {
|
||||
export interface UseThemeProps {
|
||||
seedColor?: string;
|
||||
colorMode?: ColorMode;
|
||||
borderRadius?: string;
|
||||
fontFamily?: FontFamily;
|
||||
rootUnitRatio?: number;
|
||||
};
|
||||
}
|
||||
|
||||
export const SHEET_TYPES = {
|
||||
fontFace: "fontFace",
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
//THIS FILE IS CREATED AUTOMATICALLY. PLEASE DON'T EDIT IT.
|
||||
/* THIS FILE IS CREATED AUTOMATICALLY. PLEASE DON'T EDIT IT. */
|
||||
:root {
|
||||
--root-unit: clamp(4px, calc(0.06vw + 3.77px), 5px);
|
||||
--spacing-0: 0;
|
||||
|
|
@ -159,7 +159,7 @@
|
|||
--color-fg-on-warning: rgb(21.953% 9.0775% 0%);
|
||||
--color-bd: rgb(72.54% 73.727% 82.602%);
|
||||
--color-bd-accent: rgb(33.333% 23.922% 91.373%);
|
||||
--color-bd-focus: rgb(78.161% 34.431% 0%);
|
||||
--color-bd-focus: rgb(33.333% 23.922% 91.373%);
|
||||
--color-bd-neutral: rgb(37.869% 38.922% 47.553%);
|
||||
--color-bd-neutral-hover: rgb(49.162% 50.308% 59.345%);
|
||||
--color-bd-positive: rgb(6.7435% 63.436% 18.481%);
|
||||
|
|
|
|||
|
|
@ -193,7 +193,7 @@
|
|||
"type": "color"
|
||||
},
|
||||
"bd-focus": {
|
||||
"value": "rgb(78.161% 34.431% 0%)",
|
||||
"value": "rgb(33.333% 23.922% 91.373%)",
|
||||
"type": "color"
|
||||
},
|
||||
"bd-neutral": {
|
||||
|
|
|
|||
|
|
@ -37,4 +37,6 @@ export interface TokenSource {
|
|||
spacing?: TokenObj;
|
||||
}
|
||||
|
||||
export type TokenObj = { [key: string]: string | number };
|
||||
export interface TokenObj {
|
||||
[key: string]: string | number;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -52,11 +52,11 @@ export const TYPOGRAPHY_FONT_WEIGHTS = {
|
|||
|
||||
export type FontFamily = keyof typeof FONT_METRICS | "System Default";
|
||||
|
||||
export type TypographyVariantMetric = {
|
||||
export interface TypographyVariantMetric {
|
||||
capHeight: number;
|
||||
lineGap: number;
|
||||
fontFamily?: FontFamily;
|
||||
};
|
||||
}
|
||||
|
||||
export type Typography = {
|
||||
[key in keyof typeof TYPOGRAPHY_VARIANTS]: TypographyVariantMetric;
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ const allTokens = new TokensAccessor({
|
|||
}).getAllTokens();
|
||||
|
||||
const ATTENTION_MESSAGE =
|
||||
"//THIS FILE IS CREATED AUTOMATICALLY. PLEASE DON'T EDIT IT.";
|
||||
"/* THIS FILE IS CREATED AUTOMATICALLY. PLEASE DON'T EDIT IT. */";
|
||||
const cssStyles = `:root {--root-unit: ${getFluidRootUnit(fluid)}; ${cssRule(
|
||||
allTokens,
|
||||
)}}`;
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ export enum Size {
|
|||
large = "large",
|
||||
}
|
||||
|
||||
type stateStyleType = {
|
||||
interface stateStyleType {
|
||||
bgColorPrimary: string;
|
||||
borderColorPrimary: string;
|
||||
txtColorPrimary: string;
|
||||
|
|
@ -54,20 +54,20 @@ type stateStyleType = {
|
|||
bgColorTertiary: string;
|
||||
borderColorTertiary: string;
|
||||
txtColorTertiary: string;
|
||||
};
|
||||
}
|
||||
|
||||
type BtnColorType = {
|
||||
interface BtnColorType {
|
||||
bgColor: string;
|
||||
txtColor: string;
|
||||
border: string;
|
||||
outline: string;
|
||||
};
|
||||
}
|
||||
|
||||
type BtnFontType = {
|
||||
interface BtnFontType {
|
||||
buttonFont: any;
|
||||
padding: string;
|
||||
height: number;
|
||||
};
|
||||
}
|
||||
|
||||
export enum IconPositions {
|
||||
left = "left",
|
||||
|
|
@ -103,17 +103,17 @@ const defaultProps = {
|
|||
tag: "a",
|
||||
};
|
||||
|
||||
type buttonVariant = {
|
||||
interface buttonVariant {
|
||||
main: string;
|
||||
light: string;
|
||||
dark: string;
|
||||
darker: string;
|
||||
darkest: string;
|
||||
};
|
||||
}
|
||||
|
||||
type ButtonColorType = {
|
||||
interface ButtonColorType {
|
||||
[index: string]: buttonVariant;
|
||||
};
|
||||
}
|
||||
|
||||
const ButtonColors: ButtonColorType = {
|
||||
info: {
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ export type DropdownOnSelect = (
|
|||
isUpdatedViaKeyboard?: boolean,
|
||||
) => void;
|
||||
|
||||
export type DropdownOption = {
|
||||
export interface DropdownOption {
|
||||
label?: string;
|
||||
value?: string;
|
||||
id?: string;
|
||||
|
|
@ -47,7 +47,7 @@ export type DropdownOption = {
|
|||
disabledTooltipText?: string;
|
||||
hasCustomBadge?: boolean;
|
||||
link?: string;
|
||||
};
|
||||
}
|
||||
|
||||
export interface DropdownSearchProps {
|
||||
enableSearch?: boolean;
|
||||
|
|
@ -346,7 +346,8 @@ export const DropdownWrapper = styled.div<{
|
|||
border: 1px solid var(--ads-dropdown-default-menu-border-color);
|
||||
overflow: hidden;
|
||||
overflow-y: auto;
|
||||
box-shadow: 0px 12px 16px -4px rgba(0, 0, 0, 0.1),
|
||||
box-shadow:
|
||||
0px 12px 16px -4px rgba(0, 0, 0, 0.1),
|
||||
0px 4px 6px -2px rgba(0, 0, 0, 0.05);
|
||||
display: ${(props) => (props.isOpen ? "inline-block" : "none")};
|
||||
.dropdown-search {
|
||||
|
|
@ -1121,9 +1122,8 @@ export default function Dropdown(props: DropdownProps) {
|
|||
|
||||
const handleKeydown = useCallback(
|
||||
(e: React.KeyboardEvent) => {
|
||||
const elementList = document.getElementById(
|
||||
"ds--dropdown-options",
|
||||
)?.children;
|
||||
const elementList = document.getElementById("ds--dropdown-options")
|
||||
?.children;
|
||||
if (!elementList || elementList?.length === 0) {
|
||||
setHighlight(-1);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -916,7 +916,7 @@ export const IconCollection = Object.keys(ICON_LOOKUP);
|
|||
|
||||
export type IconName = (typeof IconCollection)[number];
|
||||
|
||||
export type IconProps = {
|
||||
export interface IconProps {
|
||||
size?: IconSize;
|
||||
name?: IconName;
|
||||
invisible?: boolean;
|
||||
|
|
@ -930,7 +930,7 @@ export type IconProps = {
|
|||
disabled?: boolean;
|
||||
withWrapper?: boolean;
|
||||
wrapperColor?: string;
|
||||
};
|
||||
}
|
||||
|
||||
const Icon = forwardRef(
|
||||
(
|
||||
|
|
|
|||
|
|
@ -22,11 +22,11 @@ const StyledHr = styled.div`
|
|||
margin-left: var(--ads-spaces-3);
|
||||
`;
|
||||
|
||||
export type SegmentHeaderProps = {
|
||||
export interface SegmentHeaderProps {
|
||||
title: string;
|
||||
style?: CSSProperties;
|
||||
hideStyledHr?: boolean;
|
||||
};
|
||||
}
|
||||
|
||||
export default function SegmentHeader(props: SegmentHeaderProps) {
|
||||
return (
|
||||
|
|
|
|||
|
|
@ -38,9 +38,9 @@ const SvgCircle = styled.circle`
|
|||
stroke-width: var(--ads-spaces-1);
|
||||
`;
|
||||
|
||||
export type SpinnerProp = {
|
||||
export interface SpinnerProp {
|
||||
size?: IconSize;
|
||||
};
|
||||
}
|
||||
|
||||
Spinner.defaultProp = {
|
||||
size: "small",
|
||||
|
|
|
|||
|
|
@ -11,11 +11,11 @@ import Text, { TextType } from "../Text";
|
|||
import type { CommonComponentProps } from "../types/common";
|
||||
import { Classes } from "../constants/classes";
|
||||
|
||||
export type TableDropdownOption = {
|
||||
export interface TableDropdownOption {
|
||||
id: string;
|
||||
name: string;
|
||||
desc: string;
|
||||
};
|
||||
}
|
||||
|
||||
type DropdownProps = CommonComponentProps & {
|
||||
options: TableDropdownOption[];
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import styled from "styled-components";
|
||||
|
||||
export type IconProps = {
|
||||
export interface IconProps {
|
||||
width?: number;
|
||||
height?: number;
|
||||
color?: string;
|
||||
|
|
@ -10,7 +10,7 @@ export type IconProps = {
|
|||
keepColors?: boolean;
|
||||
disabled?: boolean;
|
||||
cursor?: "move" | "grab" | "default";
|
||||
};
|
||||
}
|
||||
|
||||
export const IconWrapper = styled.div<IconProps>`
|
||||
&:focus {
|
||||
|
|
|
|||
|
|
@ -19,11 +19,11 @@ export enum DSEventTypes {
|
|||
KEYPRESS = "KEYPRESS",
|
||||
}
|
||||
|
||||
export type DSEventDetail = {
|
||||
export interface DSEventDetail {
|
||||
component: string;
|
||||
event: DSEventTypes;
|
||||
meta: Record<string, unknown>;
|
||||
};
|
||||
}
|
||||
|
||||
export function createDSEvent(detail: DSEventDetail) {
|
||||
return new CustomEvent(DS_EVENT, {
|
||||
|
|
|
|||
|
|
@ -108,7 +108,9 @@
|
|||
*-----------------------------------------------------------------------------
|
||||
*/
|
||||
&[data-focused] {
|
||||
box-shadow: 0 0 0 2px var(--color-bg), 0 0 0 4px var(--color-bd-focus);
|
||||
box-shadow:
|
||||
0 0 0 2px var(--color-bg),
|
||||
0 0 0 4px var(--color-bd-focus);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -50,7 +50,9 @@
|
|||
*-----------------------------------------------------------------------------
|
||||
*/
|
||||
&[data-focused] [data-icon] {
|
||||
box-shadow: var(--checkbox-box-shadow), 0 0 0 2px var(--color-bg),
|
||||
box-shadow:
|
||||
var(--checkbox-box-shadow),
|
||||
0 0 0 2px var(--color-bg),
|
||||
0 0 0 4px var(--color-bd-focus);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -48,7 +48,9 @@
|
|||
*-----------------------------------------------------------------------------
|
||||
*/
|
||||
&[data-focused] [data-icon] {
|
||||
box-shadow: var(--radio-box-shadow), 0 0 0 2px var(--color-bg),
|
||||
box-shadow:
|
||||
var(--radio-box-shadow),
|
||||
0 0 0 2px var(--color-bg),
|
||||
0 0 0 4px var(--color-bd-focus);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -56,6 +56,8 @@
|
|||
*-----------------------------------------------------------------------------
|
||||
*/
|
||||
&[data-focused] [data-icon] {
|
||||
box-shadow: 0 0 0 2px var(--color-bg), 0 0 0 4px var(--color-bd-focus);
|
||||
box-shadow:
|
||||
0 0 0 2px var(--color-bg),
|
||||
0 0 0 4px var(--color-bd-focus);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
/* using auto instead of 100% so that text doesnot push everything to the edge */
|
||||
width: auto;
|
||||
color: inherit;
|
||||
overflow-wrap: anywhere;
|
||||
|
||||
@each $color in colors {
|
||||
&[data-color="$(color)"] {
|
||||
|
|
@ -16,5 +17,4 @@
|
|||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
overflow-wrap: break-word;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -59,7 +59,9 @@
|
|||
|
||||
&[data-focused],
|
||||
&:focus-visible {
|
||||
box-shadow: 0 0 0 2px var(--color-bg), 0 0 0 4px var(--color-bd-focus);
|
||||
box-shadow:
|
||||
0 0 0 2px var(--color-bg),
|
||||
0 0 0 4px var(--color-bd-focus);
|
||||
}
|
||||
|
||||
&[data-disabled] {
|
||||
|
|
|
|||
|
|
@ -6,9 +6,13 @@ export type NestedDSLWidget<W> = W & { children?: NestedDSLWidget<W>[] };
|
|||
export type NestedDSL<W> = NestedDSLWidget<W>;
|
||||
|
||||
export type FlattenedDSLWidget<W> = W & { children?: string[] };
|
||||
export type FlattenedDSL<W> = { [widgetId: string]: FlattenedDSLWidget<W> };
|
||||
export interface FlattenedDSL<W> {
|
||||
[widgetId: string]: FlattenedDSLWidget<W>;
|
||||
}
|
||||
|
||||
export type FlattenedDSLEntities<W> = { canvasWidgets: FlattenedDSL<W> };
|
||||
export interface FlattenedDSLEntities<W> {
|
||||
canvasWidgets: FlattenedDSL<W>;
|
||||
}
|
||||
|
||||
// Schema by widgetId
|
||||
const SCHEMA_BY_ID = new schema.Entity(
|
||||
|
|
|
|||
4
app/client/packages/rts/.lintstagedrc.json
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"src/**/*.{js,ts,tsx}": ["npx eslint --fix"],
|
||||
"src/**/*.{js,ts,tsx,css,md,json}": ["npx prettier --write"]
|
||||
}
|
||||
|
|
@ -4,23 +4,23 @@ import { StatusCodes } from "http-status-codes";
|
|||
import BaseController from "@controllers/BaseController";
|
||||
import AstService from "@services/AstService";
|
||||
|
||||
type ScriptToIdentifiersType = {
|
||||
interface ScriptToIdentifiersType {
|
||||
script: string;
|
||||
evalVersion?: number;
|
||||
};
|
||||
}
|
||||
|
||||
type entityRefactorType = {
|
||||
interface entityRefactorType {
|
||||
script: string;
|
||||
oldName: string;
|
||||
newName: string;
|
||||
isJSObject: boolean;
|
||||
evalVersion?: number;
|
||||
};
|
||||
}
|
||||
|
||||
type MultipleScriptToIdentifiersType = {
|
||||
interface MultipleScriptToIdentifiersType {
|
||||
scripts: string[];
|
||||
evalVersion?: number;
|
||||
};
|
||||
}
|
||||
export default class AstController extends BaseController {
|
||||
constructor() {
|
||||
super();
|
||||
|
|
|
|||
|
|
@ -3,22 +3,22 @@ import type { ValidationError } from "express-validator";
|
|||
import { StatusCodes } from "http-status-codes";
|
||||
import type { IdentifierInfo } from "@shared/ast";
|
||||
|
||||
type ErrorData = {
|
||||
interface ErrorData {
|
||||
error: string | string[];
|
||||
validationErrors?: ValidationError[];
|
||||
};
|
||||
}
|
||||
|
||||
type ErrorBag = {
|
||||
interface ErrorBag {
|
||||
success: boolean;
|
||||
message: string;
|
||||
data?: ErrorData;
|
||||
};
|
||||
}
|
||||
|
||||
type ResponseData = {
|
||||
interface ResponseData {
|
||||
success: boolean;
|
||||
message?: string;
|
||||
data: IdentifierInfo;
|
||||
};
|
||||
}
|
||||
|
||||
export default class BaseController {
|
||||
serverErrorMessaage = "Something went wrong";
|
||||
|
|
|
|||
|
|
@ -3,8 +3,6 @@ import svgr from "vite-plugin-svgr";
|
|||
import postcssNesting from "postcss-nesting";
|
||||
import postcssImport from "postcss-import";
|
||||
import postcssAtRulesVariables from "postcss-at-rules-variables";
|
||||
import postcssConditionals from "postcss-conditionals";
|
||||
import postcssFor from "postcss-for";
|
||||
import postcssEach from "postcss-each";
|
||||
import postcssModulesValues from "postcss-modules-values";
|
||||
import * as glob from "glob";
|
||||
|
|
@ -33,8 +31,6 @@ module.exports = {
|
|||
postcssNesting,
|
||||
postcssImport,
|
||||
postcssAtRulesVariables,
|
||||
postcssConditionals,
|
||||
postcssFor,
|
||||
postcssEach,
|
||||
postcssModulesValues,
|
||||
],
|
||||
|
|
|
|||
|
|
@ -29,9 +29,7 @@
|
|||
"chromatic": "^6.20.0",
|
||||
"postcss": "*",
|
||||
"postcss-at-rules-variables": "*",
|
||||
"postcss-conditionals": "*",
|
||||
"postcss-each": "*",
|
||||
"postcss-for": "*",
|
||||
"postcss-import": "*",
|
||||
"postcss-loader": "*",
|
||||
"postcss-modules-values": "*",
|
||||
|
|
|
|||
|
|
@ -9,10 +9,10 @@ import { APPLICATIONS_URL, AUTH_LOGIN_URL, BASE_URL } from "constants/routes";
|
|||
import PageLoadingBar from "pages/common/PageLoadingBar";
|
||||
import ServerUnavailable from "pages/common/ErrorPages/ServerUnavailable";
|
||||
|
||||
type Props = {
|
||||
interface Props {
|
||||
user?: User;
|
||||
authError: string;
|
||||
};
|
||||
}
|
||||
|
||||
function LandingScreen(props: Props) {
|
||||
if (props.user && window.location.pathname === BASE_URL) {
|
||||
|
|
|
|||