This commit is contained in:
Trisha Anand 2021-07-16 20:29:52 +05:30
commit 5232e1faee
1071 changed files with 72828 additions and 22701 deletions

View File

@ -343,6 +343,15 @@
"contributions": [
"code"
]
},
{
"login": "aswathkk",
"name": "Aswath K",
"avatar_url": "https://avatars.githubusercontent.com/u/10436935?v=4",
"profile": "https://github.com/aswathkk",
"contributions": [
"code"
]
}
],
"contributorsPerLine": 7,

View File

@ -57,4 +57,9 @@ APPSMITH_MAIL_SMTP_TLS_ENABLED=
#APPSMITH_SENTRY_ENVIRONMENT=
# Configure cloud services
# APPSMITH_CLOUD_SERVICES_BASE_URL
# APPSMITH_CLOUD_SERVICES_BASE_URL="https://release-cs.appsmith.com"
# Google Recaptcha Config
APPSMITH_RECAPTCHA_SITE_KEY=
APPSMITH_RECAPTCHA_SECRET_KEY=
APPSMITH_RECAPTCHA_ENABLED=

View File

@ -2,7 +2,7 @@
name: "\U0001F6E0 Feature request"
about: Suggest an idea to improve appsmith
title: "[Feature]"
labels: ''
labels: Enhancement
assignees: Nikhil-Nandagopal
---

View File

@ -4,7 +4,6 @@ about: Create a bug report to help us improve appsmith
title: "[Bug]"
labels: Bug, Needs Triaging
assignees: Nikhil-Nandagopal
---
## Description
@ -12,13 +11,17 @@ assignees: Nikhil-Nandagopal
[What happened]
### Steps to reproduce the behaviour:
Add steps to reproduce this behaviour, include console / network logs & screenshots
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
### Important Details
- Version: [Cloud / Self-Hosted vx.x]
- OS: [e.g.MacOSX]
- Browser [e.g. chrome, safari]
- Version: [Cloud / Self-Hosted vx.x]
- OS: [e.g.MacOSX]
- Browser [e.g. chrome, safari]
- Environment [production, release, deploy preview]

View File

@ -4,6 +4,7 @@ about: Describe the problem, solution and related issues
title: "[Epic]"
labels: Epic, Product Note
assignees: Nikhil-Nandagopal
---
# Objective

19
.github/config.json vendored
View File

