diff --git a/.github/workflows/build-client-server-count.yml b/.github/workflows/build-client-server-count.yml index c15a92947b0..0b78fa2dbda 100644 --- a/.github/workflows/build-client-server-count.yml +++ b/.github/workflows/build-client-server-count.yml @@ -17,6 +17,8 @@ jobs: matrix_count: ${{steps.matrix.outputs.matrix_count}} run_count: ${{ steps.countArgs.outputs.run_count }} is-pg-build: ${{steps.args.outputs.is-pg-build}} + update_snapshot: ${{steps.args.outputs.update_snapshot}} + specs_to_run: ${{steps.args.outputs.specs_to_run}} steps: - name: Checkout the head commit of the branch uses: actions/checkout@v4 @@ -38,6 +40,21 @@ jobs: runId=$((checkArg + 0)) echo "runId=$runId" >> $GITHUB_OUTPUT fi + + # Check for update_snapshot + checkArg=${{ github.event.client_payload.slash_command.args.named.update_snapshot }} + if [[ -z "$checkArg" ]]; then + echo "update_snapshot=false" >> $GITHUB_OUTPUT + else + echo "update_snapshot=$checkArg" >> $GITHUB_OUTPUT + fi + # Check for spec file + checkArg=${{ github.event.client_payload.slash_command.args.named.specs_to_run }} + if [[ -z "$checkArg" ]]; then + echo "specs_to_run=''" >> $GITHUB_OUTPUT + else + echo "specs_to_run=$checkArg" >> $GITHUB_OUTPUT + fi - name: Set run count id: countArgs @@ -97,7 +114,7 @@ jobs: body: | Tests running at: <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}>. [Cypress dashboard](https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=${{ github.run_id }}&attempt=${{ github.run_attempt }}&selectiontype=test&testsstatus=failed&specsstatus=fail) - PR: #${{ fromJson(steps.args.outputs.pr) }}. + PR: #${{ fromJson(steps.args.outputs.pr) }} with spec: ${{steps.args.outputs.specs_to_run}} . server-build: name: server-build @@ -149,6 +166,8 @@ jobs: with: pr: ${{fromJson(needs.file-check.outputs.pr)}} run_count: ${{fromJson(needs.file-check.outputs.run_count)}} + update_snapshot: ${{fromJson(needs.file-check.outputs.update_snapshot)}} + specs_to_run: ${{needs.file-check.outputs.specs_to_run}} ci-test-limited-existing-docker-image: @@ -162,6 +181,8 @@ jobs: pr: ${{fromJson(needs.file-check.outputs.pr)}} previous-workflow-run-id: ${{ fromJson(needs.file-check.outputs.runId) }} run_count: ${{fromJson(needs.file-check.outputs.run_count)}} + update_snapshot: ${{fromJson(needs.file-check.outputs.update_snapshot)}} + specs_to_run: ${{needs.file-check.outputs.specs_to_run}} ci-test-limited-result: needs: [file-check, ci-test-limited] diff --git a/.github/workflows/ci-test-limited-with-count.yml b/.github/workflows/ci-test-limited-with-count.yml index f987d90e0e0..7179819b2fd 100644 --- a/.github/workflows/ci-test-limited-with-count.yml +++ b/.github/workflows/ci-test-limited-with-count.yml @@ -19,6 +19,16 @@ on: required: false type: number default: 1 + update_snapshot: + description: 'Give option to update snapshot (true/false)' + required: false + type: boolean + default: false + specs_to_run: + description: 'Cypress spec file(s) to run' + required: false + type: string + workflow_call: inputs: pr: @@ -35,6 +45,15 @@ on: required: false type: number default: 1 + update_snapshot: + description: 'Give option to update snapshot (true/false)' + required: false + type: boolean + default: false + specs_to_run: + description: 'Cypress spec file(s) to run' + required: false + type: string jobs: ci-test-limited: @@ -111,10 +130,18 @@ jobs: else echo "rerun=false" >> $GITHUB_OUTPUT fi + + - name: Upload existing snapshot data + if: always() + uses: actions/upload-artifact@v4 + with: + name: cypress-existing-compare-snapshots + path: ${{ github.workspace }}/app/client/cypress/snapshots + overwrite: true # Get specs to run - name: Get specs to run - if: steps.run_result.outputs.run_result != 'success' && steps.run_result.outputs.run_result != 'failedtest' + if: ${{ (inputs.specs_to_run == '' || inputs.specs_to_run == null) && steps.run_result.outputs.run_result != 'success' && steps.run_result.outputs.run_result != 'failedtest' }} run: | specs_to_run="" while IFS= read -r line @@ -349,10 +376,19 @@ jobs: NODE_ENV: development run: | cd app/client - npx cypress-repeat-pro run -n ${{ inputs.run_count }} --force \ - --spec ${{ env.specs_to_run }} \ + if [[ "${{ inputs.update_snapshot }}" == "true" ]]; then + echo "Running Cypress with snapshot updates..." + CYPRESS_updateSnapshots=true npx cypress-repeat-pro run -n "${{ inputs.run_count }}" --force \ + --spec "${{ inputs.specs_to_run }}" \ --config-file "cypress_ci_custom.config.ts" \ - --browser ${{ env.BROWSER_PATH }} + --browser "${{ env.BROWSER_PATH }}" + else + echo "Running Cypress tests without snapshot updates..." + npx cypress-repeat-pro run -n "${{ inputs.run_count }}" --force \ + --spec "${{ env.specs_to_run }}" \ + --config-file "cypress_ci_custom.config.ts" \ + --browser "${{ env.BROWSER_PATH }}" + fi cat cy-repeat-summary.txt # Define the path for the failure flag file FAILURE_FLAG_FILE="ci_test_status.txt" @@ -453,9 +489,17 @@ jobs: if: always() with: name: server-logs - path: app/server/server-logs.log + path: ${{ github.workspace }}/app/server/server-logs.log overwrite: true + - name: Upload new compared snapshot data + if: always() + uses: actions/upload-artifact@v4 + with: + name: cypress-new-compare-snapshots + path: ${{ github.workspace }}/app/client/cypress/snapshots + overwrite: true + # Set status = success - name: Save the status of the run run: | diff --git a/.github/workflows/ci-test-limited.yml b/.github/workflows/ci-test-limited.yml index 5461d5469f3..e6be6dcdaf8 100644 --- a/.github/workflows/ci-test-limited.yml +++ b/.github/workflows/ci-test-limited.yml @@ -418,7 +418,7 @@ jobs: if: failure() with: name: server-logs - path: app/server/server-logs.log + path: ${{ github.workspace }}/app/server/server-logs.log overwrite: true # Set status = success diff --git a/app/client/cypress/support/Pages/EditorNavigation.ts b/app/client/cypress/support/Pages/EditorNavigation.ts index b175499aab3..971b607b196 100644 --- a/app/client/cypress/support/Pages/EditorNavigation.ts +++ b/app/client/cypress/support/Pages/EditorNavigation.ts @@ -6,11 +6,12 @@ import { LeftPane } from "./IDE/LeftPane"; import PageList from "./PageList"; export enum AppSidebarButton { - Data = "Data", + Data = "Datasources", Editor = "Editor", Libraries = "Libraries", Settings = "Settings", } + export const AppSidebar = new Sidebar(Object.values(AppSidebarButton)); export enum PagePaneSegment { @@ -42,6 +43,7 @@ export enum EntityType { JSObject = "JSObject", Page = "Page", } + class EditorNavigation { public locators = { MaximizeBtn: "[data-testid='t--ide-maximize']", diff --git a/app/client/cypress/support/Pages/IDE/Sidebar.ts b/app/client/cypress/support/Pages/IDE/Sidebar.ts index 00a75a1c7ca..6d9d93c125f 100644 --- a/app/client/cypress/support/Pages/IDE/Sidebar.ts +++ b/app/client/cypress/support/Pages/IDE/Sidebar.ts @@ -2,7 +2,7 @@ export class Sidebar { buttons: string[]; locators = { sidebar: ".t--sidebar", - sidebarButton: (name: string) => `.t--sidebar-${name}`, + sidebarButton: (name: string) => `[data-testid='t--sidebar-${name}']`, }; constructor(buttons: string[]) { diff --git a/app/client/package.json b/app/client/package.json index 02bd681ec3f..7330ec7e966 100644 --- a/app/client/package.json +++ b/app/client/package.json @@ -88,6 +88,7 @@ "@redux-saga/core": "1.1.3", "@redux-saga/types": "1.2.1", "@reduxjs/toolkit": "^2.4.0", + "@segment/analytics-next": "^1.76.0", "@sentry/react": "^6.2.4", "@shared/ast": "workspace:^", "@shared/dsl": "workspace:^", diff --git a/app/client/packages/design-system/ads/src/SegmentedControl/SegmentedControl.styles.tsx b/app/client/packages/design-system/ads/src/SegmentedControl/SegmentedControl.styles.tsx index a93f7aa7fc9..df71f94da91 100644 --- a/app/client/packages/design-system/ads/src/SegmentedControl/SegmentedControl.styles.tsx +++ b/app/client/packages/design-system/ads/src/SegmentedControl/SegmentedControl.styles.tsx @@ -41,6 +41,12 @@ export const StyledSegment = styled.span` & > * { color: var(--ads-v2-colors-control-segment-value-default-fg); } + + &[data-selected="true"] { + span { + font-weight: var(--ads-v2-font-weight-bold); + } + } `; export const StyledControlContainer = styled.div` @@ -81,6 +87,7 @@ export const StyledControlContainer = styled.div` /* Select all segments which is not a selected and last child */ /* seperator */ + &:not(:hover):not(:last-child):not([data-selected="true"]):not( :has(+ [data-selected="true"]) ):after { diff --git a/app/client/packages/design-system/ads/src/__assets__/icons/ads/dashboard-line.svg b/app/client/packages/design-system/ads/src/__assets__/icons/ads/dashboard-line.svg index c0a187a04d2..cadb8135591 100644 --- a/app/client/packages/design-system/ads/src/__assets__/icons/ads/dashboard-line.svg +++ b/app/client/packages/design-system/ads/src/__assets__/icons/ads/dashboard-line.svg @@ -1,3 +1,6 @@ - - + + + diff --git a/app/client/public/index.html b/app/client/public/index.html index 1bd179b00a0..dc9ca3ddc49 100755 --- a/app/client/public/index.html +++ b/app/client/public/index.html @@ -39,7 +39,6 @@ return result; }; const CLOUD_HOSTING = parseConfig('{{env "APPSMITH_CLOUD_HOSTING"}}'); - const ZIPY_KEY = parseConfig('{{env "APPSMITH_ZIPY_SDK_KEY"}}'); const AIRGAPPED = parseConfig('{{env "APPSMITH_AIRGAP_ENABLED"}}'); const REO_CLIENT_ID = parseConfig('{{env "APPSMITH_REO_CLIENT_ID"}}'); @@ -64,21 +63,6 @@ })() %> - {integration.name} + + {integration.name} + + + {getTagText(!isFreePlanInstance)} + + + + ))} + + + setSelectedIntegration("")} + integrationName={selectedIntegration} + /> + + + + ); +} diff --git a/app/client/src/pages/Editor/IntegrationEditor/RequestNewIntegration/form.tsx b/app/client/src/pages/Editor/IntegrationEditor/RequestNewIntegration/form.tsx index d2585f0d599..13e144775cd 100644 --- a/app/client/src/pages/Editor/IntegrationEditor/RequestNewIntegration/form.tsx +++ b/app/client/src/pages/Editor/IntegrationEditor/RequestNewIntegration/form.tsx @@ -41,6 +41,7 @@ const RequestIntegrationForm = (props: RequestIntegrationFormProps) => { { ); } - if (!values.email || !isEmail(values.email)) { + if (values.email && !isEmail(values.email)) { errors.email = createMessage( REQUEST_NEW_INTEGRATIONS.REQUEST_MODAL_EMAIL.ERROR, ); diff --git a/app/client/src/pages/Editor/IntegrationEditor/RequestNewIntegration/index.tsx b/app/client/src/pages/Editor/IntegrationEditor/RequestNewIntegration/index.tsx index 0154902442b..8d432635c26 100644 --- a/app/client/src/pages/Editor/IntegrationEditor/RequestNewIntegration/index.tsx +++ b/app/client/src/pages/Editor/IntegrationEditor/RequestNewIntegration/index.tsx @@ -5,6 +5,7 @@ import { ModalContent, ModalHeader, ModalTrigger, + Text, } from "@appsmith/ads"; import { createMessage, REQUEST_NEW_INTEGRATIONS } from "ee/constants/messages"; import React, { useState, type ReactNode } from "react"; @@ -42,8 +43,10 @@ function RequestModal({ children }: { children: ReactNode }) { export default function RequestNewIntegration() { return ( - -

{createMessage(REQUEST_NEW_INTEGRATIONS.UNABLE_TO_FIND)}

+ + + {createMessage(REQUEST_NEW_INTEGRATIONS.UNABLE_TO_FIND)} +