Skip to content

Commit

Permalink
Merge release
Browse files Browse the repository at this point in the history
  • Loading branch information
sharat87 committed Jul 21, 2023
2 parents 70e7236 + 75b2972 commit d2a5404
Show file tree
Hide file tree
Showing 196 changed files with 3,705 additions and 1,354 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci-test-custom-script.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ jobs:
if: steps.run_result.outputs.run_result == 'failedtest'
uses: actions/download-artifact@v3
with:
name: failed_spec_ci
name: failed-spec-ci
path: ~/failed_spec_ci

# failed_spec_env will contain list of all failed specs
Expand Down Expand Up @@ -411,7 +411,7 @@ jobs:
if: always()
uses: actions/upload-artifact@v3
with:
name: failed_spec_ci
name: failed-spec-ci
path: ~/failed_spec_ci

# Force store previous run result to cache
Expand Down
49 changes: 5 additions & 44 deletions .github/workflows/client-prettier.yml
Original file line number Diff line number Diff line change
@@ -1,66 +1,33 @@
name: Client Prettier
name: Client Prettier Check

on:
# This line enables manual triggering of this workflow.
workflow_dispatch:
workflow_call:
inputs:
pr:
description: "This is the PR number in case the workflow is being called in a pull request"
required: false
type: number
skip-tests:
description: "This is a boolean value in case the workflow is being called in build deploy-preview"
required: false
type: string
default: "false"

pull_request:
branches: [release, master]
paths:
- "app/client/**"
- "!app/client/cypress/manual_TestSuite/**"

# Change the working directory for all the jobs in this workflow
defaults:
run:
working-directory: app/client

jobs:
build:
runs-on: ubuntu-latest-8-cores
# Only run this workflow for internally triggered events
if: |
github.event.pull_request.head.repo.full_name == github.repository ||
github.event_name == 'push' ||
github.event_name == 'workflow_dispatch' ||
github.event_name == 'repository_dispatch'
prettier-check:
runs-on: ubuntu-latest
defaults:
run:
working-directory: app/client
shell: bash

steps:
# The checkout steps MUST happen first because the default directory is set according to the code base.
# GitHub Action expects all future commands to be executed in the code directory. Hence, we need to check out
# the code before doing anything else.

# Check out merge commit with the base branch in case this workflow is invoked via pull request
- name: Checkout the merged commit from PR and base branch
if: inputs.pr != 0
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: refs/pull/${{ inputs.pr }}/merge

# Checkout the code in the current branch in case the workflow is called because of a branch push event
- name: Checkout the head commit of the branch
if: inputs.pr == 0

uses: actions/checkout@v3
with:
fetch-depth: 0

# In case this is second attempt try restoring status of the prior attempt from cache
- name: Restore the previous run result
uses: actions/cache@v3
Expand Down Expand Up @@ -93,8 +60,7 @@ jobs:
with:
path: app/client/.yarn/cache
key: v1-yarn3-${{ hashFiles('app/client/yarn.lock') }}
restore-keys: |
v1-yarn3-
restore-keys: v1-yarn3-

# Install all the dependencies
- name: Install dependencies
Expand All @@ -112,9 +78,4 @@ jobs:
with:
path: app/client/.yarn/cache
key: v1-yarn3-${{ hashFiles('app/client/yarn.lock') }}
restore-keys: |
v1-yarn3-
# Set status = success
- name: Save the status of the run
run: echo "run_result=success" >> $GITHUB_OUTPUT > ~/run_result
restore-keys: v1-yarn3-
64 changes: 64 additions & 0 deletions .github/workflows/formatting-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Formatting checks

on:
pull_request:
branches: [release, master]

jobs:
path-filter:
runs-on: ubuntu-latest
outputs:
server: ${{ steps.filter.outputs.server }}
client: ${{ steps.filter.outputs.client }}
steps:
# Check out merge commit with the base branch in case this workflow is invoked via pull request
- name: Checkout the merged commit from PR and base branch
uses: actions/checkout@v3
with:
ref: refs/pull/${{ github.event.pull_request.number }}/merge

- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
server:
- 'app/server/**'
client:
- 'app/client/**'
server-formatting:
name: server-formatting
needs: path-filter
if: needs.path-filter.outputs.server == 'true'
uses: ./.github/workflows/server-spotless.yml
secrets: inherit
with:
pr: ${{ github.event.pull_request.number }}