@ -170,6 +170,10 @@
"color": "50ba23",
"description": ""
},
"Import-Export-App": {
"name": "Import-Export-App",
"color": "50ba23"
},
"JS": {
"name": "JS",
"color": "ffc1c2",
@ -619,6 +623,11 @@
"type": "hasLabel",
"value": true
},
{
"label": "iFrame",
"type": "hasLabel",
"value": true
},
{
"label": "Widgets",
"type": "hasLabel",
@ -648,6 +657,11 @@
"type": "hasLabel",
"label": "UI Building",
"value": true
},
{
"type": "hasLabel",
"label": "UI Performance",
"value": true
}
]
},
@ -664,6 +678,11 @@
"label": "Debugger",
"value": true
},
{
"type": "hasLabel",
"label": "Import-Export-App",
"value": true
},
{
"type": "hasLabel",
"label": "Omnibar",

View File

@ -3,10 +3,12 @@
> Use this template to quickly create a well written pull request. Delete all quotes before creating the pull request.
## Description
> Please include a summary of the changes and which issue has been fixed. Please also include relevant motivation
> Please include a summary of the changes and which issue has been fixed. Please also include relevant motivation
> and context. List any dependencies that are required for this change.
Fixes # (issue)
> if no issue exists, please create an issue and ask the maintainers about this first
## Type of change
@ -20,7 +22,7 @@ Fixes # (issue)
## How Has This Been Tested?
> Please describe the tests that you ran to verify your changes. Provide instructions, so we can reproduce.
> Please describe the tests that you ran to verify your changes. Provide instructions, so we can reproduce.
> Please also list any relevant details for your test configuration.
- Test A

View File

@ -9,6 +9,9 @@ categories:
- 'Bug'
- title: '📙 Documentation'
label: 'Documentation'
# Any PR with the label 'skip-changelog' will not be inserted into the release notes
exclude-labels:
- 'skip-changelog'
change-template: '- $TITLE (#$NUMBER)'
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
version-resolver:
@ -25,4 +28,4 @@ version-resolver:
template: |
## What's new?
$CHANGES
$CHANGES

View File

@ -6,7 +6,7 @@ on:
workflow_dispatch:
push:
branches: [release, master]
branches: [release, release-frozen, master]
# Only trigger if files have changed in this specific path
paths:
- "app/rts/**"
@ -68,6 +68,14 @@ jobs:
echo ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | docker login -u ${{ secrets.DOCKER_HUB_USERNAME }} --password-stdin
docker push ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-rts:${{steps.vars.outputs.tag}}
# Build release-frozen Docker image and push to Docker Hub
- name: Push release-frozen image to Docker Hub
if: success() && github.ref == 'refs/heads/release-frozen'
run: |
docker build -t ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-rts:${{steps.vars.outputs.tag}} .
echo ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | docker login -u ${{ secrets.DOCKER_HUB_USERNAME }} --password-stdin
docker push ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-rts:${{steps.vars.outputs.tag}}
# Build master Docker image and push to Docker Hub
- name: Push master image to Docker Hub with commit tag
if: success() && github.ref == 'refs/heads/master'

View File

@ -13,7 +13,7 @@ on:
# trigger for pushes to release and master
push:
branches: [release, master]
branches: [release, release-frozen, master]
paths:
- "app/client/**"
- "!app/client/cypress/manual_TestSuite/**"
@ -27,13 +27,11 @@ jobs:
build:
# If the build has been triggered manually via workflow_dispatch or via a push to protected branches
# then we don't check for the PR approved state
# Only PR approvals of internally created PRs should trigger this workflow
if: |
github.event_name == 'workflow_dispatch' ||
github.event_name == 'push' ||
(github.event_name == 'pull_request_review' &&
github.event.review.state == 'approved' &&
github.event.pull_request.head.repo.full_name == github.repository)
github.event_name == 'workflow_dispatch' ||
github.event_name == 'push' ||
(github.event_name == 'pull_request_review' &&
github.event.review.state == 'approved')
runs-on: ubuntu-latest
defaults:
run:
@ -116,6 +114,7 @@ jobs:
REACT_APP_VERSION_ID=${{ steps.vars.outputs.version }} \
REACT_APP_VERSION_RELEASE_DATE=$(date -u '+%Y-%m-%dT%H:%M:%SZ') \
REACT_APP_GOOGLE_ANALYTICS_ID=${{ secrets.GOOGLE_TAG_MANAGER_ID }} \
REACT_APP_SHOW_ONBOARDING_FORM=true \
yarn build
# Upload the build artifact so that it can be used by the test & deploy job in the workflow
@ -197,7 +196,22 @@ jobs:
path: app/client/build
- name: Pull release server docker container and start it locally
if: github.ref == 'refs/heads/release' || github.event.pull_request.base.ref == 'release'
if: github.ref == 'refs/heads/release' || github.event.pull_request.base.ref == 'release' || github.event.pull_request.head.ref == 'release'
shell: bash
run: |
docker run -d --net=host --name appsmith-internal-server -p 8080:8080 \
--env APPSMITH_MONGODB_URI=mongodb://localhost:27017/appsmith \
--env APPSMITH_REDIS_URL=redis://localhost:6379 \
--env APPSMITH_ENCRYPTION_PASSWORD=password \
--env APPSMITH_ENCRYPTION_SALT=salt \
--env APPSMITH_IS_SELF_HOSTED=false \
--env APPSMITH_CLOUD_SERVICES_BASE_URL=https://release-cs.appsmith.com \
--env APPSMITH_CLOUD_SERVICES_USERNAME= \
--env APPSMITH_CLOUD_SERVICES_PASSWORD= \
${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-server:release
- name: Pull release-frozen server docker container and start it locally
if: github.ref == 'refs/heads/release-frozen' || github.event.pull_request.head.ref == 'release-frozen'
shell: bash
run: |
docker run -d --net=host --name appsmith-internal-server -p 8080:8080 \
@ -209,10 +223,10 @@ jobs:
--env APPSMITH_CLOUD_SERVICES_BASE_URL= \
--env APPSMITH_CLOUD_SERVICES_USERNAME= \
--env APPSMITH_CLOUD_SERVICES_PASSWORD= \
${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-server:release
${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-server:release-frozen
- name: Pull master server docker container and start it locally
if: github.ref == 'refs/heads/master' || github.event.pull_request.base.ref == 'master'
if: github.ref == 'refs/heads/master'
shell: bash
run: |
docker run -d --net=host --name appsmith-internal-server -p 8080:8080 \
@ -221,7 +235,7 @@ jobs:
--env APPSMITH_ENCRYPTION_PASSWORD=password \
--env APPSMITH_ENCRYPTION_SALT=salt \
--env APPSMITH_IS_SELF_HOSTED=false \
--env APPSMITH_CLOUD_SERVICES_BASE_URL= \
--env APPSMITH_CLOUD_SERVICES_BASE_URL=https://release-cs.appsmith.com \
--env APPSMITH_CLOUD_SERVICES_USERNAME= \
--env APPSMITH_CLOUD_SERVICES_PASSWORD= \
${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-server:nightly
@ -287,7 +301,7 @@ jobs:
ui-test-result:
needs: ui-test
# Only run if the ui-test with matrices step is successful
if: success()
if: always()
runs-on: ubuntu-latest
defaults:
run:
@ -295,6 +309,19 @@ jobs:
steps:
- run: echo "All ui-test matrices completed"
- name: Return status for ui-matrix
run: |
if [[ "${{ needs.ui-test.result }}" == "success" ]]; then
echo "Integration tests completed successfully!";
exit 0;
elif [[ "${{ needs.ui-test.result }}" == "skipped" ]]; then
echo "Integration tests were skipped";
exit 1;
else
echo "Integration tests have failed";
exit 1;
fi
package:
needs: ui-test
runs-on: ubuntu-latest
@ -302,7 +329,7 @@ jobs:
run:
working-directory: app/client
# Run this job only if all the previous steps are a success and the reference if the release or master branch
if: success() && (github.ref == 'refs/heads/release' || github.ref == 'refs/heads/master')
if: (success() && github.ref == 'refs/heads/release') || github.ref == 'refs/heads/master'
steps:
# Checkout the code
@ -336,6 +363,14 @@ jobs:
echo ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | docker login -u ${{ secrets.DOCKER_HUB_USERNAME }} --password-stdin
docker push ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-editor:${{steps.branch_name.outputs.tag}}
# Build release-frozen Docker image and push to Docker Hub
- name: Push release-frozen image to Docker Hub
if: success() && github.ref == 'refs/heads/release-frozen' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch')
run: |
docker build -t ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-editor:${{steps.branch_name.outputs.tag}} .
echo ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | docker login -u ${{ secrets.DOCKER_HUB_USERNAME }} --password-stdin
docker push ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-editor:${{steps.branch_name.outputs.tag}}
# Build master Docker image and push to Docker Hub
- name: Push production image to Docker Hub with commit tag
if: success() && github.ref == 'refs/heads/master' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch')

View File

@ -71,6 +71,7 @@ jobs:
- name: Build and test
env:
APPSMITH_MONGODB_URI: "mongodb://localhost:27017/mobtools"
APPSMITH_CLOUD_SERVICES_BASE_URL: "https://release-cs.appsmith.com"
APPSMITH_REDIS_URL: "redis://127.0.0.1:6379"
APPSMITH_ENCRYPTION_PASSWORD: "password"
APPSMITH_ENCRYPTION_SALT: "salt"
@ -199,7 +200,7 @@ jobs:
if(check.length == 0) {
const head_sha = pull.head.sha;
const { data: completed_at } = await github.checks.create({
owner: context.repo.owner,
owner: context.repo.owner,
repo: context.repo.repo,
head_sha: head_sha,
name: process.env.job,
@ -294,7 +295,24 @@ jobs:
path: app/client/build
- name: Pull release server docker container and start it locally
if: github.ref == 'refs/heads/release' || github.event.pull_request.base.ref == 'release'
if: github.ref == 'refs/heads/release' || github.event.pull_request.base.ref == 'release'|| github.event.pull_request.head.ref == 'release'
shell: bash
run: |
echo ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | docker login -u ${{ secrets.DOCKER_HUB_USERNAME }} --password-stdin
docker run -d --net=host --name appsmith-internal-server -p 8080:8080 \
--env APPSMITH_MONGODB_URI=mongodb://localhost:27017/appsmith \
--env APPSMITH_REDIS_URL=redis://localhost:6379 \
--env APPSMITH_ENCRYPTION_PASSWORD=password \
--env APPSMITH_ENCRYPTION_SALT=salt \
--env APPSMITH_IS_SELF_HOSTED=false \
--env APPSMITH_CLOUD_SERVICES_BASE_URL=https://release-cs.appsmith.com \
--env APPSMITH_CLOUD_SERVICES_USERNAME= \
--env APPSMITH_CLOUD_SERVICES_PASSWORD= \
${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-server:release
- name: Pull release-frozen server docker container and start it locally
if: github.ref == 'refs/heads/release-frozen' || github.event.pull_request.head.ref == 'release-frozen'
shell: bash
run: |
echo ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | docker login -u ${{ secrets.DOCKER_HUB_USERNAME }} --password-stdin
@ -308,10 +326,10 @@ jobs:
--env APPSMITH_CLOUD_SERVICES_BASE_URL= \
--env APPSMITH_CLOUD_SERVICES_USERNAME= \
--env APPSMITH_CLOUD_SERVICES_PASSWORD= \
${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-server:release
${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-server:release-frozen
- name: Pull master server docker container and start it locally
if: github.ref == 'refs/heads/master' || github.event.pull_request.base.ref == 'master'
if: github.ref == 'refs/heads/master'
shell: bash
run: |
echo ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | docker login -u ${{ secrets.DOCKER_HUB_USERNAME }} --password-stdin
@ -322,7 +340,7 @@ jobs:
--env APPSMITH_ENCRYPTION_PASSWORD=password \
--env APPSMITH_ENCRYPTION_SALT=salt \
--env APPSMITH_IS_SELF_HOSTED=false \
--env APPSMITH_CLOUD_SERVICES_BASE_URL= \
--env APPSMITH_CLOUD_SERVICES_BASE_URL=https://release-cs.appsmith.com \
--env APPSMITH_CLOUD_SERVICES_USERNAME= \
--env APPSMITH_CLOUD_SERVICES_PASSWORD= \
${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-server:nightly
@ -426,7 +444,7 @@ jobs:
if(check.length == 0) {
const head_sha = pull.head.sha;
const { data: completed_at } = await github.checks.create({
owner: context.repo.owner,
owner: context.repo.owner,
repo: context.repo.repo,
head_sha: head_sha,
name: process.env.job,
@ -461,45 +479,9 @@ jobs:
run:
working-directory: app/client
# Run this job only if all the previous steps are a success and the reference if the release or master branch
if: success() && (github.ref == 'refs/heads/release' || github.ref == 'refs/heads/master')
if: success() && (github.ref == 'refs/heads/release' || github.ref == 'refs/heads/release-frozen' || github.ref == 'refs/heads/master')
steps:
# Check out merge commit
- name: Fork based /ok-to-test checkout
uses: actions/checkout@v2
with:
ref: "refs/pull/${{ github.event.client_payload.pull_request.number }}/merge"
- name: Download the react build artifact
uses: actions/download-artifact@v2
with:
name: build
path: app/client/build
# Here, the GITHUB_REF is of type /refs/head/<branch_name>. We extract branch_name from this by removing the
# first 11 characters. This can be used to build images for several branches
- name: Get the version to tag the Docker image
id: branch_name
run: echo ::set-output name=tag::$(echo ${GITHUB_REF:11})
# Build release Docker image and push to Docker Hub
- name: Push release image to Docker Hub
if: success() && github.ref == 'refs/heads/release' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch')
run: |
docker build -t ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-editor:${{steps.branch_name.outputs.tag}} .
echo ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | docker login -u ${{ secrets.DOCKER_HUB_USERNAME }} --password-stdin
docker push ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-editor:${{steps.branch_name.outputs.tag}}
# Build master Docker image and push to Docker Hub
- name: Push production image to Docker Hub with commit tag
if: success() && github.ref == 'refs/heads/master' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch')
run: |
docker build -t ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-editor:${GITHUB_SHA} .
docker build -t ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-editor:nightly .
echo ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | docker login -u ${{ secrets.DOCKER_HUB_USERNAME }} --password-stdin
docker push ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-editor:${GITHUB_SHA}
docker push ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-editor:nightly
# Update check run called "package"
- name: Mark package job as complete
uses: actions/github-script@v1
@ -531,7 +513,7 @@ jobs:
if(check.length == 0) {
const head_sha = pull.head.sha;
const { data: completed_at } = await github.checks.create({
owner: context.repo.owner,
owner: context.repo.owner,
repo: context.repo.repo,
head_sha: head_sha,
name: process.env.job,

View File

@ -6,7 +6,7 @@ on:
workflow_dispatch:
push:
branches: [release, master]
branches: [release, release-frozen, master]
# Only trigger if files have changed in this specific path
paths:
- "app/server/**"
@ -83,6 +83,7 @@ jobs:
- name: Build and test
env:
APPSMITH_MONGODB_URI: "mongodb://localhost:27017/mobtools"
APPSMITH_CLOUD_SERVICES_BASE_URL: "https://release-cs.appsmith.com"
APPSMITH_REDIS_URL: "redis://127.0.0.1:6379"
APPSMITH_ENCRYPTION_PASSWORD: "password"
APPSMITH_ENCRYPTION_SALT: "salt"
@ -102,6 +103,14 @@ jobs:
echo ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | docker login -u ${{ secrets.DOCKER_HUB_USERNAME }} --password-stdin
docker push ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-server:${{steps.vars.outputs.tag}}
# Build release-frozen Docker image and push to Docker Hub
- name: Push release-frozen image to Docker Hub
if: success() && github.ref == 'refs/heads/release-frozen'
run: |
docker build --build-arg APPSMITH_SEGMENT_CE_KEY=${{ secrets.APPSMITH_SEGMENT_CE_KEY }} -t ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-server:${{steps.vars.outputs.tag}} .
echo ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | docker login -u ${{ secrets.DOCKER_HUB_USERNAME }} --password-stdin
docker push ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-server:${{steps.vars.outputs.tag}}
# Build master Docker image and push to Docker Hub
- name: Push master image to Docker Hub with commit tag
if: success() && github.ref == 'refs/heads/master'

View File

@ -186,7 +186,7 @@ Apache License
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Copyright 2021 Appsmith Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.

187
README.md
View File

@ -1,114 +1,128 @@
<p align="center">
<img src="https://github.com/appsmithOrg/appsmith/blob/release/static/appsmith_logo_white.png" alt="Appsmith.com logo" width="400"/>
<br>
<i> Build and self-host all your internal apps.</i>
<br>
</p>
<a href="https://app.appsmith.com/signup/?utm_source=github&utm_medium=social&utm_content=website&utm_campaign=null&utm_term=website"><img src="static/images/git-banner.png" width="100%" alt="Appsmith - The Frontend Tool for Any Backend"></a>
<p align="center">
<a href="https://app.appsmith.com/signup?utm_source=github&utm_medium=social&utm_content=website&utm_campaign=null&utm_term=website"><strong>Try Online Sandbox</strong></a>
</p>
<p align="center">
<a href="https://docs.appsmith.com/">Documentation</a>
·
<h3 align="center">
<b><a href="https://app.appsmith.com/signup/?utm_source=github&utm_medium=social&utm_content=website&utm_campaign=null&utm_term=website">Get Started</a></b>
<a href="https://docs.appsmith.com/?utm_source=github&utm_medium=social&utm_content=appsmith_docs&utm_campaign=null&utm_term=appsmith_docs">Docs</a>
<a href="https://community.appsmith.com/">Community</a>
<a href="https://github.com/appsmithorg/appsmith/tree/update/readme#tutorials">Tutorials</a>
<a href="https://app.appsmith.com/applications/602b8aef12ba0d29d3ec151c/pages/602b8aef12ba0d29d3ec151e">Events</a>
<a href="https://www.youtube.com/appsmith">Youtube</a>
<a href="https://discord.gg/rBTTVJp">Discord</a>
·
<a href="./office_hours.md">Office Hours</a>
<br>
<br>
</p>
<a href="./appsmith_templates.md">Templates</a>
</h3>
---
<div>
Appsmith is a JavaScript-based visual development platform to build and launch internal tools quickly. Drag-and-drop pre-built widgets, and connect them using JavaScript to create interactive pages. Connect UI to your APIs and Databases to build complex workflows in minutes.<br/><br/>
**UI Components**: Table, Chart, Form, Map, Image, Video, and many more.<br/>
**API Support**: REST APIs, OAuth 2.0, CURL<br/>
**Database Support**: PostgreSQL, MongoDB, MySQL, Firestore, S3, Redshift, Elastic Search, DynamoDB, Redis, and MSFT SQL Server<br/>
**Hosting**: Cloud-hosted & On-premise
Already familiar with Appsmith? [Quickly start building on your own](#%EF%B8%8F-quickstart).
</div>
<img src="https://github.com/appsmithOrg/appsmith/blob/release/static/UI.gif">
<p align="center">
<img src="https://github.com/appsmithOrg/appsmith/blob/release/static/Query2.png" width="270">
<img src="https://github.com/appsmithOrg/appsmith/blob/release/static/API2.png" width="270">
<img src="https://github.com/appsmithOrg/appsmith/blob/release/static/Share5.png" width="270">
Turn any datasource into an internal app in minutes. Appsmith lets you drag-and-drop components to build dashboards, write logic with JavaScript objects and connect to any API, database or GraphQL source.
<br />
<br>
<img src="static/images/integrations.png" width="320px">
<img width="783" alt="MVC-Github-Readme" src="https://user-images.githubusercontent.com/1650391/124094578-d1618480-da50-11eb-839b-c702c2574f15.png">
</p>
<br>
## Quick Start
The fastest way to start with Appsmith is the cloud-hosted version. When you're ready, you can also host it yourself.
- Start building apps _immediately_ with [Appsmith Cloud](https://app.appsmith.com/signup/?utm_source=github&utm_medium=social&utm_content=website&utm_campaign=null&utm_term=website)
- Install locally or on a private instance with [Docker](https://docs.appsmith.com/setup/docker?utm_source=github&utm_medium=social&utm_content=appsmith_docs&utm_campaign=null&utm_term=appsmith_docs) _(Recommended)_
- Deploy on a [Kubernetes](https://docs.appsmith.com/setup/kubernetes?utm_source=github&utm_medium=social&utm_content=appsmith_docs&utm_campaign=null&utm_term=appsmith_docs) cluster
- Deploy to [AWS with an AMI](https://docs.appsmith.com/setup/aws-ami?utm_source=github&utm_medium=social&utm_content=appsmith_docs&utm_campaign=null&utm_term=appsmith_docs) on the marketplace
- One-click deploy to [Heroku](https://docs.appsmith.com/setup/heroku?utm_source=github&utm_medium=social&utm_content=appsmith_docs&utm_campaign=null&utm_term=appsmith_docs)
<br><a href="https://www.youtube.com/watch?v=mzqK0QIZRLs" target="_blank"><img src="static/images/build-tool.png" alt="Build an Internal Tool with Appsmith" width="410px" /></a>
## Features
<p>
<img src="static/animations/widgets.gif" width="100%">
</p>
## 🏭 Features
Use [ready components](https://docs.appsmith.com/widget-reference/button) to build workflows in record time. Drag common elements like tables, charts, forms and more right into your app.
- **5-minute setup**: Deploy Appsmith on your server, or use our cloud version to start building in 5 minutes. [Quick Start](#%EF%B8%8F-quickstart)
- **Frontend as a service**: Drag-and-drop from pre-built UI widgets like table, form, and image, to build sophisticated **dashboards** and **workflows, without writing HTML/CSS**. Write JavaScript anywhere to transform data, and dynamically control widget-properties.
- **Database CRUD**: Query & update your database directly by connecting it to the UI. Connect to **PostgreSQL, MongoDB, MySQL & more!**
- **Trigger APIs**: Connect to REST APIs to build custom apps.
- **Security**: DB Credentials are AES 256 encrypted and no data is stored by appsmith. Deploy behind your private VPC for additional security!
- **One-click deployment**: Managed deployment of your apps with a click of a button.
- **Access-control**: Assign users different roles & control who can edit / view your applications.
- **Supports OAuth**: Allow users to authenticate via Google Auth or GitHub Auth.
_Includes text, forms, inputs, buttons, tables, images, charts, checkboxes, switches, radio buttons, datepickers, dropdowns, filepickers, containers, maps, modals, rich text editors, tabs & video._ <br>
## 📺 Demo
<p>
<img src="static/animations/running-api.gif" width="100%">
</p>
Unsure if Appsmith is for you? [Watch it in action here!](http://bit.ly/appsmith-demo-github)
Appsmith automagically works using any DB, Rest API or GraphQL as a datasource, with support for OAuth 2.0 and CURL. Here's a list of all our [pre-built integrations](https://docs.appsmith.com/core-concepts/connecting-to-data-sources/connecting-to-databases).
But if youd rather check out some real applications that can be built with Appsmith, check below:
_Currently works with PostgreSQL, MongoDB, MySQL, Firestore, S3, Redshift, Elastic Search, DynamoDB, Redis, and MSFT SQL Server._ <br>
- [Customer Support Dashboard](https://bit.ly/cs-dashboard-appsmith)
- [Job Application Tracker](https://bit.ly/3hbYtTi)
<p>
<img src="static/animations/javascript.gif" width="100%">
</p>
## 🏃‍♀️ Quickstart
We'll run JS anywhere! Code interactions between elements, update datasources or manipulate SQL queries—[we'll parse JS anywhere](https://docs.appsmith.com/core-concepts/writing-code).<br>
The following steps introduce you to building a simple user-list dashboard on Appsmith.
<p>
<img src="static/animations/invite.gif" width="100%">
</p>
1. [Sign up on Appsmith Cloud](https://app.appsmith.com/signup?utm_source=github&utm_medium=social&utm_content=website&utm_campaign=null&utm_term=website) or [Deploy Appsmith](https://docs.appsmith.com/setup).
2. Create a new app within the organization that has already been created for you.
3. Click on the `+` icon next to the `Queries` section to add a new query in the mock database
1. Name the query `usersQuery`.
2. Write the query `select * from users limit 5;`.
3. Run the query.
4. Click on the `+` icon next to the `Widgets` section and drag a table onto the screen
5. Link the table data property to the `usersQuery` using JavaScript `{{usersQuery.data}}`
6. Hit the Deploy button and checkout the view mode of the app.
[Push a button](https://docs.appsmith.com/core-concepts/access-control) to deploy & share apps with your team, or privately invite your team using OAuth 2.0. Each member can be assigned a role with access to certain parts of the app.<br>
Congratulations 🎉 You just built your first app on Appsmith!
Connect your own data to build apps for your team. [Read more here.](https://docs.appsmith.com/core-concepts)
#### 🔑 Solid 256-bit Encryption
## 📚 Tutorials
Appsmith apps are [secure by default](https://docs.appsmith.com/security). All connections are TLS-encrypted, and credentials are encrypted with AES-256—so we can't see any of your data. For added security, try our [self-hosted options](https://docs.appsmith.com/setup).<br><br>
1. [Building an Admin Panel on MongoDB using Appsmith](https://blog.appsmith.com/building-an-admin-panel-with-mongodb-using-appsmith) ([Video](https://www.youtube.com/watch?v=tisUaIgI86k))
2. [Building a Customer Support Dashboard in Appsmith](https://www.youtube.com/watch?v=-O_6OLREEzo&t=272s)
3. [Building a Store Catalogue Management System using Appsmith and GraphQL](https://blog.appsmith.com/building-a-store-catalogue-management-system-using-appsmith-and-graphql)
4. [Running CI/CD Jobs Manually using Appsmith](https://blog.appsmith.com/how-to-run-manual-jobs-in-gitlab-cicd) ([Video](https://www.youtube.com/watch?v=CYdeJcD4I8A))
5. [Building a Calendly Clone in Appsmith](https://blog.appsmith.com/how-to-build-a-calendly-clone-in-30-minutes)
6. [Building Internal Tools with Appsmith](https://youtu.be/eYYYfuW-kEE) `Community`
7. [Building an Issue Tracker with Appsmith](https://dev.to/pjmantoss/how-to-build-an-issue-tracker-with-appsmith-204e) `Community`
#### 🎙 Transparent Support
## 📕 Support & Troubleshooting
Issues are inevitable. When you have one, our entire team is around to help—
If you encountered a bug or need help troubleshooting an issue, you can use one of the following channels:
- 💬 Talk to us on [Discord](https://discord.gg/rBTTVJp)
- 📄 Find a solution in our [Documentation](https://docs.appsmith.com)
- ⚠️ Open an issue right here on [GitHub](https://github.com/appsmithorg/appsmith/issues/new/choose)
- 👾 Ask for help on our [Forum](https://community.appsmith.com)
- Join our Beta users program and give us feedback <a href = "https://www.notion.so/Betasmith-Join-the-Appsmith-Beta-Community-5c288dfd57bd4c4781c3bf02ddf9aa8a">Betasmith Community</a>. Be a part of the community that will help shape the future of Appsmith.
- Self Help: [Documentation](https://docs.appsmith.com)
- Community Support: [Discord](https://discord.gg/rBTTVJp)
- Issue & bug tracking: [GitHub Issues](https://github.com/appsmithorg/appsmith/issues/new/choose)
## Demos
## 🧑‍🤝‍🧑 Contributing
Check out some real applications that can be built with Appsmith:
If you're interested in contributing to Appsmith:
- 👩‍💻 [Customer Support Dashboard](https://app.appsmith.com/applications/5f2aeb2580ca1f6faaed4e4a/pages/5f2d61b580ca1f6faaed4e79/?utm_source=github&utm_medium=direct&utm_content=appsmith_apps&utm_campaign=null&utm_term=appsmith_apps)
- 🗓️ [Calendly in Appsmith](https://app.appsmith.com/applications/600186605b452f525458d6d2/pages/600186605b452f525458d6d4/?utm_source=github&utm_medium=direct&utm_content=appsmith_apps&utm_campaign=null&utm_term=appsmith_apps)
- 💸 [Fundraising CRM](https://app.appsmith.com/applications/6098bdc65864501cc39c3d2f/pages/6098bdc65864501cc39c3d31/?utm_source=github&utm_medium=direct&utm_content=appsmith_apps&utm_campaign=null&utm_term=appsmith_apps)
- 📄 [Application Tracking System App](https://app.appsmith.com/applications/5f43bce13697fd5df1c52ce4/pages/5f43c39c3697fd5df1c52d50/?utm_source=github&utm_medium=direct&utm_content=appsmith_apps&utm_campaign=null&utm_term=appsmith_apps)
1. Start by reading our [Contribution Guide](https://github.com/appsmithorg/appsmith/blob/master/CONTRIBUTING.md).
2. Learn how to set up your local environment, in our [developer-guide](https://github.com/appsmithorg/appsmith/blob/master/contributions/CodeContributionsGuidelines.md#-setup-for-local-development).
3. Explore our list of [good first issues](https://github.com/appsmithorg/appsmith/issues?q=is%3Aissue+is%3Aopen+label%3A%22Good+First+Issue%22).
- 🌟 Made something cool? [Share it with the community](https://discord.gg/Tx395War)
<br><br>
We are committed to fostering an open and welcoming environment in the community. Please read our [Code of Conduct](CODE_OF_CONDUCT.md).
## Tutorials
## 📑 License
Here are the latest tutorials and videos for you to learn more about Appsmith:
The Appsmith platform is available under the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0) (Apache-2.0).
1. [Build an Investor CRM using Appsmith on Google Sheets](https://blog.appsmith.com/build-an-investor-crm-using-appsmith-on-google-sheets-1)
2. [Building an Admin Panel on MongoDB using Appsmith](https://blog.appsmith.com/building-an-admin-panel-with-mongodb-using-appsmith) ([Video](https://www.youtube.com/watch?v=tisUaIgI86k))
3. [Building a Discount Management Dashboard With Postgres](https://blog.appsmith.com/building-a-discount-management-dashboard-with-postgres)
4. [Building a Customer Support Dashboard in Appsmith](https://www.youtube.com/watch?v=-O_6OLREEzo)
5. [Building a Store Catalogue Management System using Appsmith and GraphQL](https://blog.appsmith.com/building-a-store-catalogue-management-system-using-appsmith-and-graphql)
6. [Using the Notion API to Build a Content Management System](https://blog.appsmith.com/using-the-notion-api-to-build-a-content-management-system)
7. [How to run manual jobs in Gitlab CI/CD](https://blog.appsmith.com/how-to-run-manual-jobs-in-gitlab-cicd) ([Video](https://www.youtube.com/watch?v=CYdeJcD4I8A))
8. [Building a Calendly Clone in Appsmith](https://blog.appsmith.com/how-to-build-a-calendly-clone-in-30-minutes)
9. [Building Internal Tools with Appsmith](https://youtu.be/eYYYfuW-kEE) `Community`
10. [Building an Issue Tracker with Appsmith](https://dev.to/pjmantoss/how-to-build-an-issue-tracker-with-appsmith-204e) `Community`
## Contributors
Visit our [blog](https://blog.appsmith.com/) to explore more.
## Contribute
We love our contributors! We're committed to fostering an open and welcoming environment in the community. If you'd like to contribute anything from a bug-fix to a feature update, start here—
- 📖 Read our [Contribution Guide](https://github.com/appsmithorg/appsmith/blob/master/CONTRIBUTING.md)
- 🧩 [Set up your local environment](https://github.com/appsmithorg/appsmith/blob/master/contributions/CodeContributionsGuidelines.md#-setup-for-local-development)
- 👾 Explore some [good first issues](https://github.com/appsmithorg/appsmith/issues?q=is%3Aissue+is%3Aopen+label%3A%22Good+First+Issue%22)
- 📕 Read our [Code of Conduct](CODE_OF_CONDUCT.md)
#### Top Contributors (36)
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove / modify this section -->
<!-- prettier-ignore-start -->
@ -161,6 +175,7 @@ The Appsmith platform is available under the [Apache License 2.0](https://www.ap
</tr>
<tr>
<td align="center"><a href="http://www.navdeepsingh.in/"><img src="https://avatars.githubusercontent.com/u/2968787?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Navdeep Singh</b></sub></a><br /><a href="https://github.com/appsmithorg/appsmith/commits?author=navdeepsingh" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/aswathkk"><img src="https://avatars.githubusercontent.com/u/10436935?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Aswath K</b></sub></a><br /><a href="https://github.com/appsmithorg/appsmith/commits?author=aswathkk" title="Code">💻</a></td>
</tr>
</table>
@ -168,3 +183,7 @@ The Appsmith platform is available under the [Apache License 2.0](https://www.ap
<!-- prettier-ignore-end -->
<!-- ALL-CONTRIBUTORS-LIST:END -->
## License
Appsmith is available under the [Apache License 2.0](https://github.com/appsmithorg/appsmith/blob/release/LICENSE). Use it wisely.

View File

@ -98,6 +98,21 @@
"value": "",
"required": false
},
"APPSMITH_RECAPTCHA_SITE_KEY": {
"description" : "Google reCAPTCHA v3 site key, it is required if you wish to enable protection against spam/abusive users. Read more at: https://developers.google.com/recaptcha/docs/v3",
"value": "",
"required": false
},
"APPSMITH_RECAPTCHA_SECRET_KEY": {
"description" : "Google reCAPTCHA v3 verification secret key, it is required if you wish to enable spam protection in your backend server.",
"value": "",
"required": false
},
"APPSMITH_RECAPTCHA_ENABLED": {
"description" : "Boolean config to enable or disable Google reCAPTCHA v3 verification feature. If set to true, both site key and secret key should be provided.",
"value": "",
"required": false
},
"APPSMITH_DISABLE_TELEMETRY": {
"description" : "We want to be transparent and request that you share anonymous usage data with us. This data is purely statistical in nature and helps us understand your needs & provide better support to your self-hosted instance. You can read more about what information is collected in our documentation https://docs.appsmith.com/v/v1.2.1/setup/telemetry",
"value": "false"

View File

@ -1,7 +1,7 @@
// This JSON file configures the eslint plugin. It supports comments as well as per the JSON5 spec
{
"parser": "@typescript-eslint/parser",
"plugins": ["react", "@typescript-eslint", "prettier", "react-hooks"],
"plugins": ["react", "@typescript-eslint", "prettier", "react-hooks","sort-destructure-keys"],
"extends": [
"plugin:react/recommended", // Uses the recommended rules from @eslint-plugin-react
"plugin:@typescript-eslint/recommended",
@ -34,7 +34,8 @@
"react/self-closing-comp": "error",
"react/jsx-sort-props": "error",
"react/jsx-fragments": "error",
"react/jsx-no-useless-fragment": "error"
"react/jsx-no-useless-fragment": "error",
"sort-destructure-keys/sort-destructure-keys": ["error", {"caseSensitive": false}]
},
"settings": {
"react": {

View File

@ -6,4 +6,4 @@
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
For details on setting up your development machine, please refer to the [Setup Guide](https://github.com/appsmithorg/appsmith/blob/release/contributions/ClientSetup.md)
For details on setting up your development machine, please refer to the [Setup Guide](../../contributions/ClientSetup.md)

View File

@ -6,7 +6,7 @@ GIT_SHA=$(eval git rev-parse HEAD)
echo $GIT_SHA
echo "Sentry Auth Token: $SENTRY_AUTH_TOKEN"
REACT_APP_SENTRY_RELEASE=$GIT_SHA EXTEND_ESLINT=true craco --max-old-space-size=4096 build --config craco.build.config.js
REACT_APP_SENTRY_RELEASE=$GIT_SHA REACT_APP_CLIENT_LOG_LEVEL=ERROR EXTEND_ESLINT=true craco --max-old-space-size=4096 build --config craco.build.config.js
rm ./build/static/js/*.js.map
echo "build finished"

View File

@ -4,6 +4,7 @@
"requestTimeout": 21000,
"pageLoadTimeout": 20000,
"video": true,
"videoUploadOnPasses": false,
"reporter": "mochawesome",
"reporterOptions": {
"reportDir": "results",
@ -18,4 +19,4 @@
"runMode": 2,
"openMode": 0
}
}
}

View File

@ -7,7 +7,7 @@
"detachFromLayout": true,
"widgetId": "0",
"topRow": 0,
"bottomRow": 2960,
"bottomRow": 740,
"containerStyle": "none",
"snapRows": 33,
"parentRowSpace": 1,

View File

@ -0,0 +1,48 @@
{
"dsl": {
"widgetName": "MainContainer",
"backgroundColor": "none",
"rightColumn": 1280,
"snapColumns": 64,
"detachFromLayout": true,
"widgetId": "0",
"topRow": 0,
"bottomRow": 1300,
"containerStyle": "none",
"snapRows": 125,
"parentRowSpace": 1,
"type": "CANVAS_WIDGET",
"canExtend": true,
"version": 23,
"minHeight": 1310,
"parentColumnSpace": 1,
"dynamicTriggerPathList": [],
"dynamicBindingPathList": [],
"leftColumn": 0,
"children": [
{
"widgetName": "Divider1",
"rightColumn": 23,
"widgetId": "i5kplngd19",
"topRow": 25,
"bottomRow": 75,
"parentRowSpace": 10,
"isVisible": true,
"type": "DIVIDER_WIDGET",
"version": 1,
"parentId": "0",
"isLoading": false,
"parentColumnSpace": 19.75,
"dynamicTriggerPathList": [],
"leftColumn": 15,
"dynamicBindingPathList": [],
"orientation": "horizontal",
"capType": "nc",
"capSide": -1,
"strokeStyle": "solid",
"dividerColor": "black",
"thickness": 2
}
]
}
}

View File

@ -144,7 +144,7 @@
"parentRowSpace": 38,
"leftColumn": 3,
"rightColumn": 11,
"topRow": 0,
"topRow": 1,
"bottomRow": 12,
"parentId": "yt4ouwn0sk",
"widgetId": "673etzjyv9",

View File

@ -0,0 +1,174 @@
{
"exportedApplication": {
"userPermissions": [
"canComment:applications",
"manage:applications",
"read:applications",
"publish:applications",
"makePublic:applications"
],
"name": "testing app - pk",
"isPublic": false,
"appIsExample": false,
"color": "#FE9F44",
"icon": "heart",
"new": true
},
"datasourceList": [],
"pageList": [
{
"userPermissions": [
"read:pages",
"manage:pages"
],
"unpublishedPage": {
"name": "Page1",
"layouts": [
{
"id": "60a77186cdbfc9440388285c",
"userPermissions": [],
"dsl": {
"widgetName": "MainContainer",
"backgroundColor": "none",
"rightColumn": 1118,
"snapColumns": 16,
"detachFromLayout": true,
"widgetId": "0",
"topRow": 0,
"bottomRow": 1280,
"containerStyle": "none",
"snapRows": 33,
"parentRowSpace": 1,
"type": "CANVAS_WIDGET",
"canExtend": true,
"version": 18,
"minHeight": 1292,
"parentColumnSpace": 1,
"dynamicTriggerPathList": [],
"dynamicBindingPathList": [],
"leftColumn": 0,
"children": [
{
"widgetName": "Button1",
"rightColumn": 4,
"isDefaultClickDisabled": true,
"widgetId": "g7jf8v3wkq",
"buttonStyle": "PRIMARY_BUTTON",
"topRow": 0,
"bottomRow": 1,
"parentRowSpace": 40,
"isVisible": true,
"type": "BUTTON_WIDGET",
"version": 1,
"parentId": "0",
"isLoading": false,
"parentColumnSpace": 67.375,
"leftColumn": 2,
"text": "Submit",
"isDisabled": false
},
{
"widgetName": "Chart1",
"rightColumn": 8,
"allowHorizontalScroll": false,
"widgetId": "ow55pc4z0z",
"topRow": 5,
"bottomRow": 13,
"parentRowSpace": 40,
"isVisible": true,
"type": "CHART_WIDGET",
"version": 1,
"parentId": "0",
"isLoading": false,
"chartData": {
"pftw37090s": {
"seriesName": "Sales",
"data": [
{
"x": "Mon",
"y": 10000
},
{
"x": "Tue",
"y": 12000
},
{
"x": "Wed",
"y": 32000
},
{
"x": "Thu",
"y": 28000
},
{
"x": "Fri",
"y": 14000
},
{
"x": "Sat",
"y": 19000
},
{
"x": "Sun",
"y": 36000
}
]
}
},
"yAxisName": "Total Order Revenue $",
"parentColumnSpace": 67.375,
"chartName": "Last week's revenue",
"leftColumn": 2,
"xAxisName": "Last Week",
"chartType": "LINE_CHART"
}
]
},
"layoutOnLoadActions": [],
"new": false
}
],
"userPermissions": []
},
"publishedPage": {
"name": "Page1",
"layouts": [
{
"id": "60a77186cdbfc9440388285c",
"userPermissions": [],
"dsl": {
"widgetName": "MainContainer",
"backgroundColor": "none",
"rightColumn": 1224,
"snapColumns": 16,
"detachFromLayout": true,
"widgetId": "0",
"topRow": 0,
"bottomRow": 1254,
"containerStyle": "none",
"snapRows": 33,
"parentRowSpace": 1,
"type": "CANVAS_WIDGET",
"canExtend": true,
"version": 4,
"minHeight": 1292,
"parentColumnSpace": 1,
"dynamicBindingPathList": [],
"leftColumn": 0,
"children": []
},
"new": false
}
],
"userPermissions": []
},
"new": true
}
],
"publishedDefaultPageName": "Page1",
"unpublishedDefaultPageName": "Page1",
"actionList": [],
"decryptedFields": {},
"publishedLayoutmongoEscapedWidgets": {},
"unpublishedLayoutmongoEscapedWidgets": {}
}

View File

@ -0,0 +1 @@
{"dsl":{"widgetName":"MainContainer","backgroundColor":"none","rightColumn":966,"snapColumns":64,"detachFromLayout":true,"widgetId":"0","topRow":0,"bottomRow":320,"containerStyle":"none","snapRows":125,"parentRowSpace":1,"type":"CANVAS_WIDGET","canExtend":true,"version":23,"minHeight":1292,"parentColumnSpace":1,"dynamicBindingPathList":[],"leftColumn":0,"children":[{"isVisible":true,"inputType":"TEXT","label":"","widgetName":"Input1","version":1,"resetOnSubmit":true,"isRequired":false,"isDisabled":false,"type":"INPUT_WIDGET","isLoading":false,"parentColumnSpace":14.84375,"parentRowSpace":10,"leftColumn":23,"rightColumn":43,"topRow":8,"bottomRow":12,"parentId":"0","widgetId":"ihviqc47ev"}],"dynamicTriggerPathList":[]}}

View File

@ -0,0 +1,184 @@
{
"dsl": {
"widgetName": "MainContainer",
"backgroundColor": "none",
"rightColumn": 966,
"snapColumns": 64,
"detachFromLayout": true,
"widgetId": "0",
"topRow": 0,
"bottomRow": 5168,
"containerStyle": "none",
"snapRows": 129,
"parentRowSpace": 1,
"type": "CANVAS_WIDGET",
"canExtend": true,
"version": 20,
"minHeight": 450,
"parentColumnSpace": 1,
"dynamicBindingPathList": [],
"leftColumn": 0,
"children": [
{
"backgroundColor": "#FFFFFF",
"widgetName": "Container1",
"rightColumn": 32,
"orientation": "VERTICAL",
"snapColumns": 16,
"widgetId": "mxbaasg65u",
"containerStyle": "card",
"topRow": 0,
"bottomRow": 36,
"parentRowSpace": 38,
"isVisible": true,
"type": "CONTAINER_WIDGET",
"version": 1,
"isLoading": false,
"parentColumnSpace": 75.25,
"dynamicBindingPathList": [],
"leftColumn": 0,
"children": [
{
"backgroundColor": "transparent",
"widgetName": "59gdivzv7s",
"rightColumn": 2408,
"orientation": "VERTICAL",
"snapColumns": 16,
"detachFromLayout": true,
"widgetId": "bxekwxgc1i",
"containerStyle": "none",
"topRow": 0,
"bottomRow": 20,
"parentRowSpace": 1,
"isVisible": true,
"type": "CANVAS_WIDGET",
"canExtend": false,
"version": 1,
"isLoading": false,
"parentColumnSpace": 1,
"leftColumn": 0,
"dynamicBindingPathList": [],
"children": []
}
]
},
{
"backgroundColor": "#FFFFFF",
"widgetName": "Container3",
"rightColumn": 64,
"orientation": "VERTICAL",
"snapColumns": 16,
"widgetId": "i331vll2mg",
"containerStyle": "card",
"topRow": 36,
"bottomRow": 92,
"parentRowSpace": 38,
"isVisible": true,
"type": "CONTAINER_WIDGET",
"version": 1,
"isLoading": false,
"parentColumnSpace": 75.25,
"dynamicBindingPathList": [],
"leftColumn": 0,
"children": [
{
"backgroundColor": "transparent",
"widgetName": "rhfg2vf1n5",
"rightColumn": 4816,
"orientation": "VERTICAL",
"snapColumns": 16,
"detachFromLayout": true,
"widgetId": "rglduihhzk",
"containerStyle": "none",
"topRow": 0,
"bottomRow": 20,
"parentRowSpace": 1,
"isVisible": true,
"type": "CANVAS_WIDGET",
"canExtend": false,
"version": 1,
"isLoading": false,
"parentColumnSpace": 1,
"leftColumn": 0,
"dynamicBindingPathList": [],
"children": [
{
"isVisible": true,
"widgetName": "Chart1",
"chartType": "LINE_CHART",
"chartName": "Last week's revenue",
"allowHorizontalScroll": false,
"version": 1,
"chartData": {
"q4pm3w97mo": {
"seriesName": "Sales",
"data": ""
}
},
"xAxisName": "Last Week",
"yAxisName": "Total Order Revenue $",
"type": "CHART_WIDGET",
"isLoading": false,
"parentColumnSpace": 14.59375,
"parentRowSpace": 10,
"leftColumn": 20,
"rightColumn": 44,
"topRow": 16,
"bottomRow": 48,
"parentId": "rglduihhzk",
"widgetId": "snzfh3qjo8",
"dynamicBindingPathList": [],
"dynamicTriggerPathList": []
}
]
}
]
},
{
"backgroundColor": "#FFFFFF",
"widgetName": "Container4",
"rightColumn": 64,
"orientation": "VERTICAL",
"snapColumns": 16,
"widgetId": "qznzsquf70",
"containerStyle": "card",
"topRow": 0,
"bottomRow": 36,
"parentRowSpace": 38,
"isVisible": true,
"type": "CONTAINER_WIDGET",
"version": 1,
"isLoading": false,
"parentColumnSpace": 75.25,
"dynamicBindingPathList": [],
"leftColumn": 32,
"children": [
{
"backgroundColor": "transparent",
"widgetName": "3bn6uv0vy4",
"rightColumn": 2408,
"orientation": "VERTICAL",
"snapColumns": 16,
"detachFromLayout": true,
"widgetId": "7vm5mdu8ey",
"containerStyle": "none",
"topRow": 0,
"bottomRow": 1368,
"parentRowSpace": 1,
"isVisible": true,
"type": "CANVAS_WIDGET",
"canExtend": false,
"version": 1,
"isLoading": false,
"parentColumnSpace": 1,
"leftColumn": 0,
"dynamicBindingPathList": [],
"children": [
null
]
}
]
}
]
}
}

View File

@ -0,0 +1,58 @@
{
"dsl": {
"widgetName": "MainContainer",
"backgroundColor": "none",
"rightColumn": 1224,
"snapColumns": 16,
"detachFromLayout": true,
"widgetId": "0",
"topRow": 0,
"bottomRow": 1280,
"containerStyle": "none",
"snapRows": 33,
"parentRowSpace": 1,
"type": "CANVAS_WIDGET",
"canExtend": true,
"version": 9,
"minHeight": 1292,
"parentColumnSpace": 1,
"dynamicBindingPathList": [],
"leftColumn": 0,
"children": [
{
"isVisible": true,
"text": "Submit",
"buttonStyle": "PRIMARY_BUTTON",
"widgetName": "Button1",
"isDisabled": false,
"isDefaultClickDisabled": true,
"type": "BUTTON_WIDGET",
"isLoading": false,
"parentColumnSpace": 74,
"parentRowSpace": 40,
"leftColumn": 5,
"rightColumn": 7,
"topRow": 2,
"bottomRow": 3,
"parentId": "0",
"widgetId": "3qg87le9t4"
},
{
"isVisible": true,
"inputType": "TEXT",
"label": "",
"widgetName": "Input1",
"type": "INPUT_WIDGET",
"isLoading": false,
"parentColumnSpace": 74,
"parentRowSpace": 40,
"leftColumn": 2,
"rightColumn": 7,
"topRow": 0,
"bottomRow": 1,
"parentId": "0",
"widgetId": "2lhsjdd5sg"
}
]
}
}

View File

@ -0,0 +1,42 @@
{
"dsl": {
"widgetName": "MainContainer",
"backgroundColor": "none",
"rightColumn": 1224,
"snapColumns": 16,
"detachFromLayout": true,
"widgetId": "0",
"topRow": 0,
"bottomRow": 1280,
"containerStyle": "none",
"snapRows": 33,
"parentRowSpace": 1,
"type": "CANVAS_WIDGET",
"canExtend": true,
"version": 9,
"minHeight": 1292,
"parentColumnSpace": 1,
"dynamicBindingPathList": [],
"leftColumn": 0,
"children": [
{
"isVisible": true,
"label": "Data",
"widgetName": "Table1",
"searchKey": "",
"tableData": "{{TestApi.data.users}}",
"type": "TABLE_WIDGET",
"isLoading": false,
"parentColumnSpace": 74,
"parentRowSpace": 40,
"leftColumn": 1,
"rightColumn": 9,
"topRow": 7,
"bottomRow": 14,
"parentId": "0",
"widgetId": "7miqot30xy",
"dynamicBindingPathList": []
}
]
}
}

View File

@ -14,7 +14,6 @@
"type": "CANVAS_WIDGET",
"canExtend": true,
"dynamicBindingPathList": [],
"version": 4,
"minHeight": 1292,
"parentColumnSpace": 1,
"leftColumn": 0,

View File

@ -201,50 +201,60 @@
"orderAmount": 9.99
}
],
"ChartCustomConfig": {"type": "area2d",
"dataSource": {
"chart": {
"caption": "Countries With Most Oil Reserves [2017-18]",
"subCaption": "In MMbbl = One Million barrels",
"xAxisName": "Country",
"yAxisName": "Reserves (MMbbl)",
"numberSuffix": "K"
},
"data": [
{
"label": "Venezuela",
"value": "290"
},
{
"label": "Saudi",
"value": "260"
},
{
"label": "Canada",
"value": "180"
},
{
"label": "Iran",
"value": "140"
},
{
"label": "Russia",
"value": "115"
},
{
"label": "UAE",
"value": "100"
},
{
"label": "US",
"value": "30"
},
{
"label": "China",
"value": "30"
}
]
}},
"ChartCustomConfig": {
"type":"column2d",
"dataSource":{
"chart":{
"caption":"Monthly revenue for last year",
"subCaption":"Harry's SuperMart",
"xAxisName":"Month",
"yAxisName":"Revenues (In USD)",
"numberPrefix":"$",
"theme":"fusion"
},
"data":[
{
"label":"Jan",
"value":"420000"
},
{
"label":"Feb",
"value":"810000"
},
{
"label":"Mar",
"value":"720000"
},
{
"label":"Apr",
"value":"550000"
},
{
"label":"May",
"value":"910000"
},
{
"label":"Jun",
"value":"256000"
},
{
"label":"Jul",
"value":"512000"
}
],
"trendlines":[
{
"line":[
{
"startvalue":"700000",
"valueOnRight":"1",
"displayvalue":"Monthly Target"
}
]
}
]
}
},
"TableInputWithNull": [
{
"id": 2381224,

View File

@ -110,7 +110,9 @@
"topRow": 3,
"bottomRow": 4,
"parentId": "4lvpg75cy5",
"widgetId": "vwe9oyg9x1"
"widgetId": "vwe9oyg9x1",
"defaultText": "{{Input1.text}}",
"dynamicBindingPathList": [{"key": "defaultText"}]
}
],
"blueprint": {

View File

@ -199,7 +199,7 @@
"backgroundColor": "Gray",
"rightColumn": 11,
"widgetId": "z62mnh15y5",
"topRow": 0,
"topRow": 1,
"bottomRow": 13,
"parentRowSpace": 38,
"isVisible": true,

View File

@ -13,7 +13,7 @@
"parentRowSpace": 1,
"type": "CANVAS_WIDGET",
"canExtend": true,
"version": 9,
"version": 23,
"minHeight": 1292,
"parentColumnSpace": 1,
"dynamicBindingPathList": [],
@ -25,7 +25,7 @@
"backgroundColor": "",
"gridType": "vertical",
"gridGap": 0,
"items": "[\n {\n \"id\": 1,\n \"email\": \"michael.lawson@reqres.in\",\n \"first_name\": \"Michael\",\n \"last_name\": \"Lawson\",\n \"avatar\": \"https://reqres.in/img/faces/7-image.jpg\"\n },\n {\n \"id\": 2,\n \"email\": \"lindsay.ferguson@reqres.in\",\n \"first_name\": \"Lindsay\",\n \"last_name\": \"Ferguson\",\n \"avatar\": \"https://reqres.in/img/faces/8-image.jpg\"\n },\n {\n \"id\": 3,\n \"email\": \"brock.lesnar@reqres.in\",\n \"first_name\": \"Brock\",\n \"last_name\": \"Lesnar\",\n \"avatar\": \"https://reqres.in/img/faces/8-image.jpg\"\n }\n]",
"listData": "[\n {\n \"id\": 1,\n \"email\": \"michael.lawson@reqres.in\",\n \"first_name\": \"Michael\",\n \"last_name\": \"Lawson\",\n \"avatar\": \"https://reqres.in/img/faces/7-image.jpg\"\n },\n {\n \"id\": 2,\n \"email\": \"lindsay.ferguson@reqres.in\",\n \"first_name\": \"Lindsay\",\n \"last_name\": \"Ferguson\",\n \"avatar\": \"https://reqres.in/img/faces/8-image.jpg\"\n },\n {\n \"id\": 3,\n \"email\": \"brock.lesnar@reqres.in\",\n \"first_name\": \"Brock\",\n \"last_name\": \"Lesnar\",\n \"avatar\": \"https://reqres.in/img/faces/8-image.jpg\"\n }\n]",
"widgetName": "List1",
"children": [
{
@ -60,9 +60,9 @@
"parentColumnSpace": 32,
"parentRowSpace": 40,
"leftColumn": 2,
"rightColumn": 6,
"rightColumn": 24,
"topRow": 0,
"bottomRow": 1,
"bottomRow": 16,
"parentId": "dinv2tsatk",
"widgetId": "k6ct7dxg4w"
},
@ -73,15 +73,15 @@
"widgetName":"Button1",
"isDisabled":false,
"isDefaultClickDisabled":true,
"version":1,
"version":26,
"type":"BUTTON_WIDGET",
"isLoading":false,
"parentColumnSpace":29.25,
"parentRowSpace":40,
"leftColumn":6,
"rightColumn":8,
"leftColumn":24,
"rightColumn": 32,
"topRow":1,
"bottomRow":2,
"bottomRow":8,
"parentId":"dinv2tsatk",
"widgetId":"fuw9p7cuek"
}
@ -105,9 +105,9 @@
"type": "CONTAINER_WIDGET",
"isLoading": false,
"leftColumn": 0,
"rightColumn": 16,
"rightColumn": 64,
"topRow": 0,
"bottomRow": 4,
"bottomRow": 16,
"parentId": "0pvmmqr77m",
"widgetId": "4ruj7xl5ri"
}
@ -130,9 +130,9 @@
"parentColumnSpace": 74,
"parentRowSpace": 40,
"leftColumn": 0,
"rightColumn": 8,
"rightColumn": 32,
"topRow": 0,
"bottomRow": 10,
"bottomRow": 40,
"parentId": "0",
"widgetId": "5bwz8xcvhj",
"dynamicBindingPathList": [],

View File

@ -0,0 +1,275 @@
{
"dsl": {
"widgetName": "MainContainer",
"backgroundColor": "none",
"rightColumn": 966,
"snapColumns": 16,
"detachFromLayout": true,
"widgetId": "0",
"topRow": 0,
"bottomRow": 800,
"containerStyle": "none",
"snapRows": 33,
"parentRowSpace": 1,
"type": "CANVAS_WIDGET",
"canExtend": true,
"version": 18,
"minHeight": 240,
"parentColumnSpace": 1,
"dynamicTriggerPathList": [],
"dynamicBindingPathList": [],
"leftColumn": 0,
"children": [
{
"isVisible": true,
"backgroundColor": "",
"itemBackgroundColor": "white",
"gridType": "vertical",
"enhancements": true,
"gridGap": 0,
"listData": "",
"widgetName": "List1",
"children": [
{
"isVisible": true,
"widgetName": "Canvas1",
"version": 1,
"containerStyle": "none",
"canExtend": false,
"detachFromLayout": true,
"dropDisabled": true,
"noPad": true,
"children": [
{
"isVisible": true,
"backgroundColor": "white",
"widgetName": "Container1",
"containerStyle": "card",
"children": [
{
"isVisible": true,
"widgetName": "Canvas2",
"version": 1,
"containerStyle": "none",
"canExtend": false,
"detachFromLayout": true,
"children": [
{
"isVisible": true,
"defaultImage": "https://res.cloudinary.com/drako999/image/upload/v1589196259/default.png",
"imageShape": "RECTANGLE",
"maxZoomLevel": 1,
"image": "{{currentItem.img}}",
"widgetName": "Image1",
"version": 1,
"dynamicBindingPathList": [
{
"key": "image"
}
],
"dynamicTriggerPathList": [],
"type": "IMAGE_WIDGET",
"isLoading": false,
"leftColumn": 0,
"rightColumn": 4,
"topRow": 0,
"bottomRow": 3,
"parentId": "muh6tmsm1f",
"widgetId": "vr29m4code"
},
{
"isVisible": true,
"text": "{{currentItem.name}}",
"fontSize": "PARAGRAPH",
"fontStyle": "BOLD",
"textAlign": "LEFT",
"textColor": "#231F20",
"widgetName": "Text1",
"version": 1,
"textStyle": "HEADING",
"dynamicBindingPathList": [
{
"key": "text"
}
],
"dynamicTriggerPathList": [],
"type": "TEXT_WIDGET",
"isLoading": false,
"leftColumn": 4,
"rightColumn": 10,
"topRow": 0,
"bottomRow": 1,
"parentId": "muh6tmsm1f",
"widgetId": "envgv9f2j9"
},
{
"isVisible": true,
"text": "{{currentItem.num}}",
"fontSize": "PARAGRAPH",
"fontStyle": "BOLD",
"textAlign": "LEFT",
"textColor": "#231F20",
"widgetName": "Text2",
"version": 1,
"textStyle": "BODY",
"dynamicBindingPathList": [
{
"key": "text"
}
],
"dynamicTriggerPathList": [],
"type": "TEXT_WIDGET",
"isLoading": false,
"leftColumn": 4,
"rightColumn": 10,
"topRow": 1,
"bottomRow": 2,
"parentId": "muh6tmsm1f",
"widgetId": "37xbmi0bbz"
}
],
"minHeight": null,
"type": "CANVAS_WIDGET",
"isLoading": false,
"parentColumnSpace": 1,
"parentRowSpace": 1,
"leftColumn": 0,
"rightColumn": null,
"topRow": 0,
"bottomRow": null,
"parentId": "5q9jzp3d17",
"widgetId": "muh6tmsm1f"
}
],
"version": 1,
"dragDisabled": true,
"isDeletable": false,
"disallowCopy": true,
"disablePropertyPane": true,
"type": "CONTAINER_WIDGET",
"isLoading": false,
"leftColumn": 0,
"rightColumn": 16,
"topRow": 0,
"bottomRow": 4,
"parentId": "qt3cziyljx",
"widgetId": "5q9jzp3d17"
}
],
"minHeight": 400,
"type": "CANVAS_WIDGET",
"isLoading": false,
"parentColumnSpace": 1,
"parentRowSpace": 1,
"leftColumn": 0,
"rightColumn": 463,
"topRow": 0,
"bottomRow": 400,
"parentId": "wmuvmnfqm0",
"widgetId": "qt3cziyljx"
}
],
"type": "LIST_WIDGET",
"isLoading": false,
"parentColumnSpace": 57.875,
"parentRowSpace": 40,
"leftColumn": 4,
"rightColumn": 12,
"topRow": 8,
"bottomRow": 18,
"parentId": "0",
"widgetId": "wmuvmnfqm0",
"dynamicBindingPathList": [
{
"key": "template.Image1.image"
},
{
"key": "template.Text1.text"
},
{
"key": "template.Text2.text"
}
],
"template": {
"Image1": {
"isVisible": true,
"defaultImage": "https://res.cloudinary.com/drako999/image/upload/v1589196259/default.png",
"imageShape": "RECTANGLE",
"maxZoomLevel": 1,
"image": "{{List1.listData.map((currentItem) => currentItem.img)}}",
"widgetName": "Image1",
"version": 1,
"dynamicBindingPathList": [
{
"key": "image"
}
],
"dynamicTriggerPathList": [],
"type": "IMAGE_WIDGET",
"isLoading": false,
"leftColumn": 0,
"rightColumn": 4,
"topRow": 0,
"bottomRow": 3,
"parentId": "muh6tmsm1f",
"widgetId": "vr29m4code"
},
"Text1": {
"isVisible": true,
"text": "{{List1.listData.map((currentItem) => currentItem.name)}}",
"fontSize": "PARAGRAPH",
"fontStyle": "BOLD",
"textAlign": "LEFT",
"textColor": "#231F20",
"widgetName": "Text1",
"version": 1,
"textStyle": "HEADING",
"dynamicBindingPathList": [
{
"key": "text"
}
],
"dynamicTriggerPathList": [],
"type": "TEXT_WIDGET",
"isLoading": false,
"leftColumn": 4,
"rightColumn": 10,
"topRow": 0,
"bottomRow": 1,
"parentId": "muh6tmsm1f",
"widgetId": "envgv9f2j9"
},
"Text2": {
"isVisible": true,
"text": "{{List1.listData.map((currentItem) => currentItem.num)}}",
"fontSize": "PARAGRAPH",
"fontStyle": "BOLD",
"textAlign": "LEFT",
"textColor": "#231F20",
"widgetName": "Text2",
"version": 1,
"textStyle": "BODY",
"dynamicBindingPathList": [
{
"key": "text"
}
],
"dynamicTriggerPathList": [],
"type": "TEXT_WIDGET",
"isLoading": false,
"leftColumn": 4,
"rightColumn": 10,
"topRow": 1,
"bottomRow": 2,
"parentId": "muh6tmsm1f",
"widgetId": "37xbmi0bbz"
}
},
"childAutoComplete": {
"currentItem": {}
},
"dynamicTriggerPathList": []
}
]
}
}

View File

@ -0,0 +1,505 @@
{
"dsl": {
"widgetName": "MainContainer",
"backgroundColor": "none",
"rightColumn": 1280,
"snapColumns": 64,
"detachFromLayout": true,
"widgetId": "0",
"topRow": 0,
"bottomRow": 1310,
"containerStyle": "none",
"snapRows": 125,
"parentRowSpace": 1,
"type": "CANVAS_WIDGET",
"canExtend": true,
"version": 23,
"minHeight": 1320,
"parentColumnSpace": 1,
"dynamicTriggerPathList": [],
"dynamicBindingPathList": [],
"leftColumn": 0,
"children": [
{
"backgroundColor": "#ffffff",
"widgetName": "Container1",
"rightColumn": 64,
"widgetId": "sc2tsag5jw",
"containerStyle": "card",
"topRow": 0,
"bottomRow": 6,
"parentRowSpace": 10,
"isVisible": true,
"type": "CONTAINER_WIDGET",
"version": 1,
"parentId": "0",
"isLoading": false,
"parentColumnSpace": 16.432031249999998,
"dynamicTriggerPathList": [],
"leftColumn": 0,
"dynamicBindingPathList": [],
"children": [
{
"widgetName": "Canvas1",
"rightColumn": 525.8249999999999,
"detachFromLayout": true,
"widgetId": "v615d41hf1",
"containerStyle": "none",
"topRow": 0,
"bottomRow": 400,
"parentRowSpace": 1,
"isVisible": true,
"canExtend": false,
"type": "CANVAS_WIDGET",
"version": 1,
"parentId": "sc2tsag5jw",
"minHeight": 400,
"isLoading": false,
"parentColumnSpace": 1,
"leftColumn": 0,
"children": []
}
]
},
{
"image": "https://source.unsplash.com/mGFHA_0TWnA/2048x620",
"widgetName": "Image1",
"rightColumn": 64,
"widgetId": "ah4cbb9o2e",
"topRow": 6,
"bottomRow": 39,
"parentRowSpace": 10,
"isVisible": true,
"type": "IMAGE_WIDGET",
"version": 1,
"parentId": "0",
"isLoading": false,
"maxZoomLevel": 1,
"parentColumnSpace": 16.432031249999998,
"dynamicTriggerPathList": [],
"imageShape": "RECTANGLE",
"leftColumn": 0,
"dynamicBindingPathList": [],
"defaultImage": "https://res.cloudinary.com/drako999/image/upload/v1589196259/default.png"
},
{
"backgroundColor": "#FFFFFF",
"widgetName": "Container2",
"rightColumn": 64,
"widgetId": "0oh55q30ji",
"containerStyle": "card",
"topRow": 39,
"bottomRow": 85,
"parentRowSpace": 10,
"isVisible": true,
"type": "CONTAINER_WIDGET",
"version": 1,
"parentId": "0",
"isLoading": false,
"shouldScrollContents": false,
"parentColumnSpace": 16.432031249999998,
"dynamicTriggerPathList": [],
"leftColumn": 0,
"dynamicBindingPathList": [],
"children": [
{
"widgetName": "Canvas2",
"rightColumn": 525.8249999999999,
"detachFromLayout": true,
"widgetId": "9kax26wjp6",
"containerStyle": "none",
"topRow": 0,
"bottomRow": 460,
"parentRowSpace": 1,
"isVisible": true,
"canExtend": false,
"type": "CANVAS_WIDGET",
"version": 1,
"parentId": "0oh55q30ji",
"minHeight": 400,
"isLoading": false,
"parentColumnSpace": 1,
"dynamicTriggerPathList": [],
"leftColumn": 0,
"dynamicBindingPathList": [],
"children": [
{
"widgetName": "Table2",
"columnOrder": [
"data",
"customColumn3",
"customColumn4",
"customColumn5",
"customColumn6",
"page_id",
"customColumn2",
"customColumn7",
"customColumn8"
],
"dynamicPropertyPathList": [],
"topRow": 4,
"bottomRow": 44,
"parentRowSpace": 10,
"type": "TABLE_WIDGET",
"parentColumnSpace": 16.182031249999998,
"dynamicTriggerPathList": [
{
"key": "primaryColumns.customColumn2.onClick"
}
],
"dynamicBindingPathList": [
{
"key": "tableData"
},
{
"key": "primaryColumns.data.computedValue"
},
{
"key": "primaryColumns.page_id.computedValue"
},
{
"key": "primaryColumns.customColumn3.computedValue"
},
{
"key": "primaryColumns.customColumn4.computedValue"
},
{
"key": "primaryColumns.customColumn5.computedValue"
},
{
"key": "primaryColumns.customColumn6.computedValue"
},
{
"key": "primaryColumns.customColumn7.computedValue"
},
{
"key": "primaryColumns.customColumn8.computedValue"
},
{
"key": "primaryColumns.customColumn2.buttonLabel"
}
],
"leftColumn": 0,
"primaryColumns": {
"customColumn7": {
"isDerived": true,
"computedValue": "{{Table2.sanitizedTableData.map((currentRow) => { return currentRow.data.author?.email})}}",
"textSize": "PARAGRAPH2",
"buttonStyle": "rgb(3, 179, 101)",
"index": 8,
"isVisible": true,
"label": "Author",
"columnType": "text",
"horizontalAlignment": "LEFT",
"width": 150,
"enableFilter": true,
"enableSort": true,
"id": "customColumn7",
"buttonLabelColor": "#FFFFFF",
"verticalAlignment": "CENTER"
},
"page_id": {
"isDerived": false,
"computedValue": "{{Table2.sanitizedTableData.map((currentRow) => { return currentRow.page_id})}}",
"textSize": "PARAGRAPH2",
"index": 1,
"isVisible": false,
"label": "page_id",
"columnType": "text",
"horizontalAlignment": "LEFT",
"width": 150,
"enableFilter": true,
"enableSort": true,
"id": "page_id",
"verticalAlignment": "CENTER"
},
"customColumn8": {
"isDerived": true,
"computedValue": "{{Table2.sanitizedTableData.map((currentRow) => { return currentRow.data.updated_at?.date.start})}}",
"textSize": "PARAGRAPH2",
"buttonStyle": "rgb(3, 179, 101)",
"index": 9,
"isVisible": true,
"label": "Last Updated",
"inputFormat": "YYYY-MM-DD",
"columnType": "date",
"horizontalAlignment": "LEFT",
"width": 150,
"enableFilter": true,
"enableSort": true,
"id": "customColumn8",
"buttonLabelColor": "#FFFFFF",
"outputFormat": "LL",
"verticalAlignment": "CENTER"
},
"data": {
"isDerived": false,
"computedValue": "{{Table2.sanitizedTableData.map((currentRow) => { return '#' + currentRow.data.id?.number})}}",
"textSize": "PARAGRAPH2",
"index": 0,
"isVisible": true,
"label": "ID",
"fontStyle": "BOLD",
"columnType": "text",
"horizontalAlignment": "RIGHT",
"width": 150,
"enableFilter": true,
"enableSort": true,
"id": "data",
"verticalAlignment": "CENTER"
},
"customColumn2": {
"isDerived": true,
"computedValue": "",
"onClick": "{{showModal('Modal2')}}",
"textSize": "PARAGRAPH2",
"buttonStyle": "#38AFF4",
"index": 9,
"isVisible": true,
"label": "Re-Estimate",
"buttonLabel": "{{Table2.sanitizedTableData.map((currentRow) => { return 'Update'})}}",
"columnType": "button",
"horizontalAlignment": "LEFT",
"width": 150,
"enableFilter": true,
"enableSort": true,
"id": "customColumn2",
"buttonLabelColor": "#F6F7F8",
"verticalAlignment": "CENTER"
},
"customColumn3": {
"isDerived": true,
"computedValue": "{{Table2.sanitizedTableData.map((currentRow) => { return currentRow.data.estimate?.number})}}",
"textSize": "PARAGRAPH2",
"buttonStyle": "rgb(3, 179, 101)",
"index": 4,
"isVisible": true,
"label": "Estimate(SP)",
"columnType": "number",
"horizontalAlignment": "RIGHT",
"width": 150,
"enableFilter": true,
"enableSort": true,
"id": "customColumn3",
"buttonLabelColor": "#FFFFFF",
"verticalAlignment": "CENTER"
},
"customColumn4": {
"isDerived": true,
"computedValue": "{{Table2.sanitizedTableData.map((currentRow) => { return currentRow.data.issue_type?.select.name})}}",
"textSize": "PARAGRAPH2",
"buttonStyle": "rgb(3, 179, 101)",
"index": 5,
"isVisible": true,
"label": "Issue Type",
"columnType": "text",
"horizontalAlignment": "LEFT",
"width": 150,
"enableFilter": true,
"enableSort": true,
"id": "customColumn4",
"buttonLabelColor": "#FFFFFF",
"verticalAlignment": "CENTER"
},
"customColumn5": {
"isDerived": true,
"computedValue": "{{Table2.sanitizedTableData.map((currentRow) => { return currentRow.data.issue_url?.url})}}",
"textSize": "PARAGRAPH2",
"buttonStyle": "rgb(3, 179, 101)",
"index": 6,
"isVisible": true,
"label": "Issue URL",
"columnType": "url",
"horizontalAlignment": "LEFT",
"width": 150,
"enableFilter": true,
"enableSort": true,
"id": "customColumn5",
"buttonLabelColor": "#FFFFFF",
"verticalAlignment": "CENTER"
},
"customColumn6": {
"isDerived": true,
"computedValue": "{{Table2.sanitizedTableData.map((currentRow) => { return currentRow.data.created_at?.date.start})}}",
"textSize": "PARAGRAPH2",
"buttonStyle": "rgb(3, 179, 101)",
"index": 7,
"isVisible": true,
"label": "Created At",
"inputFormat": "YYYY-MM-DD",
"columnType": "date",
"horizontalAlignment": "LEFT",
"width": 150,
"enableFilter": true,
"enableSort": true,
"id": "customColumn6",
"buttonLabelColor": "#FFFFFF",
"outputFormat": "LL",
"verticalAlignment": "CENTER"
}
},
"derivedColumns": {
"customColumn7": {
"isDerived": true,
"computedValue": "{{Table2.sanitizedTableData.map((currentRow) => { return currentRow.data.author?.email})}}",
"textSize": "PARAGRAPH2",
"buttonStyle": "rgb(3, 179, 101)",
"index": 8,
"isVisible": true,
"label": "Author",
"columnType": "text",
"horizontalAlignment": "LEFT",
"width": 150,
"enableFilter": true,
"enableSort": true,
"id": "customColumn7",
"buttonLabelColor": "#FFFFFF",
"verticalAlignment": "CENTER"
},
"customColumn8": {
"isDerived": true,
"computedValue": "{{Table2.sanitizedTableData.map((currentRow) => { return currentRow.data.updated_at?.date.start})}}",
"textSize": "PARAGRAPH2",
"buttonStyle": "rgb(3, 179, 101)",
"index": 9,
"isVisible": true,
"label": "Last Updated",
"inputFormat": "YYYY-MM-DD",
"columnType": "date",
"horizontalAlignment": "LEFT",
"width": 150,
"enableFilter": true,
"enableSort": true,
"id": "customColumn8",
"buttonLabelColor": "#FFFFFF",
"outputFormat": "LL",
"verticalAlignment": "CENTER"
},
"customColumn2": {
"isDerived": true,
"computedValue": "",
"onClick": "{{showModal('Modal2')}}",
"textSize": "PARAGRAPH2",
"buttonStyle": "#38AFF4",
"index": 9,
"isVisible": true,
"label": "Re-Estimate",
"buttonLabel": "{{Table1.sanitizedTableData.map((currentRow) => { return 'Update'})}}",
"columnType": "button",
"horizontalAlignment": "LEFT",
"width": 150,
"enableFilter": true,
"enableSort": true,
"id": "customColumn2",
"buttonLabelColor": "#F6F7F8",
"verticalAlignment": "CENTER"
},
"customColumn3": {
"isDerived": true,
"computedValue": "{{Table2.sanitizedTableData.map((currentRow) => { return currentRow.data.estimate?.number})}}",
"textSize": "PARAGRAPH2",
"buttonStyle": "rgb(3, 179, 101)",
"index": 4,
"isVisible": true,
"label": "Estimate(SP)",
"columnType": "number",
"horizontalAlignment": "RIGHT",
"width": 150,
"enableFilter": true,
"enableSort": true,
"id": "customColumn3",
"buttonLabelColor": "#FFFFFF",
"verticalAlignment": "CENTER"
},
"customColumn4": {
"isDerived": true,
"computedValue": "{{Table2.sanitizedTableData.map((currentRow) => { return currentRow.data.issue_type?.select.name})}}",
"textSize": "PARAGRAPH2",
"buttonStyle": "rgb(3, 179, 101)",
"index": 5,
"isVisible": true,
"label": "Issue Type",
"columnType": "text",
"horizontalAlignment": "LEFT",
"width": 150,
"enableFilter": true,
"enableSort": true,
"id": "customColumn4",
"buttonLabelColor": "#FFFFFF",
"verticalAlignment": "CENTER"
},
"customColumn5": {
"isDerived": true,
"computedValue": "{{Table2.sanitizedTableData.map((currentRow) => { return currentRow.data.issue_url?.url})}}",
"textSize": "PARAGRAPH2",
"buttonStyle": "rgb(3, 179, 101)",
"index": 6,
"isVisible": true,
"label": "Issue URL",
"columnType": "url",
"horizontalAlignment": "LEFT",
"width": 150,
"enableFilter": true,
"enableSort": true,
"id": "customColumn5",
"buttonLabelColor": "#FFFFFF",
"verticalAlignment": "CENTER"
},
"customColumn6": {
"isDerived": true,
"computedValue": "{{Table2.sanitizedTableData.map((currentRow) => { return currentRow.data.created_at?.date.start})}}",
"textSize": "PARAGRAPH2",
"buttonStyle": "rgb(3, 179, 101)",
"index": 7,
"isVisible": true,
"label": "Created At",
"inputFormat": "YYYY-MM-DD",
"columnType": "date",
"horizontalAlignment": "LEFT",
"width": 150,
"enableFilter": true,
"enableSort": true,
"id": "customColumn6",
"buttonLabelColor": "#FFFFFF",
"outputFormat": "LL",
"verticalAlignment": "CENTER"
}
},
"rightColumn": 64,
"textSize": "PARAGRAPH2",
"widgetId": "efhhtr442b",
"tableData": "{{[]}}",
"isVisible": true,
"label": "Data",
"searchKey": "",
"version": 1,
"parentId": "9kax26wjp6",
"isLoading": false,
"horizontalAlignment": "LEFT",
"verticalAlignment": "CENTER",
"columnSizeMap": {
"parent": 136,
"issue_url": 174,
"data": 72,
"author": 174,
"issue_type": 109,
"created_at": 117,
"customColumn1": 122,
"customColumn2": 110,
"customColumn3": 110,
"customColumn4": 112,
"customColumn5": 320,
"task": 245,
"estimate": 109,
"step": 62,
"id": 60,
"status": 75
}
}
]
}
]
}
]
}
}

View File

@ -67,7 +67,11 @@
"bottomRow": 10,
"parentId": "tyiwk4xuq0",
"widgetId": "5up3r2iuvs",
"dynamicBindingPathList": []
"dynamicTriggerPathList": [{
"key": "onSearchTextChanged"
}],
"onSearchTextChanged": "{{Api1.run()}}",
"selectedRow": "{{Table1.tableData[Table1.selectedRowIndex]}}"
}
],
"widgetId": "tyiwk4xuq0",

View File

@ -0,0 +1,208 @@
{
"dsl": {
"widgetName": "MainContainer",
"backgroundColor": "none",
"rightColumn": 966,
"snapColumns": 16,
"detachFromLayout": true,
"widgetId": "0",
"topRow": 0,
"bottomRow": 1280,
"containerStyle": "none",
"snapRows": 33,
"parentRowSpace": 1,
"type": "CANVAS_WIDGET",
"canExtend": true,
"version": 18,
"minHeight": 1292,
"parentColumnSpace": 1,
"dynamicTriggerPathList": [],
"dynamicBindingPathList": [],
"leftColumn": 0,
"children": [
{
"isVisible": true,
"shouldScrollContents": false,
"widgetName": "Tabs1",
"tabsObj": {
"tab1": {
"label": "Tab 1",
"id": "tab1",
"widgetId": "78u8fmjgom",
"isVisible": true,
"index": 0
},
"tab2": {
"label": "Tab 2",
"id": "tab2",
"widgetId": "tch1asw4ti",
"isVisible": true,
"index": 1
}
},
"shouldShowTabs": true,
"defaultTab": "Tab 1",
"version": 2,
"type": "TABS_WIDGET",
"isLoading": false,
"parentColumnSpace": 57.875,
"parentRowSpace": 40,
"leftColumn": 3,
"rightColumn": 15,
"topRow": 1,
"bottomRow": 10,
"parentId": "0",
"widgetId": "wqb436vlj8",
"children": [
{
"type": "CANVAS_WIDGET",
"tabId": "tab1",
"tabName": "Tab 1",
"widgetId": "78u8fmjgom",
"parentId": "wqb436vlj8",
"detachFromLayout": true,
"children": [
{
"isVisible": true,
"isDisabled": false,
"datePickerType": "DATE_PICKER",
"label": "",
"dateFormat": "YYYY-MM-DD HH:mm",
"widgetName": "DatePicker1",
"defaultDate": "2021-05-09T10:22:42.862Z",
"version": 2,
"isRequired": false,
"type": "DATE_PICKER_WIDGET2",
"isLoading": false,
"parentColumnSpace": 40.90625,
"parentRowSpace": 40,
"leftColumn": 2,
"rightColumn": 7,
"topRow": 0,
"bottomRow": 1,
"parentId": "78u8fmjgom",
"widgetId": "opw72wgf4p"
},
{
"isVisible": true,
"text": "Label",
"fontSize": "PARAGRAPH",
"fontStyle": "BOLD",
"textAlign": "LEFT",
"textColor": "#231F20",
"widgetName": "Text1",
"version": 1,
"type": "TEXT_WIDGET",
"isLoading": false,
"parentColumnSpace": 40.90625,
"parentRowSpace": 40,
"leftColumn": 2,
"rightColumn": 6,
"topRow": 2,
"bottomRow": 3,
"parentId": "78u8fmjgom",
"widgetId": "vnm91359up"
},
{
"isVisible": true,
"text": "Submit",
"buttonStyle": "PRIMARY_BUTTON",
"widgetName": "Button1",
"isDisabled": false,
"isDefaultClickDisabled": true,
"version": 1,
"type": "BUTTON_WIDGET",
"isLoading": false,
"parentColumnSpace": 40.90625,
"parentRowSpace": 40,
"leftColumn": 3,
"rightColumn": 5,
"topRow": 4,
"bottomRow": 5,
"parentId": "78u8fmjgom",
"widgetId": "lu7vjd5tq3"
}
],
"parentRowSpace": 1,
"parentColumnSpace": 1,
"leftColumn": 0,
"rightColumn": 463,
"topRow": 0,
"bottomRow": 280,
"isLoading": false,
"widgetName": "Canvas1",
"renderMode": "CANVAS"
},
{
"type": "CANVAS_WIDGET",
"tabId": "tab2",
"tabName": "Tab 2",
"widgetId": "tch1asw4ti",
"parentId": "wqb436vlj8",
"detachFromLayout": true,
"children": [
{
"isVisible": true,
"label": "Label",
"defaultCheckedState": true,
"widgetName": "Checkbox1",
"version": 1,
"alignWidget": "LEFT",
"isDisabled": false,
"isRequired": false,
"type": "CHECKBOX_WIDGET",
"isLoading": false,
"parentColumnSpace": 40.90625,
"parentRowSpace": 40,
"leftColumn": 3,
"rightColumn": 6,
"topRow": 0,
"bottomRow": 1,
"parentId": "tch1asw4ti",
"widgetId": "l7ahbr0vww"
},
{
"isVisible": true,
"label": "",
"options": [
{
"label": "Yes",
"value": "Y"
},
{
"label": "No",
"value": "N"
}
],
"defaultOptionValue": "Y",
"widgetName": "RadioGroup1",
"version": 1,
"isRequired": false,
"isDisabled": false,
"type": "RADIO_GROUP_WIDGET",
"isLoading": false,
"parentColumnSpace": 40.90625,
"parentRowSpace": 40,
"leftColumn": 8,
"rightColumn": 11,
"topRow": 0,
"bottomRow": 2,
"parentId": "tch1asw4ti",
"widgetId": "k4vwuehj29"
}
],
"parentRowSpace": 1,
"parentColumnSpace": 1,
"leftColumn": 0,
"rightColumn": 463,
"topRow": 0,
"bottomRow": 160,
"isLoading": false,
"widgetName": "Canvas2",
"renderMode": "CANVAS"
}
]
}
]
}
}

View File

@ -112,8 +112,8 @@
"currentRowWithIdOutside": "#{{currentRow.email}}",
"currentRowWithIdInside": "{{\"#\" + currentRow.email}}",
"defaultdataBinding": "{'Test','This'}",
"dropdownErrorMsg": "This value does not evaluate to type \"Array<{ label: string, value: string }>\". Transform it using JS inside '{{ }}'",
"tableWidgetErrorMsg": "This value does not evaluate to type \"Array<Object>\". Transform it using JS inside '{{ }}'",
"dropdownErrorMsg": "This value does not evaluate to type \"Array<{ label: string, value: string }>\".",
"tableWidgetErrorMsg": "This value does not evaluate to type \"Array<Object>\".",
"bindingDataPoint": "{{JSON.stringify(Chart1.selectedDataPoint)}}",
"bindChartData": "{{Chart1.selectedDataPoint",
"appUrl": "https://oauth.mocklab.io/userinfo",
@ -121,5 +121,7 @@
"clientSecret": "505dac16a21681f277b5fde97445be18",
"accessTokenUrl": "https://oauth.mocklab.io/oauth/token",
"oauthResponse": "169444434892406",
"authorizationURL": "https://oauth.mocklab.io/oauth/authorize"
"authorizationURL": "https://oauth.mocklab.io/oauth/authorize",
"basicURl": "https://envyenksqii9nf3.m.pipedream.net",
"methodWithQueryParam": "users?q=mimeType='application/vnd.google-apps.spreadsheet'"
}

View File

@ -0,0 +1,209 @@
{
"dsl": {
"widgetName": "MainContainer",
"backgroundColor": "none",
"rightColumn": 1270,
"snapColumns": 64,
"detachFromLayout": true,
"widgetId": "0",
"topRow": 0,
"bottomRow": 820,
"containerStyle": "none",
"snapRows": 125,
"parentRowSpace": 1,
"type": "CANVAS_WIDGET",
"canExtend": true,
"version": 23,
"minHeight": 830,
"parentColumnSpace": 1,
"dynamicTriggerPathList": [],
"dynamicBindingPathList": [],
"leftColumn": 0,
"children": [
{
"widgetName": "Chart1",
"rightColumn": 26,
"allowHorizontalScroll": false,
"widgetId": "ypstklohw5",
"topRow": 4,
"bottomRow": 36,
"parentRowSpace": 10,
"isVisible": true,
"type": "CHART_WIDGET",
"version": 1,
"parentId": "0",
"isLoading": false,
"chartData": {
"3jzahcrorq": {
"seriesName": "Sales",
"data": [
{
"x": "Mon",
"y": 10000
},
{
"x": "Tue",
"y": 12000
},
{
"x": "Wed",
"y": 32000
},
{
"x": "Thu",
"y": 28000
},
{
"x": "Fri",
"y": 14000
},
{
"x": "Sat",
"y": 19000
},
{
"x": "Sun",
"y": 36000
}
]
}
},
"yAxisName": "Total Order Revenue $",
"parentColumnSpace": 19.65625,
"chartName": "Last week's revenue",
"leftColumn": 2,
"xAxisName": "Last Week",
"customFusionChartConfig": {
"type": "column2d",
"dataSource": {
"chart": {
"caption": "Last week's revenue",
"xAxisName": "Last Week",
"yAxisName": "Total Order Revenue $",
"theme": "fusion"
},
"data": [
{
"label": "Mon",
"value": 10000
},
{
"label": "Tue",
"value": 12000
},
{
"label": "Wed",
"value": 32000
},
{
"label": "Thu",
"value": 28000
},
{
"label": "Fri",
"value": 14000
},
{
"label": "Sat",
"value": 19000
},
{
"label": "Sun",
"value": 36000
}
],
"trendlines": [
{
"line": [
{
"startvalue": "38000",
"valueOnRight": "1",
"displayvalue": "Weekly Target"
}
]
}
]
}
},
"chartType": "LINE_CHART"
},
{
"backgroundColor": "#FFFFFF",
"widgetName": "Container1",
"rightColumn": 62,
"widgetId": "6y21iarlp4",
"containerStyle": "card",
"topRow": 11,
"bottomRow": 51,
"parentRowSpace": 10,
"isVisible": true,
"type": "CONTAINER_WIDGET",
"version": 1,
"parentId": "0",
"isLoading": false,
"parentColumnSpace": 19.65625,
"leftColumn": 30,
"children": [
{
"widgetName": "Canvas1",
"rightColumn": 629,
"detachFromLayout": true,
"widgetId": "jqasr1uss5",
"containerStyle": "none",
"topRow": 0,
"bottomRow": 400,
"parentRowSpace": 1,
"isVisible": true,
"canExtend": false,
"type": "CANVAS_WIDGET",
"version": 1,
"parentId": "6y21iarlp4",
"minHeight": 400,
"isLoading": false,
"parentColumnSpace": 1,
"leftColumn": 0,
"children": []
}
]
},
{
"image": "",
"widgetName": "Image1",
"rightColumn": 22,
"widgetId": "1t50avy6f1",
"topRow": 58,
"bottomRow": 70,
"parentRowSpace": 10,
"isVisible": true,
"type": "IMAGE_WIDGET",
"version": 1,
"parentId": "0",
"isLoading": false,
"maxZoomLevel": 1,
"parentColumnSpace": 19.65625,
"imageShape": "RECTANGLE",
"leftColumn": 6,
"defaultImage": "https://res.cloudinary.com/drako999/image/upload/v1589196259/default.png"
},
{
"widgetName": "Button1",
"rightColumn": 18,
"isDefaultClickDisabled": true,
"widgetId": "41wgbhd5vp",
"buttonStyle": "PRIMARY_BUTTON",
"topRow": 44,
"bottomRow": 48,
"parentRowSpace": 10,
"isVisible": true,
"type": "BUTTON_WIDGET",
"version": 1,
"parentId": "0",
"isLoading": false,
"parentColumnSpace": 19.65625,
"leftColumn": 10,
"text": "Submit",
"isDisabled": false
}
]
}
}

View File

@ -31,8 +31,12 @@ describe("API Panel Test Functionality", function() {
cy.contains(".t--datasource-name", datasourceName)
.find(queryLocators.createQuery)
.click();
cy.get(queryLocators.templateMenu).click();
cy.get(queryLocators.settings).click({ force: true });
cy.get(queryLocators.switch)
.last()
.click({ force: true });
cy.get(queryLocators.query).click({ force: true });
cy.get(".CodeMirror textarea")
.first()
.focus()
@ -43,6 +47,7 @@ describe("API Panel Test Functionality", function() {
cy.WaitAutoSave();
cy.runQuery();
});
it("Will pass execution params", function() {
// Bind the table
cy.SearchEntityandOpen("Table1");
@ -78,7 +83,6 @@ describe("API Panel Test Functionality", function() {
// Publish the app
cy.PublishtheApp();
cy.wait("@postExecute");
// Assert on load data in table
cy.readTabledataPublish("0", "1").then((cellData) => {

View File

@ -7,11 +7,9 @@ describe("API Panel Test Functionality", function() {
cy.NavigateToAPI_Panel();
cy.log("Navigation to API Panel screen successful");
cy.CreateAPI("FirstAPI");
cy.get("textarea").should(
"have.attr",
"placeholder",
"https://mock-api.appsmith.com/users",
);
cy.get(".CodeMirror-placeholder")
.first()
.should("have.text", "https://mock-api.appsmith.com/users");
cy.log("Creation of FirstAPI Action successful");
cy.enterDatasourceAndPath(testdata.baseUrl, testdata.methods);
cy.SaveAndRunAPI();
@ -29,14 +27,24 @@ describe("API Panel Test Functionality", function() {
cy.NavigateToAPI_Panel();
cy.CreateAPI("CrashTestAPI");
cy.SelectAction(testdata.postAction);
cy.xpath(apiwidget.headerKey)
cy.get(apiwidget.headerKey)
.first()
.focus({ force: true })
.type("{uparrow}", { force: true })
.type("{ctrl}{shift}{downarrow}", { force: true })
.type("{backspace}", { force: true });
.click({ force: true })
.type("{uparrow}", { parseSpecialCharSequences: true })
.type("{ctrl}{shift}{downarrow}", { parseSpecialCharSequences: true })
.type("{backspace}", { parseSpecialCharSequences: true });
// assert so that this fails
cy.xpath(apiwidget.headerKey).should("be.visible");
cy.xpath(apiwidget.headerKey).should("have.value", "");
cy.get(apiwidget.headerKey).should("be.visible");
cy.get(apiwidget.headerKey).should("have.value", "");
});
it("Should correctly parse query params", function() {
cy.NavigateToAPI_Panel();
cy.CreateAPI("APIWithQueryParams");
cy.enterDatasourceAndPath(testdata.baseUrl, testdata.methodWithQueryParam);
cy.ValidateQueryParams({
key: "q",
value: "mimeType='application/vnd.google-apps.spreadsheet'",
});
});
});

View File

@ -12,7 +12,7 @@ describe("API Panel request body", function() {
cy.contains(apiEditor.bodyTab).click();
cy.contains(testdata.apiFormDataBodyType).click();
cy.xpath(apiwidget.formEncoded).should("be.visible");
cy.get(apiwidget.formEncoded).should("be.visible");
cy.DeleteAPI();
});

View File

@ -3,9 +3,15 @@ describe("Name uniqueness test", function() {
cy.log("Login Successful");
cy.NavigateToAPI_Panel();
cy.log("Navigation to API Panel screen successful");
cy.CreateAPI("UniqueName");
cy.CreateAPI("Uni");
cy.log("Creation of UniqueName Action successful");
cy.CreationOfUniqueAPIcheck("UniqueName");
});
it("Validate Unique Name", () => {
cy.CreationOfUniqueAPIcheck("Uni");
});
it("Validate download apiname check", () => {
cy.CreationOfUniqueAPIcheck("download");
});
});

View File

@ -1,8 +1,10 @@
const dsl = require("../../../../fixtures/displayWidgetDsl.json");
const dsl = require("../../../../fixtures/basicDsl.json");
const homePage = require("../../../../locators/HomePage.json");
const commonlocators = require("../../../../locators/commonlocators.json");
const explorerlocators = require("../../../../locators/explorerlocators.json");
const widgetsPage = require("../../../../locators/Widgets.json");
let duplicateApplicationDsl;
let parentApplicationDsl;
describe("Duplicate application", function() {
before(() => {
@ -10,12 +12,20 @@ describe("Duplicate application", function() {
});
it("Check whether the duplicate application has the same dsl as the original", function() {
cy.get(commonlocators.homeIcon).click({ force: true });
const appname = localStorage.getItem("AppName");
cy.SearchEntityandOpen("Input1");
cy.intercept("PUT", "/api/v1/layouts/*/pages/*").as("inputUpdate");
cy.get(widgetsPage.defaultInput).type("A");
cy.get(commonlocators.editPropCrossButton).click({ force: true });
cy.wait("@inputUpdate").then((response) => {
parentApplicationDsl = response.response.body.data.dsl;
});
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(2000);
cy.NavigateToHome();
cy.get(homePage.searchInput).type(appname);
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(2000);
cy.get(homePage.applicationCard)
.first()
.trigger("mouseover");
@ -23,17 +33,20 @@ describe("Duplicate application", function() {
.first()
.click({ force: true });
cy.get(homePage.duplicateApp).click({ force: true });
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(4000);
cy.wait("@getPage").should(
"have.nested.property",
"response.body.responseMeta.status",
200,
);
cy.get("@getPage").then((httpResponse) => {
const data = httpResponse.response.body.data;
duplicateApplicationDsl = data.layouts[0].dsl;
expect(duplicateApplicationDsl).to.deep.equal(dsl.dsl);
duplicateApplicationDsl = httpResponse.response.body.data.layouts[0].dsl;
cy.log(JSON.stringify(duplicateApplicationDsl));
cy.log(JSON.stringify(parentApplicationDsl));
expect(JSON.stringify(duplicateApplicationDsl)).to.deep.equal(
JSON.stringify(parentApplicationDsl),
);
});
});
});

View File

@ -0,0 +1,159 @@
const dsl = require("../../../../fixtures/displayWidgetDsl.json");
const homePage = require("../../../../locators/HomePage.json");
const commonlocators = require("../../../../locators/commonlocators.json");
describe("Export application as a JSON file", function() {
let orgid;
let appid;
let currentUrl;
let newOrganizationName;
let appname;
before(() => {
cy.addDsl(dsl);
});
it("Check if exporting app flow works as expected", function() {
cy.get(commonlocators.homeIcon).click({ force: true });
appname = localStorage.getItem("AppName");
cy.get(homePage.searchInput).type(appname);
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(2000);
cy.get(homePage.applicationCard)
.first()
.trigger("mouseover");
cy.get(homePage.appMoreIcon)
.first()
.click({ force: true });
cy.get(homePage.exportAppFromMenu).click({ force: true });
cy.get(homePage.toastMessage).should("contain", "Successfully exported");
cy.LogOut();
});
it("User with admin access,should be able to export the app", function() {
cy.LogintoApp(Cypress.env("USERNAME"), Cypress.env("PASSWORD"));
cy.NavigateToHome();
cy.generateUUID().then((uid) => {
orgid = uid;
appid = uid;
localStorage.setItem("OrgName", orgid);
cy.createOrg();
cy.wait("@createOrg").then((interception) => {
newOrganizationName = interception.response.body.data.name;
cy.renameOrg(newOrganizationName, orgid);
});
cy.CreateAppForOrg(orgid, appid);
cy.wait("@getPagesForCreateApp").should(
"have.nested.property",
"response.body.responseMeta.status",
200,
);
cy.get("h2").contains("Drag and drop a widget here");
cy.get(homePage.shareApp).click({ force: true });
cy.shareApp(Cypress.env("TESTUSERNAME1"), homePage.adminRole);
cy.LogOut();
cy.LogintoApp(Cypress.env("TESTUSERNAME1"), Cypress.env("TESTPASSWORD1"));
cy.NavigateToHome();
cy.wait(2000);
cy.log({ appid });
cy.get(homePage.searchInput).type(appid);
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(2000);
cy.get(homePage.applicationCard)
.first()
.trigger("mouseover");
cy.get(homePage.appMoreIcon)
.first()
.click({ force: true });
cy.get(homePage.exportAppFromMenu).should("be.visible");
});
cy.LogOut();
});
it("User with developer access,should not be able to export the app", function() {
cy.LogintoApp(Cypress.env("USERNAME"), Cypress.env("PASSWORD"));
cy.NavigateToHome();
cy.generateUUID().then((uid) => {
orgid = uid;
appid = uid;
localStorage.setItem("OrgName", orgid);
cy.createOrg();
cy.wait("@createOrg").then((interception) => {
newOrganizationName = interception.response.body.data.name;
cy.renameOrg(newOrganizationName, orgid);
});
cy.CreateAppForOrg(orgid, appid);
cy.wait("@getPagesForCreateApp").should(
"have.nested.property",
"response.body.responseMeta.status",
200,
);
cy.get("h2").contains("Drag and drop a widget here");
cy.get(homePage.shareApp).click({ force: true });
cy.shareApp(Cypress.env("TESTUSERNAME1"), homePage.developerRole);
cy.LogOut();
cy.LogintoApp(Cypress.env("TESTUSERNAME1"), Cypress.env("TESTPASSWORD1"));
cy.NavigateToHome();
cy.wait(2000);
cy.log({ appid });
cy.get(homePage.searchInput).type(appid);
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(2000);
cy.get(homePage.applicationCard)
.first()
.trigger("mouseover");
cy.get(homePage.appMoreIcon)
.first()
.click({ force: true });
cy.get(homePage.exportAppFromMenu).should("not.exist");
});
cy.LogOut();
});
it("User with viewer access,should not be able to export the app", function() {
cy.LogintoApp(Cypress.env("USERNAME"), Cypress.env("PASSWORD"));
cy.NavigateToHome();
cy.generateUUID().then((uid) => {
orgid = uid;
appid = uid;
localStorage.setItem("OrgName", orgid);
cy.createOrg();
cy.wait("@createOrg").then((interception) => {
newOrganizationName = interception.response.body.data.name;
cy.renameOrg(newOrganizationName, orgid);
});
cy.CreateAppForOrg(orgid, appid);
cy.wait("@getPagesForCreateApp").should(
"have.nested.property",
"response.body.responseMeta.status",
200,
);
cy.get("h2").contains("Drag and drop a widget here");
cy.get(homePage.shareApp).click({ force: true });
cy.shareApp(Cypress.env("TESTUSERNAME1"), homePage.viewerRole);
cy.LogOut();
cy.LogintoApp(Cypress.env("TESTUSERNAME1"), Cypress.env("TESTPASSWORD1"));
cy.NavigateToHome();
cy.wait(2000);
cy.log({ appid });
cy.get(homePage.searchInput).type(appid);
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(2000);
cy.get(homePage.applicationCard)
.first()
.trigger("mouseover");
cy.get(homePage.appEditIcon).should("not.exist");
});
cy.LogOut();
});
});

View File

@ -1,7 +1,10 @@
const dsl = require("../../../../fixtures/displayWidgetDsl.json");
const dsl = require("../../../../fixtures/basicDsl.json");
const homePage = require("../../../../locators/HomePage.json");
const commonlocators = require("../../../../locators/commonlocators.json");
const widgetsPage = require("../../../../locators/Widgets.json");
let forkedApplicationDsl;
let parentApplicationDsl;
describe("Fork application across orgs", function() {
before(() => {
@ -9,12 +12,20 @@ describe("Fork application across orgs", function() {
});
it("Check if the forked application has the same dsl as the original", function() {
cy.get(commonlocators.homeIcon).click({ force: true });
const appname = localStorage.getItem("AppName");
cy.SearchEntityandOpen("Input1");
cy.intercept("PUT", "/api/v1/layouts/*/pages/*").as("inputUpdate");
cy.get(widgetsPage.defaultInput).type("A");
cy.get(commonlocators.editPropCrossButton).click({ force: true });
cy.wait("@inputUpdate").then((response) => {
parentApplicationDsl = response.response.body.data.dsl;
});
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(2000);
cy.NavigateToHome();
cy.get(homePage.searchInput).type(appname);
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(2000);
cy.get(homePage.applicationCard)
.first()
.trigger("mouseover");
@ -28,6 +39,8 @@ describe("Fork application across orgs", function() {
.last()
.click({ force: true });
cy.get(homePage.forkAppOrgButton).click({ force: true });
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(4000);
cy.wait("@postForkAppOrg").then((httpResponse) => {
expect(httpResponse.status).to.equal(200);
});
@ -35,8 +48,11 @@ describe("Fork application across orgs", function() {
cy.get("@getPage").then((httpResponse) => {
const data = httpResponse.response.body.data;
forkedApplicationDsl = data.layouts[0].dsl;
expect(forkedApplicationDsl).to.deep.equal(dsl.dsl);
cy.log(JSON.stringify(forkedApplicationDsl));
cy.log(JSON.stringify(parentApplicationDsl));
expect(JSON.stringify(forkedApplicationDsl)).to.contain(
JSON.stringify(parentApplicationDsl),
);
});
});
});

View File

@ -100,12 +100,13 @@ describe("Update Application", function() {
);
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(2000);
cy.get(homePage.searchInput).type(veryLongAppName);
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(2000);
cy.get(homePage.applicationCard)
.first()
.find(homePage.applicationCardName)
.trigger("mouseover");
cy.get(".bp3-popover-target.bp3-popover-open").should("have.length", 1);
});
});

View File

@ -0,0 +1,94 @@
const commonlocators = require("../../../../locators/commonlocators.json");
const dsl = require("../../../../fixtures/listwidgetdsl.json");
const pages = require("../../../../locators/Pages.json");
const apiPage = require("../../../../locators/ApiEditor.json");
const publishPage = require("../../../../locators/publishWidgetspage.json");
describe("Test Create Api and Bind to Table widget", function() {
let apiData;
let valueToTest;
before(() => {
cy.addDsl(dsl);
});
it("Test_Add users api and execute api", function() {
cy.createAndFillApi(this.data.userApi, "/users");
cy.RunAPI();
cy.get(apiPage.responseBody)
.contains("name")
.siblings("span")
.invoke("text")
.then((text) => {
valueToTest = `${text
.match(/"(.*)"/)[0]
.split('"')
.join("")}`;
cy.log(valueToTest);
apiData = valueToTest;
cy.log("val1:" + valueToTest);
});
});
it("Test_Validate the Api data is updated on List widget", function() {
cy.SearchEntityandOpen("List1");
cy.getCodeMirror().then(($cm) => {
cy.get(".CodeMirror textarea")
.first()
.type(`{{Api1.data.users}}`, {
force: true,
parseSpecialCharSequences: false,
});
});
cy.get(commonlocators.editPropCrossButton).click({ force: true });
cy.get(".t--draggable-textwidget span").should("have.length", 4);
cy.get(".t--draggable-textwidget span")
.first()
.invoke("text")
.then((text) => {
expect(text).to.equal(valueToTest);
});
cy.PublishtheApp();
cy.get(".t--widget-textwidget span").should("have.length", 4);
cy.get(".t--widget-textwidget span")
.first()
.invoke("text")
.then((text) => {
expect(text).to.equal(valueToTest);
});
});
it("Test_Validate the list widget ", function() {
cy.get(publishPage.backToEditor).click({ force: true });
cy.SearchEntityandOpen("List1");
cy.getCodeMirror().then(($cm) => {
cy.get(".CodeMirror textarea")
.last()
.type(`50`, {
force: true,
parseSpecialCharSequences: false,
});
});
cy.get(commonlocators.editPropCrossButton).click({ force: true });
cy.get(".t--draggable-textwidget span").should("have.length", 2);
cy.get(".t--draggable-textwidget span")
.first()
.invoke("text")
.then((text) => {
expect(text).to.equal(valueToTest);
});
cy.PublishtheApp();
cy.get(".t--widget-textwidget span").should("have.length", 2);
cy.get(".t--widget-textwidget span")
.first()
.invoke("text")
.then((text) => {
expect(text).to.equal(valueToTest);
});
});
afterEach(() => {
// put your clean up code if any
});
});

View File

@ -28,6 +28,7 @@ describe("Binding the Table and input Widget", function() {
cy.get(".draggable-header ")
.first()
.click({ force: true });
cy.wait(1000);
cy.readTabledataPublish("0", "0").then((tabData) => {
const tabValue = tabData;
expect(tabValue).to.be.equal("6788734");
@ -40,6 +41,7 @@ describe("Binding the Table and input Widget", function() {
cy.get(".draggable-header ")
.first()
.click({ force: true });
cy.wait(1000);
cy.readTabledataPublish("0", "0").then((tabData) => {
const tabValue = tabData;
expect(tabValue).to.be.equal("2381224");

View File

@ -46,19 +46,18 @@ describe("Test Create Api and Bind to Table widget", function() {
it("Table-Text, Validate Publish Mode on Server Side Pagination of Paginate with Table Page No", function() {
cy.PublishtheApp();
// Make sure onPageLoad action has run before validating the data
cy.wait("@postExecute");
cy.ValidatePublishTableData("1");
cy.get(commonlocators.tableNextPage).click({ force: true });
cy.wait("@postExecute").should(
"have.nested.property",
"response.body.responseMeta.status",
200,
);
// Make sure net page action is run
cy.wait("@postExecute");
cy.validateToastMessage("done");
cy.ValidatePublishTableData("11");
cy.get(publishPage.backToEditor).click({ force: true });
});
it("Test_Add Paginate with Response URL and Execute the Api", function() {
cy.get(publishPage.backToEditor).click({ force: true });
/** Create Api2 of Paginate with Response URL*/
cy.createAndFillApi(this.data.paginationUrl, "users");
cy.RunAPI();

View File

@ -22,17 +22,6 @@ describe("Binding the table widget and input Widget", function() {
);
});
it("Input widget test with default value from table widget", function() {
cy.SearchEntityandOpen("Input2");
cy.get(widgetsPage.defaultInput).type(testdata.defaultRowIndexBinding);
cy.get(commonlocators.editPropCrossButton).click({ force: true });
cy.wait("@updateLayout").should(
"have.nested.property",
"response.body.responseMeta.status",
200,
);
});
it("validation of data displayed in input widgets based on selected row", function() {
cy.SearchEntityandOpen("Table1");
cy.get(commonlocators.deflautSelectedRow)
@ -47,10 +36,6 @@ describe("Binding the table widget and input Widget", function() {
.first()
.invoke("attr", "value")
.should("contain", tabValue);
cy.get(publish.inputWidget + " " + "input")
.last()
.invoke("attr", "value")
.should("contain", 2);
});
});
});

View File

@ -3,6 +3,7 @@ const dsl = require("../../../../fixtures/tableWidgetDsl.json");
const pages = require("../../../../locators/Pages.json");
const apiPage = require("../../../../locators/ApiEditor.json");
const publishPage = require("../../../../locators/publishWidgetspage.json");
const widgetsPage = require("../../../../locators/Widgets.json");
describe("Test Create Api and Bind to Table widget", function() {
let apiData;
@ -43,6 +44,18 @@ describe("Test Create Api and Bind to Table widget", function() {
cy.readTabledataPublish("0", "1").then((tabData) => {
expect(apiData).to.eq(`\"${tabData}\"`);
});
cy.get(commonlocators.backToEditor).click();
});
it("Validate onSearchTextChanged function is called when configured for search text", function() {
cy.SearchEntityandOpen("Table1");
cy.get(".t--widget-tablewidget .t--search-input")
.first()
.type("Currey");
cy.wait(5000);
cy.readTabledataPublish("0", "1").then((tabData) => {
expect(apiData).to.eq(`\"${tabData}\"`);
});
});
afterEach(() => {

View File

@ -22,18 +22,6 @@ describe("Binding the multiple input Widget", function() {
);
});
it("Binding second input widget with first input widget and validating", function() {
cy.SearchEntityandOpen("Input2");
cy.get(widgetsPage.defaultInput).type(testdata.defaultMoustacheData);
cy.get(commonlocators.editPropCrossButton).click({ force: true });
cy.wait("@updateLayout").should(
"have.nested.property",
"response.body.responseMeta.status",
200,
);
cy.reload();
});
it("validation of data displayed in all widgets based on row selected", function() {
cy.isSelectRow(1);
cy.readTabledataPublish("1", "0").then((tabData) => {
@ -45,10 +33,10 @@ describe("Binding the multiple input Widget", function() {
.first()
.invoke("attr", "value")
.should("contain", tabValue);
cy.get(publish.inputWidget + " " + "input")
.last()
.invoke("attr", "value")
.should("contain", tabValue);
// cy.get(publish.inputWidget + " " + "input")
// .last()
// .invoke("attr", "value")
// .should("contain", tabValue);
});
});
});

View File

@ -31,7 +31,6 @@ describe("aTob and bToa library tests ", function() {
"response.body.responseMeta.status",
200,
);
cy.reload();
});
it("publish widget and validate the data displayed in input widgets value for aToB and bToa", function() {

View File

@ -31,7 +31,6 @@ describe("Loadash basic test with input Widget", function() {
"response.body.responseMeta.status",
200,
);
cy.reload();
});
it("publish widget and validate the data displayed in input widgets from loadash function", function() {

View File

@ -31,7 +31,6 @@ describe("Moment basic test with input Widget", function() {
"response.body.responseMeta.status",
200,
);
cy.reload();
});
it("publish widget and validate the data displayed in input widgets", function() {

View File

@ -7,10 +7,17 @@ describe("Canvas Resize", function() {
});
it("Deleting bottom widget should resize canvas", function() {
const InitHeight = "2960px";
const FinalHeight = "1292px";
cy.get(commonlocators.dropTarget).should("have.css", "height", InitHeight);
cy.openPropertyPane("textwidget");
cy.intercept("PUT", "/api/v1/layouts/*/pages/*").as("deleteUpdate");
cy.get(commonlocators.deleteWidget).click();
cy.get(commonlocators.dropTarget).should("have.css", "height", FinalHeight);
cy.wait("@deleteUpdate").then((response) => {
const dsl = response.response.body.data.dsl;
cy.get(commonlocators.dropTarget).should(
"have.css",
"height",
`${dsl.bottomRow}px`,
);
});
});
});

View File

@ -0,0 +1,16 @@
const dsl = require("../../../../fixtures/debuggerDependencyDsl.json");
describe("Inspect Entity", function() {
before(() => {
cy.addDsl(dsl);
});
it("Check whether depedencies and references are shown correctly", function() {
cy.openPropertyPane("inputwidget");
cy.testJsontext("defaulttext", "{{Button1.text}}");
cy.get(".t--debugger").click();
cy.contains(".react-tabs__tab", "Inspect Entity").click();
cy.contains(".t--dependencies-item", "Button1").click();
cy.contains(".t--references-item", "Input1");
});
});

View File

@ -1,4 +1,6 @@
const dsl = require("../../../../fixtures/buttondsl.json");
const commonlocators = require("../../../../locators/commonlocators.json");
const debuggerLocators = require("../../../../locators/Debugger.json");
describe("Debugger logs", function() {
before(() => {
@ -11,4 +13,18 @@ describe("Debugger logs", function() {
cy.get(".t--debugger").click();
cy.get(".t--debugger-log-state").contains("Test");
});
it("Reset debugger state", function() {
cy.get(".t--property-control-visible")
.find(".t--js-toggle")
.click();
cy.testJsontext("visible", "Test");
cy.get(commonlocators.homeIcon).click({ force: true });
cy.generateUUID().then((id) => {
cy.CreateAppInFirstListedOrg(id);
cy.contains(debuggerLocators.debuggerIcon, 0);
});
});
});

View File

@ -0,0 +1,23 @@
const dsl = require("../../../../fixtures/debuggerTableDsl.json");
const explorer = require("../../../../locators/explorerlocators.json");
const debuggerLocators = require("../../../../locators/Debugger.json");
const testdata = require("../../../../fixtures/testdata.json");
describe("Check debugger logs state when there are onPageLoad actions", function() {
before(() => {
cy.addDsl(dsl);
});
it("Check debugger logs state when there are onPageLoad actions", function() {
cy.openPropertyPane("tablewidget");
cy.testJsontext("tabledata", "{{TestApi.data.users}}");
cy.NavigateToAPI_Panel();
cy.CreateAPI("TestApi");
cy.enterDatasourceAndPath(testdata.baseUrl, testdata.methods);
cy.SaveAndRunAPI();
cy.get(explorer.addWidget).click();
cy.reload();
cy.contains(debuggerLocators.debuggerIcon, 0);
});
});

View File

@ -0,0 +1,25 @@
const dsl = require("../../../../fixtures/buttondsl.json");
const debuggerLocators = require("../../../../locators/Debugger.json");
describe("Widget error state", function() {
before(() => {
cy.addDsl(dsl);
});
it("Check widget error state", function() {
cy.openPropertyPane("buttonwidget");
cy.get(".t--property-control-visible")
.find(".t--js-toggle")
.click();
cy.testJsontext("visible", "Test");
cy.contains(".t--widget-error-count", 1);
});
it("Check if the current value is shown in the debugger", function() {
cy.get(debuggerLocators.debuggerIcon).click();
cy.contains(".react-tabs__tab", "Errors").click();
cy.get(debuggerLocators.debuggerLogState).contains("Test");
});
});

View File

@ -1,8 +1,10 @@
const commonlocators = require("../../../../locators/commonlocators.json");
const viewWidgetsPage = require("../../../../locators/ViewWidgets.json");
const publish = require("../../../../locators/publishWidgetspage.json");
const dsl = require("../../../../fixtures/displayWidgetDsl.json");
const dsl = require("../../../../fixtures/chartUpdatedDsl.json");
const pages = require("../../../../locators/Pages.json");
const modalWidgetPage = require("../../../../locators/ModalWidget.json");
const widgetsPage = require("../../../../locators/Widgets.json");
describe("Chart Widget Functionality", function() {
before(() => {
@ -13,7 +15,8 @@ describe("Chart Widget Functionality", function() {
cy.openPropertyPane("chartwidget");
});
it("Chart Widget Functionality", function() {
it("Fill the Chart Widget Properties.", function() {
//changing the Chart Name
/**
* @param{Text} Random Text
* @param{ChartWidget}Mouseover
@ -24,6 +27,7 @@ describe("Chart Widget Functionality", function() {
viewWidgetsPage.chartWidget,
commonlocators.containerInnerText,
);
//changing the Chart Title
/**
* @param{Text} Random Input Value
*/
@ -32,23 +36,77 @@ describe("Chart Widget Functionality", function() {
.contains("App Sign Up")
.should("have.text", "App Sign Up");
cy.get(viewWidgetsPage.chartType)
.last()
.click({ force: true });
//Entering the Chart data
cy.testJsontext(
"chart-series-data-control",
JSON.stringify(this.data.chartInput),
);
cy.get(".t--propertypane").click("right");
cy.get(commonlocators.dropdownmenu)
.children()
.contains("Column Chart")
.click();
cy.get(viewWidgetsPage.chartType)
.last()
.should("have.text", "Column Chart");
cy.testJsontext("chartseries", JSON.stringify(this.data.chartInput));
// Asserting Chart Height
cy.get(viewWidgetsPage.chartWidget)
.should("be.visible")
.and((chart) => {
expect(chart.height()).to.be.greaterThan(200);
});
//Entring the label of x-axis
cy.get(viewWidgetsPage.xlabel)
.click({ force: true })
.type(this.data.command)
.type(this.data.plan);
//Entring the label of y-axis
cy.get(viewWidgetsPage.ylabel)
.click({ force: true })
.type(this.data.command)
.type(this.data.ylabel);
//Close edit prop
cy.get(commonlocators.editPropCrossButton).click({ force: true });
cy.PublishtheApp();
});
it("Pie Chart Widget Functionality", function() {
//changing the Chart type
cy.UpdateChartType("Pie Chart");
//Verifying X-axis labels
cy.get(viewWidgetsPage.chartWidget).should("have.css", "opacity", "1");
const labels = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"];
[0, 1, 2, 3, 4, 5, 6].forEach((k) => {
cy.get(viewWidgetsPage.rectangleChart)
.last()
.trigger("mousemove", { force: true });
cy.get(viewWidgetsPage.PieChartLabel)
.eq(k)
.should("have.text", labels[k]);
});
cy.PublishtheApp();
});
it("Line Chart Widget Functionality", function() {
//changing the Chart type
cy.UpdateChartType("Line Chart");
//Verifying X-axis labels
cy.get(viewWidgetsPage.chartWidget).should("have.css", "opacity", "1");
const labels = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"];
[0, 1, 2, 3, 4, 5, 6].forEach((k) => {
cy.get(viewWidgetsPage.rectangleChart)
.last()
.trigger("mousemove", { force: true });
cy.get(viewWidgetsPage.Chartlabel)
.eq(k)
.should("have.text", labels[k]);
});
cy.PublishtheApp();
});
it("Bar Chart Widget Functionality", function() {
//changing the Chart type
cy.UpdateChartType("Bar Chart");
//Verifying X-axis labels
cy.get(viewWidgetsPage.chartWidget).should("have.css", "opacity", "1");
const labels = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"];
[0, 1, 2, 3, 4, 5, 6].forEach((k) => {
@ -59,74 +117,273 @@ describe("Chart Widget Functionality", function() {
.eq(k)
.should("have.text", labels[k]);
});
cy.get(viewWidgetsPage.xlabel)
.click({ force: true })
.type(this.data.command)
.type(this.data.plan);
cy.get(viewWidgetsPage.ylabel)
.click({ force: true })
.type(this.data.command)
.type(this.data.ylabel);
//Close edit prop
cy.get(commonlocators.editPropCrossButton).click({ force: true });
cy.PublishtheApp();
});
it("Chart Widget Functionality To Unchecked Visible Widget", function() {
it("Area Chart Widget Functionality", function() {
//changing the Chart type
cy.UpdateChartType("Area Chart");
//Verifying X-axis labels
cy.get(viewWidgetsPage.chartWidget).should("have.css", "opacity", "1");
const labels = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"];
[0, 1, 2, 3, 4, 5, 6].forEach((k) => {
cy.get(viewWidgetsPage.rectangleChart)
.last()
.trigger("mousemove", { force: true });
cy.get(viewWidgetsPage.Chartlabel)
.eq(k)
.should("have.text", labels[k]);
});
cy.PublishtheApp();
});
it("Column Chart Widget Functionality", function() {
//changing the Chart type
cy.UpdateChartType("Column Chart");
//Verifying X-axis labels
cy.get(viewWidgetsPage.chartWidget).should("have.css", "opacity", "1");
const labels = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"];
[0, 1, 2, 3, 4, 5, 6].forEach((k) => {
cy.get(viewWidgetsPage.rectangleChart)
.eq(k)
.trigger("mousemove", { force: true });
cy.get(viewWidgetsPage.Chartlabel)
.eq(k)
.should("have.text", labels[k]);
});
cy.PublishtheApp();
});
it("Toggle JS - Pie Chart Widget Functionality", function() {
//changing the Chart type
cy.get(widgetsPage.toggleChartType).click({ force: true });
cy.testJsontext("charttype", "PIE_CHART");
//Verifying X-axis labels
cy.get(viewWidgetsPage.chartWidget).should("have.css", "opacity", "1");
const labels = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"];
[0, 1, 2, 3, 4, 5, 6].forEach((k) => {
cy.get(viewWidgetsPage.rectangleChart)
.last()
.trigger("mousemove", { force: true });
cy.get(viewWidgetsPage.PieChartLabel)
.eq(k)
.should("have.text", labels[k]);
});
cy.PublishtheApp();
});
it("Toggle JS - Line Chart Widget Functionality", function() {
//changing the Chart type
cy.testJsontext("charttype", "LINE_CHART");
//Verifying X-axis labels
cy.get(viewWidgetsPage.chartWidget).should("have.css", "opacity", "1");
const labels = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"];
[0, 1, 2, 3, 4, 5, 6].forEach((k) => {
cy.get(viewWidgetsPage.rectangleChart)
.last()
.trigger("mousemove", { force: true });
cy.get(viewWidgetsPage.Chartlabel)
.eq(k)
.should("have.text", labels[k]);
});
cy.PublishtheApp();
});
it("Toggle JS - Bar Chart Widget Functionality", function() {
//changing the Chart type
cy.testJsontext("charttype", "BAR_CHART");
//Verifying X-axis labels
cy.get(viewWidgetsPage.chartWidget).should("have.css", "opacity", "1");
const labels = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"];
[0, 1, 2, 3, 4, 5, 6].forEach((k) => {
cy.get(viewWidgetsPage.rectangleChart)
.eq(k)
.trigger("mousemove", { force: true });
cy.get(viewWidgetsPage.Chartlabel)
.eq(k)
.should("have.text", labels[k]);
});
cy.PublishtheApp();
});
it("Toggle JS - Area Chart Widget Functionality", function() {
//changing the Chart type
cy.testJsontext("charttype", "AREA_CHART");
//Verifying X-axis labels
cy.get(viewWidgetsPage.chartWidget).should("have.css", "opacity", "1");
const labels = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"];
[0, 1, 2, 3, 4, 5, 6].forEach((k) => {
cy.get(viewWidgetsPage.rectangleChart)
.last()
.trigger("mousemove", { force: true });
cy.get(viewWidgetsPage.Chartlabel)
.eq(k)
.should("have.text", labels[k]);
});
cy.PublishtheApp();
});
it("Toggle JS - Column Chart Widget Functionality", function() {
//changing the Chart type
cy.testJsontext("charttype", "COLUMN_CHART");
//Verifying X-axis labels
cy.get(viewWidgetsPage.chartWidget).should("have.css", "opacity", "1");
const labels = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"];
[0, 1, 2, 3, 4, 5, 6].forEach((k) => {
cy.get(viewWidgetsPage.rectangleChart)
.eq(k)
.trigger("mousemove", { force: true });
cy.get(viewWidgetsPage.Chartlabel)
.eq(k)
.should("have.text", labels[k]);
});
cy.PublishtheApp();
});
it("Chart - Show Alert Modal", function() {
//creating the Alert Modal and verify Modal name
cy.createModal("Alert Modal", this.data.AlertModalName);
cy.PublishtheApp();
cy.get(widgetsPage.chartPlotGroup)
.children()
.first()
.click();
cy.get(modalWidgetPage.modelTextField).should(
"have.text",
this.data.AlertModalName,
);
});
it("Chart - Form Modal Validation", function() {
//creating the Form Modal and verify Modal name
cy.updateModal("Form Modal", this.data.FormModalName);
cy.PublishtheApp();
cy.get(widgetsPage.chartPlotGroup)
.children()
.first()
.click();
cy.get(modalWidgetPage.modelTextField).should(
"have.text",
this.data.FormModalName,
);
});
it("Chart-Unckeck Visible field Validation", function() {
// Making the widget invisible
cy.togglebarDisable(commonlocators.visibleCheckbox);
cy.PublishtheApp();
cy.get(publish.chartWidget).should("not.exist");
cy.get(publish.backToEditor).click();
});
it("Chart Widget Functionality To Check Visible Widget", function() {
it("Chart-Check Visible field Validation", function() {
// Making the widget visible
cy.togglebar(commonlocators.visibleCheckbox);
cy.PublishtheApp();
cy.get(publish.chartWidget).should("be.visible");
cy.get(publish.backToEditor).click();
});
it("Toggle JS - Chart-Unckeck Visible field Validation", function() {
//Uncheck the disabled checkbox using JS and validate
cy.get(widgetsPage.toggleVisible).click({ force: true });
cy.EditWidgetPropertiesUsingJS(widgetsPage.inputToggleVisible, "false");
cy.PublishtheApp();
cy.get(publish.chartWidget).should("not.exist");
});
it("Toggle JS - Chart-Check Visible field Validation", function() {
//Check the disabled checkbox using JS and Validate
cy.EditWidgetPropertiesUsingJS(widgetsPage.inputToggleVisible, "true");
cy.PublishtheApp();
cy.get(publish.chartWidget).should("be.visible");
});
it("Chart Widget Functionality To Uncheck Horizontal Scroll Visible", function() {
cy.togglebarDisable(commonlocators.horizontalScroll);
cy.PublishtheApp();
cy.get(publish.horizontalTab).should("not.exist");
cy.get(publish.backToEditor).click();
});
it("Chart Widget Functionality To Check Horizontal Scroll Visible", function() {
cy.togglebar(commonlocators.horizontalScroll);
cy.PublishtheApp();
cy.get(publish.horizontalTab)
.eq(1)
.should("exist");
cy.get(publish.backToEditor).click();
});
it("Chart Widget Custom Config Feature", function() {
// Note: This only checks for crashes in custom config
cy.get(viewWidgetsPage.chartType)
.last()
.click({ force: true });
cy.get(commonlocators.dropdownmenu)
.children()
.contains("Custom Chart")
.click();
cy.get(viewWidgetsPage.chartType)
.last()
.should("have.text", "Custom Chart");
it("Custom Chart Widget Functionality", function() {
//changing the Chart type
cy.get(widgetsPage.toggleChartType).click({ force: true });
cy.UpdateChartType("Custom Chart");
cy.testJsontext(
"customfusionchartconfiguration",
`{{${JSON.stringify(this.data.ChartCustomConfig)}}}`,
);
cy.get(viewWidgetsPage.chartWidget)
.should("be.visible")
.and((chart) => {
expect(chart.height()).to.be.greaterThan(200);
});
//Verifying X-axis labels
cy.get(viewWidgetsPage.chartWidget).should("have.css", "opacity", "1");
const labels = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul"];
[0, 1, 2, 3, 4, 5, 6].forEach((k) => {
cy.get(viewWidgetsPage.rectangleChart)
.eq(k)
.trigger("mousemove", { force: true });
cy.get(viewWidgetsPage.Chartlabel)
.eq(k)
.should("have.text", labels[k]);
});
//Close edit prop
cy.get(commonlocators.editPropCrossButton).click();
cy.PublishtheApp();
});
it("Toggle JS - Custom Chart Widget Functionality", function() {
//changing the Chart type
cy.UpdateChartType("Pie Chart");
cy.get(widgetsPage.toggleChartType).click({ force: true });
cy.testJsontext("charttype", "CUSTOM_FUSION_CHART");
//Verifying X-axis labels
cy.get(viewWidgetsPage.chartWidget).should("have.css", "opacity", "1");
const labels = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul"];
[0, 1, 2, 3, 4, 5, 6].forEach((k) => {
cy.get(viewWidgetsPage.rectangleChart)
.eq(k)
.trigger("mousemove", { force: true });
cy.get(viewWidgetsPage.Chartlabel)
.eq(k)
.should("have.text", labels[k]);
});
//Close edit prop
cy.get(commonlocators.editPropCrossButton).click();
cy.PublishtheApp();
});
it("Chart-Copy Verification", function() {
const modifierKey = Cypress.platform === "darwin" ? "meta" : "ctrl";
//Copy Chart and verify all properties
cy.copyWidget("chartwidget", viewWidgetsPage.chartWidget);
cy.PublishtheApp();
});
it("Chart-Delete Verification", function() {
// Delete the Chart widget
cy.deleteWidget(viewWidgetsPage.chartWidget);
cy.PublishtheApp();
cy.get(viewWidgetsPage.chartWidget).should("not.exist");
});
afterEach(() => {
cy.get(publish.backToEditor).click({ force: true });
});
});
afterEach(() => {
// put your clean up code if any
});

View File

@ -0,0 +1,23 @@
const dsl = require("../../../../fixtures/DividerDsl.json");
const explorer = require("../../../../locators/explorerlocators.json");
describe("Divider Widget Functionality", function() {
beforeEach(() => {
cy.addDsl(dsl);
});
it("Add new Divider", () => {
cy.get(explorer.addWidget).click();
cy.dragAndDropToCanvas("dividerwidget", { x: 300, y: 300 });
cy.get(".t--divider-widget").should("exist");
});
it("Open Existing Divider from created Widgets list", () => {
cy.get(".bp3-icon-caret-right ~ .t--entity-name:contains(Widgets)").click({
multiple: true,
});
cy.get(".bp3-icon-caret-right ~ .t--entity-name:contains(Divider1)").click({
multiple: true,
});
});
});

View File

@ -23,7 +23,6 @@ describe("Image Widget Functionality", function() {
);
cy.get(viewWidgetsPage.defaultImage)
.click({ force: true })
.type(this.data.command)
.type(this.data.defaultimage);
/**
* @param{URL} ImageUrl

View File

@ -8,7 +8,7 @@ describe("Modal Widget Functionality", function() {
it("Add new Modal", () => {
cy.get(explorer.addWidget).click();
cy.dragAndDropToCanvas("modalwidget", { x: 300, y: -300 });
cy.dragAndDropToCanvas("modalwidget", { x: 300, y: 300 });
cy.get(".t--modal-widget").should("exist");
});

View File

@ -0,0 +1,24 @@
/* eslint-disable cypress/no-unnecessary-waiting */
const widgetsPage = require("../../../../locators/Widgets.json");
const commonlocators = require("../../../../locators/commonlocators.json");
const publish = require("../../../../locators/publishWidgetspage.json");
const dsl = require("../../../../fixtures/tableResizedColumnsDsl.json");
describe("Table Widget Functionality with Hidden and Resized Columns", function() {
before(() => {
cy.addDsl(dsl);
});
it("Table Widget Functionality with Hidden and Resized Columns", function() {
cy.PublishtheApp();
cy.get(".t--widget-tablewidget")
.invoke("outerWidth")
.then((tableWidth) => {
cy.get(".t--widget-tablewidget .thead .tr")
.invoke("outerWidth")
.then((width) => {
expect(width).to.be.at.least(tableWidth);
});
});
});
});

View File

@ -43,13 +43,12 @@ describe("Test Create Api and Bind to Table widget", function() {
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(1000);
cy.toggleJsAndUpdate("tabledata", "Green");
cy.get(commonlocators.editPropCrossButton).click();
cy.get(".t--property-pane-back-btn").click({ force: true });
cy.wait("@updateLayout");
cy.readTabledataValidateCSS("1", "0", "background-color", "rgb(0, 128, 0)");
});
it("Edit column name and validate test for computed value based on column type selected", function() {
cy.SearchEntityandOpen("Table1");
cy.editColumn("customColumn1");
cy.readTabledataPublish("1", "9").then((tabData) => {
const tabValue = tabData;

View File

@ -0,0 +1,46 @@
const widgetsPage = require("../../../../locators/Widgets.json");
const dsl = require("../../../../fixtures/tableNewDsl.json");
describe("Table Widget row multi select validation", function() {
before(() => {
cy.addDsl(dsl);
});
it("Test multi select column shows when enableMultirowselection is true", function() {
cy.openPropertyPane("tablewidget");
cy.get(widgetsPage.toggleEnableMultirowselection)
.first()
.click({ force: true });
cy.get(".t--table-multiselect-header")
.first()
.should("be.visible");
cy.get(".t--table-multiselect")
.first()
.should("be.visible");
});
it("Test click on header cell selects all row", function() {
// click on header check cell
cy.get(".t--table-multiselect-header")
.first()
.click({ force: true });
// check if rows selected
cy.get(".tr").should("have.class", "selected-row");
});
it("Test click on single row cell changes header select cell state", function() {
// un select all rows
cy.get(".t--table-multiselect-header")
.first()
.click({ force: true });
// click on first row select box
cy.get(".t--table-multiselect")
.first()
.click({ force: true });
// check if header cell is in half check state
cy.get(".t--table-multiselect-header-half-check-svg")
.first()
.should("be.visible");
});
});

View File

@ -32,19 +32,24 @@ describe("Test Suite to validate copy/paste table Widget", function() {
200,
);
cy.get(commonlocators.toastAction).should("be.visible");
//Check after copying new table widget should not have any warnings
cy.get('.t--widget-propertypane-toggle [name="warning"]').should(
"not.exist",
);
/*
cy.get(commonlocators.toastAction)
.contains("UNDO")
.click({ force: true });
*/
cy.GlobalSearchEntity("Table2");
cy.GlobalSearchEntity("Table1Copy");
cy.get(".t--entity-collapse-toggle")
.last()
.click();
cy.get(apiwidget.propertyList).then(function($lis) {
expect($lis).to.have.length(8);
expect($lis.eq(0)).to.contain("{{Table2.selectedRow}}");
expect($lis.eq(1)).to.contain("{{Table2.selectedRows}}");
expect($lis.eq(0)).to.contain("{{Table1Copy.selectedRow}}");
expect($lis.eq(1)).to.contain("{{Table1Copy.selectedRows}}");
});
});
});

View File

@ -3,7 +3,6 @@ const widgetsPage = require("../../../../locators/Widgets.json");
const commonlocators = require("../../../../locators/commonlocators.json");
const publish = require("../../../../locators/publishWidgetspage.json");
const dsl = require("../../../../fixtures/tableWidgetDsl.json");
const pages = require("../../../../locators/Pages.json");
describe("Table Widget Functionality", function() {
before(() => {
@ -83,7 +82,9 @@ describe("Table Widget Functionality", function() {
cy.wait(5000);
cy.get(publish.searchInput)
.first()
.clear()
.within(() => {
return cy.get("input").clear();
})
.type("7434532");
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(1000);
@ -97,7 +98,9 @@ describe("Table Widget Functionality", function() {
it("Table Widget Functionality To Filter The Data", function() {
cy.get(publish.searchInput)
.first()
.clear();
.within(() => {
return cy.get("input").clear();
});
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(1000);
cy.isSelectRow(1);
@ -261,16 +264,16 @@ describe("Table Widget Functionality", function() {
const tabValue = tabData;
expect(tabValue).to.be.equal("Lindsay Ferguson");
cy.log("the value is" + tabValue);
cy.get(publish.compactMode).click();
cy.get(publish.compactOpt)
cy.get(publish.rowHeight).click();
cy.get(publish.rowHeightOpt)
.contains("Tall")
.click();
cy.scrollTabledataPublish("3", "3").then((tabData) => {
const tabValue = tabData;
expect(tabValue).to.be.equal("Byron Fields");
});
cy.get(publish.compactMode).click();
cy.get(publish.compactOpt)
cy.get(publish.rowHeight).click();
cy.get(publish.rowHeightOpt)
.contains("Short")
.click();
cy.readTabledataPublish("4", "3").then((tabData) => {
@ -282,7 +285,7 @@ describe("Table Widget Functionality", function() {
/*
To enabled later
it("Table Widget Functionality To Verify The Visiblity mode functionality", function() {
cy.get(publish.backToEditor)
.first()

View File

@ -36,7 +36,19 @@ describe("Text Widget Functionality", function() {
.should("have.css", "font-size", "24px");
});
it("Text Email Parsing Validation", function() {
cy.testCodeMirror("ab.end@domain.com");
cy.wait("@updateLayout");
cy.PublishtheApp();
cy.get(commonlocators.headingTextStyle + " a").should(
"have.attr",
"href",
"mailto:ab.end@domain.com",
);
});
it("Text-TextStyle Label Validation", function() {
cy.testCodeMirror(this.data.TextLabelValue);
//Changing the Text Style's and validating
cy.ChangeTextStyle(
this.data.TextLabel,
@ -61,33 +73,33 @@ describe("Text Widget Functionality", function() {
.should("have.css", "font-size", "18px");
});
// it("Text widget depends on itself", function() {
// cy.getCodeMirror().then(($cm) => {
// if ($cm.val() !== "") {
// cy.get(".CodeMirror textarea")
// .first()
// .clear({
// force: true,
// });
// }
//
// cy.get(".CodeMirror textarea")
// .first()
// .type(`{{${this.data.TextName}}}`, {
// force: true,
// parseSpecialCharSequences: false,
// });
// });
// cy.get(commonlocators.toastBody)
// .first()
// .contains("Cyclic");
//
// cy.PublishtheApp();
// cy.get(commonlocators.bodyTextStyle).should(
// "have.text",
// `{{${this.data.TextName}}}`,
// );
// });
it("Text widget depends on itself", function() {
cy.getCodeMirror().then(($cm) => {
if ($cm.val() !== "") {
cy.get(".CodeMirror textarea")
.first()
.clear({
force: true,
});
}
cy.get(".CodeMirror textarea")
.first()
.type(`{{${this.data.TextName}}}`, {
force: true,
parseSpecialCharSequences: false,
});
});
cy.get(commonlocators.toastBody)
.first()
.contains("Cyclic");
cy.PublishtheApp();
cy.get(commonlocators.bodyTextStyle).should(
"have.text",
`{{${this.data.TextName}}}`,
);
});
afterEach(() => {
cy.get(publishPage.backToEditor).click({ force: true });

View File

@ -51,7 +51,7 @@ describe("Video Widget Functionality", function() {
cy.get(".CodeMirror textarea")
.first()
.blur();
cy.get(widgetsPage.autoPlay).click();
cy.get(widgetsPage.autoPlay).click({ force: true });
cy.wait("@updateLayout").should(
"have.nested.property",
"response.body.responseMeta.status",
@ -62,7 +62,7 @@ describe("Video Widget Functionality", function() {
cy.get(commonlocators.toastMsg).should("be.visible");
cy.get(commonlocators.toastMsg).contains("Play success");
*/
cy.get(widgetsPage.autoPlay).click();
cy.get(widgetsPage.autoPlay).click({ force: true });
cy.wait("@updateLayout").should(
"have.nested.property",
"response.body.responseMeta.status",

View File

@ -6,29 +6,23 @@ const dynamicInputLocators = require("../../../../locators/DynamicInput.json");
const apiwidget = require("../../../../locators/apiWidgetslocator.json");
describe("Dynamic input autocomplete", () => {
beforeEach(() => {
before(() => {
cy.addDsl(dsl);
});
it("opens autocomplete for bindings", () => {
cy.openPropertyPane("buttonwidget");
cy.get(dynamicInputLocators.input)
.first()
.focus()
.type("{ctrl}{shift}{downarrow}")
.then(($cm) => {
if ($cm.val() !== "") {
cy.get(dynamicInputLocators.input)
.first()
.clear({
force: true,
});
}
.click({ force: true })
.type("{uparrow}", { parseSpecialCharSequences: true })
.type("{ctrl}{shift}{downarrow}", { parseSpecialCharSequences: true })
.type("{backspace}", { parseSpecialCharSequences: true })
.then(() => {
cy.get(dynamicInputLocators.input)
.first()
.click({ force: true })
.type("{{", {
force: true,
parseSpecialCharSequences: false,
parseSpecialCharSequences: true,
});
// Tests if autocomplete will open
@ -36,15 +30,17 @@ describe("Dynamic input autocomplete", () => {
// Tests if data tree entities are sorted
cy.get(`${dynamicInputLocators.hints} li`)
.first()
.should("have.text", "Aditya");
.eq(1)
.should("have.text", "Aditya.backgroundColor");
// Tests if "No suggestions" message will pop if you type any garbage
cy.get(dynamicInputLocators.input)
.first()
.type("garbage", {
force: true,
parseSpecialCharSequences: false,
.click({ force: true })
.type("{uparrow}", { parseSpecialCharSequences: true })
.type("{ctrl}{shift}{downarrow}", { parseSpecialCharSequences: true })
.type("{{ garbage", {
parseSpecialCharSequences: true,
})
.then(() => {
cy.get(".CodeMirror-Tern-tooltip").should(
@ -53,21 +49,16 @@ describe("Dynamic input autocomplete", () => {
);
});
});
cy.evaluateErrorMessage("ReferenceError: garbage is not defined");
});
it("opens current value popup", () => {
// Test on widgets pane
cy.openPropertyPane("buttonwidget");
cy.get(dynamicInputLocators.input)
.first()
.focus();
cy.assertEvaluatedValuePopup("string");
// Test on api pane
cy.NavigateToAPI_Panel();
cy.get(apiwidget.createapi).click({ force: true });
cy.wait("@createNewApi");
cy.xpath(apiwidget.headerValue)
.first()
.focus();
cy.get(apiwidget.headerValue).within(() => {
cy.get("textarea").click({ force: true });
});
cy.assertEvaluatedValuePopup("string");
});
});

View File

@ -1,5 +1,6 @@
const testdata = require("../../../../fixtures/testdata.json");
const apiwidget = require("../../../../locators/apiWidgetslocator.json");
const widgetsPage = require("../../../../locators/Widgets.json");
const explorer = require("../../../../locators/explorerlocators.json");
const commonlocators = require("../../../../locators/commonlocators.json");
const formWidgetsPage = require("../../../../locators/FormWidgets.json");
@ -15,7 +16,8 @@ describe("Entity explorer Drag and Drop widgets testcases", function() {
cy.get(commonlocators.entityExplorersearch)
.clear()
.type("form");
cy.dragAndDropToCanvas("formwidget", { x: 300, y: -300 });
cy.dragAndDropToCanvas("formwidget", { x: 300, y: 80 });
cy.get(formWidgetsPage.formD).click();
/**
* @param{Text} Random Text
* @param{FormWidget}Mouseover
@ -29,10 +31,13 @@ describe("Entity explorer Drag and Drop widgets testcases", function() {
/**
* @param{Text} Random Colour
*/
cy.testCodeMirror(this.data.colour);
cy.get(widgetsPage.backgroundcolorPicker)
.first()
.click({ force: true });
cy.xpath(widgetsPage.greenColor).click();
cy.get(formWidgetsPage.formD)
.should("have.css", "background-color")
.and("eq", this.data.rgbValue);
.and("eq", "rgb(3, 179, 101)");
/**
* @param{toggleButton Css} Assert to be checked
*/

View File

@ -5,6 +5,7 @@ const datasource = require("../../../../locators/DatasourcesEditor.json");
const apiwidget = require("../../../../locators/apiWidgetslocator.json");
const commonlocators = require("../../../../locators/commonlocators.json");
const explorer = require("../../../../locators/explorerlocators.json");
const pages = require("../../../../locators/Pages.json");
const pageid = "MyPage";
let datasourceName;
@ -59,7 +60,7 @@ describe("Entity explorer tests related to query and datasource", function() {
/* eslint-disable */
cy.wait(2000);
cy.go("back");
cy.NavigateToQueryEditor();
cy.contains(".t--datasource-name", datasourceName)
.find(queryLocators.editDatasourceButton)
@ -101,10 +102,11 @@ describe("Entity explorer tests related to query and datasource", function() {
.find(explorer.collapse)
.click();
cy.get(apiwidget.propertyList).then(function($lis) {
expect($lis).to.have.length(3);
expect($lis).to.have.length(4);
expect($lis.eq(0)).to.contain("{{Query1.isLoading}}");
expect($lis.eq(1)).to.contain("{{Query1.data}}");
expect($lis.eq(2)).to.contain("{{Query1.run()}}");
expect($lis.eq(2)).to.contain("{{Query1.responseMeta}}");
expect($lis.eq(3)).to.contain("{{Query1.run()}}");
});
cy.Createpage(pageid);
cy.GlobalSearchEntity("Query1");
@ -120,7 +122,12 @@ describe("Entity explorer tests related to query and datasource", function() {
cy.runQuery();
cy.deleteQuery();
cy.get(commonlocators.entityExplorersearch).clear({ force: true });
cy.wait(500);
cy.NavigateToQueryEditor();
cy.get(pages.integrationActiveTab)
.should("be.visible")
.click({ force: true });
cy.contains(".t--datasource-name", datasourceName)
.find(".t--edit-datasource")
.click();

View File

@ -31,10 +31,9 @@ describe("Tab widget test", function() {
cy.RenameEntity(tabname);
cy.validateMessage(tabname);
cy.deleteEntity();
cy.get(commonlocators.entityExplorersearch).should("be.visible");
cy.get(commonlocators.entityExplorersearch)
.clear()
.type("Tab 2");
.clear({ force: true })
.type("Tab 2", { force: true });
cy.get(
commonlocators.entitySearchResult.concat("Tab 2").concat("')"),
).should("not.exist");

View File

@ -28,7 +28,8 @@ describe("Test Suite to validate copy/delete/undo functionalites", function() {
cy.wait(500);
cy.get(commonlocators.toastBody)
.first()
.contains("Copied");
.contains("Copied")
.click();
cy.get("body").type(`{${modifierKey}}v`, { force: true });
cy.wait("@updateLayout").should(
"have.nested.property",
@ -45,11 +46,11 @@ describe("Test Suite to validate copy/delete/undo functionalites", function() {
cy.get(commonlocators.toastAction)
.contains("UNDO")
.click({ force: true });
cy.GlobalSearchEntity("Form1");
cy.GlobalSearchEntity("FormTestCopy");
cy.get(apiwidget.propertyList).then(function($lis) {
expect($lis).to.have.length(2);
expect($lis.eq(0)).to.contain("{{Form1.isVisible}}");
expect($lis.eq(1)).to.contain("{{Form1.data}}");
expect($lis.eq(0)).to.contain("{{FormTestCopy.isVisible}}");
expect($lis.eq(1)).to.contain("{{FormTestCopy.data}}");
});
});
});

View File

@ -5,6 +5,8 @@ const homePage = require("../../../../locators/HomePage.json");
const pages = require("../../../../locators/Pages.json");
const publishPage = require("../../../../locators/publishWidgetspage.json");
const modalWidgetPage = require("../../../../locators/ModalWidget.json");
const datasource = require("../../../../locators/DatasourcesEditor.json");
const queryLocators = require("../../../../locators/QueryEditor.json");
describe("Button Widget Functionality", function() {
before(() => {
@ -15,6 +17,20 @@ describe("Button Widget Functionality", function() {
cy.openPropertyPane("buttonwidget");
});
it("Button-Style Validation", function() {
//Changing the style of the button from the property pane and verify it's color.
// Change to Secondary button sytle
cy.changeButtonStyle(2, "rgba(0, 0, 0, 0)", "rgba(0, 0, 0, 0)");
cy.get(publishPage.backToEditor).click({ force: true });
// Change to Danger button sytle
cy.openPropertyPane("buttonwidget");
cy.changeButtonStyle(3, "rgb(179, 3, 56)", "rgb(139, 2, 43)");
cy.get(publishPage.backToEditor).click({ force: true });
// Change to Primary button sytle
cy.openPropertyPane("buttonwidget");
cy.changeButtonStyle(1, "rgb(3, 179, 101)", "rgb(2, 139, 78)");
});
it("Button-Name validation", function() {
//changing the Button Name
cy.widgetText(
@ -71,6 +87,35 @@ describe("Button Widget Functionality", function() {
);
});
it("Toggle JS - Button-Disable Validation", function() {
//Check the disabled checkbox by using JS widget and Validate
cy.get(widgetsPage.toggleDisable).click({ force: true });
cy.EditWidgetPropertiesUsingJS(widgetsPage.inputToggleDisable, "true");
cy.validateDisableWidget(
widgetsPage.buttonWidget,
commonlocators.disabledField,
);
cy.PublishtheApp();
cy.validateDisableWidget(
publishPage.buttonWidget,
commonlocators.disabledField,
);
});
it("Toggle JS - Button-Enable Validation", function() {
//Uncheck the disabled checkbox and validate
cy.EditWidgetPropertiesUsingJS(widgetsPage.inputToggleDisable, "false");
cy.validateEnableWidget(
widgetsPage.buttonWidget,
commonlocators.disabledField,
);
cy.PublishtheApp();
cy.validateEnableWidget(
publishPage.buttonWidget,
commonlocators.disabledField,
);
});
it("Button-Unckeck Visible field Validation", function() {
//Uncheck the disabled checkbox and validate
cy.UncheckWidgetProperties(commonlocators.visibleCheckbox);
@ -85,6 +130,21 @@ describe("Button Widget Functionality", function() {
cy.get(publishPage.buttonWidget).should("be.visible");
});
it("Toggle JS - Button-Unckeck Visible field Validation", function() {
//Uncheck the disabled checkbox using JS and validate
cy.get(widgetsPage.toggleVisible).click({ force: true });
cy.EditWidgetPropertiesUsingJS(widgetsPage.inputToggleVisible, "false");
cy.PublishtheApp();
cy.get(publishPage.buttonWidget).should("not.exist");
});
it("Toggle JS - Button-Check Visible field Validation", function() {
//Check the disabled checkbox using JS and Validate
cy.EditWidgetPropertiesUsingJS(widgetsPage.inputToggleVisible, "true");
cy.PublishtheApp();
cy.get(publishPage.buttonWidget).should("be.visible");
});
it("Button-AlertModal Validation", function() {
//creating the Alert Modal and verify Modal name
cy.createModal("Alert Modal", this.data.AlertModalName);
@ -107,6 +167,124 @@ describe("Button Widget Functionality", function() {
);
});
it("Button-CallAnApi Validation", function() {
//creating an api and calling it from the onClickAction of the button widget.
// Creating the api
cy.NavigateToAPI_Panel();
cy.CreateAPI("buttonApi");
cy.log("Creation of buttonApi Action successful");
cy.enterDatasourceAndPath(this.data.paginationUrl, "users?page=4&size=3");
cy.SaveAndRunAPI();
// Going to HomePage where the button widget is located and opeing it's property pane.
cy.get(widgetsPage.NavHomePage).click({ force: true });
cy.reload();
cy.openPropertyPane("buttonwidget");
// Adding the api in the onClickAction of the button widget.
cy.addAPIFromLightningMenu("buttonApi");
// Filling the messages for success/failure in the onClickAction of the button widget.
cy.onClickActions("Success", "Error");
cy.PublishtheApp();
// Clicking the button to verify the success message
cy.get(publishPage.buttonWidget).click();
cy.get(widgetsPage.apiCallToast).should("have.text", "Success");
});
it("Button-Call-Query Validation", function() {
//creating a query and calling it from the onClickAction of the button widget.
// Creating a mock query
// cy.CreateMockQuery("Query1");
let postgresDatasourceName;
cy.startRoutesForDatasource();
cy.NavigateToDatasourceEditor();
cy.get(datasource.PostgreSQL).click();
cy.generateUUID().then((uid) => {
postgresDatasourceName = uid;
cy.get(".t--edit-datasource-name").click();
cy.get(".t--edit-datasource-name input")
.clear()
.type(postgresDatasourceName, { force: true })
.should("have.value", postgresDatasourceName)
.blur();
});
cy.wait("@saveDatasource").should(
"have.nested.property",
"response.body.responseMeta.status",
200,
);
cy.fillPostgresDatasourceForm();
cy.saveDatasource();
cy.CreateMockQuery("Query1");
// Going to HomePage where the button widget is located and opeing it's property pane.
cy.get(widgetsPage.NavHomePage).click({ force: true });
cy.reload();
cy.openPropertyPane("buttonwidget");
// Adding the query in the onClickAction of the button widget.
cy.addQueryFromLightningMenu("Query1");
// Filling the messages for success/failure in the onClickAction of the button widget.
cy.onClickActions("Success", "Error");
cy.PublishtheApp();
// Clicking the button to verify the success message
cy.get(publishPage.buttonWidget).click();
cy.get(widgetsPage.apiCallToast).should("have.text", "Success");
});
it("Toggle JS - Button-CallAnApi Validation", function() {
//creating an api and calling it from the onClickAction of the button widget.
// calling the existing api
cy.get(widgetsPage.toggleOnClick).click({ force: true });
cy.testJsontext(
"onclick",
"{{buttonApi.run(() => showAlert('Success','success'), () => showAlert('Error','error'))}}",
);
cy.PublishtheApp();
// Clicking the button to verify the success message
cy.get(publishPage.buttonWidget).click();
cy.get(widgetsPage.apiCallToast).should("have.text", "Success");
});
it("Toggle JS - Button-Call-Query Validation", function() {
//creating a query and calling it from the onClickAction of the button widget.
// Creating a mock query
cy.testJsontext(
"onclick",
"{{Query1.run(() => showAlert('Success','success'), () => showAlert('Error','error'))}}",
);
cy.PublishtheApp();
// Clicking the button to verify the success message
cy.get(publishPage.buttonWidget).click();
cy.get(widgetsPage.apiCallToast).should("have.text", "Success");
});
it("Button-Copy Verification", function() {
const modifierKey = Cypress.platform === "darwin" ? "meta" : "ctrl";
//Copy button and verify all properties
cy.copyWidget("buttonwidget", widgetsPage.buttonWidget);
cy.PublishtheApp();
});
it("Button-Delete Verification", function() {
// Delete the button widget
cy.deleteWidget(widgetsPage.buttonWidget);
cy.PublishtheApp();
cy.get(widgetsPage.buttonWidget).should("not.exist");
});
afterEach(() => {
cy.get(publishPage.backToEditor).click({ force: true });
});

View File

@ -81,7 +81,7 @@ describe("Checkbox Widget Functionality", function() {
cy.get(publish.checkboxWidget).click();
cy.get(widgetsPage.formButtonWidget)
.contains("Submit")
.should("have.attr", "disabled");
.should("have.class", "bp3-disabled");
cy.get(publish.checkboxWidget).click();
cy.get(widgetsPage.formButtonWidget)

View File

@ -74,13 +74,44 @@ describe("DatePicker Widget Property pane tests with js bindings", function() {
cy.get(".t--property-control-defaultdate .bp3-input").type("2020-02-01");
cy.closePropertyPane();
cy.openPropertyPane("datepickerwidget2");
cy.get(formWidgetsPage.toggleJsMinDate).click();
cy.get(formWidgetsPage.toggleJsMinDate).click({ force: true });
cy.get(".t--property-control-mindate .bp3-input").type("2020-01-01");
cy.get(formWidgetsPage.toggleJsMaxDate).click();
cy.get(formWidgetsPage.toggleJsMaxDate).click({ force: true });
cy.get(".t--property-control-maxdate .bp3-input").type("2020-02-10");
cy.closePropertyPane();
});
it("Datepicker input value changes to work with selected date formats", function() {
cy.openPropertyPane("datepickerwidget2");
cy.get(".t--property-control-mindate .bp3-input")
.clear()
.type("2021-01-01");
cy.closePropertyPane();
cy.openPropertyPane("datepickerwidget2");
cy.get(".t--property-control-maxdate .bp3-input")
.clear()
.type("2021-10-10");
cy.closePropertyPane();
cy.openPropertyPane("datepickerwidget2");
cy.get(".t--property-control-defaultdate .bp3-input").clear();
cy.selectDateFormat("DD/MM/YYYY HH:mm");
cy.get(formWidgetsPage.toggleJsDefaultDate).click();
cy.testJsontext(
"defaultdate",
'{{moment("04/05/2021 05:25", "DD/MM/YYYY HH:mm").toISOString()}}',
);
cy.get(".t--draggable-datepickerwidget2 .bp3-input")
.clear({
force: true,
})
.type("04/05/2021 06:25");
cy.selectDateFormat("LLL");
cy.wait("@updateLayout");
cy.get(".t--draggable-textwidget .bp3-ui-text")
.first()
.should("have.text", "May 4, 2021 6:25 AM");
});
it("Datepicker default date validation with js binding", function() {
cy.PublishtheApp();
// eslint-disable-next-line cypress/no-unnecessary-waiting

View File

@ -3,6 +3,7 @@ const formWidgetsPage = require("../../../../locators/FormWidgets.json");
const publish = require("../../../../locators/publishWidgetspage.json");
const dsl = require("../../../../fixtures/formdsl.json");
const pages = require("../../../../locators/Pages.json");
const widgetsPage = require("../../../../locators/Widgets.json");
describe("Form Widget Functionality", function() {
before(() => {
@ -23,10 +24,13 @@ describe("Form Widget Functionality", function() {
/**
* @param{Text} Random Colour
*/
cy.testCodeMirror(this.data.colour);
cy.get(widgetsPage.backgroundcolorPicker)
.first()
.click({ force: true });
cy.xpath(widgetsPage.greenColor).click();
cy.get(formWidgetsPage.formD)
.should("have.css", "background-color")
.and("eq", this.data.rgbValue);
.and("eq", "rgb(3, 179, 101)");
/**
* @param{toggleButton Css} Assert to be checked
*/
@ -40,7 +44,7 @@ describe("Form Widget Functionality", function() {
it("Form Widget Functionality To Verify The Colour", function() {
cy.get(formWidgetsPage.formD)
.should("have.css", "background-color")
.and("eq", this.data.rgbValue);
.and("eq", "rgb(3, 179, 101)");
});
it("Form Widget Functionality To Unchecked Visible Widget", function() {
cy.get(publish.backToEditor).click();

View File

@ -49,7 +49,6 @@ describe("Radio Widget Functionality", function() {
cy.get(formWidgetsPage.radioOnSelectionChangeDropdown)
.get(commonlocators.dropdownSelectButton)
.click({ force: true })
.type(this.data.command)
.type("2");
cy.PublishtheApp();
});

View File

@ -29,17 +29,6 @@ describe("RichTextEditor Widget Functionality", function() {
"h1",
"This is a Heading",
);
// validate after reload
cy.reload(true);
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(2000);
cy.validateHTMLText(
formWidgetsPage.richTextEditorWidget,
"h1",
"This is a Heading",
);
cy.PublishtheApp();
cy.validateHTMLText(
publishPage.richTextEditorWidget,

View File

@ -42,8 +42,8 @@ describe("GlobalSearch", function() {
.its("store")
.invoke("getState")
.then((state) => {
const { selectedWidget } = state.ui.widgetDragResize;
expect(selectedWidget).to.be.equal(table.widgetId);
const { lastSelectedWidget } = state.ui.widgetDragResize;
expect(lastSelectedWidget).to.be.equal(table.widgetId);
});
});
@ -119,5 +119,6 @@ describe("GlobalSearch", function() {
expect(loc.pathname).includes(expectedPage.pageId);
});
});
cy.NavigateToHome();
});
});

View File

@ -0,0 +1,40 @@
const commonlocators = require("../../../../locators/commonlocators.json");
const Layoutpage = require("../../../../locators/Layout.json");
const widgetsPage = require("../../../../locators/Widgets.json");
const publish = require("../../../../locators/publishWidgetspage.json");
const dsl = require("../../../../fixtures/tabsWithWidgetDsl.json");
const pages = require("../../../../locators/Pages.json");
const modalWidgetPage = require("../../../../locators/ModalWidget.json");
describe("Tab widget test", function() {
before(() => {
cy.addDsl(dsl);
});
it("Tab Widget Functionality Test with Modal on change of selected tab", function() {
cy.openPropertyPane("tabswidget");
cy.widgetText("tab", Layoutpage.tabWidget, Layoutpage.tabInput);
cy.AddActionWithModal();
cy.get(".t--widget-buttonwidget:contains('Confirm')").click({
force: true,
});
});
it("Publih the app and validate the widgets displayed under each tab", function() {
cy.PublishtheApp();
cy.get(publish.buttonWidget).should("be.visible");
cy.get(publish.textWidget).should("be.visible");
cy.get(publish.datePickerNew).should("be.visible");
cy.get(publish.tab)
.contains("Tab 2")
.click({ force: true });
cy.get(publish.checkboxWidget).should("be.visible");
cy.get(publish.radioWidget).should("be.visible");
cy.get(publish.buttonWidget)
.contains("Confirm")
.click({ force: true });
});
});
afterEach(() => {
// put your clean up code if any
});

View File

@ -60,9 +60,9 @@ describe("Tab widget test", function() {
.contains(this.data.tabName)
.click({ force: true })
.should("be.selected");
cy.get(publish.backToEditor).click();
});
it("Tab Widget Functionality To Unchecked Visible Widget", function() {
cy.get(publish.backToEditor).click();
cy.openPropertyPane("tabswidget");
cy.togglebarDisable(commonlocators.visibleCheckbox);
cy.PublishtheApp();
@ -74,8 +74,71 @@ describe("Tab widget test", function() {
cy.togglebar(commonlocators.visibleCheckbox);
cy.PublishtheApp();
cy.get(publish.tabWidget).should("be.visible");
cy.get(publish.backToEditor).click();
});
it("Tab Widget Functionality To Check tab invisiblity", function() {
cy.openPropertyPane("tabswidget");
cy.get(Layoutpage.tabEdit)
.eq(1)
.click({ force: true });
cy.get(Layoutpage.tabVisibility)
.first()
.click({ force: true });
cy.get(Layoutpage.tabWidget)
.contains("Tab 1")
.should("not.exist");
cy.PublishtheApp();
cy.get(publish.tabWidget)
.contains("Tab 1")
.should("not.exist");
cy.get(publish.backToEditor).click();
});
it("Tab Widget Functionality To Check tab visibility", function() {
cy.openPropertyPane("tabswidget");
cy.get(Layoutpage.tabEdit)
.eq(1)
.click({ force: true });
cy.get(Layoutpage.tabVisibility)
.first()
.click({ force: true });
cy.get(Layoutpage.tabWidget)
.contains("Tab 1")
.should("be.visible");
cy.PublishtheApp();
cy.get(publish.tabWidget)
.contains("Tab 1")
.should("be.visible");
cy.get(publish.backToEditor).click();
});
/* Test to be revisted as the undo action is inconsistent in automation
it("Tab Widget Functionality To Check undo action after delete", function() {
cy.openPropertyPane("tabswidget");
cy.get(Layoutpage.tabDelete)
.eq(1)
.click({ force: true });
cy.wait(2000);
cy.wait("@updateLayout");
cy.get(publish.tabWidget)
.contains("Tab 1")
.should("not.exist");
cy.get(".undo-section:contains('UNDO')")
.should("be.visible")
.click({ force: true });
cy.wait(2000);
cy.wait("@updateLayout");
cy.get(Layoutpage.tabWidget)
.contains("Tab 1")
.should("be.visible");
cy.PublishtheApp();
cy.get(publish.tabWidget)
.contains("Tab 1")
.should("be.visible");
});
*/
});
afterEach(() => {
// put your clean up code if any
});

View File

@ -2,6 +2,9 @@
// const explorer = require("../../../../locators/explorerlocators.json");
const homePage = require("../../../../locators/HomePage.json");
const commonlocators = require("../../../../locators/commonlocators.json");
const pages = require("../../../../locators/Pages.json");
const datasourceEditor = require("../../../../locators/DatasourcesEditor.json");
const datasource = require("../../../../locators/DatasourcesEditor.json");
describe("Onboarding", function() {
it("Onboarding flow", function() {
@ -50,7 +53,7 @@ describe("Onboarding", function() {
// Add widget
cy.get(".t--add-widget").click();
cy.dragAndDropToCanvas("tablewidget", { x: 30, y: -30 });
cy.dragAndDropToCanvas("tablewidget", { x: 360, y: 40 });
// wait for animation duration
// eslint-disable-next-line cypress/no-unnecessary-waiting

View File

@ -0,0 +1,62 @@
/// <reference types="Cypress" />
const homePage = require("../../../../locators/HomePage.json");
describe("Leave organization test spec", function() {
let newOrgId;
let newOrganizationName;
it("leave organization menu is visible validation", function() {
cy.visit("/applications");
cy.createOrg();
cy.wait("@createOrg").then((interception) => {
newOrganizationName = interception.response.body.data.name;
newOrgId = interception.response.body.data.name;
cy.visit("/applications");
cy.openOrgOptionsPopup(newOrganizationName);
cy.contains("Leave Organization");
});
});
it("Only admin user can not leave organization validation", function() {
cy.visit("/applications");
cy.createOrg();
cy.wait("@createOrg").then((interception) => {
newOrganizationName = interception.response.body.data.name;
newOrgId = interception.response.body.data.name;
cy.visit("/applications");
cy.openOrgOptionsPopup(newOrganizationName);
cy.contains("Leave Organization").click();
cy.contains("Are you sure").click();
cy.wait("@leaveOrgApiCall").then((httpResponse) => {
expect(httpResponse.status).to.equal(400);
});
cy.contains(newOrganizationName);
});
});
it("Non admin users can only access leave organization popup menu validation", function() {
cy.visit("/applications");
cy.createOrg();
cy.wait("@createOrg").then((interception) => {
newOrganizationName = interception.response.body.data.name;
newOrgId = interception.response.body.data.name;
cy.visit("/applications");
cy.inviteUserForOrg(
newOrganizationName,
Cypress.env("TESTUSERNAME1"),
homePage.viewerRole,
);
cy.LogOut();
cy.LogintoApp(Cypress.env("TESTUSERNAME1"), Cypress.env("TESTPASSWORD1"));
cy.visit("/applications");
cy.openOrgOptionsPopup(newOrganizationName);
cy.get(homePage.orgNamePopoverContent)
.find("a")
.should("have.length", 1)
.first()
.contains("Leave Organization");
});
});
});

View File

@ -0,0 +1,39 @@
const homePage = require("../../../../locators/HomePage.json");
describe("Organization Import Application", function() {
let orgid;
let newOrganizationName;
const fixtureDummyAppPath = "application-file.json";
it("Can Import Application", function() {
cy.NavigateToHome();
cy.generateUUID().then((uid) => {
orgid = uid;
localStorage.setItem("OrgName", orgid);
cy.createOrg();
cy.wait("@createOrg").then((createOrgInterception) => {
newOrganizationName = createOrgInterception.response.body.data.name;
cy.renameOrg(newOrganizationName, orgid);
cy.get(homePage.orgImportAppOption).click({ force: true });
cy.get(homePage.orgImportAppModal).should("be.visible");
cy.xpath(homePage.uploadLogo).attachFile(fixtureDummyAppPath);
cy.get(homePage.orgImportAppButton).click({ force: true });
cy.wait("@importNewApplication").then((interception) => {
let appId = interception.response.body.data.id;
let defaultPage = interception.response.body.data.pages.find(
(eachPage) => !!eachPage.isDefault,
);
cy.get(homePage.toastMessage).should(
"contain",
"Application imported successfully",
);
cy.url().should(
"include",
`/applications/${appId}/pages/${defaultPage.id}/edit`,
);
});
});
});
});
});

View File

@ -4,6 +4,7 @@ const homePage = require("../../../../locators/HomePage.json");
describe("Org Settings validation spec", function() {
let orgid;
let newOrganizationName;
it("create org with long name should use ellipsis validation", function() {
cy.NavigateToHome();
@ -13,15 +14,21 @@ describe("Org Settings validation spec", function() {
uid;
localStorage.setItem("OrgName", orgid);
// create org with long name
cy.createOrg(orgid);
cy.navigateToOrgSettings(orgid);
// checking parent's(<a></a>) since the child(<span>) inherits css from it
cy.get(homePage.orgHeaderName)
.parent()
.then((elem) => {
assert.isBelow(elem[0].offsetWidth, elem[0].scrollWidth);
})
.should("have.css", "text-overflow", "ellipsis");
cy.createOrg();
// stub the response and
// find app name
cy.wait("@createOrg").then((interception) => {
newOrganizationName = interception.response.body.data.name;
cy.renameOrg(newOrganizationName, orgid);
cy.navigateToOrgSettings(orgid);
// checking parent's(<a></a>) since the child(<span>) inherits css from it
cy.get(homePage.orgHeaderName)
.parent()
.then((elem) => {
assert.isBelow(elem[0].offsetWidth, elem[0].scrollWidth);
})
.should("have.css", "text-overflow", "ellipsis");
});
});
cy.LogOut();
});

View File

@ -4,21 +4,26 @@ const homePage = require("../../../../locators/HomePage.json");
describe("Check if org has user icons on homepage", function() {
let orgid;
let newOrganizationName;
it("create org and check if user icons exists in that org on homepage", function() {
cy.NavigateToHome();
cy.generateUUID().then((uid) => {
orgid = uid;
localStorage.setItem("OrgName", orgid);
cy.createOrg(orgid);
cy.get(homePage.orgList.concat(orgid).concat(")"))
.scrollIntoView()
.should("be.visible")
.within(() => {
cy.get(homePage.shareUserIcons)
.first()
.should("be.visible");
});
cy.createOrg();
cy.wait("@createOrg").then((interception) => {
newOrganizationName = interception.response.body.data.name;
cy.renameOrg(newOrganizationName, orgid);
cy.get(homePage.orgList.concat(orgid).concat(")"))
.scrollIntoView()
.should("be.visible")
.within(() => {
cy.get(homePage.shareUserIcons)
.first()
.should("be.visible");
});
});
});
cy.LogOut();
});

View File

@ -3,28 +3,40 @@
const homePage = require("../../../../locators/HomePage.json");
describe("Org name validation spec", function() {
let orgid;
let newOrganizationName;
it("create org with leading space validation", function() {
cy.NavigateToHome();
cy.get(homePage.createOrg)
.should("be.visible")
.first()
.click({ force: true });
cy.xpath(homePage.inputOrgName)
.should("be.visible")
.type(" ");
cy.get(homePage.submit).should("be.disabled");
cy.xpath(homePage.cancelBtn).click();
cy.createOrg();
cy.wait("@createOrg").then((interception) => {
newOrganizationName = interception.response.body.data.name;
cy.NavigateToHome();
cy.contains(newOrganizationName).click({ force: true });
cy.get(homePage.renameOrgInput)
.should("be.visible")
.type(" ");
cy.get(".error-message").should("be.visible");
});
});
it("creates org and checks that orgname is editable", function() {
cy.createOrg();
cy.generateUUID().then((uid) => {
orgid =
"kadjhfkjadsjkfakjdscajdsnckjadsnckadsjcnanakdjsnckjdscnakjdscnnadjkncakjdsnckjadsnckajsdfkjadshfkjsdhfjkasdhfkjasdhfjkasdhjfasdjkfhjhdsfjhdsfjhadasdfasdfadsasdf" +
uid;
// create org with long name
cy.createOrg();
cy.wait("@createOrg").then((interception) => {
newOrganizationName = interception.response.body.data.name;
cy.renameOrg(newOrganizationName, orgid);
});
});
});
it("create org with special characters validation", function() {
cy.get(homePage.createOrg)
.should("be.visible")
.first()
.click({ force: true });
cy.xpath(homePage.inputOrgName)
.should("be.visible")
.type("Test & Org");
cy.get(homePage.submit).should("be.enabled");
cy.xpath(homePage.cancelBtn).click();
cy.createOrg();
cy.wait("@createOrg").then((interception) => {
newOrganizationName = interception.response.body.data.name;
cy.renameOrg(newOrganizationName, "Test & Org");
});
});
});

View File

@ -23,7 +23,9 @@ describe("Pages", function() {
cy.get(".bp3-icon-caret-right ~ .t--entity-name:contains(Page1)").click({
multiple: true,
});
cy.get(".bp3-icon-caret-right ~ .t--entity-name:contains(APIs)").click({
cy.get(
".bp3-icon-caret-right ~ .t--entity-name:contains(Datasources)",
).click({
multiple: true,
});
cy.get(`.t--entity-name:contains(${apiName})`).should("have.length", 2);

View File

@ -10,10 +10,10 @@ describe("Check for product updates button and modal", function() {
.its("store")
.invoke("getState")
.then((state) => {
const { releaseItems, newReleasesCount } = state.ui.releases;
const { newReleasesCount, releaseItems } = state.ui.releases;
if (Array.isArray(releaseItems) && releaseItems.length > 0) {
cy.get("[data-cy=t--product-updates-btn]")
.contains(newReleasesCount)
.contains("What's New?")
.click({ force: true });
//eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(500); // modal transition

View File

@ -0,0 +1,21 @@
const dsl = require("../../../../fixtures/TextTabledsl.json");
describe("Property pane CTA to add an action", function() {
before(() => {
cy.addDsl(dsl);
});
it("Check if CTA is shown when there is no action", function() {
cy.openPropertyPane("tablewidget");
cy.get(".t--propertypane-connect-cta").should("be.visible");
});
it("Check if CTA does not exist when there is an action", function() {
cy.NavigateToAPI_Panel();
cy.CreateAPI("FirstAPI");
cy.SearchEntityandOpen("Table1");
cy.get(".t--propertypane-connect-cta").should("not.exist");
});
});

View File

@ -1,6 +1,7 @@
const datasource = require("../../../../locators/DatasourcesEditor.json");
const queryLocators = require("../../../../locators/QueryEditor.json");
const commonlocators = require("../../../../locators/commonlocators.json");
const queryEditor = require("../../../../locators/QueryEditor.json");
describe("Check datasource doc links", function() {
let postgresDatasourceName;
@ -44,7 +45,8 @@ describe("Check datasource doc links", function() {
});
it("Delete the query and datasources", function() {
cy.get(queryLocators.deleteQuery).click();
cy.get(queryEditor.queryMoreAction).click();
cy.get(queryEditor.deleteUsingContext).click();
cy.wait("@deleteAction").should(
"have.nested.property",
"response.body.responseMeta.status",

View File

@ -1,5 +1,6 @@
const datasource = require("../../../../locators/DatasourcesEditor.json");
const queryLocators = require("../../../../locators/QueryEditor.json");
const queryEditor = require("../../../../locators/QueryEditor.json");
describe("Switch datasource", function() {
let postgresDatasourceName;
@ -92,7 +93,8 @@ describe("Switch datasource", function() {
});
it("Delete the query and datasources", function() {
cy.get(queryLocators.deleteQuery).click();
cy.get(queryEditor.queryMoreAction).click();
cy.get(queryEditor.deleteUsingContext).click();
cy.wait("@deleteAction").should(
"have.nested.property",
"response.body.responseMeta.status",

View File

@ -0,0 +1,29 @@
const dsl = require("../../../../fixtures/widgetSelection.json");
describe("Widget Selection", function() {
before(() => {
cy.addDsl(dsl);
});
it("Multi Select widgets using cmd + click", function() {
cy.get(`#${dsl.dsl.children[0].widgetId}`).click({
ctrlKey: true,
});
cy.get(`#${dsl.dsl.children[1].widgetId}`).click({
ctrlKey: true,
});
cy.get(`.t--widget-propertypane-toggle`).should("have.length", 2);
cy.get(`#${dsl.dsl.children[2].widgetId}`).click({
ctrlKey: true,
});
cy.get(`.t--widget-propertypane-toggle`).should("have.length", 3);
cy.get(`#${dsl.dsl.children[0].widgetId}`).click({
ctrlKey: true,
});
cy.get(`.t--widget-propertypane-toggle`)
.not(`[style *= "background: rgb(255, 224, 210);"]`) // Excluding focused widgets.
.should("have.length", 2);
cy.get(`.t--multi-selection-box`).should("have.length", 1);
});
});

View File

@ -4,7 +4,7 @@ const dsl = require("../../../fixtures/listdsl.json");
const publishPage = require("../../../locators/publishWidgetspage.json");
describe("Container Widget Functionality", function() {
const items = JSON.parse(dsl.dsl.children[0].items);
const items = JSON.parse(dsl.dsl.children[0].listData);
before(() => {
cy.addDsl(dsl);

View File

@ -1,10 +1,14 @@
const ApiEditor = require("../../../../locators/ApiEditor.json");
const apiwidget = require("../../../../locators/apiWidgetslocator.json");
const pages = require("../../../../locators/Pages.json");
describe("Test curl import flow", function() {
it("Test curl import flow Run and Delete", function() {
localStorage.setItem("ApiPaneV2", "ApiPaneV2");
cy.NavigateToApiEditor();
cy.get(pages.integrationCreateNew)
.should("be.visible")
.click({ force: true });
cy.get(ApiEditor.curlImage).click({ force: true });
cy.get("textarea").type("curl -X GET https://mock-api.appsmith.com/users");
cy.importCurl();
@ -27,7 +31,5 @@ describe("Test curl import flow", function() {
cy.get("@deleteAction").then((response) => {
cy.expect(response.response.body.responseMeta.success).to.eq(true);
});
cy.get(ApiEditor.ApiHomePage).should("be.visible");
cy.get(ApiEditor.formActionButtons).should("not.exist");
});
});

View File

@ -14,11 +14,8 @@ describe("API Panel Test Functionality", function() {
});
it("PUT Action test API fetaure", function() {
cy.log("Login Successful");
cy.NavigateToAPI_Panel();
cy.log("Navigation to API Panel screen successful");
cy.CreateAPI("FirstAPI");
cy.log("Creation of FirstAPI Action successful");
cy.SelectAction(testdata.putAction);
cy.EnterSourceDetailsWithbody(
testdata.baseUrl,

Some files were not shown because too many files have changed in this diff Show More