Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
8efce1d
chore: Housekeeping items in List and Entity Item ADS (#38537)
hetunandu Jan 8, 2025
01a7b3d
chore: merge and merge status (#38495)
sondermanish Jan 8, 2025
5978a96
chore: update map defaults to NYC coords (#38545)
devin-ai-integration[bot] Jan 8, 2025
4662317
chore: make cyclic deps check an error (#38543)
Jan 9, 2025
c302b64
fix: Show bindings hiding behind scroll (#38553)
hetunandu Jan 9, 2025
dfd7fde
feat: datasource homepage ui redesign and search functionality for th…
Jan 9, 2025
388fd81
fix: UsagePulse initialisation flow (#38555)
hetunandu Jan 9, 2025
6446f46
fix: Updating CSS for list item to fix UI breaking on JS module insta…
ankitakinger Jan 9, 2025
ee51fbd
chore: Update upload-artifact version to v4
mohanarpit Jan 9, 2025
c155a51
chore: Separate files for Redux Types (#38559)
hetunandu Jan 10, 2025
37354bc
chore: make refName and refType transient in Artifact Metadata class …
AnaghHegde Jan 10, 2025
65df8d4
chore: Use zone as form (#38550)
jsartisan Jan 10, 2025
e12f1bc
chore: update client-build github runner (#38571)
pratapaprasanna Jan 10, 2025
1030275
fix: Added login for better flow (#38569)
sagar-qa007 Jan 10, 2025
c169d48
chore: git mod - minor fixes (#38563)
Jan 10, 2025
5a17a7f
fix: Response view not passing error to support (#38579)
hetunandu Jan 10, 2025
ca26549
feat: add setText setter to PhoneInputWidget (#38578)
devin-ai-integration[bot] Jan 10, 2025
3d97706
chore: Adding Group component in ADS Templates (#38512)
ankitakinger Jan 10, 2025
057c626
fix: SSH key dropdown scrolls with modal (#38584)
devin-ai-integration[bot] Jan 10, 2025
2dadb16
test: regression tests for import flow (#38457)
NandanAnantharamu Jan 12, 2025
8c3bcba
ci: Checking no_data with contains to avoid error (#38592)
sagar-qa007 Jan 13, 2025
1cc3899
fix: Fix copy issue in embedsetting spec (#38590)
sagar-qa007 Jan 13, 2025
635de37
test: validate 'Show Bindings' menu for queries & JS Objects in split…
shadabbuchh Jan 13, 2025
13d316d
fix: select column to display cell value when options are mismatched …
jacquesikot Jan 13, 2025
d52a0f2
test: exluding from airgap list of tests (#38596)
NandanAnantharamu Jan 13, 2025
f8784fc
feat: ADS Entity List Tree (#38493)
hetunandu Jan 13, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
52 changes: 43 additions & 9 deletions .github/workflows/ci-client-cyclic-deps-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,32 @@ jobs:
files: |
app/client/src/**

- name: Use Node.js
if: steps.changed-files.outputs.any_changed == 'true'
uses: actions/setup-node@v4
with:
node-version-file: app/client/package.json

# Globally install the npm package
- name: Install dpdm globally
if: steps.changed-files.outputs.any_changed == 'true'
run: npm install -g dpdm@3.14

# Install all the dependencies
- name: Install dependencies
if: steps.changed-files.outputs.any_changed == 'true'
run: |
yarn install --immutable

- name: Count circular dependencies on PR branch
id: count-cyclic-deps-in-pr
if: steps.changed-files.outputs.any_changed == 'true'
run: |
npx dpdm ./src/* --circular --warning=false --tree=false > pr_circular_deps.txt
pr_count=$(cat pr_circular_deps.txt | wc -l)
dpdm "./src/**/*.{js,jsx,ts,tsx}" --circular --warning=false --tree=false > pr_circular_deps.txt
# awk 'NF' pr_circular_deps.txt: Filter out empty lines from the file
# wc -l: Count the number of lines in the file
# awk '{print $1 - 1}': Subtract 1 from the count because the first line is the header 'Circular Dependencies'
pr_count="$(awk 'NF' pr_circular_deps.txt | wc -l | awk '{print $1 - 1}')"
echo "pr_count=$pr_count" >> $GITHUB_OUTPUT
cat pr_circular_deps.txt

Expand All @@ -49,22 +69,31 @@ jobs:
with:
ref: release

# Install all the dependencies
- name: Install dependencies
if: steps.changed-files.outputs.any_changed == 'true'
run: |
yarn install --immutable

- name: Count circular dependencies on release branch
id: coun-cyclic-deps-in-release
id: count-cyclic-deps-in-release
if: steps.changed-files.outputs.any_changed == 'true'
run: |
npx dpdm ./src/* --circular --warning=false --tree=false > release_circular_deps.txt
release_count=$(cat release_circular_deps.txt | wc -l)
dpdm "./src/**/*.{js,jsx,ts,tsx}" --circular --warning=false --tree=false > release_circular_deps.txt
# awk 'NF' release_circular_deps.txt: Filter out empty lines from the file
# wc -l: Count the number of lines in the file
# awk '{print $1 - 1}': Subtract 1 from the count because the first line is the header 'Circular Dependencies'
release_count="$(awk 'NF' release_circular_deps.txt | wc -l | awk '{print $1 - 1}')"
echo "release_count=$release_count" >> $GITHUB_OUTPUT
cat release_circular_deps.txt

- name: Compare circular dependencies
id: compare-deps
if: steps.changed-files.outputs.any_changed == 'true'
run: |
release_count=${{ steps.coun-cyclic-deps-in-release.outputs.release_count }}
pr_count=${{ steps.count-cyclic-deps-in-pr.outputs.pr_count }}
diff=$((pr_count - release_count))
release_count="${{ steps.count-cyclic-deps-in-release.outputs.release_count }}"
pr_count="${{ steps.count-cyclic-deps-in-pr.outputs.pr_count }}"
diff="$((pr_count - release_count))"

if [ "$diff" -gt 0 ]; then
echo "has_more_cyclic_deps=true" >> "$GITHUB_OUTPUT"
Expand All @@ -79,9 +108,14 @@ jobs:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
const prNumber = context.payload.pull_request.number;
const message = `⚠️ Cyclic Dependency Check:\n\nThis PR has increased the number of cyclic dependencies by ${{steps.compare-deps.outputs.diff}}, when compared with the release branch.\n\nRefer [this document](https://appsmith.notion.site/How-to-check-cyclic-dependencies-c47b08fe5f2f4261a3a234b19e13f2db) to identify the cyclic dependencies introduced by this PR.`;
const message = `🔴🔴🔴 Cyclic Dependency Check:\n\nThis PR has increased the number of cyclic dependencies by ${{steps.compare-deps.outputs.diff}}, when compared with the release branch.\n\nRefer [this document](https://appsmith.notion.site/How-to-check-cyclic-dependencies-c47b08fe5f2f4261a3a234b19e13f2db) to identify the cyclic dependencies introduced by this PR.`;
github.issues.createComment({
...context.repo,
issue_number: prNumber,
body: message
});

# Fail the workflow if cyclic dependencies are found
- name: Fail the workflow if cyclic dependencies are found
if: steps.compare-deps.outputs.has_more_cyclic_deps == 'true' && steps.changed-files.outputs.any_changed == 'true'
run: exit 1
3 changes: 2 additions & 1 deletion .github/workflows/ci-test-custom-script.yml
Original file line number Diff line number Diff line change
Expand Up @@ -390,11 +390,12 @@ jobs:
overwrite: true

# Upload the screenshots as artifacts if there's a failure
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: failure()
with:
name: cypress-screenshots-${{ matrix.job }}
path: ${{ github.workspace }}/app/client/cypress/screenshots/
overwrite: true

- name: Collect CI container logs
if: failure()
Expand Down
52 changes: 31 additions & 21 deletions .github/workflows/ci-test-limited-with-count.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,35 +144,47 @@ jobs:
# Step to get specs from the file or use the provided specs
- name: Get specs to run
run: |
ls -l
echo "[DEBUG] Checking inputs.specs_to_run: '${{ inputs.specs_to_run }}'"
echo "[DEBUG] Checking github.event.inputs.specs_to_run: '${{ github.event.inputs.specs_to_run }}'"

# Determine the source of the specs_to_run input
if [[ -n "${{ inputs.specs_to_run }}" ]]; then
specs_to_run="${{ inputs.specs_to_run }}" # For workflow_call
echo "[INFO] specs_to_run provided via workflow_call: $specs_to_run"
elif [[ -n "${{ github.event.inputs.specs_to_run }}" ]]; then
specs_to_run="${{ github.event.inputs.specs_to_run }}" # For workflow_dispatch
echo "[INFO] specs_to_run provided via workflow_dispatch: $specs_to_run"
else
specs_to_run=""
echo "[INFO] No specs provided. Falling back to limited-tests.txt."
fi

# Check if specs_to_run is provided; if not, use the fallback file
echo "[DEBUG] Initial specs_to_run value: $specs_to_run"
if [[ -z "$specs_to_run" || "$specs_to_run" == "no_data" ]]; then
echo "[INFO] No specs provided, falling back to limited-tests.txt file."

# Verify if the fallback file exists
if [[ ! -f app/client/cypress/limited-tests.txt ]]; then
echo "[ERROR] limited-tests.txt file not found in app/client/cypress!" >&2
exit 1
else
echo "[DEBUG] limited-tests.txt file found. Proceeding to read specs."
fi
echo "[DEBUG] Initial specs_to_run value: '$specs_to_run'"

if [[ "$specs_to_run" == *"no_data"* || -z "$specs_to_run" || "$specs_to_run" == "" ]]; then
echo "[INFO] No specs provided or 'no_data' detected, falling back to limited-tests.txt file."

# Verify if the fallback file exists
limited_tests_file="${{ github.workspace }}/app/client/cypress/limited-tests.txt"
ls -l ${{ github.workspace }}/app/client/cypress/limited-tests.txt
cat ${{ github.workspace }}/app/client/cypress/limited-tests.txt
specs_to_run=""

# Read each line of limited-tests.txt
while IFS= read -r line || [[ -n "$line" ]]; do
# Log each line being read
echo "[DEBUG] Reading line: $line"
echo "[DEBUG] Read line: '$line'"

# Skip comments and empty lines
if [[ $line =~ ^#|^\/\/ || -z $line ]]; then
echo "[DEBUG] Skipping comment/empty line: $line"
echo "[DEBUG] Skipped line: '$line'" # Indicate skipped lines
continue
else
echo "[DEBUG] Adding spec to specs_to_run: $line"
specs_to_run="$specs_to_run,$line"
fi
done < app/client/cypress/limited-tests.txt

# Add the line to specs_to_run
specs_to_run="$specs_to_run,$line"
done < ${{ github.workspace }}/app/client/cypress/limited-tests.txt

# Remove leading comma
specs_to_run=${specs_to_run#,}
Expand All @@ -187,10 +199,8 @@ jobs:
echo "[INFO] Using provided specs: $specs_to_run"
fi

# Log the final specs_to_run value before writing it to GitHub environment
# Log the final specs_to_run value
echo "[DEBUG] Setting specs_to_run to GitHub environment variable: $specs_to_run"

# Set the final specs_to_run to GitHub environment variable
echo "specs_to_run=$specs_to_run" >> $GITHUB_ENV


Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/github-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
needs:
- prelude

runs-on: ubuntu-latest-4-cores
runs-on: ubuntu-latest-8-cores

defaults:
run:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/quality-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ jobs:
client-prettier,
client-unit-tests,
client-lint,
client-check-cyclic-deps,
]
if: always()
runs-on: ubuntu-latest
Expand All @@ -116,6 +117,7 @@ jobs:
"${{ needs.client-build.result }}" == "failure" || \
"${{ needs.client-prettier.result }}" == "failure" || \
"${{ needs.client-unit-tests.result }}" == "failure" || \
"${{ needs.client-check-cyclic-deps.result }}" == "failure" || \
"${{ needs.client-lint.result }}" == "failure" ]]; then
echo "Quality checks failed";
exit 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import adminsSettings from "../../../../locators/AdminsSettings";
import {
agHelper,
adminSettings as adminSettingsHelper,
homePage,
} from "../../../../support/Objects/ObjectsCore";

const {
Expand Down Expand Up @@ -210,7 +211,9 @@ describe("Admin settings page", { tags: ["@tag.Settings"] }, function () {
"11. Verify all admin setting sections are accessible",
{ tags: ["@tag.excludeForAirgap"] },
() => {
cy.visit("/applications", { timeout: 60000 });
homePage.LogOutviaAPI();
cy.LoginFromAPI(Cypress.env("USERNAME"), Cypress.env("PASSWORD"));
agHelper.VisitNAssert("/applications", "getAllWorkspaces");
agHelper.GetNClick(adminSettingsHelper._adminSettingsBtn);
cy.wait("@getEnvVariables");
agHelper.GetNClick(adminsSettings.generalTab);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ describe("Embed settings options", { tags: ["@tag.Settings"] }, function () {
);
};

let clipboardData;

function ValidateEditModeSetting(setting) {
_.deployMode.NavigateBacktoEditor();
_.embedSettings.OpenEmbedSettings();
Expand All @@ -31,6 +33,7 @@ describe("Embed settings options", { tags: ["@tag.Settings"] }, function () {
}

before(() => {
_.agHelper.GiveChromeCopyPermission();
_.homePage.NavigateToHome();
_.homePage.CreateNewApplication();
_.entityExplorer.DragDropWidgetNVerify(_.draggableWidgets.IFRAME);
Expand All @@ -48,9 +51,22 @@ describe("Embed settings options", { tags: ["@tag.Settings"] }, function () {
.click()
.wait(1000);
_.agHelper.ClickButton("Copy application url");

cy.window().then((win) => {
cy.stub(win.navigator.clipboard, "writeText").as("deployUrl").resolves();
new Cypress.Promise((resolve, reject) => {
win.navigator.clipboard.readText().then(resolve).catch(reject);
}).then((text) => {
clipboardData = text; // Store the clipboard content in a variable
cy.log(`Clipboard Content: ${clipboardData}`); // Log clipboard content
expect(clipboardData).to.equal("Expected clipboard text"); // Add assertions if needed
});
});

// Log clipboard data after it's been set
cy.then(() => {
cy.log(`Stored Clipboard Data: ${clipboardData}`);
});

cy.enablePublicAccess();
cy.wait(8000); //adding wait time for iframe to load fully!
_.agHelper.RefreshPage();
Expand All @@ -67,10 +83,8 @@ describe("Embed settings options", { tags: ["@tag.Settings"] }, function () {
cy.get(adminSettings.saveButton).click();
cy.waitForServerRestart();
_.agHelper.Sleep(2000);
cy.get("@deployUrl").then((depUrl) => {
cy.log("deployUrl is " + depUrl);
cy.visit(depUrl, { timeout: 60000 });
});

cy.visit(clipboardData, { timeout: 60000 });
getIframeBody().contains("Submit").should("exist");
ValidateEditModeSetting(_.embedSettings.locators._restrictedText);
// });
Expand All @@ -84,10 +98,7 @@ describe("Embed settings options", { tags: ["@tag.Settings"] }, function () {
cy.get(adminSettings.saveButton).click();
cy.waitForServerRestart();
_.agHelper.Sleep(2000);
cy.get("@deployUrl").then((depUrl) => {
cy.log("deployUrl is " + depUrl);
cy.visit(depUrl, { timeout: 60000 });
});
cy.visit(clipboardData, { timeout: 60000 });
getIframeBody().contains("Submit").should("exist");
ValidateEditModeSetting(_.embedSettings.locators._allowAllText);
// });
Expand All @@ -98,13 +109,11 @@ describe("Embed settings options", { tags: ["@tag.Settings"] }, function () {
cy.get(".t--admin-settings-APPSMITH_ALLOWED_FRAME_ANCESTORS").within(() => {
cy.get("input").last().click();
});

cy.get(adminSettings.saveButton).click();
cy.waitForServerRestart();
_.agHelper.Sleep(2000);
cy.get("@deployUrl").then((depUrl) => {
cy.log("deployUrl is " + depUrl);
cy.visit(depUrl, { timeout: 60000 });
});
cy.visit(clipboardData, { timeout: 60000 });
getIframeBody().contains("Submit").should("not.exist");

ValidateEditModeSetting(_.embedSettings.locators._disabledText);
Expand Down
Loading