client-formatting:
name: client-formatting
needs: path-filter
if: needs.path-filter.outputs.client == 'true'
uses: ./.github/workflows/client-prettier.yml
secrets: inherit
with:
pr: ${{ github.event.pull_request.number }}

formatting-result:
name: formatting-result
needs: [server-formatting, client-formatting]
if: always()
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- name: Return status for formatting checks
run: |
if [[ "${{ needs.server-formatting.result }}" == "failure" || "${{ needs.client-formatting.result }}" == "failure" ]]; then
echo "Formatting checks failed";
exit 1;
else
echo "Formatting checks successful";
exit 0;
fi
36 changes: 36 additions & 0 deletions .github/workflows/server-spotless.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# This workflow is responsible for running Spotless check on server code base
name: Server Spotless Check

on:
workflow_call:
inputs:
pr:
description: "This is the PR number in case the workflow is being called in a pull request"
required: false
type: number

# Change the working directory for all the jobs in this workflow
defaults:
run:
working-directory: app/server

jobs:
spotless-check:
runs-on: ubuntu-latest
steps:
# Check out merge commit with the base branch in case this workflow is invoked via pull request
- name: Checkout the merged commit from PR and base branch
uses: actions/checkout@v3
with:
ref: refs/pull/${{ inputs.pr }}/merge

# Setup Java
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'

# Run maven step for spotless check
- name: Run spotless check
run: mvn spotless:check
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,17 +184,17 @@ Lets build great software together.
[![SatishGandham](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/441914?v=4&w=50&h=50&mask=circle)](https://github.com/SatishGandham)
[![rahulramesha](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/71900764?v=4&w=50&h=50&mask=circle)](https://github.com/rahulramesha)
[![prsidhu](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/5424788?v=4&w=50&h=50&mask=circle)](https://github.com/prsidhu)
[![yatinappsmith](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/84702014?v=4&w=50&h=50&mask=circle)](https://github.com/yatinappsmith)
[![sarojsarab](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/43822041?v=4&w=50&h=50&mask=circle)](https://github.com/sarojsarab)
[![yatinappsmith](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/84702014?v=4&w=50&h=50&mask=circle)](https://github.com/yatinappsmith)
[![somangshu](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/11089579?v=4&w=50&h=50&mask=circle)](https://github.com/somangshu)
[![ApekshaBhosale](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/7846888?v=4&w=50&h=50&mask=circle)](https://github.com/ApekshaBhosale)
[![pranavkanade](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/13262095?v=4&w=50&h=50&mask=circle)](https://github.com/pranavkanade)
[![AmanAgarwal041](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/7565635?v=4&w=50&h=50&mask=circle)](https://github.com/AmanAgarwal041)
[![Parthvi12](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/80334441?v=4&w=50&h=50&mask=circle)](https://github.com/Parthvi12)
[![albinAppsmith](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/87797149?v=4&w=50&h=50&mask=circle)](https://github.com/albinAppsmith)
[![marks0351](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/35134347?v=4&w=50&h=50&mask=circle)](https://github.com/marks0351)
[![ayushpahwa](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/8526215?v=4&w=50&h=50&mask=circle)](https://github.com/ayushpahwa)
[![berzerkeer](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/74818788?v=4&w=50&h=50&mask=circle)](https://github.com/berzerkeer)
[![ayushpahwa](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/8526215?v=4&w=50&h=50&mask=circle)](https://github.com/ayushpahwa)
[![sneha122](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/30018882?v=4&w=50&h=50&mask=circle)](https://github.com/sneha122)
[![ashit-rath](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/88306433?v=4&w=50&h=50&mask=circle)](https://github.com/ashit-rath)
[![keyurparalkar](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/14138515?v=4&w=50&h=50&mask=circle)](https://github.com/keyurparalkar)
Expand All @@ -205,11 +205,11 @@ Lets build great software together.
[![ChandanBalajiBP](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/104058110?v=4&w=50&h=50&mask=circle)](https://github.com/ChandanBalajiBP)
[![nsarupr](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/20905988?v=4&w=50&h=50&mask=circle)](https://github.com/nsarupr)
[![sum35h](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/20785806?v=4&w=50&h=50&mask=circle)](https://github.com/sum35h)
[![dhruvikn](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/22471214?v=4&w=50&h=50&mask=circle)](https://github.com/dhruvikn)
[![sondermanish](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/107841575?v=4&w=50&h=50&mask=circle)](https://github.com/sondermanish)
[![dhruvikn](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/22471214?v=4&w=50&h=50&mask=circle)](https://github.com/dhruvikn)
[![NilanshBansal](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/25542733?v=4&w=50&h=50&mask=circle)](https://github.com/NilanshBansal)
[![megaconfidence](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/17744578?v=4&w=50&h=50&mask=circle)](https://github.com/megaconfidence)
[![tanvibhakta](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/13763558?v=4&w=50&h=50&mask=circle)](https://github.com/tanvibhakta)
[![NilanshBansal](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/25542733?v=4&w=50&h=50&mask=circle)](https://github.com/NilanshBansal)
[![rajatagrawal](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/1189106?v=4&w=50&h=50&mask=circle)](https://github.com/rajatagrawal)
[![subrata71](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/3524599?v=4&w=50&h=50&mask=circle)](https://github.com/subrata71)
[![Druthi](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/20187542?v=4&w=50&h=50&mask=circle)](https://github.com/Druthi)
Expand All @@ -235,13 +235,13 @@ Lets build great software together.
[![tejasahluwalia](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/39881648?v=4&w=50&h=50&mask=circle)](https://github.com/tejasahluwalia)
[![dilippitchika](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/19730984?v=4&w=50&h=50&mask=circle)](https://github.com/dilippitchika)
[![sharanya-appsmith](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/135708039?v=4&w=50&h=50&mask=circle)](https://github.com/sharanya-appsmith)
[![srix](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/5801636?v=4&w=50&h=50&mask=circle)](https://github.com/srix)
[![nerbos](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/121891?v=4&w=50&h=50&mask=circle)](https://github.com/nerbos)
[![hiteshjoshi](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/217911?v=4&w=50&h=50&mask=circle)](https://github.com/hiteshjoshi)
[![rlnorthcutt](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/673633?v=4&w=50&h=50&mask=circle)](https://github.com/rlnorthcutt)
[![kevinblanco](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/1458238?v=4&w=50&h=50&mask=circle)](https://github.com/kevinblanco)
[![tomjose92](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/5265702?v=4&w=50&h=50&mask=circle)](https://github.com/tomjose92)
[![andreevanatasha](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/5361618?v=4&w=50&h=50&mask=circle)](https://github.com/andreevanatasha)
[![srix](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/5801636?v=4&w=50&h=50&mask=circle)](https://github.com/srix)
[![LagunaElectric](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/6085143?v=4&w=50&h=50&mask=circle)](https://github.com/LagunaElectric)
[![sw4ti493](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/8166029?v=4&w=50&h=50&mask=circle)](https://github.com/sw4ti493)
[![ginilpg](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/8299030?v=4&w=50&h=50&mask=circle)](https://github.com/ginilpg)
Expand Down
5 changes: 4 additions & 1 deletion app/client/cypress/e2e/Regression/Apps/PromisesApp_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ describe("JSEditor tests", function () {
});

it("1. Testing promises with resetWidget, storeValue action and API call", () => {
apiPage.CreateAndFillApi(tedTestConfig.mockApiUrl, "TC1api");
apiPage.CreateAndFillApi(
tedTestConfig.dsValues[tedTestConfig.defaultEnviorment].mockApiUrl,
"TC1api",
);
apiPage.RunAPI();
jsEditor.CreateJSObject(
`export default {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,9 @@ describe("Autocomplete tests", () => {
});

it("5. Api data with array of object autocompletion test", () => {
apiPage.CreateAndFillApi(tedTestConfig.mockApiUrl);
apiPage.CreateAndFillApi(
tedTestConfig.dsValues[tedTestConfig.defaultEnviorment].mockApiUrl,
);
agHelper.Sleep(2000);
apiPage.RunAPI();
// Using same js object
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ describe("Validate JSObj binding to Table widget", () => {
});

it("1. Add users api and bind to JSObject", () => {
_.apiPage.CreateAndFillApi(_.tedTestConfig.mockApiUrl);
_.apiPage.CreateAndFillApi(
_.tedTestConfig.dsValues[_.tedTestConfig.defaultEnviorment].mockApiUrl,
);
_.apiPage.RunAPI();
_.agHelper.GetNClick(_.dataSources._queryResponse("JSON"));
_.apiPage.ReadApiResponsebyKey("name");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ describe("Test Create Api and Bind to Table widget", function () {
cy.executeDbQuery("Api2", "onPageChange");
});

it("5. Table-Text, Validate Server Side Pagination of Paginate with response URL", function () {
it.skip("5. Table-Text, Validate Server Side Pagination of Paginate with response URL", function () {
/**Validate Response data with Table data in Text Widget */
entityExplorer.SelectEntityByName("Table1", "Widgets");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ describe("Test Create Api and Bind to Table widget", function () {
cy.executeDbQuery("Api2", "onPageChange");
});

it("5. Table-Text, Validate Server Side Pagination of Paginate with Response URL", function () {
it.skip("5. Table-Text, Validate Server Side Pagination of Paginate with Response URL", function () {
/**Validate Response data with Table data in Text Widget */
cy.get("body").then(($ele) => {
if ($ele.find(locators._backToEditor).length) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ describe("API Bugs", function () {
agHelper.RefreshPage();
});
it("1. Bug 14037: User gets an error even when table widget is added from the API page successfully", function () {
apiPage.CreateAndFillApi(tedTestConfig.mockApiUrl, "Api1");
apiPage.CreateAndFillApi(
tedTestConfig.dsValues[tedTestConfig.defaultEnviorment].mockApiUrl,
"Api1",
);
apiPage.RunAPI();

dataSources.AddSuggesstedWidget(Widgets.Table);
Expand Down Expand Up @@ -54,7 +57,7 @@ describe("API Bugs", function () {

it("3. Bug 18876 Ensures application does not crash when saving datasource", () => {
apiPage.CreateAndFillApi(
tedTestConfig.mockApiUrl,
tedTestConfig.dsValues[tedTestConfig.defaultEnviorment].mockApiUrl,
"FirstAPI",
10000,
"POST",
Expand All @@ -70,11 +73,11 @@ describe("API Bugs", function () {
});

it("4. Bug 16683, When Api url has dynamic binding expressions, ensures the query params is not truncated", function () {
const apiUrl = `https://echo.hoppscotch.io/v6/deployments?limit=4{{Math.random() > 0.5 ? '&param1=5' : '&param2=6'}}`;
const apiUrl = `http://host.docker.internal:5001/v1/mock-api?records=4{{Math.random() > 0.5 ? '&param1=5' : '&param2=6'}}`;

apiPage.CreateAndFillApi(apiUrl, "BindingExpressions");
apiPage.ValidateQueryParams({
key: "limit",
key: "records",
value: "4{{Math.random() > 0.5 ? '&param1=5' : '&param2=6'}}",
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ describe("JS data update on button click", function () {
});

it("1. Populates js function data when triggered via button click", function () {
apiPage.CreateAndFillApi(tedTestConfig.mockApiUrl, "Api1");
apiPage.CreateAndFillApi(
tedTestConfig.dsValues[tedTestConfig.defaultEnviorment].mockApiUrl,
"Api1",
);

const jsObjectString = `export default {
myVar1: [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@ describe("Binding Expressions should not be truncated in Url and path extraction
shouldCreateNewJSObj: true,
});

_.apiPage.CreateAndFillGraphqlApi(_.tedTestConfig.GraphqlApiUrl_TED);
_.apiPage.CreateAndFillGraphqlApi(
_.tedTestConfig.dsValues[_.tedTestConfig.defaultEnviorment]
.GraphqlApiUrl_TED,
);
_.dataSources.UpdateGraphqlQueryAndVariable({
query: GRAPHQL_LIMIT_QUERY,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ describe(
//Create any other datasource, click on back button, discard popup should contain save
dataSources.NavigateToDSCreateNew();
dataSources.CreatePlugIn("PostgreSQL");
// Need to add values since without that, going back won't show any popup
dataSources.FillPostgresDSForm();
agHelper.GoBack();
agHelper.AssertContains(
"Save",
Expand All @@ -33,6 +35,7 @@ describe(
dataSources.NavigateToDSCreateNew();
dataSources.CreatePlugIn("S3");
dataSources.TestDatasource(false);
dataSources.FillS3DSForm();
dataSources.SaveDSFromDialog(false);
});
},
Expand Down
Loading

0 comments on commit d2a5404

Please sign in to comment.