diff --git a/.coderabbit.yaml b/.coderabbit.yaml index 308553066b61..12abe96745f8 100644 --- a/.coderabbit.yaml +++ b/.coderabbit.yaml @@ -1,7 +1,7 @@ # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json language: "en-US" early_access: false -tone_instructions: 'You must talk like teacher.' +tone_instructions: 'You are an expert code reviewer in Java, TypeScript, JavaScript, and NodeJS. You work in an enterprise software developer team, providing concise and clear code review advice.You only elaborate or provide detailed explanations when requested.' reviews: profile: "chill" request_changes_workflow: false @@ -12,6 +12,7 @@ reviews: auto_review: enabled: true drafts: false + base_branches: ["pg", "release"] path_instructions: - path: "app/client/cypress/**/**.*" instructions: | @@ -34,4 +35,4 @@ reviews: - Do not use duplicate filenames even with different paths. - Avoid using agHelper.Sleep, this.Sleep in any file in code. chat: - auto_reply: true \ No newline at end of file + auto_reply: true diff --git a/.github/config.json b/.github/config.json index 7117d4ab6143..1e541bd76b49 100644 --- a/.github/config.json +++ b/.github/config.json @@ -1 +1 @@ -{"runners":[{"versioning":{"source":"milestones","type":"SemVer"},"prereleaseName":"alpha","issue":{"labels":{"Widgets Product":{"conditions":[{"label":"Button Widget","type":"hasLabel","value":true},{"label":"Chart Widget","type":"hasLabel","value":true},{"label":"Container Widget","type":"hasLabel","value":true},{"label":"Date Picker Widget","type":"hasLabel","value":true},{"label":"Select Widget","type":"hasLabel","value":true},{"label":"File Picker Widget","type":"hasLabel","value":true},{"label":"Form Widget","type":"hasLabel","value":true},{"label":"Image Widget","type":"hasLabel","value":true},{"label":"Input Widget","type":"hasLabel","value":true},{"label":"List Widget","type":"hasLabel","value":true},{"label":"MultiSelect Widget","type":"hasLabel","value":true},{"label":"Map Widget","type":"hasLabel","value":true},{"label":"Modal Widget","type":"hasLabel","value":true},{"label":"Radio Widget","type":"hasLabel","value":true},{"label":"Rich Text Editor Widget","type":"hasLabel","value":true},{"label":"Tab Widget","type":"hasLabel","value":true},{"label":"Table Widget","type":"hasLabel","value":true},{"label":"Text Widget","type":"hasLabel","value":true},{"label":"Video Widget","type":"hasLabel","value":true},{"label":"iFrame","type":"hasLabel","value":true},{"label":"Menu Button","type":"hasLabel","value":true},{"label":"Rating","type":"hasLabel","value":true},{"label":"Widget Validation","type":"hasLabel","value":true},{"label":"New Widget","type":"hasLabel","value":true},{"label":"Switch widget","type":"hasLabel","value":true},{"label":"Audio Widget","type":"hasLabel","value":true},{"label":"Icon Button Widget","type":"hasLabel","value":true},{"label":"Stat Box Widget","type":"hasLabel","value":true},{"label":"Voice Recorder Widget","type":"hasLabel","value":true},{"label":"Calendar Widget","type":"hasLabel","value":true},{"label":"Menu Button Widget","type":"hasLabel","value":true},{"label":"Divider Widget","type":"hasLabel","value":true},{"label":"Rating Widget","type":"hasLabel","value":true},{"label":"View Mode","type":"hasLabel","value":true},{"label":"Widget Property","type":"hasLabel","value":true},{"label":"Document Viewer Widget","type":"hasLabel","value":true},{"label":"Radio Group Widget","type":"hasLabel","value":true},{"label":"Currency Input Widget","type":"hasLabel","value":true},{"label":"TreeSelect","type":"hasLabel","value":true},{"label":"MultiTree Select Widget","type":"hasLabel","value":true},{"label":"Phone Input Widget","type":"hasLabel","value":true},{"label":"JSON Form","type":"hasLabel","value":true},{"label":"All Widgets","type":"hasLabel","value":true},{"label":"Button Group widget","type":"hasLabel","value":true},{"label":"Progress bar widget","type":"hasLabel","value":true},{"label":"Audio Recorder Widget","type":"hasLabel","value":true},{"label":"Camera Widget","type":"hasLabel","value":true},{"label":"Table Widget V2","type":"hasLabel","value":true},{"label":"Map Chart Widget","type":"hasLabel","value":true},{"label":"Code Scanner Widget","type":"hasLabel","value":true},{"label":"Widget keyboard accessibility","type":"hasLabel","value":true},{"label":"List Widget V2","type":"hasLabel","value":true},{"label":"Slider Widget","type":"hasLabel","value":true},{"label":"One-click Binding","type":"hasLabel","value":true},{"label":"Old widget version","type":"hasLabel","value":true},{"label":"Widget Discoverability","type":"hasLabel","value":true},{"label":"Switch Group Widget","type":"hasLabel","value":true},{"label":"Checkbox Group widget","type":"hasLabel","value":true},{"label":"Checkbox Widget","type":"hasLabel","value":true},{"label":"Table Inline Edit","type":"hasLabel","value":true},{"label":"Custom Widgets","type":"hasLabel","value":true}],"requires":1},"Javascript Product":{"conditions":[{"label":"JS Linting & Errors","type":"hasLabel","value":true},{"label":"Autocomplete","type":"hasLabel","value":true},{"label":"Evaluated Value","type":"hasLabel","value":true},{"label":"Slash Command","type":"hasLabel","value":true},{"label":"New JS Function","type":"hasLabel","value":true},{"label":"JS Usability","type":"hasLabel","value":true},{"label":"Framework Functions","type":"hasLabel","value":true},{"label":"JS Objects","type":"hasLabel","value":true},{"label":"JS Evaluation","type":"hasLabel","value":true},{"label":"Custom JS Libraries","type":"hasLabel","value":true},{"label":"Action Selector","type":"hasLabel","value":true},{"label":"Widget setter method","type":"hasLabel","value":true},{"label":"Entity Refactor","type":"hasLabel","value":true},{"label":"AST-frontend","type":"hasLabel","value":true},{"label":"Sniping Mode","type":"hasLabel","value":true},{"label":"AST-backend","type":"hasLabel","value":true}],"requires":1},"IDE Product":{"conditions":[{"label":"IDE Product","type":"hasLabel","value":true},{"label":"IDE Infra","type":"hasLabel","value":true},{"label":"IDE Navigation","type":"hasLabel","value":true},{"label":"IDE tabs","type":"hasLabel","value":true},{"label":"Omnibar","type":"hasLabel","value":true},{"label":"Entity Explorer","type":"hasLabel","value":true},{"label":"Page Management","type":"hasLabel","value":true},{"label":"Preview mode","type":"hasLabel","value":true}],"requires":1},"Accelerators Product":{"conditions":[{"label":"Generate Page","type":"hasLabel","value":true},{"label":"Building blocks","type":"hasLabel","value":true}],"requires":1},"Templates Product":{"conditions":[{"label":"Partial-import-export","type":"hasLabel","value":true},{"label":"Templates Product","type":"hasLabel","value":true}],"requires":1},"Design System Product":{"conditions":[{"label":"Design System Product","type":"hasLabel","value":true},{"label":"ADS Component Issue","type":"hasLabel","value":true},{"label":"Keyboard accessibility ","type":"hasLabel","value":true},{"label":"Toggle button","type":"hasLabel","value":true},{"label":"ADS Category Token","type":"hasLabel","value":true},{"label":"ADS Component Documentation","type":"hasLabel","value":true},{"label":"ADS Migration","type":"hasLabel","value":true},{"label":"ADS Deduplication ","type":"hasLabel","value":true},{"label":"ADS Revamp","type":"hasLabel","value":true},{"label":"ADS Deduplication","type":"hasLabel","value":true},{"label":"ADS Unit Test","type":"hasLabel","value":true},{"label":"ADS Components","type":"hasLabel","value":true},{"label":"ADS Grayscale","type":"hasLabel","value":true},{"label":"Design System","type":"hasLabel","value":true},{"label":"ADS Typography","type":"hasLabel","value":true},{"label":"ADS Visual Styles","type":"hasLabel","value":true},{"label":"ADS Component Design","type":"hasLabel","value":true},{"label":"Modal Component","type":"hasLabel","value":true},{"label":"ADS Spacing","type":"hasLabel","value":true},{"label":"ads unit test","type":"hasLabel","value":true},{"label":"ads revamp","type":"hasLabel","value":true},{"label":"ads deduplication","type":"hasLabel","value":true}],"requires":1},"RBAC Product":{"conditions":[{"label":"Invite users","type":"hasLabel","value":true},{"label":"RBAC Product","type":"hasLabel","value":true}],"requires":1},"Workspace Product":{"conditions":[{"label":"Home Page","type":"hasLabel","value":true},{"label":"Workspace Product","type":"hasLabel","value":true}],"requires":1},"Billing & Licensing Product":{"conditions":[{"label":"Customer Portal","type":"hasLabel","value":true},{"label":"Cloud Services","type":"hasLabel","value":true},{"label":"Billing","type":"hasLabel","value":true},{"label":"Self Serve","type":"hasLabel","value":true},{"label":"Enterprise Billing","type":"hasLabel","value":true},{"label":"Analytics Improvements","type":"hasLabel","value":true},{"label":"Self Serve 1.0","type":"hasLabel","value":true},{"label":"License","type":"hasLabel","value":true},{"label":"BE instance","type":"hasLabel","value":true},{"label":"Invite flow","type":"hasLabel","value":true},{"label":"CE Instance Usage","type":"hasLabel","value":true},{"label":"Feature Flagging","type":"hasLabel","value":true}],"requires":1},"Packages Product":{"conditions":[{"label":"Packages Product","type":"hasLabel","value":true}],"requires":1},"Environments Product":{"conditions":[{"label":"Environments Product","type":"hasLabel","value":true}],"requires":1},"UI Building Product":{"conditions":[{"label":"Property Pane","type":"hasLabel","value":true},{"label":"Copy Paste","type":"hasLabel","value":true},{"label":"Drag & Drop","type":"hasLabel","value":true},{"label":"Undo/Redo","type":"hasLabel","value":true},{"label":"Widgets Pane","type":"hasLabel","value":true},{"label":"UI Performance","type":"hasLabel","value":true},{"label":"Widget Grouping","type":"hasLabel","value":true},{"label":"Reflow & Resize","type":"hasLabel","value":true},{"label":"Canvas / Grid","type":"hasLabel","value":true},{"label":"Auto Height","type":"hasLabel","value":true},{"label":"Browser specific","type":"hasLabel","value":true},{"label":"Auto Layout","type":"hasLabel","value":true},{"label":"Fixed layout","type":"hasLabel","value":true},{"label":"App Navigation","type":"hasLabel","value":true}],"requires":1},"Onboarding Product":{"conditions":[{"label":"Welcome Screen","type":"hasLabel","value":true}],"requires":1},"Git Product":{"conditions":[{"label":"Git Product","type":"hasLabel","value":true},{"label":"Git Auto-commit","type":"hasLabel","value":true},{"label":"Auto-commit","type":"hasLabel","value":true},{"label":"Continuous Deployment","type":"hasLabel","value":true},{"label":"Default branch","type":"hasLabel","value":true},{"label":"Git status","type":"hasLabel","value":true},{"label":"Git performance","type":"hasLabel","value":true},{"label":"SDLC","type":"hasLabel","value":true},{"label":"Git IA","type":"hasLabel","value":true},{"label":"Branch management","type":"hasLabel","value":true}],"requires":1},"Embedding Apps Product":{"conditions":[{"label":"Embedding Apps Product","type":"hasLabel","value":true}],"requires":1},"Integrations Product":{"conditions":[{"label":"New Datasource","type":"hasLabel","value":true},{"label":"Firestore","type":"hasLabel","value":true},{"label":"Google Sheets","type":"hasLabel","value":true},{"label":"Mongo","type":"hasLabel","value":true},{"label":"Redshift","type":"hasLabel","value":true},{"label":"snowflake","type":"hasLabel","value":true},{"label":"S3","type":"hasLabel","value":true},{"label":"Redis","type":"hasLabel","value":true},{"label":"Postgres","type":"hasLabel","value":true},{"label":"GraphQL Plugin","type":"hasLabel","value":true},{"label":"ArangoDB","type":"hasLabel","value":true},{"label":"MsSQL","type":"hasLabel","value":true},{"label":"Elastic Search","type":"hasLabel","value":true},{"label":"OAuth","type":"hasLabel","value":true},{"label":"Airtable","type":"hasLabel","value":true},{"label":"CURL","type":"hasLabel","value":true},{"label":"DynamoDB","type":"hasLabel","value":true},{"label":"Zendesk","type":"hasLabel","value":true},{"label":"Hubspot","type":"hasLabel","value":true},{"label":"Query Forms","type":"hasLabel","value":true},{"label":"Twilio","type":"hasLabel","value":true},{"label":"MySQL","type":"hasLabel","value":true},{"label":"Connection pool","type":"hasLabel","value":true},{"label":"MariaDB","type":"hasLabel","value":true},{"label":"Integrations Pod General","type":"hasLabel","value":true},{"label":"SMTP plugin","type":"hasLabel","value":true},{"label":"Oracle SQL DB","type":"hasLabel","value":true},{"label":"Query filter","type":"hasLabel","value":true},{"label":"Activation - datasources","type":"hasLabel","value":true},{"label":"REST API","type":"hasLabel","value":true},{"label":"REST API","type":"hasLabel","value":true},{"label":"Datasources","type":"hasLabel","value":true},{"label":"REST API plugin","type":"hasLabel","value":true},{"label":"Prepared statements","type":"hasLabel","value":true},{"label":"Query Generation","type":"hasLabel","value":true},{"label":"Core Query Execution","type":"hasLabel","value":true},{"label":"Query Management","type":"hasLabel","value":true},{"label":"Query Settings","type":"hasLabel","value":true},{"label":"Query performance","type":"hasLabel","value":true},{"label":"Datatype issue","type":"hasLabel","value":true},{"label":"SmartSubstitution","type":"hasLabel","value":true},{"label":"Suggested Widgets","type":"hasLabel","value":true},{"label":"SAAS Plugins","type":"hasLabel","value":true},{"label":"Reconnect DS modal","type":"hasLabel","value":true},{"label":"OnPageLoad","type":"hasLabel","value":true},{"label":"File upload issues","type":"hasLabel","value":true},{"label":"AI","type":"hasLabel","value":true},{"label":"Appsmith AI","type":"hasLabel","value":true},{"label":"Database Schema","type":"hasLabel","value":true}],"requires":1},"Identity & Authentication Product":{"conditions":[{"label":"Login / Signup","type":"hasLabel","value":true},{"label":"SSO","type":"hasLabel","value":true},{"label":"SCIM","type":"hasLabel","value":true},{"label":"Email verification","type":"hasLabel","value":true}],"requires":1},"Artifact Platform Product":{"conditions":[{"label":"Fork App","type":"hasLabel","value":true},{"label":"Publish App","type":"hasLabel","value":true},{"label":"Secret Management","type":"hasLabel","value":true},{"label":"Import-Export-App","type":"hasLabel","value":true}],"requires":1},"DevOps Pod":{"conditions":[{"label":"Docker","type":"hasLabel","value":true},{"label":"Super Admin","type":"hasLabel","value":true},{"label":"Deployment","type":"hasLabel","value":true},{"label":"K8s","type":"hasLabel","value":true},{"label":"Email Config","type":"hasLabel","value":true},{"label":"Backup & Restore","type":"hasLabel","value":true},{"label":"AWS AMI","type":"hasLabel","value":true},{"label":"Observability","type":"hasLabel","value":true},{"label":"Heroku","type":"hasLabel","value":true},{"label":"New Deployment Mode","type":"hasLabel","value":true},{"label":"Supervisor","type":"hasLabel","value":true},{"label":"Deployment Certificates","type":"hasLabel","value":true},{"label":"Mock Data","type":"hasLabel","value":true},{"label":"AWS ECS","type":"hasLabel","value":true},{"label":"Ingress","type":"hasLabel","value":true},{"label":"Nginx","type":"hasLabel","value":true}],"requires":1},"Performance Pod":{"conditions":[{"label":"Performance","type":"hasLabel","value":true},{"label":"Performance infra","type":"hasLabel","value":true}],"requires":1},"Git Platform Pod":{"conditions":[{"label":"Environments Product","type":"hasLabel","value":true},{"label":"Git Product","type":"hasLabel","value":true},{"label":"Artifact Platform Product","type":"hasLabel","value":true}],"requires":1},"IDE Pod":{"conditions":[{"label":"Telemetry","type":"hasLabel","value":true},{"label":"i18n","type":"hasLabel","value":true},{"label":"IDE Product","type":"hasLabel","value":true},{"label":"App setting","type":"hasLabel","value":true},{"label":"Debugger Product","type":"hasLabel","value":true},{"label":"Embedding Apps Product","type":"hasLabel","value":true}],"requires":1},"Platform Administration Pod":{"conditions":[{"label":"Airgap","type":"hasLabel","value":true},{"label":"Enterprise Edition","type":"hasLabel","value":true},{"label":"Invite flow","type":"hasLabel","value":true},{"label":"User Profile","type":"hasLabel","value":true},{"label":"User Session ","type":"hasLabel","value":true},{"label":"User Session","type":"hasLabel","value":true},{"label":"Admin Settings Product","type":"hasLabel","value":true},{"label":"RBAC Product","type":"hasLabel","value":true},{"label":"Workspace Product","type":"hasLabel","value":true},{"label":"Branding Product","type":"hasLabel","value":true},{"label":"Audit Logs Product","type":"hasLabel","value":true},{"label":"Identity & Authentication Product","type":"hasLabel","value":true}],"requires":1},"DB Infrastructure Pod":{"conditions":[{"label":"Move to Postgres","type":"hasLabel","value":true}],"requires":1},"Widgets & Accelerators Pod":{"conditions":[{"label":"Accelerators Product","type":"hasLabel","value":true},{"label":"Templates Product","type":"hasLabel","value":true},{"label":"Widgets Product","type":"hasLabel","value":true},{"label":"App Theming Product","type":"hasLabel","value":true}],"requires":1},"Packages Pod":{"conditions":[{"label":"Module creator","type":"hasLabel","value":true},{"label":"Module consumer","type":"hasLabel","value":true},{"label":"Package versioning","type":"hasLabel","value":true},{"label":"Convert to module","type":"hasLabel","value":true},{"label":"Query module","type":"hasLabel","value":true},{"label":"JS module","type":"hasLabel","value":true},{"label":"UI module","type":"hasLabel","value":true},{"label":"Packages Pod","type":"hasLabel","value":true},{"label":"Packages Product","type":"hasLabel","value":true}],"requires":1},"Workflows Pod":{"conditions":[{"label":"Workflows Product","type":"hasLabel","value":true}],"requires":1},"Query & JS Pod":{"conditions":[{"label":"Javascript Product","type":"hasLabel","value":true},{"label":"Onboarding Product","type":"hasLabel","value":true},{"label":"Integrations Product","type":"hasLabel","value":true},{"label":"Reconfigure Datasource Modal","type":"hasLabel","value":true}],"requires":1},"QA Pod":{"conditions":[{"label":"QA","type":"hasLabel","value":true},{"label":"Automation Test","type":"hasLabel","value":true},{"label":"TestGap","type":"hasLabel","value":true},{"label":"Automation failures","type":"hasLabel","value":true},{"label":"Needs automation","type":"hasLabel","value":true}],"requires":1},"Anvil POD":{"conditions":[{"label":"Checkbox Component","type":"hasLabel","value":true},{"label":"WDS team","type":"hasLabel","value":true},{"label":"Anvil POD","type":"hasLabel","value":true},{"label":"WDS - all widgets","type":"hasLabel","value":true},{"label":"WDS - input widget","type":"hasLabel","value":true},{"label":"WDS - paragraph widget","type":"hasLabel","value":true},{"label":"WDS - statbox widget","type":"hasLabel","value":true},{"label":"WDS - modal widget","type":"hasLabel","value":true},{"label":"WDS - icon widget","type":"hasLabel","value":true},{"label":"WDS - checkbox widget","type":"hasLabel","value":true},{"label":"WDS - table widget","type":"hasLabel","value":true},{"label":"WDS - keyValue widget","type":"hasLabel","value":true},{"label":"WDS - switch group widget","type":"hasLabel","value":true},{"label":"WDS - theming","type":"hasLabel","value":true},{"label":"Anvil layout","type":"hasLabel","value":true},{"label":"Anvil - theming","type":"hasLabel","value":true},{"label":"Anvil - vertical alignment","type":"hasLabel","value":true},{"label":"Anvil - layout component","type":"hasLabel","value":true},{"label":"Anvil - drag & drop","type":"hasLabel","value":true},{"label":"Anvil - zones & sections","type":"hasLabel","value":true},{"label":"Anvil - copy paste experience","type":"hasLabel","value":true},{"label":"WDS - phone widget","type":"hasLabel","value":true},{"label":"WDS - responsive widget","type":"hasLabel","value":true},{"label":"Anvil - responsive viewport","type":"hasLabel","value":true},{"label":"WDS - widget styling","type":"hasLabel","value":true},{"label":"Anvil - spacing","type":"hasLabel","value":true},{"label":"Anvil - responsive canvas","type":"hasLabel","value":true},{"label":"WDS - inline button widget","type":"hasLabel","value":true},{"label":"Anvil team","type":"hasLabel","value":true}],"requires":1},"Activation Pod":{"conditions":[{"label":"Activation","type":"hasLabel","value":true}],"requires":1},"Stability Pod":{"conditions":[{"label":"Stability Issue","type":"hasLabel","value":true},{"label":"cypress-flaky-fix","type":"hasLabel","value":true},{"label":"Cypress flaky tests","type":"hasLabel","value":true}],"requires":1},"Documentation Pod":{"conditions":[{"label":"Documentation","type":"hasLabel","value":true}],"requires":1}}},"root":"."}],"labels":{"Tab Widget":{"color":"e2c76c","name":"Tab Widget","description":""},"Dont merge":{"color":"ADB39C","name":"Dont merge","description":""},"Epic":{"color":"3E4B9E","name":"Epic","description":"A zenhub epic that describes a project"},"Menu Button Widget":{"color":"235708","name":"Menu Button Widget","description":"Issues related to Menu Button widget"},"Checkbox Group widget":{"color":"bbeecd","name":"Checkbox Group widget","description":"Issues related to Checkbox Group Widget"},"Input Widget":{"color":"ae65d8","name":"Input Widget","description":""},"Security":{"color":"99139C","name":"Security","description":""},"QA":{"color":"","name":"QA","description":"Needs QA attention"},"Verified":{"color":"9bf416","name":"Verified","description":""},"Wont Fix":{"color":"ffffff","name":"Wont Fix","description":"This will not be worked on"},"MySQL":{"color":"c9ddc6","name":"MySQL","description":"Issues related to MySQL plugin"},"Development":{"color":"9F8A02","name":"Development","description":""},"Help Wanted":{"color":"008672","name":"Help Wanted","description":"Extra attention is needed"},"Home Page":{"color":"","name":"Home Page","description":"Issues related to the application home page"},"Rating Widget":{"color":"235708","name":"Rating Widget","description":"Issues related to the rating widget"},"Stat Box Widget":{"color":"f1c9ce","name":"Stat Box Widget","description":"Issues related to stat box"},"Enhancement":{"color":"a2eeef","name":"Enhancement","description":"New feature or request"},"Fork App":{"color":"af87c7","name":"Fork App","description":"Issues related to forking apps"},"Container Widget":{"color":"19AD0D","name":"Container Widget","description":"Container widget"},"Papercut":{"color":"B562F6","name":"Papercut","description":""},"Needs Design":{"color":"bfd4f2","name":"Needs Design","description":"needs design or changes to design"},"i18n":{"color":"1799b0","name":"i18n","description":"Represents issues that need to be tackled to handle internationalization"},"Rich Text Editor Widget":{"color":"f72cac","name":"Rich Text Editor Widget","description":""},"skip-changelog":{"color":"06086F","name":"skip-changelog","description":"Adding this label to a PR prevents it from being listed in the changelog"},"Low":{"color":"79e53b","name":"Low","description":"An issue that is neither critical nor breaks a user flow"},"potential-duplicate":{"color":"d3cb2e","name":"potential-duplicate","description":"This label marks issues that are potential duplicates of already open issues"},"Audio Widget":{"color":"447B9A","name":"Audio Widget","description":"Issues related to Audio Widget"},"Firestore":{"color":"8078b0","name":"Firestore","description":"Issues related to the firestore Integration"},"New Widget":{"color":"be4cf2","name":"New Widget","description":"A request for a new widget"},"Modal Widget":{"color":"03846f","name":"Modal Widget","description":""},"UX Improvement":{"color":"f4a089","name":"UX Improvement","description":""},"S3":{"color":"8078b0","name":"S3","description":"Issues related to the S3 plugin"},"Release Blocker":{"color":"5756bf","name":"Release Blocker","description":"This issue must be resolved before the release"},"safari":{"color":"51C6AA","name":"safari","description":"Bugs seen on safari browser"},"Example Apps":{"color":"1799b0","name":"Example Apps","description":"Example apps created for new signups"},"MultiSelect Widget":{"color":"AB62D4","name":"MultiSelect Widget","description":"Issues related to MultiSelect Widget"},"Calendar Widget":{"color":"8c6644","name":"Calendar Widget","description":""},"Website":{"color":"151720","name":"Website","description":"Related to www.appsmith.com website"},"Low effort":{"color":"8B59F0","name":"Low effort","description":"Something that'll take a few days to build"},"Checkbox Widget":{"color":"bbeecd","name":"Checkbox Widget","description":""},"Spam":{"color":"620faf","name":"Spam","description":""},"Voice Recorder Widget":{"color":"85bc87","name":"Voice Recorder Widget","description":""},"Select Widget":{"color":"0c669e","name":"Select Widget","description":"Select or dropdown widget"},"Bug":{"color":"8ba6fd","name":"Bug","description":"Something isn't right"},"Widget Validation":{"color":"6990BC","name":"Widget Validation","description":"Issues related to widget property validation"},"Generate Page":{"color":"2b4664","name":"Generate Page","description":"Issures related to page generation"},"File Picker Widget":{"color":"6ae4f2","name":"File Picker Widget","description":""},"snowflake":{"color":"8078b0","name":"snowflake","description":"Issues related to the snowflake Integration"},"Automation":{"color":"CCAF60","name":"Automation","description":""},"hotfix":{"color":"BA3F1D","name":"hotfix","description":""},"Import-Export-App":{"color":"48883f","name":"Import-Export-App","description":"Issues related to importing and exporting apps"},"High effort":{"color":"A7E87B","name":"High effort","description":"Something that'll take more than a month to build"},"Telemetry":{"color":"bc70f9","name":"Telemetry","description":"Issues related to instrumenting appsmith"},"Radio Widget":{"color":"91ef15","name":"Radio Widget","description":""},"Omnibar":{"color":"1bb96a","name":"Omnibar","description":"Issues related to the omnibar for navigation"},"Button Widget":{"color":"34efae","name":"Button Widget","description":""},"Switch widget":{"color":"33A8CE","name":"Switch widget","description":"The switch widget"},"Map Widget":{"color":"7eef7a","name":"Map Widget","description":""},"Task":{"color":"085630","name":"Task","description":"A simple Todo"},"Design System":{"color":"2958a4","name":"Design System","description":"Design system"},"opera":{"color":"C63F5B","name":"opera","description":"Any issues identified on the opera browser"},"Login / Signup":{"color":"","name":"Login / Signup","description":"Authentication flows"},"Image Widget":{"color":"8de8ad","name":"Image Widget","description":""},"firefox":{"color":"6d56e2","name":"firefox","description":""},"Property Pane":{"color":"b356ff","name":"Property Pane","description":"Issues related to the behaviour of the property pane"},"Deployment":{"color":"93491f","name":"Deployment","description":"Installation process of appsmith"},"Production":{"color":"b60205","name":"Production","description":""},"Dependencies":{"color":"0366d6","name":"Dependencies","description":"Pull requests that update a dependency file"},"Google Sheets":{"color":"8078b0","name":"Google Sheets","description":"Issues related to Google Sheets"},"Icon Button Widget":{"color":"D319CE","name":"Icon Button Widget","description":"Issues related to the icon button widget"},"Mongo":{"color":"8078b0","name":"Mongo","description":"Issues related to Mongo DB plugin"},"Documentation":{"color":"a8dff7","name":"Documentation","description":"Improvements or additions to documentation"},"TestGap":{"color":"","name":"TestGap","description":"Issues identified for test plan improvement"},"keyboard shortcut":{"color":"0688B6","name":"keyboard shortcut","description":""},"Reopen":{"color":"897548","name":"Reopen","description":""},"Redshift":{"color":"8078b0","name":"Redshift","description":"Issues related to the redshift integration"},"Date Picker Widget":{"color":"ef1ce1","name":"Date Picker Widget","description":""},"Entity Explorer":{"color":"1bb96a","name":"Entity Explorer","description":"Issues related to navigation using the entity explorer"},"JS Linting & Errors":{"color":"E56AA5","name":"JS Linting & Errors","description":"Issues related to JS Linting and errors"},"iFrame":{"color":"3CD1DB","name":"iFrame","description":"Issues related to iFrame"},"Stale":{"color":"ededed","name":"Stale","description":null},"Text Widget":{"color":"d130d1","name":"Text Widget","description":""},"Video Widget":{"color":"23dd4b","name":"Video Widget","description":""},"Datasources":{"color":"3d590f","name":"Datasources","description":"Issues related to configuring datasource on appsmith"},"error":{"color":"B66773","name":"error","description":"All issues connected to error messages"},"Form Widget":{"color":"09ed77","name":"Form Widget","description":""},"Needs Triaging":{"color":"e8b851","name":"Needs Triaging","description":"Needs attention from maintainers to triage"},"Autocomplete":{"color":"235708","name":"Autocomplete","description":"Issues related to the autocomplete"},"hacktoberfest":{"color":"0052cc","name":"hacktoberfest","description":"All issues that can be solved by the community during Hacktoberfest"},"Medium effort":{"color":"D31156","name":"Medium effort","description":"Something that'll take more than a week but less than a month to build"},"Release":{"color":"57e5e0","name":"Release","description":""},"High":{"color":"c94d14","name":"High","description":"This issue blocks a user from building or impacts a lot of users"},"UI Performance":{"color":"1799b0","name":"UI Performance","description":"Issues related to UI performance"},"Deploy Preview":{"color":"bfdadc","name":"Deploy Preview","description":"Issues found in Deploy Preview"},"Needs Tests":{"color":"8ee263","name":"Needs Tests","description":"Needs automated tests to assert a feature/bug fix"},"Refactor":{"color":"B96662","name":"Refactor","description":"needs refactoring of code"},"Divider Widget":{"color":"235708","name":"Divider Widget","description":"Issues related to the divider widget"},"Table Widget":{"color":"2eead1","name":"Table Widget","description":""},"Needs More Info":{"color":"e54c10","name":"Needs More Info","description":"Needs additional information"},"Good First Issue":{"color":"7057ff","name":"Good First Issue","description":"Good for newcomers"},"UI Improvement":{"color":"9aeef4","name":"UI Improvement","description":""},"Backend":{"color":"d4c5f9","name":"Backend","description":"This marks the issue or pull request to reference server code"},"Frontend":{"color":"87c7f2","name":"Frontend","description":"This label marks the issue or pull request to reference client code"},"Chart Widget":{"color":"616ecc","name":"Chart Widget","description":""},"List Widget":{"color":"8508A0","name":"List Widget","description":"Issues related to the list widget"},"Duplicate":{"color":"cfd3d7","name":"Duplicate","description":"This issue or pull request already exists"},"JS Snippets":{"color":"8d62d2","name":"JS Snippets","description":"issues related to JS Snippets"},"Copy Paste":{"name":"Copy Paste","description":"Issues related to copy paste","color":"b4f0a9"},"Drag & Drop":{"name":"Drag & Drop","description":"Issues related to the drag & drop experience","color":"92115a"},"Sniping Mode":{"name":"Sniping Mode","description":"Issues related to sniping mode","color":"48883f"},"Redis":{"name":"Redis","description":"Issues related to Redis","color":"8078b0"},"New Datasource":{"color":"60b14c","name":"New Datasource","description":"Requests for new datasources"},"Evaluated Value":{"name":"Evaluated Value","description":"Issues related to evaluated values","color":"39f6e7"},"Undo/Redo":{"name":"Undo/Redo","description":"Issues related to undo/redo","color":"f25880"},"App Navigation":{"name":"App Navigation","description":"Issues related to the topbar navigation and configuring it","color":"4773ab"},"Widgets Pane":{"name":"Widgets Pane","description":"Issues related to the discovery and organisation of widgets","color":"ad5d78"},"View Mode":{"color":"1799b0","name":"View Mode","description":"Issues related to the view mode"},"Content":{"name":"Content","description":"For content related topics i.e blogs, templates, videos","color":"a8dff7"},"Slash Command":{"name":"Slash Command","description":"Issues related to the slash command","color":"a0608e"},"Widget Property":{"name":"Widget Property","description":"Issues related to adding / modifying widget properties across widgets","color":"5e92cb"},"Windows":{"name":"Windows","description":"Issues related exclusively to Windows systems","color":"b4cb8a"},"Old App Issues":{"name":"Old App Issues","description":"Issues related to apps old apps a few weeks old and app issues in stale browser session","color":"87ab18"},"Document Viewer Widget":{"name":"Document Viewer Widget","description":"Issues related to Document Viewer Widget","color":"899d4b"},"Radio Group Widget":{"name":"Radio Group Widget","description":"Issues related to radio group widget","color":"b68495"},"Super Admin":{"name":"Super Admin","description":"Issues related to the super admin page","color":"aa95cf"},"Postgres":{"name":"Postgres","description":"Postgres related issues","color":"8078b0"},"New JS Function":{"name":"New JS Function","description":"Issues related to adding a JS Function","color":"8e8aa4"},"Cannot Reproduce Issue":{"color":"93c9cc","name":"Cannot Reproduce Issue","description":"Issues that cannot be reproduced"},"Widget Grouping":{"name":"Widget Grouping","description":"Issues related to Widget Grouping","color":"a49951"},"K8s":{"name":"K8s","description":"Kubernetes related issues","color":"5f318a"},"Docker":{"name":"Docker","description":"Issues related to docker","color":"89b808"},"Camera Widget":{"name":"Camera Widget","description":"Issues and enhancements related to camera widget","color":"e6038e"},"SAAS Plugins":{"name":"SAAS Plugins","description":"Issues related to SAAS Plugins","color":"80e18f"},"JS Promises":{"name":"JS Promises","description":"Issues related to promises","color":"d7771f"},"OnPageLoad":{"name":"OnPageLoad","description":"OnPageLoad issues on functions and queries","color":"2b4664"},"JS Usability":{"name":"JS Usability","description":"usability issues with JS editor and JS elsewhere","color":"a302b0"},"Currency Input Widget":{"name":"Currency Input Widget","description":"Issues related to currency input widget","color":"b2164f"},"TreeSelect":{"name":"TreeSelect","description":"Issues related to TreeSelect Widget","color":"a1633e"},"MultiTree Select Widget":{"name":"MultiTree Select Widget","description":"Issues related to MultiTree Select Widget","color":"a1633e"},"Welcome Screen":{"name":"Welcome Screen","description":"Issues related to the welcome screen","color":"48883f"},"Realtime Commenting":{"color":"a70b86","name":"Realtime Commenting","description":"In-app communication between teams"},"Phone Input Widget":{"name":"Phone Input Widget","description":"Issues related to the Phone Input widget","color":"a70b86"},"JSON Form":{"name":"JSON Form","description":"Issue / features related to the JSON form wiget","color":"46b209"},"All Widgets":{"name":"All Widgets","description":"Issues related to all widgets","color":"972b36"},"V1":{"name":"V1","description":"V1","color":"67ab2e"},"Reflow & Resize":{"name":"Reflow & Resize","description":"All issues related to reflow and resize experience","color":"748a13"},"SSO":{"name":"SSO","description":"Issues, requests and enhancements around Single sign-on.","color":""},"Multi User Realtime":{"name":"Multi User Realtime","description":"Issues related to multiple users using or editing an application","color":"e7b6ce"},"Ready for design":{"name":"Ready for design","description":"this issue is ready for design: it contains clear problem statements and other required information","color":"ebf442"},"Support":{"name":"Support","description":"Issues created by the A-force team to address user queries","color":"1740f3"},"Button Group widget":{"name":"Button Group widget","description":"Issue and enhancements related to the button group widget","color":"f17025"},"GraphQL Plugin":{"name":"GraphQL Plugin","description":"Issues related to GraphQL plugin","color":"8078b0"},"DevOps Pod":{"name":"DevOps Pod","description":"Issues related to devops","color":"d956c7"},"medium":{"name":"medium","description":"Issues that frustrate users due to poor UX","color":"23dfd9"},"ArangoDB":{"name":"ArangoDB","description":"Issues related to arangoDB","color":"8078b0"},"Code Refactoring":{"name":"Code Refactoring","description":"Issues related to code refactoring","color":"76310e"},"Progress bar widget":{"name":"Progress bar widget","description":"To track issues related to progress bar","color":"2d7abf"},"Audio Recorder Widget":{"name":"Audio Recorder Widget","description":"Issues related to Audio Recorder Widget","color":"9accef"},"Airtable":{"name":"Airtable","description":"Issues for Airtable","color":"60885f"},"Canvas / Grid":{"name":"Canvas / Grid","description":"Issues related to the canvas","color":"16b092"},"Email Config":{"name":"Email Config","description":"Issues related to configuring the email service","color":"2a21d1"},"CURL":{"name":"CURL","description":"Issues related to CURL impor","color":"60885f"},"Canvas Zooms":{"name":"Canvas Zooms","description":"Issues related to zooming the canvas","color":"e6038e"},"business":{"name":"business","description":"Features that will be a part of our business edition","color":"cd59eb"},"Action Pod":{"name":"Action Pod","description":"","color":"ee2e36"},"AutomationGap1":{"color":"a5e07c","name":"AutomationGap1","description":"Issues that needs automated tests"},"A-Force11":{"name":"A-Force11","description":"Issues raised by A-Force team","color":"d667b6"},"Business Edition":{"name":"Business Edition","description":"Features that will be a part of our business edition","color":"89bb6c"},"storeValue":{"name":"storeValue","description":"Issues related to the store value function","color":"5d3e66"},"DynamoDB":{"name":"DynamoDB","description":"Issues that are related to DynamoDB should have this label","color":"60885f"},"Backup & Restore":{"name":"Backup & Restore","description":"Issues related to backup and restore","color":"86874d"},"Billing":{"name":"Billing","description":"Billing infrastructure and flows for Business Edition and Trial users","color":"d2bc40"},"Datatype issue":{"name":"Datatype issue","description":"Issues that have risen because data types weren't handled","color":"cef66b"},"OAuth":{"name":"OAuth","description":"OAuth related bugs or features","color":"60885f"},"Table Widget V2":{"name":"Table Widget V2","description":"Issues related to Table Widget V2","color":"3a7192"},"IDE Navigation":{"name":"IDE Navigation","description":"Issues/feature requests related to IDE navigation, and context switching","color":"1bb96a"},"Query performance":{"name":"Query performance","description":"Issues that have to do with lack in performance of query execution","color":"cef66b"},"SAAS Manager App":{"name":"SAAS Manager App","description":"Issues with the SAAS manager app","color":"d427db"},"Twilio":{"name":"Twilio","description":"Issues related to Twilio integration","color":"23ba8d"},"Hubspot":{"name":"Hubspot","description":"Issues related to Hubspot integration","color":"60885f"},"Zendesk":{"name":"Zendesk","description":"Issues related to Zendesk integration","color":"60885f"},"Entity Refactor":{"name":"Entity Refactor","description":"Issues related to refactor logic","color":"705a2c"},"Map Chart Widget":{"name":"Map Chart Widget","description":"Issues related to Map Chart Widgets","color":"c8397f"},"Product Catchup":{"name":"Product Catchup","description":"Issues created in the product catchup","color":"29cd2c"},"Framework Functions":{"name":"Framework Functions","description":"Issues related to internal functions like showAlert(), navigateTo() etc...","color":"c25a09"},"Frontend Libraries Upgrade":{"name":"Frontend Libraries Upgrade","description":"Issues related to frontend libraries upgrade","color":"ede1fc"},"MsSQL":{"name":"MsSQL","description":"Issues related to MsSQL plugin","color":"8078b0"},"Elastic Search":{"name":"Elastic Search","description":"Issues related to the elastic search datasource","color":"8078b0"},"Core Query Execution":{"color":"cef66b","name":"Core Query Execution","description":"Issues related to the execution of all queries"},"Query Management":{"name":"Query Management","description":"Issues related to the CRUD of actions or queries","color":"cef66b"},"Query Settings":{"name":"Query Settings","description":"Issues related to the settings of all queries","color":"cef66b"},"Code Editor":{"name":"Code Editor","description":"Issues related to the code editor","color":"4ca16e"},"Query Forms":{"color":"12b253","name":"Query Forms","description":"Isuses related to the query forms"},"JS Objects":{"color":"22962c","name":"JS Objects","description":"Issues related to JS Objects"},"JS Evaluation":{"color":"22962c","name":"JS Evaluation","description":"Issues related to JS evaluation on the platform"},"SmartSubstitution":{"name":"SmartSubstitution","description":"Issues related to Smart substitution of mustache bindings in queries","color":"bae511"},"Query Generation":{"name":"Query Generation","description":"Issues related to query generation","color":"cef66b"},"Suggested Widgets":{"name":"Suggested Widgets","description":"Issues related to suggesting widgets based on query response","color":"6ac063"},"Code Scanner Widget":{"name":"Code Scanner Widget","description":"Issues related to code scanner widget","color":"9bc1a0"},"Clean URLs":{"name":"Clean URLs","description":"Issues related to clean URLs epic","color":"112623"},"Widget keyboard accessibility":{"name":"Widget keyboard accessibility","description":"All issues related to keyboard accessibility in widgets","color":"b626fd"},"Connection pool":{"name":"Connection pool","description":"issues to do with connection pooling of various plugins","color":"94fe36"},"List Widget V2":{"name":"List Widget V2","description":"Issues related to the list widget v2","color":"adaaf7"},"Auto Height":{"name":"Auto Height","description":"Issues related to dynamic height of widgets","color":"5149cf"},"cypress_failed_test":{"name":"cypress_failed_test","description":"Cypress failed tests","color":"4745d5"},"Needs validation":{"name":"Needs validation","description":"Needs problem validation before being picked up","color":"66673d"},"Slider Widget":{"name":"Slider Widget","description":"Issues raised for slider widgets.","color":"2eef5f"},"Multitenancy":{"name":"Multitenancy","description":"Support multitenancy within single appsmith instance","color":"8c49a9"},"Conversion Algorithm":{"name":"Conversion Algorithm","description":"All issue related to converting app from fixed to flex mode & vice versa","color":"d12d2e"},"Browser specific":{"name":"Browser specific","description":"All issue related to browser","color":"d12d2e"},"Performance infra":{"name":"Performance infra","description":"all issue related to the performance infra","color":"8a60f6"},"DSL Update":{"name":"DSL Update","description":"Issues related to storing and updating the DSL","color":"e16cf3"},"AST-frontend":{"name":"AST-frontend","description":"Issues related to maintaining AST logic","color":"2b4664"},"AST-backend":{"name":"AST-backend","description":"Backend issues related to AST parsing","color":"48883f"},"MariaDB":{"name":"MariaDB","description":"MariaDB datasource","color":"8428c3"},"ADS Component Issue":{"name":"ADS Component Issue","description":"Issues which are caused due to ADS components","color":"d89119"},"Regressed":{"color":"723fd0","name":"Regressed","description":"Scenarios that were working before but have now regressed"},"Needs RCA":{"name":"Needs RCA","description":"a critical or high priority issue that needs an RCA","color":"2cc68f"},"Custom JS Libraries":{"name":"Custom JS Libraries","description":"Issues related to adding custom JS library","color":"bacb6d"},"Integrations Pod General":{"name":"Integrations Pod General","description":"Issues related to the Integrations Pod that don't fit into other tags.","color":"287823"},"Performance Pod":{"name":"Performance Pod","description":"All things related to Appsmith performance","color":"b5a25d"},"Performance":{"name":"Performance","description":"Issues related to performance","color":"9a18d7"},"File upload issues":{"name":"File upload issues","description":"Issues related to uploading any type of files from within Appsmith","color":"2b4664"},"Action Selector":{"name":"Action Selector","description":"Issues related to action selector on the property pane","color":"2f9e20"},"Community Reported":{"name":"Community Reported","description":"issues reported by community members","color":"1402e5"},"JS Function execution":{"name":"JS Function execution","description":"JS function execution","color":"7c2de1"},"Self Serve":{"name":"Self Serve","description":"For all issues related to self-serve flow for business edition","color":"4dacfc"},"Self Serve 1.0":{"name":"Self Serve 1.0","description":"For all issues related to v1 of the self serve project","color":"ae839e"},"Customer Portal":{"name":"Customer Portal","description":"For all tasks/issues pertaining to customer.appsmith.com","color":"d2bc40"},"Cloud Services":{"name":"Cloud Services","description":"For all tasks/issues on Appsmith cloud-services relating to licensing, usage and billing","color":"d2bc40"},"One-click Binding":{"name":"One-click Binding","description":"Issues related to the One click binding epic","color":"f1661c"},"Airgap":{"name":"Airgap","description":"Tickets related to supporting air-gapped Appsmith instances","color":"1cb294"},"SMTP plugin":{"name":"SMTP plugin","description":"Issues related to SMTP plugin","color":"541457"},"AWS AMI":{"name":"AWS AMI","description":"Issues Related to AWS AMI","color":"b44680"},"Old widget version":{"name":"Old widget version","description":"Use this label to raise issue specific only to an older version of a widget","color":"ff3814"},"Enterprise Billing":{"name":"Enterprise Billing","description":"To track all tasks/issues related to licensing & billing for enterprise customers","color":"14c156"},"Oracle SQL DB":{"name":"Oracle SQL DB","description":"Issues related to the Oracle plugin","color":"cbabcb"},"Community Contributor":{"name":"Community Contributor","description":"Meant to track issues that are assigned to external contributors","color":"149ab6"},"widget vertical alignment":{"name":"widget vertical alignment","description":"All issue related widget vertical alignment on the auto layout canvas","color":"d12d2e"},"Observability":{"name":"Observability","description":"Issues related to observability on the Appsmith instance","color":"dff913"},"Checkbox Component":{"name":"Checkbox Component","description":"This labels deals with checkbox component in wds package","color":"75a401"},"Analytics Improvements":{"name":"Analytics Improvements","description":"For all tasks focused on improving our overall analytics and fixing any issues ","color":"29b8ed"},"WDS team":{"name":"WDS team","description":"","color":"8d675a"},"Enterprise Edition":{"name":"Enterprise Edition","description":"Features that will be supported in Enterprise Edition only","color":"984f5e"},"Query filter":{"name":"Query filter","description":"Issues related to query filtering, e.g., WHERE clause","color":"a15134"},"Keyboard accessibility ":{"name":"Keyboard accessibility ","description":"All issue related to ADS component keyboard accessibility","color":"2ba696"},"Toggle button":{"name":"Toggle button","description":"All issue related to ADS toggle button","color":"edc47f"},"SCIM":{"name":"SCIM","description":"Label to collate our SCIM issues","color":"48883f"},"ADS Category Token":{"name":"ADS Category Token","description":"All issues related appsmith design system category tokens","color":"920961"},"ADS Component Documentation":{"name":"ADS Component Documentation","description":"All issues Appsmith design system component documentation","color":"64c46a"},"ADS Migration":{"name":"ADS Migration","description":"All issues related to Appsmith design system migration","color":"b082d6"},"ADS Deduplication ":{"name":"ADS Deduplication ","description":"Replacing component with ADS components","color":"b082d6"},"ADS Revamp":{"name":"ADS Revamp","description":"All issues related to ads revamp. ","color":"b082d6"},"ADS Deduplication":{"name":"ADS Deduplication","description":"Replacing component with ADS components","color":"b082d6"},"ADS Grayscale":{"name":"ADS Grayscale","description":"Support grayscale color changes","color":"b03577"},"ADS Unit Test":{"name":"ADS Unit Test","description":"All issue related ads unit cases ","color":"b082d6"},"ADS Components":{"name":"ADS Components","description":"All issues related ADS components","color":"b082d6"},"Widget Discoverability":{"name":"Widget Discoverability","description":"Issues related to Widget Discoverability","color":"7b55ce"},"Widget setter method":{"name":"Widget setter method","description":"Issues with widget property setters","color":"8dce87"},"License":{"name":"License","description":"For all issues/tasks related to licensing of appsmith-ee edition","color":"90ee98"},"Platformization":{"name":"Platformization","description":"Issues or tasks related to platformization of Appsmith codebase","color":"4e972b"},"Activation - datasources":{"name":"Activation - datasources","description":"issues related to activation projects","color":"7c7ace"},"Partial-import-export":{"name":"Partial-import-export","description":"Label for granular reusability.","color":"717732"},"AI":{"name":"AI","description":"All tasks related to AI","color":"2b4664"},"ADS Typography":{"name":"ADS Typography","description":"All issue related typographical changes","color":"2dbe8d"},"Auto Layout":{"name":"Auto Layout","description":"Issues relates to auto layout","color":"92cf8c"},"Heroku":{"name":"Heroku","description":"Issues related to Heroku","color":"a81b69"},"ADS Visual Styles":{"name":"ADS Visual Styles","description":"All issues related to ADS visual styles","color":"d3da89"},"ADS Component Design":{"name":"ADS Component Design","description":"All issue related to component design","color":"5cc91e"},"Modal Component":{"name":"Modal Component","description":"All issue related to ads modal component","color":"ee63f3"},"App setting":{"name":"App setting","description":"Related to app settings panel within the app","color":"174f98"},"BE instance":{"name":"BE instance","description":"For all issues related to license, billing on BE instance","color":"ae8f98"},"Fixed layout":{"name":"Fixed layout","description":"issues related to fixed layout","color":"b66681"},"Anvil layout":{"name":"Anvil layout","description":"issues related to the new layout system anvil","color":"5e0904"},"New Deployment Mode":{"name":"New Deployment Mode","description":"Support a new mode of deployment","color":"108033"},"Custom widgets":{"name":"Custom widgets","description":"For all issues related to the custom widget project","color":"c9db9c"},"Homepage Experience V2":{"name":"Homepage Experience V2","description":"Label for reporting new tasks and bug fixes related to revamped homepage experience","color":"c55d54"},"Customer Success":{"name":"Customer Success","description":"Issues that the success team cares about","color":"6ccabd"},"Invite flow":{"name":"Invite flow","description":"Invite users flow and any associated actions","color":"881b35"},"Invite users":{"name":"Invite users","description":"Invite users flow and any associated actions","color":""},"Workflows Pod":{"name":"Workflows Pod","description":"Issues that the workflows team owns","color":"446925"},"DailyPromotionBlocker":{"name":"DailyPromotionBlocker","description":"DailyPromotion Blocker","color":"9b2280"},"JS Binding":{"name":"JS Binding","description":"All issues related to the JS Binding experience","color":"422fed"},"REST API":{"name":"REST API","description":"REST API plugin related issues","color":"e3ede5"},"Critical":{"color":"a1e3db","name":"Critical","description":"This issue breaks existing apps. Drop everything else to resolve"},"Module creator":{"name":"Module creator","description":"Issues related to the module creator side","color":"bb2c05"},"Module consumer":{"name":"Module consumer","description":"Issues related to the module consumer side","color":"83d3c5"},"Package versioning":{"name":"Package versioning","description":"ISsues related to how we manage versions for packages","color":"4c5218"},"Convert to module":{"name":"Convert to module","description":"Issues related to the module creation flow using conversion","color":"4c5218"},"Query module":{"name":"Query module","description":"Issues affecting query modules or its instances","color":"b11a7e"},"JS module":{"name":"JS module","description":"Issues affecting JS modules or its instances","color":"bf76f6"},"Secret Management":{"name":"Secret Management","description":"Issues related to secret management","color":"2b4664"},"REST API plugin":{"name":"REST API plugin","description":"REST API plugin related issues","color":"b5948a"},"UI module":{"name":"UI module","description":"Issues affecting UI modules or its instances","color":"d2acee"},"Preview mode":{"name":"Preview mode","description":"Issues related to app previews","color":"48883f"},"Git Auto-commit":{"name":"Git Auto-commit","description":"Issues related to autocommit","color":"717732"},"QA Pod":{"name":"QA Pod","description":"Issues under the QA Pod","color":"717732"},"Automation Test":{"name":"Automation Test","description":"","color":""},"Automation failures":{"name":"Automation failures","description":"","color":""},"Needs automation":{"name":"Needs automation","description":"Issues that needs automated tests","color":""},"Prepared statements":{"name":"Prepared statements","description":"Issues related to prepared statement flow","color":""},"Switch Group Widget":{"name":"Switch Group Widget","description":"Issues related to Switch group Widget","color":""},"Supervisor":{"name":"Supervisor","description":"Issues related to supervisor","color":"2c5813"},"Deployment Certificates":{"name":"Deployment Certificates","description":"Issues related to lets encrypt","color":"e148aa"},"Mock Data":{"name":"Mock Data","description":"Issues related to mock databases","color":"ebf251"},"AWS ECS":{"name":"AWS ECS","description":"Issues related to ECS Fargate","color":"e506ff"},"Publish App":{"name":"Publish App","description":"Issues related to app deployment","color":"2b4664"},"IDE Infra":{"name":"IDE Infra","description":"Issues related to the IDE infrastructure like saving changes","color":"1bb96a"},"User Profile":{"name":"User Profile","description":"Issues related to a user profile","color":"a60d34"},"Page Management":{"color":"1bb96a","name":"Page Management","description":"Issues related to configuring pages"},"Ingress":{"name":"Ingress","description":"Ingress Controller","color":"a86802"},"Nginx":{"name":"Nginx","description":"Issues related to Nginx","color":"e54195"},"Building blocks":{"name":"Building blocks","description":"Building blocks on cavas, on templates listing or drag and drop of building blocks.","color":"48883f"},"Table Inline Edit":{"name":"Table Inline Edit","description":"Issues related to inline editing","color":"60895a"},"User Session ":{"name":"User Session ","description":"For all issues/tasks related to user sessions","color":"65a3f5"},"WDS - all widgets":{"name":"WDS - all widgets","description":"all widget present in WDS","color":"2670ae"},"WDS - input widget":{"name":"WDS - input widget","description":"Issues related to input widget on WDS","color":"2670ae"},"WDS - paragraph widget":{"name":"WDS - paragraph widget","description":"issues related to paragraph widget on WDS","color":"2670ae"},"WDS - statbox widget":{"name":"WDS - statbox widget","description":"issues related to statbox widget on WDS","color":"2670ae"},"WDS - modal widget":{"name":"WDS - modal widget","description":"Issues related to modal widget on WDS","color":"2670ae"},"WDS - icon widget":{"name":"WDS - icon widget","description":"Issues related to icon widget on WDS","color":"2670ae"},"WDS - checkbox widget":{"name":"WDS - checkbox widget","description":"Issues related to checkbox widget on WDS","color":"2670ae"},"WDS - table widget":{"name":"WDS - table widget","description":"Issues related to table widget on WDS","color":"2670ae"},"WDS - keyValue widget":{"name":"WDS - keyValue widget","description":"Issues related to key-value widget on WDS","color":"2670ae"},"WDS - switch group widget":{"name":"WDS - switch group widget","description":"Issues related to switch group widget on WDS","color":"2670ae"},"WDS - theming":{"name":"WDS - theming","description":"Issues related to theming on the Anvil instance","color":"2670ae"},"Anvil POD":{"name":"Anvil POD","description":"Issue related to Anvil project","color":"5e0904"},"Anvil - theming":{"name":"Anvil - theming","description":"Issues related to theming on the Anvil instance","color":"c28de5"},"Anvil - vertical alignment":{"name":"Anvil - vertical alignment","description":"Issues related to vertical alignment on the Anvil layout","color":"c28de5"},"Anvil - layout component":{"name":"Anvil - layout component","description":"Issues related to layout component on the Anvil layout","color":"c28de5"},"Anvil - drag & drop":{"name":"Anvil - drag & drop","description":"Issues related to drag & drop experience on Anvil","color":"c28de5"},"Anvil - zones & sections":{"name":"Anvil - zones & sections","description":"Issues related to zones and sections on the Anvil layout","color":"c28de5"},"Anvil - copy paste experience":{"name":"Anvil - copy paste experience","description":"Issues related to copy paste experience on the Anvil layout","color":"c28de5"},"WDS - phone widget":{"name":"WDS - phone widget","description":"Issues related to phone widget on WDS","color":"c28de5"},"WDS - responsive widget":{"name":"WDS - responsive widget","description":"All issues related to widget responsiveness","color":"11ee05"},"Anvil - responsive viewport":{"color":"11ee05","name":"Anvil - responsive viewport","description":"Issues seen on different viewports like mobile"},"WDS - widget styling":{"color":"11ee05","name":"WDS - widget styling","description":"all about widget styling"},"Anvil - spacing":{"name":"Anvil - spacing","description":"Related to spacing between widgets in auto layout","color":"11ee05"},"Anvil - responsive canvas":{"name":"Anvil - responsive canvas","description":"All issues related to canvas responsiveness","color":"11ee05"},"WDS - inline button widget":{"name":"WDS - inline button widget","description":"Issues related to inline button widget on WDS","color":"7cef83"},"Activation Pod":{"name":"Activation Pod","description":"for Activation group","color":"d67d00"},"Activation":{"name":"Activation","description":"for Activation group","color":"d67d00"},"Tests":{"name":"Tests","description":"Test issues","color":"4fc7b6"},"Ballpark: XXS":{"name":"Ballpark: XXS","description":"~1xDev in 1/2xSprint","color":""},"Ballpark: XS":{"name":"Ballpark: XS","description":"~1xDev in 1xSprint","color":"53bf71"},"Ballpark: S":{"name":"Ballpark: S","description":"~2xDev in 1xSprint","color":"6e9e65"},"Ballpark: M":{"name":"Ballpark: M","description":"~1xPOD in 1xSprint","color":"2229e6"},"Ballpark: L":{"name":"Ballpark: L","description":"~1xPOD in 3xSprint or 2xPODs in 1xSprint","color":"49962f"},"Ballpark: XL":{"name":"Ballpark: XL","description":"~1xPOD in 1xQuarter or 2xPODs in 2xSprint","color":"b524c9"},"Ballpark: XXL":{"name":"Ballpark: XXL","description":"~2xPODs in 1xQuarter","color":"22092c"},"Auto-commit":{"name":"Auto-commit","description":"Issues related to auto-generated commits showing up on git ","color":"e25b89"},"Continuous Deployment":{"name":"Continuous Deployment","description":"Issues related to CD pipeline on git","color":"aea47c"},"Default branch":{"name":"Default branch","description":"Issues related to using a default branch on git","color":"195737"},"Git status":{"name":"Git status","description":"Issues related to information shown on git status modal or number of changes appearing in a branch","color":"c851b8"},"Git performance":{"name":"Git performance","description":"Issues related to perceived performance on any git operation","color":"189af6"},"Anvil team":{"name":"Anvil team","description":"issues related to the new layout system anvil","color":"798200"},"SDLC":{"name":"SDLC","description":"Issues related to software development lifecycle experiences","color":"bae511"},"Reconnect DS modal":{"name":"Reconnect DS modal","description":"Issues related to reconnect datasource modal post app import","color":"2e398b"},"Stability Pod":{"name":"Stability Pod","description":"For all issues/tasks to be prioritized under Stability pod","color":"86ddf6"},"Stability Issue":{"name":"Stability Issue","description":"Every issue handle by Stability Pod","color":"4d024a"},"Move to Postgres":{"name":"Move to Postgres","description":"Issues required to be solved for the move to Postgres as repository layer","color":"4e13ac"},"User Session":{"name":"User Session","description":"Issues related to user sessions","color":"8255e5"},"IDE tabs":{"name":"IDE tabs","description":"query and js tabs","color":"1bb96a"},"Inviting Contribution":{"name":"Inviting Contribution","description":"Issues that we would like contributions to","color":""},"cypress-flaky-fix":{"name":"cypress-flaky-fix","description":"This label is auto-added when a PR which only has Cypress fixes are merged to release","color":"722cbc"},"Cypress flaky tests":{"name":"Cypress flaky tests","description":"Test scripts that need to be fixed on Cypress by dev or SDET","color":"722cbc"},"Help enterprise":{"name":"Help enterprise","description":"Requested by Appsmith customers or prospects","color":"FF8C00"},"Learnability":{"name":"Learnability","description":"Issues affecting the product learnability, making the product harder for new users.","color":"800c2f"},"ADS Spacing":{"name":"ADS Spacing","description":"","color":"686ebb"},"ads unit test":{"name":"ads unit test","description":"All issue related ads unit cases","color":"686ebb"},"ads revamp":{"name":"ads revamp","description":"All issues related to ads revamp.","color":"686ebb"},"Javascript Product":{"color":"709a21","name":"Javascript Product","description":"Issues related to users writing javascript in appsmith"},"IDE Product":{"color":"1bb96a","name":"IDE Product","description":"Issues related to the IDE Product"},"IDE Pod":{"color":"1bb96a","name":"IDE Pod","description":"Issues that new developers face while exploring the IDE"},"Accelerators Product":{"name":"Accelerators Product","description":"Issues related to app building accelerators","color":"f3fce6"},"Templates Product":{"name":"Templates Product","description":"Issues related to Templates","color":"f3fce6"},"Design System Product":{"name":"Design System Product","description":"Appsmith design system related issues","color":"2b4664"},"ads deduplication":{"name":"ads deduplication","description":"Replacing component with ADS components","color":"708943"},"Admin Settings Product":{"color":"708943","name":"Admin Settings Product","description":"Issues in admin settings pages"},"Appsmith AI":{"name":"Appsmith AI","description":"All issues related to the Appsmith AI datasource","color":"708943"},"Query & JS Pod":{"color":"709a21","name":"Query & JS Pod","description":"Issues related to the query & JS Pod"},"RBAC Product":{"name":"RBAC Product","description":"Issues, requests and enhancements around RBAC.","color":""},"Workspace Product":{"name":"Workspace Product","description":"Issues related to workspaces","color":""},"CE Instance Usage":{"name":"CE Instance Usage","description":"For all issues relating to usage, licensing or billing on the CE instance","color":""},"Billing & Licensing Product":{"name":"Billing & Licensing Product","description":"Issues pertaining to licensing, billing and usage across self serve and enterprise customers","color":"446925"},"Platform Administration Pod":{"color":"446925","name":"Platform Administration Pod","description":"Issues related to platform administration & management"},"DB Infrastructure Pod":{"name":"DB Infrastructure Pod","description":"Pod to handle database infrastructure","color":"446925"},"Packages Product":{"name":"Packages Product","description":"Issues related to packages","color":"446925"},"Workflows Product":{"name":"Workflows Product","description":"Issues related to the workflows product","color":"446925"},"Debugger Product":{"color":"857f58","name":"Debugger Product","description":"Issues related to the debugger"},"Packages Pod":{"name":"Packages Pod","description":"issues that belong to the packages pod","color":"857f58"},"Environments Product":{"name":"Environments Product","description":"Issues related to datasource environments","color":"857f58"},"Custom Widgets":{"name":"Custom Widgets","description":"For all issues related to the custom widget project","color":"857f58"},"Branding Product":{"name":"Branding Product","description":"All issues under branding and whitelabelling appsmith ecosystem","color":"857f58"},"Widgets & Accelerators Pod":{"name":"Widgets & Accelerators Pod","description":"Issues related to widgets & Accelerators","color":"27496a"},"Widgets Product":{"name":"Widgets Product","description":"This label groups issues related to widgets","color":"f3fce6"},"App Theming Product":{"name":"App Theming Product","description":"Items that are related to the App level theming controls epic","color":"48883f"},"UI Building Product":{"color":"48883f","name":"UI Building Product","description":"Issues related to the UI Building experience"},"Onboarding Product":{"color":"48883f","name":"Onboarding Product","description":"Issues related to onboarding new developers"},"Database Schema":{"name":"Database Schema","description":"Issues related to database schema","color":"48883f"},"Git Product":{"color":"48883f","name":"Git Product","description":"Issues related to version control product"},"Git Platform Pod":{"name":"Git Platform Pod","description":"Issues related to the git & the app platform ","color":"48883f"},"Embedding Apps Product":{"name":"Embedding Apps Product","description":"Issues related to embedding","color":"48883f"},"Integrations Product":{"name":"Integrations Product","description":"Issues related to a specific integration","color":"b9f21c"},"Feature Flagging":{"name":"Feature Flagging","description":"Anything related feature flagging","color":"4574ae"},"Audit Logs Product":{"name":"Audit Logs Product","description":"Audit trails to ensure data security","color":"4574ae"},"Identity & Authentication Product":{"name":"Identity & Authentication Product","description":"Issues related to user identity & authentication","color":"4574ae"},"Email verification":{"name":"Email verification","description":"Email verification issues","color":"4574ae"},"Artifact Platform Product":{"name":"Artifact Platform Product","description":"Issues related to the application platform","color":"4574ae"},"Git IA":{"name":"Git IA","description":"Issues related to Git IA changes","color":"df8bd6"},"Documentation Pod":{"name":"Documentation Pod","description":"Issues related to user education","color":"8c8c02"},"Branch management":{"name":"Branch management","description":"Issues related to using a branch management on git","color":"ebe6af"},"Reconfigure Datasource Modal":{"name":"Reconfigure Datasource Modal","description":"Issues related to reconfigure DS modal that comes after importing applications","color":"5ac17b"}},"success":true} \ No newline at end of file +{"runners":[{"versioning":{"source":"milestones","type":"SemVer"},"prereleaseName":"alpha","issue":{"labels":{"Widgets Product":{"conditions":[{"label":"Button Widget","type":"hasLabel","value":true},{"label":"Chart Widget","type":"hasLabel","value":true},{"label":"Container Widget","type":"hasLabel","value":true},{"label":"Date Picker Widget","type":"hasLabel","value":true},{"label":"Select Widget","type":"hasLabel","value":true},{"label":"File Picker Widget","type":"hasLabel","value":true},{"label":"Form Widget","type":"hasLabel","value":true},{"label":"Image Widget","type":"hasLabel","value":true},{"label":"Input Widget","type":"hasLabel","value":true},{"label":"List Widget","type":"hasLabel","value":true},{"label":"MultiSelect Widget","type":"hasLabel","value":true},{"label":"Map Widget","type":"hasLabel","value":true},{"label":"Modal Widget","type":"hasLabel","value":true},{"label":"Radio Widget","type":"hasLabel","value":true},{"label":"Rich Text Editor Widget","type":"hasLabel","value":true},{"label":"Tab Widget","type":"hasLabel","value":true},{"label":"Table Widget","type":"hasLabel","value":true},{"label":"Text Widget","type":"hasLabel","value":true},{"label":"Video Widget","type":"hasLabel","value":true},{"label":"iFrame","type":"hasLabel","value":true},{"label":"Menu Button","type":"hasLabel","value":true},{"label":"Rating","type":"hasLabel","value":true},{"label":"Widget Validation","type":"hasLabel","value":true},{"label":"New Widget","type":"hasLabel","value":true},{"label":"Switch widget","type":"hasLabel","value":true},{"label":"Audio Widget","type":"hasLabel","value":true},{"label":"Icon Button Widget","type":"hasLabel","value":true},{"label":"Stat Box Widget","type":"hasLabel","value":true},{"label":"Voice Recorder Widget","type":"hasLabel","value":true},{"label":"Calendar Widget","type":"hasLabel","value":true},{"label":"Menu Button Widget","type":"hasLabel","value":true},{"label":"Divider Widget","type":"hasLabel","value":true},{"label":"Rating Widget","type":"hasLabel","value":true},{"label":"View Mode","type":"hasLabel","value":true},{"label":"Widget Property","type":"hasLabel","value":true},{"label":"Document Viewer Widget","type":"hasLabel","value":true},{"label":"Radio Group Widget","type":"hasLabel","value":true},{"label":"Currency Input Widget","type":"hasLabel","value":true},{"label":"TreeSelect","type":"hasLabel","value":true},{"label":"MultiTree Select Widget","type":"hasLabel","value":true},{"label":"Phone Input Widget","type":"hasLabel","value":true},{"label":"JSON Form","type":"hasLabel","value":true},{"label":"All Widgets","type":"hasLabel","value":true},{"label":"Button Group widget","type":"hasLabel","value":true},{"label":"Progress bar widget","type":"hasLabel","value":true},{"label":"Audio Recorder Widget","type":"hasLabel","value":true},{"label":"Camera Widget","type":"hasLabel","value":true},{"label":"Table Widget V2","type":"hasLabel","value":true},{"label":"Map Chart Widget","type":"hasLabel","value":true},{"label":"Code Scanner Widget","type":"hasLabel","value":true},{"label":"Widget keyboard accessibility","type":"hasLabel","value":true},{"label":"List Widget V2","type":"hasLabel","value":true},{"label":"Slider Widget","type":"hasLabel","value":true},{"label":"One-click Binding","type":"hasLabel","value":true},{"label":"Old widget version","type":"hasLabel","value":true},{"label":"Widget Discoverability","type":"hasLabel","value":true},{"label":"Switch Group Widget","type":"hasLabel","value":true},{"label":"Checkbox Group widget","type":"hasLabel","value":true},{"label":"Checkbox Widget","type":"hasLabel","value":true},{"label":"Table Inline Edit","type":"hasLabel","value":true},{"label":"Custom Widgets","type":"hasLabel","value":true}],"requires":1},"Javascript Product":{"conditions":[{"label":"JS Linting & Errors","type":"hasLabel","value":true},{"label":"Autocomplete","type":"hasLabel","value":true},{"label":"Evaluated Value","type":"hasLabel","value":true},{"label":"Slash Command","type":"hasLabel","value":true},{"label":"New JS Function","type":"hasLabel","value":true},{"label":"JS Usability","type":"hasLabel","value":true},{"label":"Framework Functions","type":"hasLabel","value":true},{"label":"JS Objects","type":"hasLabel","value":true},{"label":"JS Evaluation","type":"hasLabel","value":true},{"label":"Custom JS Libraries","type":"hasLabel","value":true},{"label":"Action Selector","type":"hasLabel","value":true},{"label":"Widget setter method","type":"hasLabel","value":true},{"label":"Entity Refactor","type":"hasLabel","value":true},{"label":"AST-frontend","type":"hasLabel","value":true},{"label":"Sniping Mode","type":"hasLabel","value":true},{"label":"AST-backend","type":"hasLabel","value":true}],"requires":1},"IDE Product":{"conditions":[{"label":"IDE Product","type":"hasLabel","value":true},{"label":"IDE Infra","type":"hasLabel","value":true},{"label":"IDE Navigation","type":"hasLabel","value":true},{"label":"IDE tabs","type":"hasLabel","value":true},{"label":"Omnibar","type":"hasLabel","value":true},{"label":"Entity Explorer","type":"hasLabel","value":true},{"label":"Page Management","type":"hasLabel","value":true},{"label":"Preview mode","type":"hasLabel","value":true}],"requires":1},"Accelerators Product":{"conditions":[{"label":"Generate Page","type":"hasLabel","value":true},{"label":"Building blocks","type":"hasLabel","value":true}],"requires":1},"Templates Product":{"conditions":[{"label":"Partial-import-export","type":"hasLabel","value":true},{"label":"Templates Product","type":"hasLabel","value":true}],"requires":1},"Design System Product":{"conditions":[{"label":"Design System Product","type":"hasLabel","value":true},{"label":"ADS Component Issue","type":"hasLabel","value":true},{"label":"Keyboard accessibility ","type":"hasLabel","value":true},{"label":"Toggle button","type":"hasLabel","value":true},{"label":"ADS Category Token","type":"hasLabel","value":true},{"label":"ADS Component Documentation","type":"hasLabel","value":true},{"label":"ADS Migration","type":"hasLabel","value":true},{"label":"ADS Deduplication ","type":"hasLabel","value":true},{"label":"ADS Revamp","type":"hasLabel","value":true},{"label":"ADS Deduplication","type":"hasLabel","value":true},{"label":"ADS Unit Test","type":"hasLabel","value":true},{"label":"ADS Components","type":"hasLabel","value":true},{"label":"ADS Grayscale","type":"hasLabel","value":true},{"label":"Design System","type":"hasLabel","value":true},{"label":"ADS Typography","type":"hasLabel","value":true},{"label":"ADS Visual Styles","type":"hasLabel","value":true},{"label":"ADS Component Design","type":"hasLabel","value":true},{"label":"Modal Component","type":"hasLabel","value":true},{"label":"ADS Spacing","type":"hasLabel","value":true},{"label":"ads unit test","type":"hasLabel","value":true},{"label":"ads revamp","type":"hasLabel","value":true},{"label":"ads deduplication","type":"hasLabel","value":true}],"requires":1},"RBAC Product":{"conditions":[{"label":"Invite users","type":"hasLabel","value":true},{"label":"RBAC Product","type":"hasLabel","value":true}],"requires":1},"Workspace Product":{"conditions":[{"label":"Home Page","type":"hasLabel","value":true},{"label":"Workspace Product","type":"hasLabel","value":true}],"requires":1},"Billing & Licensing Product":{"conditions":[{"label":"Customer Portal","type":"hasLabel","value":true},{"label":"Cloud Services","type":"hasLabel","value":true},{"label":"Billing","type":"hasLabel","value":true},{"label":"Self Serve","type":"hasLabel","value":true},{"label":"Enterprise Billing","type":"hasLabel","value":true},{"label":"Analytics Improvements","type":"hasLabel","value":true},{"label":"Self Serve 1.0","type":"hasLabel","value":true},{"label":"License","type":"hasLabel","value":true},{"label":"BE instance","type":"hasLabel","value":true},{"label":"Invite flow","type":"hasLabel","value":true},{"label":"CE Instance Usage","type":"hasLabel","value":true},{"label":"Feature Flagging","type":"hasLabel","value":true}],"requires":1},"Packages Product":{"conditions":[{"label":"Packages Product","type":"hasLabel","value":true}],"requires":1},"Environments Product":{"conditions":[{"label":"Environments Product","type":"hasLabel","value":true}],"requires":1},"UI Building Product":{"conditions":[{"label":"Property Pane","type":"hasLabel","value":true},{"label":"Copy Paste","type":"hasLabel","value":true},{"label":"Drag & Drop","type":"hasLabel","value":true},{"label":"Undo/Redo","type":"hasLabel","value":true},{"label":"Widgets Pane","type":"hasLabel","value":true},{"label":"UI Performance","type":"hasLabel","value":true},{"label":"Widget Grouping","type":"hasLabel","value":true},{"label":"Reflow & Resize","type":"hasLabel","value":true},{"label":"Canvas / Grid","type":"hasLabel","value":true},{"label":"Auto Height","type":"hasLabel","value":true},{"label":"Browser specific","type":"hasLabel","value":true},{"label":"Auto Layout","type":"hasLabel","value":true},{"label":"Fixed layout","type":"hasLabel","value":true},{"label":"App Navigation","type":"hasLabel","value":true}],"requires":1},"Onboarding Product":{"conditions":[{"label":"Welcome Screen","type":"hasLabel","value":true}],"requires":1},"Git Product":{"conditions":[{"label":"Git Product","type":"hasLabel","value":true},{"label":"Git Auto-commit","type":"hasLabel","value":true},{"label":"Auto-commit","type":"hasLabel","value":true},{"label":"Continuous Deployment","type":"hasLabel","value":true},{"label":"Default branch","type":"hasLabel","value":true},{"label":"Git status","type":"hasLabel","value":true},{"label":"Git performance","type":"hasLabel","value":true},{"label":"SDLC","type":"hasLabel","value":true},{"label":"Git IA","type":"hasLabel","value":true},{"label":"Branch management","type":"hasLabel","value":true}],"requires":1},"Embedding Apps Product":{"conditions":[{"label":"Embedding Apps Product","type":"hasLabel","value":true}],"requires":1},"Integrations Product":{"conditions":[{"label":"New Datasource","type":"hasLabel","value":true},{"label":"Firestore","type":"hasLabel","value":true},{"label":"Google Sheets","type":"hasLabel","value":true},{"label":"Mongo","type":"hasLabel","value":true},{"label":"Redshift","type":"hasLabel","value":true},{"label":"snowflake","type":"hasLabel","value":true},{"label":"S3","type":"hasLabel","value":true},{"label":"Redis","type":"hasLabel","value":true},{"label":"Postgres","type":"hasLabel","value":true},{"label":"GraphQL Plugin","type":"hasLabel","value":true},{"label":"ArangoDB","type":"hasLabel","value":true},{"label":"MsSQL","type":"hasLabel","value":true},{"label":"Elastic Search","type":"hasLabel","value":true},{"label":"OAuth","type":"hasLabel","value":true},{"label":"Airtable","type":"hasLabel","value":true},{"label":"CURL","type":"hasLabel","value":true},{"label":"DynamoDB","type":"hasLabel","value":true},{"label":"Zendesk","type":"hasLabel","value":true},{"label":"Hubspot","type":"hasLabel","value":true},{"label":"Query Forms","type":"hasLabel","value":true},{"label":"Twilio","type":"hasLabel","value":true},{"label":"MySQL","type":"hasLabel","value":true},{"label":"Connection pool","type":"hasLabel","value":true},{"label":"MariaDB","type":"hasLabel","value":true},{"label":"Integrations Pod General","type":"hasLabel","value":true},{"label":"SMTP plugin","type":"hasLabel","value":true},{"label":"Oracle SQL DB","type":"hasLabel","value":true},{"label":"Query filter","type":"hasLabel","value":true},{"label":"Activation - datasources","type":"hasLabel","value":true},{"label":"REST API","type":"hasLabel","value":true},{"label":"REST API","type":"hasLabel","value":true},{"label":"Datasources","type":"hasLabel","value":true},{"label":"REST API plugin","type":"hasLabel","value":true},{"label":"Prepared statements","type":"hasLabel","value":true},{"label":"Query Generation","type":"hasLabel","value":true},{"label":"Core Query Execution","type":"hasLabel","value":true},{"label":"Query Management","type":"hasLabel","value":true},{"label":"Query Settings","type":"hasLabel","value":true},{"label":"Query performance","type":"hasLabel","value":true},{"label":"Datatype issue","type":"hasLabel","value":true},{"label":"SmartSubstitution","type":"hasLabel","value":true},{"label":"Suggested Widgets","type":"hasLabel","value":true},{"label":"SAAS Plugins","type":"hasLabel","value":true},{"label":"Reconnect DS modal","type":"hasLabel","value":true},{"label":"OnPageLoad","type":"hasLabel","value":true},{"label":"File upload issues","type":"hasLabel","value":true},{"label":"AI","type":"hasLabel","value":true},{"label":"Appsmith AI","type":"hasLabel","value":true},{"label":"Database Schema","type":"hasLabel","value":true}],"requires":1},"Identity & Authentication Product":{"conditions":[{"label":"Login / Signup","type":"hasLabel","value":true},{"label":"SSO","type":"hasLabel","value":true},{"label":"SCIM","type":"hasLabel","value":true},{"label":"Email verification","type":"hasLabel","value":true}],"requires":1},"Artifact Platform Product":{"conditions":[{"label":"Fork App","type":"hasLabel","value":true},{"label":"Publish App","type":"hasLabel","value":true},{"label":"Secret Management","type":"hasLabel","value":true},{"label":"Import-Export-App","type":"hasLabel","value":true}],"requires":1},"DevOps Pod":{"conditions":[{"label":"Docker","type":"hasLabel","value":true},{"label":"Super Admin","type":"hasLabel","value":true},{"label":"Deployment","type":"hasLabel","value":true},{"label":"K8s","type":"hasLabel","value":true},{"label":"Email Config","type":"hasLabel","value":true},{"label":"Backup & Restore","type":"hasLabel","value":true},{"label":"AWS AMI","type":"hasLabel","value":true},{"label":"Observability","type":"hasLabel","value":true},{"label":"Heroku","type":"hasLabel","value":true},{"label":"New Deployment Mode","type":"hasLabel","value":true},{"label":"Supervisor","type":"hasLabel","value":true},{"label":"Deployment Certificates","type":"hasLabel","value":true},{"label":"Mock Data","type":"hasLabel","value":true},{"label":"AWS ECS","type":"hasLabel","value":true},{"label":"Ingress","type":"hasLabel","value":true},{"label":"Nginx","type":"hasLabel","value":true},{"label":"Setup Issues","type":"hasLabel","value":true}],"requires":1},"Performance Pod":{"conditions":[{"label":"Performance","type":"hasLabel","value":true},{"label":"Performance infra","type":"hasLabel","value":true}],"requires":1},"IDE Pod":{"conditions":[{"label":"Telemetry","type":"hasLabel","value":true},{"label":"i18n","type":"hasLabel","value":true},{"label":"IDE Product","type":"hasLabel","value":true},{"label":"App setting","type":"hasLabel","value":true},{"label":"Debugger Product","type":"hasLabel","value":true},{"label":"Embedding Apps Product","type":"hasLabel","value":true}],"requires":1},"Platform Administration Pod":{"conditions":[{"label":"Airgap","type":"hasLabel","value":true},{"label":"Enterprise Edition","type":"hasLabel","value":true},{"label":"Invite flow","type":"hasLabel","value":true},{"label":"User Profile","type":"hasLabel","value":true},{"label":"User Session ","type":"hasLabel","value":true},{"label":"User Session","type":"hasLabel","value":true},{"label":"Admin Settings Product","type":"hasLabel","value":true},{"label":"RBAC Product","type":"hasLabel","value":true},{"label":"Workspace Product","type":"hasLabel","value":true},{"label":"Branding Product","type":"hasLabel","value":true},{"label":"Audit Logs Product","type":"hasLabel","value":true},{"label":"Identity & Authentication Product","type":"hasLabel","value":true}],"requires":1},"DB Infrastructure Pod":{"conditions":[{"label":"Move to Postgres","type":"hasLabel","value":true}],"requires":1},"Widgets & Accelerators Pod":{"conditions":[{"label":"Accelerators Product","type":"hasLabel","value":true},{"label":"Templates Product","type":"hasLabel","value":true},{"label":"Widgets Product","type":"hasLabel","value":true},{"label":"App Theming Product","type":"hasLabel","value":true}],"requires":1},"Packages Pod":{"conditions":[{"label":"Module creator","type":"hasLabel","value":true},{"label":"Module consumer","type":"hasLabel","value":true},{"label":"Package versioning","type":"hasLabel","value":true},{"label":"Convert to module","type":"hasLabel","value":true},{"label":"Query module","type":"hasLabel","value":true},{"label":"JS module","type":"hasLabel","value":true},{"label":"UI module","type":"hasLabel","value":true},{"label":"Packages Pod","type":"hasLabel","value":true}],"requires":1},"Workflows Pod":{"conditions":[{"label":"Workflows Product","type":"hasLabel","value":true}],"requires":1},"Query & JS Pod":{"conditions":[{"label":"Javascript Product","type":"hasLabel","value":true},{"label":"Onboarding Product","type":"hasLabel","value":true},{"label":"Integrations Product","type":"hasLabel","value":true},{"label":"Reconfigure Datasource Modal","type":"hasLabel","value":true}],"requires":1},"QA Pod":{"conditions":[{"label":"QA","type":"hasLabel","value":true},{"label":"Automation Test","type":"hasLabel","value":true},{"label":"TestGap","type":"hasLabel","value":true},{"label":"Automation failures","type":"hasLabel","value":true},{"label":"Needs automation","type":"hasLabel","value":true}],"requires":1},"Anvil POD":{"conditions":[{"label":"Checkbox Component","type":"hasLabel","value":true},{"label":"WDS team","type":"hasLabel","value":true},{"label":"Anvil POD","type":"hasLabel","value":true},{"label":"WDS - all widgets","type":"hasLabel","value":true},{"label":"WDS - input widget","type":"hasLabel","value":true},{"label":"WDS - paragraph widget","type":"hasLabel","value":true},{"label":"WDS - statbox widget","type":"hasLabel","value":true},{"label":"WDS - modal widget","type":"hasLabel","value":true},{"label":"WDS - icon widget","type":"hasLabel","value":true},{"label":"WDS - checkbox widget","type":"hasLabel","value":true},{"label":"WDS - table widget","type":"hasLabel","value":true},{"label":"WDS - keyValue widget","type":"hasLabel","value":true},{"label":"WDS - switch group widget","type":"hasLabel","value":true},{"label":"WDS - theming","type":"hasLabel","value":true},{"label":"Anvil layout","type":"hasLabel","value":true},{"label":"Anvil - theming","type":"hasLabel","value":true},{"label":"Anvil - vertical alignment","type":"hasLabel","value":true},{"label":"Anvil - layout component","type":"hasLabel","value":true},{"label":"Anvil - drag & drop","type":"hasLabel","value":true},{"label":"Anvil - zones & sections","type":"hasLabel","value":true},{"label":"Anvil - copy paste experience","type":"hasLabel","value":true},{"label":"WDS - phone widget","type":"hasLabel","value":true},{"label":"WDS - responsive widget","type":"hasLabel","value":true},{"label":"Anvil - responsive viewport","type":"hasLabel","value":true},{"label":"WDS - widget styling","type":"hasLabel","value":true},{"label":"Anvil - spacing","type":"hasLabel","value":true},{"label":"Anvil - responsive canvas","type":"hasLabel","value":true},{"label":"WDS - inline button widget","type":"hasLabel","value":true},{"label":"Anvil team","type":"hasLabel","value":true}],"requires":1},"Activation Pod":{"conditions":[{"label":"Activation","type":"hasLabel","value":true}],"requires":1},"Stability Pod":{"conditions":[{"label":"Stability Issue","type":"hasLabel","value":true},{"label":"cypress-flaky-fix","type":"hasLabel","value":true},{"label":"Cypress flaky tests","type":"hasLabel","value":true}],"requires":1},"Documentation Pod":{"conditions":[{"label":"Documentation","type":"hasLabel","value":true}],"requires":1},"Packages & Git Pod":{"conditions":[{"label":"Packages Pod","type":"hasLabel","value":true},{"label":"Git Product","type":"hasLabel","value":true},{"label":"Packages Product","type":"hasLabel","value":true},{"label":"Git Platform","type":"hasLabel","value":true}],"requires":1},"Git Platform":{"conditions":[{"label":"Environments Product","type":"hasLabel","value":true},{"label":"Artifact Platform Product","type":"hasLabel","value":true}],"requires":1}}},"root":"."}],"labels":{"Tab Widget":{"color":"e2c76c","name":"Tab Widget","description":""},"Dont merge":{"color":"ADB39C","name":"Dont merge","description":""},"Epic":{"color":"3E4B9E","name":"Epic","description":"A zenhub epic that describes a project"},"Menu Button Widget":{"color":"235708","name":"Menu Button Widget","description":"Issues related to Menu Button widget"},"Checkbox Group widget":{"color":"bbeecd","name":"Checkbox Group widget","description":"Issues related to Checkbox Group Widget"},"Input Widget":{"color":"ae65d8","name":"Input Widget","description":""},"Security":{"color":"99139C","name":"Security","description":""},"QA":{"color":"","name":"QA","description":"Needs QA attention"},"Verified":{"color":"9bf416","name":"Verified","description":""},"Wont Fix":{"color":"ffffff","name":"Wont Fix","description":"This will not be worked on"},"MySQL":{"color":"c9ddc6","name":"MySQL","description":"Issues related to MySQL plugin"},"Development":{"color":"9F8A02","name":"Development","description":""},"Help Wanted":{"color":"008672","name":"Help Wanted","description":"Extra attention is needed"},"Home Page":{"color":"","name":"Home Page","description":"Issues related to the application home page"},"Rating Widget":{"color":"235708","name":"Rating Widget","description":"Issues related to the rating widget"},"Stat Box Widget":{"color":"f1c9ce","name":"Stat Box Widget","description":"Issues related to stat box"},"Enhancement":{"color":"a2eeef","name":"Enhancement","description":"New feature or request"},"Fork App":{"color":"af87c7","name":"Fork App","description":"Issues related to forking apps"},"Container Widget":{"color":"19AD0D","name":"Container Widget","description":"Container widget"},"Papercut":{"color":"B562F6","name":"Papercut","description":""},"Needs Design":{"color":"bfd4f2","name":"Needs Design","description":"needs design or changes to design"},"i18n":{"color":"1799b0","name":"i18n","description":"Represents issues that need to be tackled to handle internationalization"},"Rich Text Editor Widget":{"color":"f72cac","name":"Rich Text Editor Widget","description":""},"skip-changelog":{"color":"06086F","name":"skip-changelog","description":"Adding this label to a PR prevents it from being listed in the changelog"},"Low":{"color":"79e53b","name":"Low","description":"An issue that is neither critical nor breaks a user flow"},"potential-duplicate":{"color":"d3cb2e","name":"potential-duplicate","description":"This label marks issues that are potential duplicates of already open issues"},"Audio Widget":{"color":"447B9A","name":"Audio Widget","description":"Issues related to Audio Widget"},"Firestore":{"color":"8078b0","name":"Firestore","description":"Issues related to the firestore Integration"},"New Widget":{"color":"be4cf2","name":"New Widget","description":"A request for a new widget"},"Modal Widget":{"color":"03846f","name":"Modal Widget","description":""},"UX Improvement":{"color":"f4a089","name":"UX Improvement","description":""},"S3":{"color":"8078b0","name":"S3","description":"Issues related to the S3 plugin"},"Release Blocker":{"color":"5756bf","name":"Release Blocker","description":"This issue must be resolved before the release"},"safari":{"color":"51C6AA","name":"safari","description":"Bugs seen on safari browser"},"Example Apps":{"color":"1799b0","name":"Example Apps","description":"Example apps created for new signups"},"MultiSelect Widget":{"color":"AB62D4","name":"MultiSelect Widget","description":"Issues related to MultiSelect Widget"},"Calendar Widget":{"color":"8c6644","name":"Calendar Widget","description":""},"Website":{"color":"151720","name":"Website","description":"Related to www.appsmith.com website"},"Low effort":{"color":"8B59F0","name":"Low effort","description":"Something that'll take a few days to build"},"Checkbox Widget":{"color":"bbeecd","name":"Checkbox Widget","description":""},"Spam":{"color":"620faf","name":"Spam","description":""},"Voice Recorder Widget":{"color":"85bc87","name":"Voice Recorder Widget","description":""},"Select Widget":{"color":"0c669e","name":"Select Widget","description":"Select or dropdown widget"},"Bug":{"color":"8ba6fd","name":"Bug","description":"Something isn't right"},"Widget Validation":{"color":"6990BC","name":"Widget Validation","description":"Issues related to widget property validation"},"Generate Page":{"color":"2b4664","name":"Generate Page","description":"Issures related to page generation"},"File Picker Widget":{"color":"6ae4f2","name":"File Picker Widget","description":""},"snowflake":{"color":"8078b0","name":"snowflake","description":"Issues related to the snowflake Integration"},"Automation":{"color":"CCAF60","name":"Automation","description":""},"hotfix":{"color":"BA3F1D","name":"hotfix","description":""},"Import-Export-App":{"color":"48883f","name":"Import-Export-App","description":"Issues related to importing and exporting apps"},"High effort":{"color":"A7E87B","name":"High effort","description":"Something that'll take more than a month to build"},"Telemetry":{"color":"bc70f9","name":"Telemetry","description":"Issues related to instrumenting appsmith"},"Radio Widget":{"color":"91ef15","name":"Radio Widget","description":""},"Omnibar":{"color":"1bb96a","name":"Omnibar","description":"Issues related to the omnibar for navigation"},"Button Widget":{"color":"34efae","name":"Button Widget","description":""},"Switch widget":{"color":"33A8CE","name":"Switch widget","description":"The switch widget"},"Map Widget":{"color":"7eef7a","name":"Map Widget","description":""},"Task":{"color":"085630","name":"Task","description":"A simple Todo"},"Design System":{"color":"2958a4","name":"Design System","description":"Design system"},"opera":{"color":"C63F5B","name":"opera","description":"Any issues identified on the opera browser"},"Login / Signup":{"color":"","name":"Login / Signup","description":"Authentication flows"},"Image Widget":{"color":"8de8ad","name":"Image Widget","description":""},"firefox":{"color":"6d56e2","name":"firefox","description":""},"Property Pane":{"color":"b356ff","name":"Property Pane","description":"Issues related to the behaviour of the property pane"},"Deployment":{"color":"93491f","name":"Deployment","description":"Installation process of appsmith"},"Production":{"color":"b60205","name":"Production","description":""},"Dependencies":{"color":"0366d6","name":"Dependencies","description":"Pull requests that update a dependency file"},"Google Sheets":{"color":"8078b0","name":"Google Sheets","description":"Issues related to Google Sheets"},"Icon Button Widget":{"color":"D319CE","name":"Icon Button Widget","description":"Issues related to the icon button widget"},"Mongo":{"color":"8078b0","name":"Mongo","description":"Issues related to Mongo DB plugin"},"Documentation":{"color":"a8dff7","name":"Documentation","description":"Improvements or additions to documentation"},"TestGap":{"color":"","name":"TestGap","description":"Issues identified for test plan improvement"},"keyboard shortcut":{"color":"0688B6","name":"keyboard shortcut","description":""},"Reopen":{"color":"897548","name":"Reopen","description":""},"Redshift":{"color":"8078b0","name":"Redshift","description":"Issues related to the redshift integration"},"Date Picker Widget":{"color":"ef1ce1","name":"Date Picker Widget","description":""},"Entity Explorer":{"color":"1bb96a","name":"Entity Explorer","description":"Issues related to navigation using the entity explorer"},"JS Linting & Errors":{"color":"E56AA5","name":"JS Linting & Errors","description":"Issues related to JS Linting and errors"},"iFrame":{"color":"3CD1DB","name":"iFrame","description":"Issues related to iFrame"},"Stale":{"color":"ededed","name":"Stale","description":null},"Text Widget":{"color":"d130d1","name":"Text Widget","description":""},"Video Widget":{"color":"23dd4b","name":"Video Widget","description":""},"Datasources":{"color":"3d590f","name":"Datasources","description":"Issues related to configuring datasource on appsmith"},"error":{"color":"B66773","name":"error","description":"All issues connected to error messages"},"Form Widget":{"color":"09ed77","name":"Form Widget","description":""},"Needs Triaging":{"color":"e8b851","name":"Needs Triaging","description":"Needs attention from maintainers to triage"},"Autocomplete":{"color":"235708","name":"Autocomplete","description":"Issues related to the autocomplete"},"hacktoberfest":{"color":"0052cc","name":"hacktoberfest","description":"All issues that can be solved by the community during Hacktoberfest"},"Medium effort":{"color":"D31156","name":"Medium effort","description":"Something that'll take more than a week but less than a month to build"},"Release":{"color":"57e5e0","name":"Release","description":""},"High":{"color":"c94d14","name":"High","description":"This issue blocks a user from building or impacts a lot of users"},"UI Performance":{"color":"1799b0","name":"UI Performance","description":"Issues related to UI performance"},"Deploy Preview":{"color":"bfdadc","name":"Deploy Preview","description":"Issues found in Deploy Preview"},"Needs Tests":{"color":"8ee263","name":"Needs Tests","description":"Needs automated tests to assert a feature/bug fix"},"Refactor":{"color":"B96662","name":"Refactor","description":"needs refactoring of code"},"Divider Widget":{"color":"235708","name":"Divider Widget","description":"Issues related to the divider widget"},"Table Widget":{"color":"2eead1","name":"Table Widget","description":""},"Needs More Info":{"color":"e54c10","name":"Needs More Info","description":"Needs additional information"},"Good First Issue":{"color":"7057ff","name":"Good First Issue","description":"Good for newcomers"},"UI Improvement":{"color":"9aeef4","name":"UI Improvement","description":""},"Backend":{"color":"d4c5f9","name":"Backend","description":"This marks the issue or pull request to reference server code"},"Frontend":{"color":"87c7f2","name":"Frontend","description":"This label marks the issue or pull request to reference client code"},"Chart Widget":{"color":"616ecc","name":"Chart Widget","description":""},"List Widget":{"color":"8508A0","name":"List Widget","description":"Issues related to the list widget"},"Duplicate":{"color":"cfd3d7","name":"Duplicate","description":"This issue or pull request already exists"},"JS Snippets":{"color":"8d62d2","name":"JS Snippets","description":"issues related to JS Snippets"},"Copy Paste":{"name":"Copy Paste","description":"Issues related to copy paste","color":"b4f0a9"},"Drag & Drop":{"name":"Drag & Drop","description":"Issues related to the drag & drop experience","color":"92115a"},"Sniping Mode":{"name":"Sniping Mode","description":"Issues related to sniping mode","color":"48883f"},"Redis":{"name":"Redis","description":"Issues related to Redis","color":"8078b0"},"New Datasource":{"color":"60b14c","name":"New Datasource","description":"Requests for new datasources"},"Evaluated Value":{"name":"Evaluated Value","description":"Issues related to evaluated values","color":"39f6e7"},"Undo/Redo":{"name":"Undo/Redo","description":"Issues related to undo/redo","color":"f25880"},"App Navigation":{"name":"App Navigation","description":"Issues related to the topbar navigation and configuring it","color":"4773ab"},"Widgets Pane":{"name":"Widgets Pane","description":"Issues related to the discovery and organisation of widgets","color":"ad5d78"},"View Mode":{"color":"1799b0","name":"View Mode","description":"Issues related to the view mode"},"Content":{"name":"Content","description":"For content related topics i.e blogs, templates, videos","color":"a8dff7"},"Slash Command":{"name":"Slash Command","description":"Issues related to the slash command","color":"a0608e"},"Widget Property":{"name":"Widget Property","description":"Issues related to adding / modifying widget properties across widgets","color":"5e92cb"},"Windows":{"name":"Windows","description":"Issues related exclusively to Windows systems","color":"b4cb8a"},"Old App Issues":{"name":"Old App Issues","description":"Issues related to apps old apps a few weeks old and app issues in stale browser session","color":"87ab18"},"Document Viewer Widget":{"name":"Document Viewer Widget","description":"Issues related to Document Viewer Widget","color":"899d4b"},"Radio Group Widget":{"name":"Radio Group Widget","description":"Issues related to radio group widget","color":"b68495"},"Super Admin":{"name":"Super Admin","description":"Issues related to the super admin page","color":"aa95cf"},"Postgres":{"name":"Postgres","description":"Postgres related issues","color":"8078b0"},"New JS Function":{"name":"New JS Function","description":"Issues related to adding a JS Function","color":"8e8aa4"},"Cannot Reproduce Issue":{"color":"93c9cc","name":"Cannot Reproduce Issue","description":"Issues that cannot be reproduced"},"Widget Grouping":{"name":"Widget Grouping","description":"Issues related to Widget Grouping","color":"a49951"},"K8s":{"name":"K8s","description":"Kubernetes related issues","color":"5f318a"},"Docker":{"name":"Docker","description":"Issues related to docker","color":"89b808"},"Camera Widget":{"name":"Camera Widget","description":"Issues and enhancements related to camera widget","color":"e6038e"},"SAAS Plugins":{"name":"SAAS Plugins","description":"Issues related to SAAS Plugins","color":"80e18f"},"JS Promises":{"name":"JS Promises","description":"Issues related to promises","color":"d7771f"},"OnPageLoad":{"name":"OnPageLoad","description":"OnPageLoad issues on functions and queries","color":"2b4664"},"JS Usability":{"name":"JS Usability","description":"usability issues with JS editor and JS elsewhere","color":"a302b0"},"Currency Input Widget":{"name":"Currency Input Widget","description":"Issues related to currency input widget","color":"b2164f"},"TreeSelect":{"name":"TreeSelect","description":"Issues related to TreeSelect Widget","color":"a1633e"},"MultiTree Select Widget":{"name":"MultiTree Select Widget","description":"Issues related to MultiTree Select Widget","color":"a1633e"},"Welcome Screen":{"name":"Welcome Screen","description":"Issues related to the welcome screen","color":"48883f"},"Realtime Commenting":{"color":"a70b86","name":"Realtime Commenting","description":"In-app communication between teams"},"Phone Input Widget":{"name":"Phone Input Widget","description":"Issues related to the Phone Input widget","color":"a70b86"},"JSON Form":{"name":"JSON Form","description":"Issue / features related to the JSON form wiget","color":"46b209"},"All Widgets":{"name":"All Widgets","description":"Issues related to all widgets","color":"972b36"},"V1":{"name":"V1","description":"V1","color":"67ab2e"},"Reflow & Resize":{"name":"Reflow & Resize","description":"All issues related to reflow and resize experience","color":"748a13"},"SSO":{"name":"SSO","description":"Issues, requests and enhancements around Single sign-on.","color":""},"Multi User Realtime":{"name":"Multi User Realtime","description":"Issues related to multiple users using or editing an application","color":"e7b6ce"},"Ready for design":{"name":"Ready for design","description":"this issue is ready for design: it contains clear problem statements and other required information","color":"ebf442"},"Support":{"name":"Support","description":"Issues created by the A-force team to address user queries","color":"1740f3"},"Button Group widget":{"name":"Button Group widget","description":"Issue and enhancements related to the button group widget","color":"f17025"},"GraphQL Plugin":{"name":"GraphQL Plugin","description":"Issues related to GraphQL plugin","color":"8078b0"},"DevOps Pod":{"name":"DevOps Pod","description":"Issues related to devops","color":"d956c7"},"medium":{"name":"medium","description":"Issues that frustrate users due to poor UX","color":"23dfd9"},"ArangoDB":{"name":"ArangoDB","description":"Issues related to arangoDB","color":"8078b0"},"Code Refactoring":{"name":"Code Refactoring","description":"Issues related to code refactoring","color":"76310e"},"Progress bar widget":{"name":"Progress bar widget","description":"To track issues related to progress bar","color":"2d7abf"},"Audio Recorder Widget":{"name":"Audio Recorder Widget","description":"Issues related to Audio Recorder Widget","color":"9accef"},"Airtable":{"name":"Airtable","description":"Issues for Airtable","color":"60885f"},"Canvas / Grid":{"name":"Canvas / Grid","description":"Issues related to the canvas","color":"16b092"},"Email Config":{"name":"Email Config","description":"Issues related to configuring the email service","color":"2a21d1"},"CURL":{"name":"CURL","description":"Issues related to CURL impor","color":"60885f"},"Canvas Zooms":{"name":"Canvas Zooms","description":"Issues related to zooming the canvas","color":"e6038e"},"business":{"name":"business","description":"Features that will be a part of our business edition","color":"cd59eb"},"Action Pod":{"name":"Action Pod","description":"","color":"ee2e36"},"AutomationGap1":{"color":"a5e07c","name":"AutomationGap1","description":"Issues that needs automated tests"},"A-Force11":{"name":"A-Force11","description":"Issues raised by A-Force team","color":"d667b6"},"Business Edition":{"name":"Business Edition","description":"Features that will be a part of our business edition","color":"89bb6c"},"storeValue":{"name":"storeValue","description":"Issues related to the store value function","color":"5d3e66"},"DynamoDB":{"name":"DynamoDB","description":"Issues that are related to DynamoDB should have this label","color":"60885f"},"Backup & Restore":{"name":"Backup & Restore","description":"Issues related to backup and restore","color":"86874d"},"Billing":{"name":"Billing","description":"Billing infrastructure and flows for Business Edition and Trial users","color":"d2bc40"},"Datatype issue":{"name":"Datatype issue","description":"Issues that have risen because data types weren't handled","color":"cef66b"},"OAuth":{"name":"OAuth","description":"OAuth related bugs or features","color":"60885f"},"Table Widget V2":{"name":"Table Widget V2","description":"Issues related to Table Widget V2","color":"3a7192"},"IDE Navigation":{"name":"IDE Navigation","description":"Issues/feature requests related to IDE navigation, and context switching","color":"1bb96a"},"Query performance":{"name":"Query performance","description":"Issues that have to do with lack in performance of query execution","color":"cef66b"},"SAAS Manager App":{"name":"SAAS Manager App","description":"Issues with the SAAS manager app","color":"d427db"},"Twilio":{"name":"Twilio","description":"Issues related to Twilio integration","color":"23ba8d"},"Hubspot":{"name":"Hubspot","description":"Issues related to Hubspot integration","color":"60885f"},"Zendesk":{"name":"Zendesk","description":"Issues related to Zendesk integration","color":"60885f"},"Entity Refactor":{"name":"Entity Refactor","description":"Issues related to refactor logic","color":"705a2c"},"Map Chart Widget":{"name":"Map Chart Widget","description":"Issues related to Map Chart Widgets","color":"c8397f"},"Product Catchup":{"name":"Product Catchup","description":"Issues created in the product catchup","color":"29cd2c"},"Framework Functions":{"name":"Framework Functions","description":"Issues related to internal functions like showAlert(), navigateTo() etc...","color":"c25a09"},"Frontend Libraries Upgrade":{"name":"Frontend Libraries Upgrade","description":"Issues related to frontend libraries upgrade","color":"ede1fc"},"MsSQL":{"name":"MsSQL","description":"Issues related to MsSQL plugin","color":"8078b0"},"Elastic Search":{"name":"Elastic Search","description":"Issues related to the elastic search datasource","color":"8078b0"},"Core Query Execution":{"color":"cef66b","name":"Core Query Execution","description":"Issues related to the execution of all queries"},"Query Management":{"name":"Query Management","description":"Issues related to the CRUD of actions or queries","color":"cef66b"},"Query Settings":{"name":"Query Settings","description":"Issues related to the settings of all queries","color":"cef66b"},"Code Editor":{"name":"Code Editor","description":"Issues related to the code editor","color":"4ca16e"},"Query Forms":{"color":"12b253","name":"Query Forms","description":"Isuses related to the query forms"},"JS Objects":{"color":"22962c","name":"JS Objects","description":"Issues related to JS Objects"},"JS Evaluation":{"color":"22962c","name":"JS Evaluation","description":"Issues related to JS evaluation on the platform"},"SmartSubstitution":{"name":"SmartSubstitution","description":"Issues related to Smart substitution of mustache bindings in queries","color":"bae511"},"Query Generation":{"name":"Query Generation","description":"Issues related to query generation","color":"cef66b"},"Suggested Widgets":{"name":"Suggested Widgets","description":"Issues related to suggesting widgets based on query response","color":"6ac063"},"Code Scanner Widget":{"name":"Code Scanner Widget","description":"Issues related to code scanner widget","color":"9bc1a0"},"Clean URLs":{"name":"Clean URLs","description":"Issues related to clean URLs epic","color":"112623"},"Widget keyboard accessibility":{"name":"Widget keyboard accessibility","description":"All issues related to keyboard accessibility in widgets","color":"b626fd"},"Connection pool":{"name":"Connection pool","description":"issues to do with connection pooling of various plugins","color":"94fe36"},"List Widget V2":{"name":"List Widget V2","description":"Issues related to the list widget v2","color":"adaaf7"},"Auto Height":{"name":"Auto Height","description":"Issues related to dynamic height of widgets","color":"5149cf"},"cypress_failed_test":{"name":"cypress_failed_test","description":"Cypress failed tests","color":"4745d5"},"Needs validation":{"name":"Needs validation","description":"Needs problem validation before being picked up","color":"66673d"},"Slider Widget":{"name":"Slider Widget","description":"Issues raised for slider widgets.","color":"2eef5f"},"Multitenancy":{"name":"Multitenancy","description":"Support multitenancy within single appsmith instance","color":"8c49a9"},"Conversion Algorithm":{"name":"Conversion Algorithm","description":"All issue related to converting app from fixed to flex mode & vice versa","color":"d12d2e"},"Browser specific":{"name":"Browser specific","description":"All issue related to browser","color":"d12d2e"},"Performance infra":{"name":"Performance infra","description":"all issue related to the performance infra","color":"8a60f6"},"DSL Update":{"name":"DSL Update","description":"Issues related to storing and updating the DSL","color":"e16cf3"},"AST-frontend":{"name":"AST-frontend","description":"Issues related to maintaining AST logic","color":"2b4664"},"AST-backend":{"name":"AST-backend","description":"Backend issues related to AST parsing","color":"48883f"},"MariaDB":{"name":"MariaDB","description":"MariaDB datasource","color":"8428c3"},"ADS Component Issue":{"name":"ADS Component Issue","description":"Issues which are caused due to ADS components","color":"d89119"},"Regressed":{"color":"723fd0","name":"Regressed","description":"Scenarios that were working before but have now regressed"},"Needs RCA":{"name":"Needs RCA","description":"a critical or high priority issue that needs an RCA","color":"2cc68f"},"Custom JS Libraries":{"name":"Custom JS Libraries","description":"Issues related to adding custom JS library","color":"bacb6d"},"Integrations Pod General":{"name":"Integrations Pod General","description":"Issues related to the Integrations Pod that don't fit into other tags.","color":"287823"},"Performance Pod":{"name":"Performance Pod","description":"All things related to Appsmith performance","color":"b5a25d"},"Performance":{"name":"Performance","description":"Issues related to performance","color":"9a18d7"},"File upload issues":{"name":"File upload issues","description":"Issues related to uploading any type of files from within Appsmith","color":"2b4664"},"Action Selector":{"name":"Action Selector","description":"Issues related to action selector on the property pane","color":"2f9e20"},"Community Reported":{"name":"Community Reported","description":"issues reported by community members","color":"1402e5"},"JS Function execution":{"name":"JS Function execution","description":"JS function execution","color":"7c2de1"},"Self Serve":{"name":"Self Serve","description":"For all issues related to self-serve flow for business edition","color":"4dacfc"},"Self Serve 1.0":{"name":"Self Serve 1.0","description":"For all issues related to v1 of the self serve project","color":"ae839e"},"Customer Portal":{"name":"Customer Portal","description":"For all tasks/issues pertaining to customer.appsmith.com","color":"d2bc40"},"Cloud Services":{"name":"Cloud Services","description":"For all tasks/issues on Appsmith cloud-services relating to licensing, usage and billing","color":"d2bc40"},"One-click Binding":{"name":"One-click Binding","description":"Issues related to the One click binding epic","color":"f1661c"},"Airgap":{"name":"Airgap","description":"Tickets related to supporting air-gapped Appsmith instances","color":"1cb294"},"SMTP plugin":{"name":"SMTP plugin","description":"Issues related to SMTP plugin","color":"541457"},"AWS AMI":{"name":"AWS AMI","description":"Issues Related to AWS AMI","color":"b44680"},"Old widget version":{"name":"Old widget version","description":"Use this label to raise issue specific only to an older version of a widget","color":"ff3814"},"Enterprise Billing":{"name":"Enterprise Billing","description":"To track all tasks/issues related to licensing & billing for enterprise customers","color":"14c156"},"Oracle SQL DB":{"name":"Oracle SQL DB","description":"Issues related to the Oracle plugin","color":"cbabcb"},"Community Contributor":{"name":"Community Contributor","description":"Meant to track issues that are assigned to external contributors","color":"149ab6"},"widget vertical alignment":{"name":"widget vertical alignment","description":"All issue related widget vertical alignment on the auto layout canvas","color":"d12d2e"},"Observability":{"name":"Observability","description":"Issues related to observability on the Appsmith instance","color":"dff913"},"Checkbox Component":{"name":"Checkbox Component","description":"This labels deals with checkbox component in wds package","color":"75a401"},"Analytics Improvements":{"name":"Analytics Improvements","description":"For all tasks focused on improving our overall analytics and fixing any issues ","color":"29b8ed"},"WDS team":{"name":"WDS team","description":"","color":"8d675a"},"Enterprise Edition":{"name":"Enterprise Edition","description":"Features that will be supported in Enterprise Edition only","color":"984f5e"},"Query filter":{"name":"Query filter","description":"Issues related to query filtering, e.g., WHERE clause","color":"a15134"},"Keyboard accessibility ":{"name":"Keyboard accessibility ","description":"All issue related to ADS component keyboard accessibility","color":"2ba696"},"Toggle button":{"name":"Toggle button","description":"All issue related to ADS toggle button","color":"edc47f"},"SCIM":{"name":"SCIM","description":"Label to collate our SCIM issues","color":"48883f"},"ADS Category Token":{"name":"ADS Category Token","description":"All issues related appsmith design system category tokens","color":"920961"},"ADS Component Documentation":{"name":"ADS Component Documentation","description":"All issues Appsmith design system component documentation","color":"64c46a"},"ADS Migration":{"name":"ADS Migration","description":"All issues related to Appsmith design system migration","color":"b082d6"},"ADS Deduplication ":{"name":"ADS Deduplication ","description":"Replacing component with ADS components","color":"b082d6"},"ADS Revamp":{"name":"ADS Revamp","description":"All issues related to ads revamp. ","color":"b082d6"},"ADS Deduplication":{"name":"ADS Deduplication","description":"Replacing component with ADS components","color":"b082d6"},"ADS Grayscale":{"name":"ADS Grayscale","description":"Support grayscale color changes","color":"b03577"},"ADS Unit Test":{"name":"ADS Unit Test","description":"All issue related ads unit cases ","color":"b082d6"},"ADS Components":{"name":"ADS Components","description":"All issues related ADS components","color":"b082d6"},"Widget Discoverability":{"name":"Widget Discoverability","description":"Issues related to Widget Discoverability","color":"7b55ce"},"Widget setter method":{"name":"Widget setter method","description":"Issues with widget property setters","color":"8dce87"},"License":{"name":"License","description":"For all issues/tasks related to licensing of appsmith-ee edition","color":"90ee98"},"Platformization":{"name":"Platformization","description":"Issues or tasks related to platformization of Appsmith codebase","color":"4e972b"},"Activation - datasources":{"name":"Activation - datasources","description":"issues related to activation projects","color":"7c7ace"},"Partial-import-export":{"name":"Partial-import-export","description":"Label for granular reusability.","color":"717732"},"AI":{"name":"AI","description":"All tasks related to AI","color":"2b4664"},"ADS Typography":{"name":"ADS Typography","description":"All issue related typographical changes","color":"2dbe8d"},"Auto Layout":{"name":"Auto Layout","description":"Issues relates to auto layout","color":"92cf8c"},"Heroku":{"name":"Heroku","description":"Issues related to Heroku","color":"a81b69"},"ADS Visual Styles":{"name":"ADS Visual Styles","description":"All issues related to ADS visual styles","color":"d3da89"},"ADS Component Design":{"name":"ADS Component Design","description":"All issue related to component design","color":"5cc91e"},"Modal Component":{"name":"Modal Component","description":"All issue related to ads modal component","color":"ee63f3"},"App setting":{"name":"App setting","description":"Related to app settings panel within the app","color":"174f98"},"BE instance":{"name":"BE instance","description":"For all issues related to license, billing on BE instance","color":"ae8f98"},"Fixed layout":{"name":"Fixed layout","description":"issues related to fixed layout","color":"b66681"},"Anvil layout":{"name":"Anvil layout","description":"issues related to the new layout system anvil","color":"5e0904"},"New Deployment Mode":{"name":"New Deployment Mode","description":"Support a new mode of deployment","color":"108033"},"Custom widgets":{"name":"Custom widgets","description":"For all issues related to the custom widget project","color":"c9db9c"},"Homepage Experience V2":{"name":"Homepage Experience V2","description":"Label for reporting new tasks and bug fixes related to revamped homepage experience","color":"c55d54"},"Customer Success":{"name":"Customer Success","description":"Issues that the success team cares about","color":"6ccabd"},"Invite flow":{"name":"Invite flow","description":"Invite users flow and any associated actions","color":"881b35"},"Invite users":{"name":"Invite users","description":"Invite users flow and any associated actions","color":""},"Workflows Pod":{"name":"Workflows Pod","description":"Issues that the workflows team owns","color":"446925"},"DailyPromotionBlocker":{"name":"DailyPromotionBlocker","description":"DailyPromotion Blocker","color":"9b2280"},"JS Binding":{"name":"JS Binding","description":"All issues related to the JS Binding experience","color":"422fed"},"REST API":{"name":"REST API","description":"REST API plugin related issues","color":"e3ede5"},"Critical":{"color":"a1e3db","name":"Critical","description":"This issue breaks existing apps. Drop everything else to resolve"},"Module creator":{"name":"Module creator","description":"Issues related to the module creator side","color":"bb2c05"},"Module consumer":{"name":"Module consumer","description":"Issues related to the module consumer side","color":"83d3c5"},"Package versioning":{"name":"Package versioning","description":"ISsues related to how we manage versions for packages","color":"4c5218"},"Convert to module":{"name":"Convert to module","description":"Issues related to the module creation flow using conversion","color":"4c5218"},"Query module":{"name":"Query module","description":"Issues affecting query modules or its instances","color":"b11a7e"},"JS module":{"name":"JS module","description":"Issues affecting JS modules or its instances","color":"bf76f6"},"Secret Management":{"name":"Secret Management","description":"Issues related to secret management","color":"2b4664"},"REST API plugin":{"name":"REST API plugin","description":"REST API plugin related issues","color":"b5948a"},"UI module":{"name":"UI module","description":"Issues affecting UI modules or its instances","color":"d2acee"},"Preview mode":{"name":"Preview mode","description":"Issues related to app previews","color":"48883f"},"Git Auto-commit":{"name":"Git Auto-commit","description":"Issues related to autocommit","color":"717732"},"QA Pod":{"name":"QA Pod","description":"Issues under the QA Pod","color":"717732"},"Automation Test":{"name":"Automation Test","description":"","color":""},"Automation failures":{"name":"Automation failures","description":"","color":""},"Needs automation":{"name":"Needs automation","description":"Issues that needs automated tests","color":""},"Prepared statements":{"name":"Prepared statements","description":"Issues related to prepared statement flow","color":""},"Switch Group Widget":{"name":"Switch Group Widget","description":"Issues related to Switch group Widget","color":""},"Supervisor":{"name":"Supervisor","description":"Issues related to supervisor","color":"2c5813"},"Deployment Certificates":{"name":"Deployment Certificates","description":"Issues related to lets encrypt","color":"e148aa"},"Mock Data":{"name":"Mock Data","description":"Issues related to mock databases","color":"ebf251"},"AWS ECS":{"name":"AWS ECS","description":"Issues related to ECS Fargate","color":"e506ff"},"Publish App":{"name":"Publish App","description":"Issues related to app deployment","color":"2b4664"},"IDE Infra":{"name":"IDE Infra","description":"Issues related to the IDE infrastructure like saving changes","color":"1bb96a"},"User Profile":{"name":"User Profile","description":"Issues related to a user profile","color":"a60d34"},"Page Management":{"color":"1bb96a","name":"Page Management","description":"Issues related to configuring pages"},"Ingress":{"name":"Ingress","description":"Ingress Controller","color":"a86802"},"Nginx":{"name":"Nginx","description":"Issues related to Nginx","color":"e54195"},"Building blocks":{"name":"Building blocks","description":"Building blocks on cavas, on templates listing or drag and drop of building blocks.","color":"48883f"},"Table Inline Edit":{"name":"Table Inline Edit","description":"Issues related to inline editing","color":"60895a"},"User Session ":{"name":"User Session ","description":"For all issues/tasks related to user sessions","color":"65a3f5"},"WDS - all widgets":{"name":"WDS - all widgets","description":"all widget present in WDS","color":"2670ae"},"WDS - input widget":{"name":"WDS - input widget","description":"Issues related to input widget on WDS","color":"2670ae"},"WDS - paragraph widget":{"name":"WDS - paragraph widget","description":"issues related to paragraph widget on WDS","color":"2670ae"},"WDS - statbox widget":{"name":"WDS - statbox widget","description":"issues related to statbox widget on WDS","color":"2670ae"},"WDS - modal widget":{"name":"WDS - modal widget","description":"Issues related to modal widget on WDS","color":"2670ae"},"WDS - icon widget":{"name":"WDS - icon widget","description":"Issues related to icon widget on WDS","color":"2670ae"},"WDS - checkbox widget":{"name":"WDS - checkbox widget","description":"Issues related to checkbox widget on WDS","color":"2670ae"},"WDS - table widget":{"name":"WDS - table widget","description":"Issues related to table widget on WDS","color":"2670ae"},"WDS - keyValue widget":{"name":"WDS - keyValue widget","description":"Issues related to key-value widget on WDS","color":"2670ae"},"WDS - switch group widget":{"name":"WDS - switch group widget","description":"Issues related to switch group widget on WDS","color":"2670ae"},"WDS - theming":{"name":"WDS - theming","description":"Issues related to theming on the Anvil instance","color":"2670ae"},"Anvil POD":{"name":"Anvil POD","description":"Issue related to Anvil project","color":"5e0904"},"Anvil - theming":{"name":"Anvil - theming","description":"Issues related to theming on the Anvil instance","color":"c28de5"},"Anvil - vertical alignment":{"name":"Anvil - vertical alignment","description":"Issues related to vertical alignment on the Anvil layout","color":"c28de5"},"Anvil - layout component":{"name":"Anvil - layout component","description":"Issues related to layout component on the Anvil layout","color":"c28de5"},"Anvil - drag & drop":{"name":"Anvil - drag & drop","description":"Issues related to drag & drop experience on Anvil","color":"c28de5"},"Anvil - zones & sections":{"name":"Anvil - zones & sections","description":"Issues related to zones and sections on the Anvil layout","color":"c28de5"},"Anvil - copy paste experience":{"name":"Anvil - copy paste experience","description":"Issues related to copy paste experience on the Anvil layout","color":"c28de5"},"WDS - phone widget":{"name":"WDS - phone widget","description":"Issues related to phone widget on WDS","color":"c28de5"},"WDS - responsive widget":{"name":"WDS - responsive widget","description":"All issues related to widget responsiveness","color":"11ee05"},"Anvil - responsive viewport":{"color":"11ee05","name":"Anvil - responsive viewport","description":"Issues seen on different viewports like mobile"},"WDS - widget styling":{"color":"11ee05","name":"WDS - widget styling","description":"all about widget styling"},"Anvil - spacing":{"name":"Anvil - spacing","description":"Related to spacing between widgets in auto layout","color":"11ee05"},"Anvil - responsive canvas":{"name":"Anvil - responsive canvas","description":"All issues related to canvas responsiveness","color":"11ee05"},"WDS - inline button widget":{"name":"WDS - inline button widget","description":"Issues related to inline button widget on WDS","color":"7cef83"},"Activation Pod":{"name":"Activation Pod","description":"for Activation group","color":"d67d00"},"Activation":{"name":"Activation","description":"for Activation group","color":"d67d00"},"Tests":{"name":"Tests","description":"Test issues","color":"4fc7b6"},"Ballpark: XXS":{"name":"Ballpark: XXS","description":"~1xDev in 1/2xSprint","color":""},"Ballpark: XS":{"name":"Ballpark: XS","description":"~1xDev in 1xSprint","color":"53bf71"},"Ballpark: S":{"name":"Ballpark: S","description":"~2xDev in 1xSprint","color":"6e9e65"},"Ballpark: M":{"name":"Ballpark: M","description":"~1xPOD in 1xSprint","color":"2229e6"},"Ballpark: L":{"name":"Ballpark: L","description":"~1xPOD in 3xSprint or 2xPODs in 1xSprint","color":"49962f"},"Ballpark: XL":{"name":"Ballpark: XL","description":"~1xPOD in 1xQuarter or 2xPODs in 2xSprint","color":"b524c9"},"Ballpark: XXL":{"name":"Ballpark: XXL","description":"~2xPODs in 1xQuarter","color":"22092c"},"Auto-commit":{"name":"Auto-commit","description":"Issues related to auto-generated commits showing up on git ","color":"e25b89"},"Continuous Deployment":{"name":"Continuous Deployment","description":"Issues related to CD pipeline on git","color":"aea47c"},"Default branch":{"name":"Default branch","description":"Issues related to using a default branch on git","color":"195737"},"Git status":{"name":"Git status","description":"Issues related to information shown on git status modal or number of changes appearing in a branch","color":"c851b8"},"Git performance":{"name":"Git performance","description":"Issues related to perceived performance on any git operation","color":"189af6"},"Anvil team":{"name":"Anvil team","description":"issues related to the new layout system anvil","color":"798200"},"SDLC":{"name":"SDLC","description":"Issues related to software development lifecycle experiences","color":"bae511"},"Reconnect DS modal":{"name":"Reconnect DS modal","description":"Issues related to reconnect datasource modal post app import","color":"2e398b"},"Stability Pod":{"name":"Stability Pod","description":"For all issues/tasks to be prioritized under Stability pod","color":"86ddf6"},"Stability Issue":{"name":"Stability Issue","description":"Every issue handle by Stability Pod","color":"4d024a"},"Move to Postgres":{"name":"Move to Postgres","description":"Issues required to be solved for the move to Postgres as repository layer","color":"4e13ac"},"User Session":{"name":"User Session","description":"Issues related to user sessions","color":"8255e5"},"IDE tabs":{"name":"IDE tabs","description":"query and js tabs","color":"1bb96a"},"Inviting Contribution":{"name":"Inviting Contribution","description":"Issues that we would like contributions to","color":""},"cypress-flaky-fix":{"name":"cypress-flaky-fix","description":"This label is auto-added when a PR which only has Cypress fixes are merged to release","color":"722cbc"},"Cypress flaky tests":{"name":"Cypress flaky tests","description":"Test scripts that need to be fixed on Cypress by dev or SDET","color":"722cbc"},"Help enterprise":{"name":"Help enterprise","description":"Requested by Appsmith customers or prospects","color":"FF8C00"},"Learnability":{"name":"Learnability","description":"Issues affecting the product learnability, making the product harder for new users.","color":"800c2f"},"ADS Spacing":{"name":"ADS Spacing","description":"","color":"686ebb"},"ads unit test":{"name":"ads unit test","description":"All issue related ads unit cases","color":"686ebb"},"ads revamp":{"name":"ads revamp","description":"All issues related to ads revamp.","color":"686ebb"},"Javascript Product":{"color":"709a21","name":"Javascript Product","description":"Issues related to users writing javascript in appsmith"},"IDE Product":{"color":"1bb96a","name":"IDE Product","description":"Issues related to the IDE Product"},"IDE Pod":{"color":"1bb96a","name":"IDE Pod","description":"Issues that new developers face while exploring the IDE"},"Accelerators Product":{"name":"Accelerators Product","description":"Issues related to app building accelerators","color":"f3fce6"},"Templates Product":{"name":"Templates Product","description":"Issues related to Templates","color":"f3fce6"},"Design System Product":{"name":"Design System Product","description":"Appsmith design system related issues","color":"2b4664"},"ads deduplication":{"name":"ads deduplication","description":"Replacing component with ADS components","color":"708943"},"Admin Settings Product":{"color":"708943","name":"Admin Settings Product","description":"Issues in admin settings pages"},"Appsmith AI":{"name":"Appsmith AI","description":"All issues related to the Appsmith AI datasource","color":"708943"},"Query & JS Pod":{"color":"709a21","name":"Query & JS Pod","description":"Issues related to the query & JS Pod"},"RBAC Product":{"name":"RBAC Product","description":"Issues, requests and enhancements around RBAC.","color":""},"Workspace Product":{"name":"Workspace Product","description":"Issues related to workspaces","color":""},"CE Instance Usage":{"name":"CE Instance Usage","description":"For all issues relating to usage, licensing or billing on the CE instance","color":""},"Billing & Licensing Product":{"name":"Billing & Licensing Product","description":"Issues pertaining to licensing, billing and usage across self serve and enterprise customers","color":"446925"},"Platform Administration Pod":{"color":"446925","name":"Platform Administration Pod","description":"Issues related to platform administration & management"},"DB Infrastructure Pod":{"name":"DB Infrastructure Pod","description":"Pod to handle database infrastructure","color":"446925"},"Packages Product":{"name":"Packages Product","description":"Issues related to packages","color":"7e018f"},"Workflows Product":{"name":"Workflows Product","description":"Issues related to the workflows product","color":"446925"},"Debugger Product":{"color":"857f58","name":"Debugger Product","description":"Issues related to the debugger"},"Packages Pod":{"name":"Packages Pod","description":"issues that belong to the packages pod","color":"53742c"},"Environments Product":{"name":"Environments Product","description":"Issues related to datasource environments","color":"857f58"},"Custom Widgets":{"name":"Custom Widgets","description":"For all issues related to the custom widget project","color":"857f58"},"Branding Product":{"name":"Branding Product","description":"All issues under branding and whitelabelling appsmith ecosystem","color":"857f58"},"Widgets & Accelerators Pod":{"name":"Widgets & Accelerators Pod","description":"Issues related to widgets & Accelerators","color":"27496a"},"Widgets Product":{"name":"Widgets Product","description":"This label groups issues related to widgets","color":"f3fce6"},"App Theming Product":{"name":"App Theming Product","description":"Items that are related to the App level theming controls epic","color":"48883f"},"UI Building Product":{"color":"48883f","name":"UI Building Product","description":"Issues related to the UI Building experience"},"Onboarding Product":{"color":"48883f","name":"Onboarding Product","description":"Issues related to onboarding new developers"},"Database Schema":{"name":"Database Schema","description":"Issues related to database schema","color":"48883f"},"Git Product":{"color":"7e018f","name":"Git Product","description":"Issues related to version control product"},"Embedding Apps Product":{"name":"Embedding Apps Product","description":"Issues related to embedding","color":"48883f"},"Integrations Product":{"name":"Integrations Product","description":"Issues related to a specific integration","color":"b9f21c"},"Feature Flagging":{"name":"Feature Flagging","description":"Anything related feature flagging","color":"4574ae"},"Audit Logs Product":{"name":"Audit Logs Product","description":"Audit trails to ensure data security","color":"4574ae"},"Identity & Authentication Product":{"name":"Identity & Authentication Product","description":"Issues related to user identity & authentication","color":"4574ae"},"Email verification":{"name":"Email verification","description":"Email verification issues","color":"4574ae"},"Artifact Platform Product":{"name":"Artifact Platform Product","description":"Issues related to the application platform","color":"4574ae"},"Git IA":{"name":"Git IA","description":"Issues related to Git IA changes","color":"df8bd6"},"Documentation Pod":{"name":"Documentation Pod","description":"Issues related to user education","color":"8c8c02"},"Branch management":{"name":"Branch management","description":"Issues related to using a branch management on git","color":"ebe6af"},"Reconfigure Datasource Modal":{"name":"Reconfigure Datasource Modal","description":"Issues related to reconfigure DS modal that comes after importing applications","color":"5ac17b"},"Setup Issues":{"name":"Setup Issues","description":"Issues related to setting up appsmith","color":"3fc837"},"Packages & Git Pod":{"name":"Packages & Git Pod","description":"All issues belonging to Packages and Git","color":"46ac0e"},"Git Platform":{"name":"Git Platform","description":"Issues related to the git & the app platform","color":"c9ab80"}},"success":true} \ No newline at end of file diff --git a/.github/workflows/ad-hoc-docker-image.yml b/.github/workflows/ad-hoc-docker-image.yml index 38afa93839ae..44cfce8435ee 100644 --- a/.github/workflows/ad-hoc-docker-image.yml +++ b/.github/workflows/ad-hoc-docker-image.yml @@ -14,6 +14,11 @@ on: required: false type: string default: ad-hoc + pg_tag: + description: Postgres tag to use for image + required: false + type: string + default: pg jobs: server-build: @@ -90,6 +95,16 @@ jobs: scripts/generate_info_json.sh fi + - name: Place server artifacts-es + run: | + run: | + if [[ -f scripts/prepare_server_artifacts.sh ]]; then + PG_TAG=${{ inputs.pg_tag }} scripts/prepare_server_artifacts.sh + else + echo "No script found to prepare server artifacts" + exit 1 + fi + - name: Set up Depot CLI uses: depot/setup-action@v1 diff --git a/.github/workflows/ci-test-custom-script.yml b/.github/workflows/ci-test-custom-script.yml index ef8aea989ea0..ffcaea802a40 100644 --- a/.github/workflows/ci-test-custom-script.yml +++ b/.github/workflows/ci-test-custom-script.yml @@ -148,6 +148,7 @@ jobs: working-directory: "." run: | sudo /etc/init.d/ssh stop ; + sudo systemctl disable --now ssh.socket mkdir -p ~/git-server/keys ted_tag="${{inputs.ted_tag}}" docker run --name test-event-driver -d -p 22:22 -p 5001:5001 -p 3306:3306 \ @@ -197,6 +198,21 @@ jobs: uses: actions/setup-node@v4 with: node-version-file: app/client/package.json + + - name: Check DB URL + if: steps.run_result.outputs.run_result != 'success' + run: | + db_url=$(grep -oP 'APPSMITH_DB_URL=\K[^ ]+' cicontainerlocal/stacks/configuration/docker.env || echo "") + if [[ -z "$db_url" ]]; then + echo "::error::APPSMITH_DB_URL not found in the environment file" + fi + if [[ $db_url == "postgresql"* ]]; then + echo "Database type: Postgres. Ensure PostgreSQL-specific configurations are in place." + elif [[ $db_url == "mongo"* ]]; then + echo "Database type: MongoDB. Verify MongoDB connection settings if issues arise." + else + echo "::warning::Unknown database type. Please verify the database configuration." + fi # actions/setup-node@v4 doesn’t work properly with Yarn 3 # when the project lives in a subdirectory: https://github.com/actions/setup-node/issues/488 diff --git a/.github/workflows/ci-test-limited-with-count.yml b/.github/workflows/ci-test-limited-with-count.yml index 65af0adfb198..b7786c07aa5a 100644 --- a/.github/workflows/ci-test-limited-with-count.yml +++ b/.github/workflows/ci-test-limited-with-count.yml @@ -266,16 +266,18 @@ jobs: - name: Set Commit Message env: EVENT_COMMITS: ${{ toJson(github.event.commits[0].message) }} + COMMIT_INFO_AUTHOR: ${{ github.event.commits[0].author.name }} run: | - if [[ ${{ inputs.pr }} -ne 0 && ${{github.event_name}} == 'repository_dispatch' ]]; then - echo "COMMIT_INFO_MESSAGE=${{ env.COMMIT_INFO_MESSAGE }}" >> $GITHUB_ENV - elif [[ ${{ inputs.pr }} -ne 0 && ${{github.event_name}} == 'workflow_dispatch' ]]; then + if [[ ${{ inputs.pr }} -ne 0 && ${{ github.event_name }} == 'repository_dispatch' ]]; then + echo "COMMIT_INFO_MESSAGE=$COMMIT_INFO_MESSAGE" >> $GITHUB_ENV + elif [[ ${{ inputs.pr }} -ne 0 && ${{ github.event_name }} == 'workflow_dispatch' ]]; then echo "COMMIT_INFO_MESSAGE=Workflow run on PR# ${{ inputs.pr }}" >> $GITHUB_ENV else - if [[ '${{env.EVENT_COMMITS}}' == 'null' ]]; then - echo "COMMIT_INFO_MESSAGE=${{ github.event_name }} by ${{ env.COMMIT_INFO_AUTHOR }}" >> $GITHUB_ENV + if [[ "$EVENT_COMMITS" == "null" ]]; then + echo "COMMIT_INFO_MESSAGE=${{ github.event_name }} by $COMMIT_INFO_AUTHOR" >> $GITHUB_ENV else - echo "COMMIT_INFO_MESSAGE=$(echo \"${{ env.EVENT_COMMITS }}\" | awk -F '\\\\n' '{print $1}' | sed 's/^\"//')" >> $GITHUB_ENV + COMMIT_FIRST_LINE=$(echo "$EVENT_COMMITS" | awk -F '\\\\n' '{print $1}' | sed 's/^\"//') + echo "COMMIT_INFO_MESSAGE=$COMMIT_FIRST_LINE" >> $GITHUB_ENV fi fi diff --git a/.github/workflows/ci-test-limited.yml b/.github/workflows/ci-test-limited.yml index 9f62ff2a0059..b9cdeaf90f13 100644 --- a/.github/workflows/ci-test-limited.yml +++ b/.github/workflows/ci-test-limited.yml @@ -256,16 +256,18 @@ jobs: - name: Set Commit Message env: EVENT_COMMITS: ${{ toJson(github.event.commits[0].message) }} + COMMIT_INFO_AUTHOR: ${{ github.event.commits[0].author.name }} run: | - if [[ ${{ inputs.pr }} -ne 0 && ${{github.event_name}} == 'repository_dispatch' ]]; then - echo "COMMIT_INFO_MESSAGE=${{ env.COMMIT_INFO_MESSAGE }}" >> $GITHUB_ENV - elif [[ ${{ inputs.pr }} -ne 0 && ${{github.event_name}} == 'workflow_dispatch' ]]; then + if [[ ${{ inputs.pr }} -ne 0 && ${{ github.event_name }} == 'repository_dispatch' ]]; then + echo "COMMIT_INFO_MESSAGE=$COMMIT_INFO_MESSAGE" >> $GITHUB_ENV + elif [[ ${{ inputs.pr }} -ne 0 && ${{ github.event_name }} == 'workflow_dispatch' ]]; then echo "COMMIT_INFO_MESSAGE=Workflow run on PR# ${{ inputs.pr }}" >> $GITHUB_ENV else - if [[ '${{env.EVENT_COMMITS}}' == 'null' ]]; then - echo "COMMIT_INFO_MESSAGE=${{ github.event_name }} by ${{ env.COMMIT_INFO_AUTHOR }}" >> $GITHUB_ENV + if [[ "$EVENT_COMMITS" == "null" ]]; then + echo "COMMIT_INFO_MESSAGE=${{ github.event_name }} by $COMMIT_INFO_AUTHOR" >> $GITHUB_ENV else - echo "COMMIT_INFO_MESSAGE=$(echo \"${{ env.EVENT_COMMITS }}\" | awk -F '\\\\n' '{print $1}' | sed 's/^\"//')" >> $GITHUB_ENV + COMMIT_FIRST_LINE=$(echo "$EVENT_COMMITS" | awk -F '\\\\n' '{print $1}' | sed 's/^\"//') + echo "COMMIT_INFO_MESSAGE=$COMMIT_FIRST_LINE" >> $GITHUB_ENV fi fi diff --git a/.github/workflows/server-build.yml b/.github/workflows/server-build.yml index 0a74e1eb5a35..68c439738348 100644 --- a/.github/workflows/server-build.yml +++ b/.github/workflows/server-build.yml @@ -23,6 +23,27 @@ on: type: string default: "false" + workflow_dispatch: + inputs: + pr: + description: "PR number for the workflow" + required: false + type: number + skip-tests: + description: "Skip tests flag" + required: false + type: string + default: "false" + branch: + description: "Branch for the build" + required: false + type: string + is-pg-build: + description: "Flag for PG build" + required: false + type: string + default: "false" + # Change the working directory for all the jobs in this workflow defaults: run: @@ -72,6 +93,9 @@ jobs: - name: Figure out the PR number run: echo ${{ inputs.pr }} + + - name: Default database URL + run: echo "Is this a PG build? ${{ inputs.is-pg-build }}" - name: Print the Github event run: echo ${{ github.event_name }} @@ -175,39 +199,104 @@ jobs: APPSMITH_ENVFILE_PATH: /tmp/dummy.env APPSMITH_VERBOSE_LOGGING_ENABLED: false run: | - if [[ "${{ inputs.is-pg-build }}" == "true" ]]; then - export APPSMITH_DB_URL="postgresql://postgres:password@localhost:5432/postgres" - else - export APPSMITH_DB_URL="mongodb://localhost:27017/mobtools" - fi - args=() - if [[ "${{ steps.run_result.outputs.run_result }}" == "failedtest" ]]; then - failed_tests="${{ steps.failed_tests.outputs.tests }}" - args+=("-DfailIfNoTests=false" "-Dsurefire.failIfNoSpecifiedTests=false" "-Dtest=${failed_tests}") - fi - if ! mvn test "${args[@]}"; then - echo "Generating failed test list:" - failed_tests_file="$PWD/failed-server-tests.txt" + if [[ "${{ inputs.is-pg-build }}" == "true" ]]; then + export APPSMITH_DB_URL="postgresql://postgres:password@localhost:5432/postgres" + else + export APPSMITH_DB_URL="mongodb://localhost:27017/mobtools" + fi + + args=() + if [[ "${{ steps.run_result.outputs.run_result }}" == "failedtest" ]]; then + failed_tests="${{ steps.failed_tests.outputs.tests }}" + args+=("-DfailIfNoTests=false" "-Dsurefire.failIfNoSpecifiedTests=false" "-Dtest=${failed_tests}") + fi + + # Run tests and capture logs + mvn test "${args[@]}" | tee mvn_test.log + + # Check for "BUILD FAILURE" in the mvn_test.log + if grep -q "BUILD FAILURE" mvn_test.log; then + test_result="failed" + else + test_result="passed" + fi + + echo "test_result variable value: ${test_result}" + + # Prepare output file for failed tests and ensure a fresh file is created + OUTPUT_FILE="failed-server-tests.txt" + rm -f "$OUTPUT_FILE" + touch "$OUTPUT_FILE" + + failed_modules=() + skipped_modules=() + + # Process mvn_test.log for FAILURE and SKIPPED statuses + while IFS= read -r line; do + if [[ $line == *"FAILURE"* ]]; then + module_name=$(echo "$line" | awk '{print $2}') + failed_modules+=("$module_name") + elif [[ $line == *"SKIPPED"* ]]; then + module_name=$(echo "$line" | awk '{print $2}') + skipped_modules+=("$module_name") + fi + done < mvn_test.log + + echo "Failed Modules: ${failed_modules[*]}" + echo "Skipped Modules: ${skipped_modules[*]}" + + # Handle older approach for reading failed tests from XML files + failed_tests_from_xml="$PWD/failed-tests-from-xml.txt" gawk -F\" '/> "$GITHUB_STEP_SUMMARY" - # Add a comment to the PR with the list of failed tests. - curl --silent --show-error \ - --header "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \ - --data "$(jq -n --arg body "$content" '$ARGS.named')" \ - "https://api.github.com/repos/$GITHUB_REPOSITORY/issues/${{ inputs.pr }}/comments" \ - > /dev/null + | tee "$failed_tests_from_xml" + + # Filter out failed modules and add only relevant tests to the final failed list + for module in "${failed_modules[@]}"; do + grep -v "$module" "$failed_tests_from_xml" > temp_file && mv temp_file "$failed_tests_from_xml" + done + + # Include all skipped module test files in the final list + for module in "${skipped_modules[@]}"; do + module_directories=$(find . -path "*/${module}*/src/test/java/*" -type f -name "*Test.java" -exec dirname {} \; | sort -u) + for module_directory in $module_directories; do + test_classes=$(find "$module_directory" -type f -name "*Test.java" | sed 's|.*/src/test/java/||; s|\.java$||; s|/|.|g') + for class_name in $test_classes; do + if [[ ${#class_name} -le 240 ]] && ! grep -Fxq "$class_name#" "$OUTPUT_FILE"; then + echo "${class_name}#" >> "$OUTPUT_FILE" + fi + done + done + done + + # Combine the XML file test cases and skipped module test files into the final output file + cat "$failed_tests_from_xml" >> "$OUTPUT_FILE" + + # Print the final output + cat "$OUTPUT_FILE" + + if [[ -s $OUTPUT_FILE ]]; then + content="$( + echo "## Failed server tests" + echo + sed 's/^/- /' "$OUTPUT_FILE" + )" + echo "$content" >> "$GITHUB_STEP_SUMMARY" + + # Post a comment to the PR + curl --silent --show-error \ + --header "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \ + --data "$(jq -n --arg body "$content" '$ARGS.named')" \ + "https://api.github.com/repos/$GITHUB_REPOSITORY/issues/${{ inputs.pr }}/comments" \ + > /dev/null fi - exit 1 - fi + + # Fail the script if tests did not pass + if [[ "$test_result" == "failed" ]]; then + echo "Tests failed, exiting with status 1." + exit 1 + fi + # Set status = failedtest - name: Set fail if there are test failures diff --git a/.github/workflows/sync-release-to-pg.yml b/.github/workflows/sync-release-to-pg.yml index f5ad35e0669c..e4cc227b29e9 100644 --- a/.github/workflows/sync-release-to-pg.yml +++ b/.github/workflows/sync-release-to-pg.yml @@ -50,7 +50,36 @@ jobs: - name: Push changes if: env.MERGE_CONFLICT == 'false' run: | - git push origin pg + set -e + git push https://${{ secrets.PAT_GITHUB }}@github.com/${{ github.repository }} HEAD:pg || echo "PUSH_FAILURE=true" >> $GITHUB_ENV + + - name: Capture push failure message + if: env.PUSH_FAILURE == 'true' + run: | + # Capture the last git error message + push_error_message=$(git push https://${{ secrets.PAT_GITHUB }}@github.com/${{ github.repository }} HEAD:pg 2>&1 | tail -n 1) + echo "PUSH_ERROR_MESSAGE=$push_error_message" >> $GITHUB_ENV + + - name: Notify on push failure + if: env.PUSH_FAILURE == 'true' + env: + SLACK_MESSAGE: "Push to pg branch failed: ${{ env.PUSH_ERROR_MESSAGE }}" + run: | + # Format the Slack message + slack_message="${{ env.SLACK_MESSAGE }}" + + # Set the Slack message body with channel ID and text + body="$(jq -nc \ + --arg channel C07JMLWEXDJ \ + --arg text "$slack_message" \ + '$ARGS.named' + )" + + # Send the message to Slack + curl -v https://slack.com/api/chat.postMessage \ + --header "Authorization: Bearer ${{ secrets.SLACK_APPSMITH_ALERTS_TOKEN }}" \ + --header "Content-Type: application/json; charset=utf-8" \ + --data-raw "$body" - name: Notify on merge conflicts if: env.MERGE_CONFLICT == 'true' @@ -59,9 +88,9 @@ jobs: CONFLICTING_COMMIT: ${{ env.CONFLICTING_COMMIT }} run: | # Prepare the message for Slack - message="Merge conflict detected while merging release into pg branch. Conflicted commits:\n" + message="Merge conflict detected while merging release into pg branch. Conflicted commits:" commit_url="$REPOSITORY_URL/commit/$CONFLICTING_COMMIT" - message+="$commit_url\n" + message+="$commit_url" # Send the message to Slack # This unwieldy horror of a sed command, converts standard Markdown links to Slack's unwieldy link syntax. diff --git a/.github/workflows/test-build-docker-image.yml b/.github/workflows/test-build-docker-image.yml index e3c21798e6a7..bf55ec8a429f 100644 --- a/.github/workflows/test-build-docker-image.yml +++ b/.github/workflows/test-build-docker-image.yml @@ -499,3 +499,32 @@ jobs: --header 'Authorization: Bearer ${{ secrets.SLACK_APPSMITH_ALERTS_TOKEN }}' \ --header 'Content-Type: application/json; charset=utf-8' \ --data-raw "$body" + + + notify-slack-for-pg: + needs: ci-test-result + runs-on: ubuntu-latest + + if: ( failure() && github.ref == 'refs/heads/pg' ) + + steps: + - name: Notify failure on workflow run and on Slack + run: | + set -o errexit + set -o nounset + set -o xtrace + + run_url='${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/attempts/${{ github.run_attempt }}' + slack_message="🚨 TBP workflow failed in <$run_url|${{ vars.EDITION }} attempt ${{ github.run_attempt }} (run ${{ github.run_id }})>." + + # This is the ChannelId of the proj-postgres-sync channel. + body="$(jq -nc \ + --arg channel C07JMLWEXDJ \ + --arg text "$slack_message" \ + '$ARGS.named' + )" + curl -v https://slack.com/api/chat.postMessage \ + --fail-with-body \ + --header 'Authorization: Bearer ${{ secrets.SLACK_APPSMITH_ALERTS_TOKEN }}' \ + --header 'Content-Type: application/json; charset=utf-8' \ + --data-raw "$body" diff --git a/.github/workflows/test-vulnerabilities-data.yml b/.github/workflows/test-vulnerabilities-data.yml new file mode 100644 index 000000000000..f0ad5395cf23 --- /dev/null +++ b/.github/workflows/test-vulnerabilities-data.yml @@ -0,0 +1,84 @@ +name: Run Vulnerability Data Script with Parameters and Update PR + +on: + workflow_dispatch: + inputs: + image_name: + description: 'Docker image name to scan' + required: true + default: 'appsmith/appsmith-ce:release' + +jobs: + run-and-update-pr: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Set up Node.js + uses: actions/setup-node@v3 + with: + node-version: '20' + + - name: Login to DockerHub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_HUB_USERNAME }} + password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} + + - name: Install pg + run: npm install pg + + # Run Scout vulnerability data script + - name: Run Scout vulnerability data script + if: always() + env: + DB_HOST: ${{ secrets.CYPRESS_DB_HOST }} + DB_NAME: ${{ secrets.CYPRESS_DB_NAME }} + DB_USER: ${{ secrets.CYPRESS_DB_USER }} + DB_PWD: ${{ secrets.CYPRESS_DB_PWD }} + run: | + chmod +x scripts/scout_vulnerabilities_data.sh + ./scripts/scout_vulnerabilities_data.sh \ + "${{ inputs.image_name }}" \ + "${{ github.event.pull_request.number }}" \ + "${{ github.event.pull_request.html_url }}" \ + "${{ github.run_id }}" + + - name: Run Trivy vulnerability data script + if: always() + env: + DB_HOST: ${{ secrets.CYPRESS_DB_HOST }} + DB_NAME: ${{ secrets.CYPRESS_DB_NAME }} + DB_USER: ${{ secrets.CYPRESS_DB_USER }} + DB_PWD: ${{ secrets.CYPRESS_DB_PWD }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u "${{ github.actor }}" --password-stdin + chmod +x scripts/trivy_vulnerabilities_data.sh + ./scripts/trivy_vulnerabilities_data.sh \ + "${{ inputs.image_name }}" \ + "${{ github.event.pull_request.number }}" \ + "${{ github.event.pull_request.html_url }}" \ + "${{ github.run_id }}" + + - name: Check for new vulnerabilities in Scout and Trivy files + if: always() + run: | + # Check if Scout vulnerabilities file has data after the header + if [ $(tail -n +2 scout_new_vulnerabilities.csv | wc -l) -gt 0 ]; then + echo "Scout vulnerabilities detected." + cat scout_new_vulnerabilities.csv + exit 1 # Fail the job if data exists + else + echo "No new Scout vulnerabilities detected." + fi + + # Check if Trivy vulnerabilities file has data after the header + if [ $(tail -n +2 trivy_new_vulnerabilities.csv | wc -l) -gt 0 ]; then + echo "Trivy vulnerabilities detected." + cat trivy_new_vulnerabilities.csv + exit 1 # Fail the job if data exists + else + echo "No new Trivy vulnerabilities detected." + fi \ No newline at end of file diff --git a/CODEOWNERS b/CODEOWNERS index f1ae93a1aae9..6f6f143cc2f3 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -190,7 +190,7 @@ app/client/src/ce/JSFunctionExecutionSaga.ts @ApekshaBhosale app/client/src/ee/JSFunctionExecutionSaga.ts @ApekshaBhosale # Enterprise Success -app/server/appsmith-server/src/main/java/com/appsmith/server/migrations/**/* @sharat87 @abhvsn +app/server/appsmith-server/src/main/java/com/appsmith/server/migrations/**/* @sharat87 @abhvsn @AnaghHegde # DevOps & Shri deploy/**/* @sharat87 @pratapaprasanna diff --git a/Dockerfile b/Dockerfile index a9d4b233719d..be72a28da060 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,18 +17,10 @@ RUN <&2 exit 1 fi - - mkdir -p ./editor ./rts - - # Ensure all *.sh scripts are executable. - find . -name node_modules -prune -or -type f -name '*.sh' -print -exec chmod +x '{}' ';' - - # Ensure all custom command-scripts have executable permission - chmod +x /opt/bin/* END # Add client UI - Application Layer @@ -39,13 +31,28 @@ COPY ./app/client/packages/rts/dist rts/ ENV PATH /opt/bin:/opt/appsmith/utils/node_modules/.bin:/opt/java/bin:/opt/node/bin:$PATH -RUN cd ./utils && npm install --only=prod && npm install --only=prod -g . && cd - \ - && chmod +x /opt/bin/* *.sh /watchtower-hooks/*.sh \ +RUN < { EditorNavigation.SelectEntityByName("Table1", EntityType.Widget); + propPane.ExpandIfCollapsedSection("pagination"); agHelper.AssertExistingToggleState("Server side pagination", "true"); + propPane.ExpandIfCollapsedSection("rowselection"); propPane .ValidatePropertyFieldValue("Default selected row", "0") .then(($selectedRow: any) => { @@ -114,6 +116,7 @@ describe( deployMode.NavigateBacktoEditor(); table.WaitUntilTableLoad(0, 0, "v2"); EditorNavigation.SelectEntityByName("Table1", EntityType.Widget); + propPane.ExpandIfCollapsedSection("pagination"); propPane.TogglePropertyState("Server side pagination", "Off"); deployMode.DeployApp(); table.WaitUntilTableLoad(0, 0, "v2"); @@ -122,10 +125,12 @@ describe( deployMode.NavigateBacktoEditor(); table.WaitUntilTableLoad(0, 0, "v2"); EditorNavigation.SelectEntityByName("Table1", EntityType.Widget); + propPane.ExpandIfCollapsedSection("pagination"); propPane.TogglePropertyState("Server side pagination", "On"); }); it("4. Change Default selected row in table and verify", () => { + propPane.ExpandIfCollapsedSection("rowselection"); propPane.UpdatePropertyFieldValue("Default selected row", "1"); deployMode.DeployApp(); table.WaitUntilTableLoad(0, 0, "v2"); @@ -140,6 +145,7 @@ describe( it("5. Verify Default search text in table as per 'Default search text' property set + Bug 12228", () => { EditorNavigation.SelectEntityByName("Table1", EntityType.Widget); + propPane.ExpandIfCollapsedSection("search\\&filters"); propPane.TypeTextIntoField("Default search text", "Bug"); deployMode.DeployApp(); table.AssertSearchText("Bug"); @@ -148,6 +154,7 @@ describe( deployMode.NavigateBacktoEditor(); EditorNavigation.SelectEntityByName("Table1", EntityType.Widget); + propPane.ExpandIfCollapsedSection("search\\&filters"); propPane.TypeTextIntoField("Default search text", "Quest", true, false); deployMode.DeployApp(); @@ -157,6 +164,7 @@ describe( table.WaitUntilTableLoad(0, 0, "v2"); EditorNavigation.SelectEntityByName("Table1", EntityType.Widget); + propPane.ExpandIfCollapsedSection("search\\&filters"); propPane.TypeTextIntoField("Default search text", "Epic"); //Bug 12228 - Searching based on hidden column value should not be allowed deployMode.DeployApp(); table.AssertSearchText("Epic"); @@ -164,6 +172,7 @@ describe( deployMode.NavigateBacktoEditor(); EditorNavigation.SelectEntityByName("Table1", EntityType.Widget); + propPane.ExpandIfCollapsedSection("search\\&filters"); propPane.RemoveText("defaultsearchtext"); agHelper.GetNClick(dataSources._refreshIcon, 0, true); table.WaitUntilTableLoad(0, 0, "v2"); @@ -171,6 +180,7 @@ describe( it("6. Validate Search table with Client Side Search enabled & disabled & onSearchTextChanged is set", () => { EditorNavigation.SelectEntityByName("Table1", EntityType.Widget); + propPane.ExpandIfCollapsedSection("search\\&filters"); agHelper.AssertExistingToggleState("Client side search", "true"); deployMode.DeployApp(locators._widgetInDeployed(draggableWidgets.TABLE)); @@ -188,6 +198,7 @@ describe( table.WaitUntilTableLoad(0, 1, "v2"); EditorNavigation.SelectEntityByName("Table1", EntityType.Widget); + propPane.ExpandIfCollapsedSection("search\\&filters"); propPane.TogglePropertyState("Client side search", "Off"); deployMode.DeployApp(locators._widgetInDeployed(draggableWidgets.TABLE)); @@ -205,6 +216,7 @@ describe( deployMode.NavigateBacktoEditor(); table.WaitUntilTableLoad(0, 1, "v2"); EditorNavigation.SelectEntityByName("Table1", EntityType.Widget); + propPane.ExpandIfCollapsedSection("search\\&filters"); propPane.TogglePropertyState("Client side search", "On"); propPane.EnterJSContext("onSearchTextChanged", ""); propPane.ToggleJSMode("onSearchTextChanged", false); @@ -224,6 +236,7 @@ describe( deployMode.NavigateBacktoEditor(); table.WaitUntilTableLoad(0, 1, "v2"); EditorNavigation.SelectEntityByName("Table1", EntityType.Widget); + propPane.ExpandIfCollapsedSection("search\\&filters"); propPane.TogglePropertyState("Client side search", "Off"); deployMode.DeployApp(locators._widgetInDeployed(draggableWidgets.TABLE)); diff --git a/app/client/cypress/e2e/Regression/Apps/CurrencyInputIssue_Spec.js b/app/client/cypress/e2e/Regression/Apps/CurrencyInputIssue_Spec.js index 516cdccbdc43..beb99404b172 100644 --- a/app/client/cypress/e2e/Regression/Apps/CurrencyInputIssue_Spec.js +++ b/app/client/cypress/e2e/Regression/Apps/CurrencyInputIssue_Spec.js @@ -9,7 +9,7 @@ const widgetInput = `${wiggetClass} input`; describe("Currency Input Issue", function () { it( "1. Import application json &should check that the widget input is not showing any error", - { tags: ["@tag.Widget", "@tag.CurrencyInput"] }, + { tags: ["@tag.Widget", "@tag.CurrencyInput", "@tag.Binding"] }, function () { agHelper.VisitNAssert("/applications", "getAllWorkspaces"); homePage.ImportApp("CurrencyInputIssueExport.json"); diff --git a/app/client/cypress/e2e/Regression/Apps/EchoApiCMS_spec.js b/app/client/cypress/e2e/Regression/Apps/EchoApiCMS_spec.js index 197d01bc3c8f..1034df29379c 100644 --- a/app/client/cypress/e2e/Regression/Apps/EchoApiCMS_spec.js +++ b/app/client/cypress/e2e/Regression/Apps/EchoApiCMS_spec.js @@ -16,7 +16,7 @@ import EditorNavigation, { describe( "Content Management System App", - { tags: ["@tag.Datasource"] }, + { tags: ["@tag.Datasource", "@tag.Git", "@tag.AccessControl"] }, function () { before(() => { homePage.RenameApplication("EchoApiCMSApp"); diff --git a/app/client/cypress/e2e/Regression/Apps/ImportExportForkApplication_spec.js b/app/client/cypress/e2e/Regression/Apps/ImportExportForkApplication_spec.js index 8ae788c61da1..9a28386d1b59 100644 --- a/app/client/cypress/e2e/Regression/Apps/ImportExportForkApplication_spec.js +++ b/app/client/cypress/e2e/Regression/Apps/ImportExportForkApplication_spec.js @@ -9,7 +9,7 @@ import { describe( "Import, Export and Fork application and validate data binding", - { tags: ["@tag.ImportExport", "@tag.Sanity"] }, + { tags: ["@tag.ImportExport", "@tag.Sanity", "@tag.Git"] }, function () { let workspaceId; let newWorkspaceName; diff --git a/app/client/cypress/e2e/Regression/Apps/MongoDBShoppingCart_spec.ts b/app/client/cypress/e2e/Regression/Apps/MongoDBShoppingCart_spec.ts index 1e9ad7dbd2ab..213c40d0754d 100644 --- a/app/client/cypress/e2e/Regression/Apps/MongoDBShoppingCart_spec.ts +++ b/app/client/cypress/e2e/Regression/Apps/MongoDBShoppingCart_spec.ts @@ -12,7 +12,9 @@ import { describe( "Shopping cart App", - { tags: ["@tag.Datasource", "@tag.Sanity"] }, + { + tags: ["@tag.Datasource", "@tag.Sanity", "@tag.Git", "@tag.AccessControl"], + }, function () { let datasourceName: string, repoName: any; diff --git a/app/client/cypress/e2e/Regression/Apps/PgAdmin_spec.js b/app/client/cypress/e2e/Regression/Apps/PgAdmin_spec.js index 65cc8b4ba293..fd1cded24be6 100644 --- a/app/client/cypress/e2e/Regression/Apps/PgAdmin_spec.js +++ b/app/client/cypress/e2e/Regression/Apps/PgAdmin_spec.js @@ -9,92 +9,99 @@ import { const widgetsPage = require("../../../locators/Widgets.json"); const appPage = require("../../../locators/PgAdminlocators.json"); -describe("PgAdmin Clone App", { tags: ["@tag.Datasource"] }, function () { - let datasourceName, tableName; +describe( + "PgAdmin Clone App", + { tags: ["@tag.Datasource", "@tag.Git", "@tag.AccessControl"] }, + function () { + let datasourceName, tableName; - before("Add dsl and create datasource", () => { - agHelper.AddDsl("PgAdmindsl"); - dataSources.CreateDataSource("Postgres"); - cy.get("@dsName").then(($dsName) => { - datasourceName = $dsName; + before("Add dsl and create datasource", () => { + agHelper.AddDsl("PgAdmindsl"); + dataSources.CreateDataSource("Postgres"); + cy.get("@dsName").then(($dsName) => { + datasourceName = $dsName; + }); }); - }); - it("1. Create queries", function () { - // writing query to get all schema - dataSources.CreateQueryAfterDSSaved( - "SELECT schema_name FROM information_schema.schemata;", - "get_schema", - ); - // switching off Use Prepared Statement toggle - dataSources.ToggleUsePreparedStatement(false); - dataSources.RunQuery(); + it("1. Create queries", function () { + // writing query to get all schema + dataSources.CreateQueryAfterDSSaved( + "SELECT schema_name FROM information_schema.schemata;", + "get_schema", + ); + // switching off Use Prepared Statement toggle + dataSources.ToggleUsePreparedStatement(false); + dataSources.RunQuery(); - // writing query to get all the tables - dataSources.CreateQueryFromOverlay( - datasourceName, - `select * from pg_catalog.pg_tables where schemaname = {{schema_select.selectedOptionValue || "public"}};`, - "get_tables", - 2000, - ); - dataSources.RunQuery(); + // writing query to get all the tables + dataSources.CreateQueryFromOverlay( + datasourceName, + `select * from pg_catalog.pg_tables where schemaname = {{schema_select.selectedOptionValue || "public"}};`, + "get_tables", + 2000, + ); + dataSources.RunQuery(); - // writing query to get all the columns - dataSources.CreateQueryFromOverlay( - datasourceName, - `SELECT column_name, data_type, table_name, ordinal_position, is_nullable FROM information_schema.COLUMNS`, - "get_columns", - ); - dataSources.RunQuery(); + // writing query to get all the columns + dataSources.CreateQueryFromOverlay( + datasourceName, + `SELECT column_name, data_type, table_name, ordinal_position, is_nullable FROM information_schema.COLUMNS`, + "get_columns", + ); + dataSources.RunQuery(); - // writing query to get create table - dataSources.CreateQueryFromOverlay( - datasourceName, - `CREATE TABLE {{schema_select.selectedOptionValue}}.{{nt_name.text.replaceAll(" ","_")}}({{appsmith.store.nt_col.map((c)=> c.name.replaceAll(" ","_") + " " + c.dtype + (c.nnull ? " NOT NULL " : "") + (c.pkey ? " PRIMARY KEY " : "")).join(" , ")}})`, - "create_table", - ); - dataSources.ToggleUsePreparedStatement(false); + // writing query to get create table + dataSources.CreateQueryFromOverlay( + datasourceName, + `CREATE TABLE {{schema_select.selectedOptionValue}}.{{nt_name.text.replaceAll(" ","_")}}({{appsmith.store.nt_col.map((c)=> c.name.replaceAll(" ","_") + " " + c.dtype + (c.nnull ? " NOT NULL " : "") + (c.pkey ? " PRIMARY KEY " : "")).join(" , ")}})`, + "create_table", + ); + dataSources.ToggleUsePreparedStatement(false); - // writing query to get drop table - dataSources.CreateQueryFromOverlay( - datasourceName, - `DROP TABLE {{schema_select.selectedOptionValue}}.{{nt_name.text.replaceAll(" ","_")}}({{appsmith.store.nt_col.map((c)=>c.name.replaceAll(" ","_") + " " + c.dtype + (c.nnull ? " NOT NULL " : "") + (c.pkey ? " PRIMARY KEY " : "")).join(" , ")}});`, - "drop_table", - ); - }); + // writing query to get drop table + dataSources.CreateQueryFromOverlay( + datasourceName, + `DROP TABLE {{schema_select.selectedOptionValue}}.{{nt_name.text.replaceAll(" ","_")}}({{appsmith.store.nt_col.map((c)=>c.name.replaceAll(" ","_") + " " + c.dtype + (c.nnull ? " NOT NULL " : "") + (c.pkey ? " PRIMARY KEY " : "")).join(" , ")}});`, + "drop_table", + ); + }); - it("2. Add new table from app page, View and Delete table", function () { - deployMode.DeployApp(locators._widgetInDeployed(draggableWidgets.BUTTON)); - // adding new table - agHelper.GetNClick(appPage.addNewtable, 0, true); - agHelper.AssertElementAbsence(appPage.loadButton, 40000); //for CI - agHelper.WaitUntilEleAppear(appPage.addTablename); - cy.generateUUID().then((UUID) => { - cy.xpath(appPage.addTablename).clear().type(`table${UUID}`); - tableName = `table${UUID}`; + it("2. Add new table from app page, View and Delete table", function () { + deployMode.DeployApp(locators._widgetInDeployed(draggableWidgets.BUTTON)); + // adding new table + agHelper.GetNClick(appPage.addNewtable, 0, true); + agHelper.AssertElementAbsence(appPage.loadButton, 40000); //for CI + agHelper.WaitUntilEleAppear(appPage.addTablename); + cy.generateUUID().then((UUID) => { + cy.xpath(appPage.addTablename).clear().type(`table${UUID}`); + tableName = `table${UUID}`; + }); + // adding column to the table + cy.xpath(appPage.addColumn).click({ force: true }); + cy.xpath(appPage.columnNamefield).should("be.visible"); + cy.xpath(appPage.datatypefield).should("be.visible"); + agHelper.GetNClick(appPage.addColumnName); + agHelper.TypeText( + appPage.addColumnName + " " + locators._inputField, + "ID", + ); + agHelper.SelectFromDropDown("Varchar", "", 1); + // switching on the Primary Key toggle + cy.get(widgetsPage.switchWidgetInactive).first().click(); + // switching on the Not Null toggle + cy.get(widgetsPage.switchWidgetInactive).last().click(); + cy.xpath(appPage.submitButton).click({ force: true }); + agHelper.AssertElementVisibility(appPage.addColumn); + cy.xpath(appPage.submitButton).first().click({ force: true }); + assertHelper.AssertNetworkStatus("@postExecute"); + cy.xpath(appPage.closeButton).click({ force: true }); + cy.xpath(appPage.addNewtable).should("be.visible"); + // viewing the table's columns by clicking on view button + cy.xpath(appPage.viewButton).first().click({ force: true }); + // deleting the table through modal + cy.xpath(appPage.deleteButton).last().click({ force: true }); + cy.xpath(appPage.confirmButton).click({ force: true }); + cy.xpath(appPage.closeButton).click({ force: true }); }); - // adding column to the table - cy.xpath(appPage.addColumn).click({ force: true }); - cy.xpath(appPage.columnNamefield).should("be.visible"); - cy.xpath(appPage.datatypefield).should("be.visible"); - agHelper.GetNClick(appPage.addColumnName); - agHelper.TypeText(appPage.addColumnName + " " + locators._inputField, "ID"); - agHelper.SelectFromDropDown("Varchar", "", 1); - // switching on the Primary Key toggle - cy.get(widgetsPage.switchWidgetInactive).first().click(); - // switching on the Not Null toggle - cy.get(widgetsPage.switchWidgetInactive).last().click(); - cy.xpath(appPage.submitButton).click({ force: true }); - agHelper.AssertElementVisibility(appPage.addColumn); - cy.xpath(appPage.submitButton).first().click({ force: true }); - assertHelper.AssertNetworkStatus("@postExecute"); - cy.xpath(appPage.closeButton).click({ force: true }); - cy.xpath(appPage.addNewtable).should("be.visible"); - // viewing the table's columns by clicking on view button - cy.xpath(appPage.viewButton).first().click({ force: true }); - // deleting the table through modal - cy.xpath(appPage.deleteButton).last().click({ force: true }); - cy.xpath(appPage.confirmButton).click({ force: true }); - cy.xpath(appPage.closeButton).click({ force: true }); - }); -}); + }, +); diff --git a/app/client/cypress/e2e/Regression/Apps/PromisesApp_spec.js b/app/client/cypress/e2e/Regression/Apps/PromisesApp_spec.js index 2a348e14a2c1..2d26ab8949f7 100644 --- a/app/client/cypress/e2e/Regression/Apps/PromisesApp_spec.js +++ b/app/client/cypress/e2e/Regression/Apps/PromisesApp_spec.js @@ -14,7 +14,7 @@ const commonlocators = require("../../../locators/commonlocators.json"); describe( "Promises App tests", - { tags: ["@tag.Widget", "@tag.JS"] }, + { tags: ["@tag.Widget", "@tag.JS", "@tag.Binding"] }, function () { before(() => { agHelper.AddDsl("promisesStoreValueDsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/ActionExecution/ActionSelectorCreateShouldBind_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/ActionExecution/ActionSelectorCreateShouldBind_spec.ts index 4e4b96e3e11e..fcd07b535a11 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/ActionExecution/ActionSelectorCreateShouldBind_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/ActionExecution/ActionSelectorCreateShouldBind_spec.ts @@ -10,7 +10,7 @@ import EditorNavigation, { describe( "Creations via action selector should bind to the property", - { tags: ["@tag.JS", "@tag.PropertyPane"] }, + { tags: ["@tag.JS", "@tag.PropertyPane", "@tag.Binding"] }, () => { it.skip("binds newly created query / api to the button onClick", () => { entityExplorer.DragDropWidgetNVerify(draggableWidgets.BUTTON); diff --git a/app/client/cypress/e2e/Regression/ClientSide/ActionExecution/ActionSelector_JsToNonJSMode_1_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/ActionExecution/ActionSelector_JsToNonJSMode_1_spec.ts index 8b739f964cc3..ca77452c0d49 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/ActionExecution/ActionSelector_JsToNonJSMode_1_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/ActionExecution/ActionSelector_JsToNonJSMode_1_spec.ts @@ -9,150 +9,153 @@ import EditorNavigation, { EntityType, } from "../../../../support/Pages/EditorNavigation"; -describe("JS to non-JS mode in Action Selector", { tags: ["@tag.JS"] }, () => { - it("1. should not show any fields with a blank JS field", () => { - agHelper.AddDsl("promisesBtnDsl", locators._buttonByText("Submit")); - EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); - propPane.EnterJSContext("onClick", `{{}}`, true, false); - propPane.ToggleJSMode("onClick", false); - agHelper.AssertElementAbsence(".action"); - }); - - it("2. should show Api fields when Api1.run is entered", () => { - apiPage.CreateApi("Api1"); - EditorNavigation.SelectEntityByName("Page1", EntityType.Page); - EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); - propPane.EnterJSContext("onClick", `{{Api1.run()}}`, true, false); - propPane.ToggleJSMode("onClick", false); - agHelper.GetNAssertElementText( - propPane._actionCard, - "GETExecute a queryApi1.run", - ); - propPane.SelectActionByTitleAndValue("Execute a query", "Api1.run"); - propPane.AssertSelectValue("Api1.run"); - }); - - it("3. should show Api fields when an Api with then/catch is entered", () => { - EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); - propPane.EnterJSContext( - "onClick", - `{{Api1.run().then(() => {}).catch(() => {});}}`, - true, - false, - ); - propPane.ToggleJSMode("onClick", false); - agHelper.GetNAssertElementText( - propPane._actionCard, - "GETExecute a queryApi1.run", - ); - }); - - it("4. should show Api fields when an Api with then/catch is entered", () => { - EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); - propPane.EnterJSContext( - "onClick", - `{{Api1.run().then(() => { showAlert(); }).catch(() => { showModal(); });}}`, - true, - false, - ); - propPane.ToggleJSMode("onClick", false); - agHelper.GetNAssertElementText( - propPane._actionCard, - "GETExecute a queryApi1.run+2", - ); - agHelper.GetNClick(propPane._actionCard); - - agHelper.GetNAssertElementText( - propPane._actionCallbackTitle, - "On success", - "have.text", - 0, - ); - agHelper.GetNAssertElementText( - propPane._actionCard, - "Show alertAdd message", - "have.text", - 1, - ); - agHelper.GetNAssertElementText( - propPane._actionCallbackTitle, - "On failure", - "have.text", - 1, - ); - agHelper.GetNAssertElementText( - propPane._actionCard, - "Show modalnone", - "have.text", - 2, - ); - }); - - it("5. should show Api fields when an Api with then/catch is entered", () => { - EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); - propPane.EnterJSContext( - "onClick", - `{{Api1.run().then(() => { showAlert('Hello world!', 'info'); storeValue('a', 18); }).catch(() => { showModal(Modal1.name); });}}`, - true, - false, - ); - propPane.ToggleJSMode("onClick", false); - agHelper.GetNAssertElementText( - propPane._actionCard, - "GETExecute a queryApi1.run+3", - ); - agHelper.GetNClick(propPane._actionCard); - - agHelper.GetNAssertElementText( - propPane._actionCallbackTitle, - "On success", - "have.text", - 0, - ); - agHelper.GetNAssertElementText( - propPane._actionCard, - "Show alertHello world!", - "have.text", - 1, - ); - agHelper.GetNAssertElementText( - propPane._actionCallbackTitle, - "On failure", - "have.text", - 1, - ); - agHelper.GetNAssertElementText( - propPane._actionCard, - "Store valuea", - "have.text", - 2, - ); - agHelper.GetNAssertElementText( - propPane._actionCard, - "Show modalModal1", - "have.text", - 3, - ); - - agHelper.GetNClick(propPane._actionCard, 1); - agHelper.ValidateCodeEditorContent(propPane._textView, "Hello world!"); - agHelper.GetNAssertElementText(propPane._selectorViewButton, "Info"); - - agHelper.GetNClick(propPane._actionCard, 2); - agHelper.ValidateCodeEditorContent(propPane._textView, "a{{18}}"); - - agHelper.GetNClick(propPane._actionCard, 3); - agHelper.GetNAssertElementText( - propPane._selectorViewButton, - "Select modal", - ); - }); - - it("6. should show Api related fields appropriately with platform functions with callbacks", () => { - EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); - propPane.EnterJSContext( - "onClick", - `{{Api1.run().then(() => { +describe( + "JS to non-JS mode in Action Selector", + { tags: ["@tag.JS", "@tag.Binding"] }, + () => { + it("1. should not show any fields with a blank JS field", () => { + agHelper.AddDsl("promisesBtnDsl", locators._buttonByText("Submit")); + EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); + propPane.EnterJSContext("onClick", `{{}}`, true, false); + propPane.ToggleJSMode("onClick", false); + agHelper.AssertElementAbsence(".action"); + }); + + it("2. should show Api fields when Api1.run is entered", () => { + apiPage.CreateApi("Api1"); + EditorNavigation.SelectEntityByName("Page1", EntityType.Page); + EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); + propPane.EnterJSContext("onClick", `{{Api1.run()}}`, true, false); + propPane.ToggleJSMode("onClick", false); + agHelper.GetNAssertElementText( + propPane._actionCard, + "GETExecute a queryApi1.run", + ); + propPane.SelectActionByTitleAndValue("Execute a query", "Api1.run"); + propPane.AssertSelectValue("Api1.run"); + }); + + it("3. should show Api fields when an Api with then/catch is entered", () => { + EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); + propPane.EnterJSContext( + "onClick", + `{{Api1.run().then(() => {}).catch(() => {});}}`, + true, + false, + ); + propPane.ToggleJSMode("onClick", false); + agHelper.GetNAssertElementText( + propPane._actionCard, + "GETExecute a queryApi1.run", + ); + }); + + it("4. should show Api fields when an Api with then/catch is entered", () => { + EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); + propPane.EnterJSContext( + "onClick", + `{{Api1.run().then(() => { showAlert(); }).catch(() => { showModal(); });}}`, + true, + false, + ); + propPane.ToggleJSMode("onClick", false); + agHelper.GetNAssertElementText( + propPane._actionCard, + "GETExecute a queryApi1.run+2", + ); + agHelper.GetNClick(propPane._actionCard); + + agHelper.GetNAssertElementText( + propPane._actionCallbackTitle, + "On success", + "have.text", + 0, + ); + agHelper.GetNAssertElementText( + propPane._actionCard, + "Show alertAdd message", + "have.text", + 1, + ); + agHelper.GetNAssertElementText( + propPane._actionCallbackTitle, + "On failure", + "have.text", + 1, + ); + agHelper.GetNAssertElementText( + propPane._actionCard, + "Show modalnone", + "have.text", + 2, + ); + }); + + it("5. should show Api fields when an Api with then/catch is entered", () => { + EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); + propPane.EnterJSContext( + "onClick", + `{{Api1.run().then(() => { showAlert('Hello world!', 'info'); storeValue('a', 18); }).catch(() => { showModal(Modal1.name); });}}`, + true, + false, + ); + propPane.ToggleJSMode("onClick", false); + agHelper.GetNAssertElementText( + propPane._actionCard, + "GETExecute a queryApi1.run+3", + ); + agHelper.GetNClick(propPane._actionCard); + + agHelper.GetNAssertElementText( + propPane._actionCallbackTitle, + "On success", + "have.text", + 0, + ); + agHelper.GetNAssertElementText( + propPane._actionCard, + "Show alertHello world!", + "have.text", + 1, + ); + agHelper.GetNAssertElementText( + propPane._actionCallbackTitle, + "On failure", + "have.text", + 1, + ); + agHelper.GetNAssertElementText( + propPane._actionCard, + "Store valuea", + "have.text", + 2, + ); + agHelper.GetNAssertElementText( + propPane._actionCard, + "Show modalModal1", + "have.text", + 3, + ); + + agHelper.GetNClick(propPane._actionCard, 1); + agHelper.ValidateCodeEditorContent(propPane._textView, "Hello world!"); + agHelper.GetNAssertElementText(propPane._selectorViewButton, "Info"); + + agHelper.GetNClick(propPane._actionCard, 2); + agHelper.ValidateCodeEditorContent(propPane._textView, "a{{18}}"); + + agHelper.GetNClick(propPane._actionCard, 3); + agHelper.GetNAssertElementText( + propPane._selectorViewButton, + "Select modal", + ); + }); + + it("6. should show Api related fields appropriately with platform functions with callbacks", () => { + EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); + propPane.EnterJSContext( + "onClick", + `{{Api1.run().then(() => { appsmith.geolocation.getCurrentPosition(location => { showAlert(location); }); @@ -161,109 +164,109 @@ describe("JS to non-JS mode in Action Selector", { tags: ["@tag.JS"] }, () => { showAlert('hi'); }, 5000, '1'); });}}`, - true, - true, - ); - propPane.ToggleJSMode("onClick", false); - - agHelper.GetNAssertElementText( - propPane._actionCard, - "GETExecute a queryApi1.run+2", - ); - - agHelper.GetNClick(propPane._actionCard); - - agHelper.GetNAssertElementText( - propPane._actionCallbackTitle, - "On success", - "have.text", - 0, - ); - agHelper.GetNAssertElementText( - propPane._actionCallbackTitle, - "On failure", - "have.text", - 1, - ); - agHelper.GetNAssertElementText( - propPane._actionCard, - "Set interval5000ms", - "have.text", - 2, - ); - }); - - it("7. should show Api related fields appropriately with platform functions with catch callback", () => { - EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); - propPane.EnterJSContext( - "onClick", - "{{Api1.run().catch(() => copyToClipboard('hi'))}}", - true, - false, - ); - propPane.ToggleJSMode("onClick", false); - - agHelper.GetNAssertElementText( - propPane._actionCard, - "GETExecute a queryApi1.run+1", - "have.text", - 0, - ); - - agHelper.GetNClick(propPane._actionCard); - - agHelper.GetNAssertElementText( - propPane._actionCallbackTitle, - "On failure", - "have.text", - 1, - ); - agHelper.GetNAssertElementText( - propPane._actionCard, - "Copy to clipboardhi", - "have.text", - 1, - ); - - agHelper.GetNClick(propPane._actionCard, 1); - agHelper.ValidateCodeEditorContent(propPane._textView, "hi"); - }); - - it("8. should show Api related fields appropriately with platform functions with catch callback", () => { - EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); - propPane.EnterJSContext( - "onClick", - "{{Api1.run().then(() => clearStore())}}", - true, - false, - ); - propPane.ToggleJSMode("onClick", false); - - agHelper.GetNAssertElementText( - propPane._actionCard, - "GETExecute a queryApi1.run+1", - "have.text", - 0, - ); - - agHelper.GetNClick(propPane._actionCard); - - agHelper.GetNAssertElementText( - propPane._actionCallbackTitle, - "On success", - "have.text", - 0, - ); - agHelper.GetNAssertElementText( - propPane._actionCard, - "Clear store", - "have.text", - 1, - ); - }); - - it("9. shows fields appropriately for JS Object functions with/without arguments", () => { - const JS_OBJECT_BODY = `export default { + true, + true, + ); + propPane.ToggleJSMode("onClick", false); + + agHelper.GetNAssertElementText( + propPane._actionCard, + "GETExecute a queryApi1.run+2", + ); + + agHelper.GetNClick(propPane._actionCard); + + agHelper.GetNAssertElementText( + propPane._actionCallbackTitle, + "On success", + "have.text", + 0, + ); + agHelper.GetNAssertElementText( + propPane._actionCallbackTitle, + "On failure", + "have.text", + 1, + ); + agHelper.GetNAssertElementText( + propPane._actionCard, + "Set interval5000ms", + "have.text", + 2, + ); + }); + + it("7. should show Api related fields appropriately with platform functions with catch callback", () => { + EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); + propPane.EnterJSContext( + "onClick", + "{{Api1.run().catch(() => copyToClipboard('hi'))}}", + true, + false, + ); + propPane.ToggleJSMode("onClick", false); + + agHelper.GetNAssertElementText( + propPane._actionCard, + "GETExecute a queryApi1.run+1", + "have.text", + 0, + ); + + agHelper.GetNClick(propPane._actionCard); + + agHelper.GetNAssertElementText( + propPane._actionCallbackTitle, + "On failure", + "have.text", + 1, + ); + agHelper.GetNAssertElementText( + propPane._actionCard, + "Copy to clipboardhi", + "have.text", + 1, + ); + + agHelper.GetNClick(propPane._actionCard, 1); + agHelper.ValidateCodeEditorContent(propPane._textView, "hi"); + }); + + it("8. should show Api related fields appropriately with platform functions with catch callback", () => { + EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); + propPane.EnterJSContext( + "onClick", + "{{Api1.run().then(() => clearStore())}}", + true, + false, + ); + propPane.ToggleJSMode("onClick", false); + + agHelper.GetNAssertElementText( + propPane._actionCard, + "GETExecute a queryApi1.run+1", + "have.text", + 0, + ); + + agHelper.GetNClick(propPane._actionCard); + + agHelper.GetNAssertElementText( + propPane._actionCallbackTitle, + "On success", + "have.text", + 0, + ); + agHelper.GetNAssertElementText( + propPane._actionCard, + "Clear store", + "have.text", + 1, + ); + }); + + it("9. shows fields appropriately for JS Object functions with/without arguments", () => { + const JS_OBJECT_BODY = `export default { funcWithoutArgsSync: () => { console.log("hi"); }, @@ -278,113 +281,113 @@ describe("JS to non-JS mode in Action Selector", { tags: ["@tag.JS"] }, () => { } }`; - jsEditor.CreateJSObject(JS_OBJECT_BODY, { - paste: true, - completeReplace: true, - toRun: false, - shouldCreateNewJSObj: true, + jsEditor.CreateJSObject(JS_OBJECT_BODY, { + paste: true, + completeReplace: true, + toRun: false, + shouldCreateNewJSObj: true, + }); + EditorNavigation.SelectEntityByName("Page1", EntityType.Page); + EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); + + propPane.EnterJSContext( + "onClick", + "{{JSObject1.funcWithoutArgsSync()}}", + true, + false, + ); + propPane.ToggleJSMode("onClick", false); + + agHelper.GetNAssertElementText( + propPane._actionCard, + "Execute a JS functionJSObject1.funcWithoutArgsSync()", + "have.text", + 0, + ); + + agHelper.GetNClick(propPane._actionCard); + agHelper.AssertElementAbsence(propPane._actionPopupTextLabel, 0); + + propPane.EnterJSContext( + "onClick", + "{{JSObject1.funcWithArgsSync(18,26)}}", + true, + false, + ); + propPane.ToggleJSMode("onClick", false); + + agHelper.GetNAssertElementText( + propPane._actionCard, + "Execute a JS functionJSObject1.funcWithArgsSync(18, 26)", + "have.text", + 0, + ); + + agHelper.GetNClick(propPane._actionCard); + agHelper.ValidateCodeEditorContent(propPane._textView, "{{18}}{{26}}"); + agHelper.GetNAssertElementText( + propPane._actionPopupTextLabel, + "a", + "have.text", + 0, + ); + agHelper.GetNAssertElementText( + propPane._actionPopupTextLabel, + "b", + "have.text", + 1, + ); + + propPane.EnterJSContext( + "onClick", + "{{JSObject1.funcWithoutArgsAsync()}}", + true, + false, + ); + propPane.ToggleJSMode("onClick", false); + + agHelper.GetNAssertElementText( + propPane._actionCard, + "Execute a JS functionJSObject1.funcWithoutArgsAsync()", + "have.text", + 0, + ); + + agHelper.GetNClick(propPane._actionCard, 0); + agHelper.AssertElementAbsence(propPane._actionPopupTextLabel, 0); + + propPane.EnterJSContext( + "onClick", + "{{JSObject1.funcWithArgsAsync()}}", + true, + false, + ); + propPane.ToggleJSMode("onClick", false); + + agHelper.GetNAssertElementText( + propPane._actionCard, + "Execute a JS functionJSObject1.funcWithArgsAsync()", + "have.text", + 0, + ); + + agHelper.GetNClick(propPane._actionCard, 0); + agHelper.GetNAssertElementText( + propPane._actionPopupTextLabel, + "a", + "have.text", + 0, + ); + agHelper.GetNAssertElementText( + propPane._actionPopupTextLabel, + "b", + "have.text", + 1, + ); }); - EditorNavigation.SelectEntityByName("Page1", EntityType.Page); - EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); - - propPane.EnterJSContext( - "onClick", - "{{JSObject1.funcWithoutArgsSync()}}", - true, - false, - ); - propPane.ToggleJSMode("onClick", false); - - agHelper.GetNAssertElementText( - propPane._actionCard, - "Execute a JS functionJSObject1.funcWithoutArgsSync()", - "have.text", - 0, - ); - - agHelper.GetNClick(propPane._actionCard); - agHelper.AssertElementAbsence(propPane._actionPopupTextLabel, 0); - - propPane.EnterJSContext( - "onClick", - "{{JSObject1.funcWithArgsSync(18,26)}}", - true, - false, - ); - propPane.ToggleJSMode("onClick", false); - - agHelper.GetNAssertElementText( - propPane._actionCard, - "Execute a JS functionJSObject1.funcWithArgsSync(18, 26)", - "have.text", - 0, - ); - - agHelper.GetNClick(propPane._actionCard); - agHelper.ValidateCodeEditorContent(propPane._textView, "{{18}}{{26}}"); - agHelper.GetNAssertElementText( - propPane._actionPopupTextLabel, - "a", - "have.text", - 0, - ); - agHelper.GetNAssertElementText( - propPane._actionPopupTextLabel, - "b", - "have.text", - 1, - ); - - propPane.EnterJSContext( - "onClick", - "{{JSObject1.funcWithoutArgsAsync()}}", - true, - false, - ); - propPane.ToggleJSMode("onClick", false); - - agHelper.GetNAssertElementText( - propPane._actionCard, - "Execute a JS functionJSObject1.funcWithoutArgsAsync()", - "have.text", - 0, - ); - - agHelper.GetNClick(propPane._actionCard, 0); - agHelper.AssertElementAbsence(propPane._actionPopupTextLabel, 0); - - propPane.EnterJSContext( - "onClick", - "{{JSObject1.funcWithArgsAsync()}}", - true, - false, - ); - propPane.ToggleJSMode("onClick", false); - - agHelper.GetNAssertElementText( - propPane._actionCard, - "Execute a JS functionJSObject1.funcWithArgsAsync()", - "have.text", - 0, - ); - - agHelper.GetNClick(propPane._actionCard, 0); - agHelper.GetNAssertElementText( - propPane._actionPopupTextLabel, - "a", - "have.text", - 0, - ); - agHelper.GetNAssertElementText( - propPane._actionPopupTextLabel, - "b", - "have.text", - 1, - ); - }); - - it("10. shows fields appropriately for JS Object functions with/without arguments and then/catch blocks", () => { - const JS_OBJECT_BODY = `export default { + + it("10. shows fields appropriately for JS Object functions with/without arguments and then/catch blocks", () => { + const JS_OBJECT_BODY = `export default { promiseFuncNoArgs: () => { return new Promise((resolve) => { resolve("hi"); @@ -401,155 +404,156 @@ describe("JS to non-JS mode in Action Selector", { tags: ["@tag.JS"] }, () => { }, }`; - jsEditor.CreateJSObject(JS_OBJECT_BODY, { - paste: true, - completeReplace: true, - toRun: false, - shouldCreateNewJSObj: true, + jsEditor.CreateJSObject(JS_OBJECT_BODY, { + paste: true, + completeReplace: true, + toRun: false, + shouldCreateNewJSObj: true, + }); + EditorNavigation.SelectEntityByName("Page1", EntityType.Page); + EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); + + propPane.EnterJSContext( + "onClick", + '{{JSObject2.promiseFuncNoArgs().then(() => showAlert("then"))}}', + true, + false, + ); + propPane.ToggleJSMode("onClick", false); + + agHelper.GetNAssertElementText( + propPane._actionCard, + "Execute a JS functionJSObject2.promiseFuncNoArgs()", + "have.text", + 0, + ); + + agHelper.GetNClick(propPane._actionCard, 0); + agHelper.AssertElementAbsence(propPane._actionPopupTextLabel, 0); + + propPane.EnterJSContext( + "onClick", + '{{JSObject2.promiseFuncNoArgs().catch(() => showAlert("catch"))}}', + true, + false, + ); + propPane.ToggleJSMode("onClick", false); + + agHelper.GetNAssertElementText( + propPane._actionCard, + "Execute a JS functionJSObject2.promiseFuncNoArgs()", + "have.text", + 0, + ); + + agHelper.GetNClick(propPane._actionCard, 0); + agHelper.AssertElementAbsence(propPane._actionPopupTextLabel, 0); + + propPane.EnterJSContext( + "onClick", + '{{JSObject2.promiseFuncNoArgs().then(() => showAlert("then")).catch(() => showAlert("catch"));}}', + true, + false, + ); + propPane.ToggleJSMode("onClick", false); + + agHelper.GetNAssertElementText( + propPane._actionCard, + "Execute a JS functionJSObject2.promiseFuncNoArgs()", + "have.text", + 0, + ); + + agHelper.GetNClick(propPane._actionCard, 0); + agHelper.AssertElementAbsence(propPane._actionPopupTextLabel, 0); + + propPane.EnterJSContext( + "onClick", + '{{JSObject2.promiseFuncNoArgs().catch(() => showAlert("catch")).then(() => showAlert("then"));}}', + true, + false, + ); + propPane.ToggleJSMode("onClick", false); + + agHelper.GetNAssertElementText( + propPane._actionCard, + "Execute a JS functionJSObject2.promiseFuncNoArgs()", + "have.text", + 0, + ); + + agHelper.GetNClick(propPane._actionCard, 0); + agHelper.AssertElementAbsence(propPane._actionPopupTextLabel, 0); + + propPane.EnterJSContext( + "onClick", + '{{JSObject2.promiseFuncWithArgs("hi").then(() => showAlert("hi")).catch(() => showAlert("bye"));}}', + true, + false, + ); + propPane.ToggleJSMode("onClick", false); + + agHelper.GetNAssertElementText( + propPane._actionCard, + 'Execute a JS functionJSObject2.promiseFuncWithArgs("hi")', + "have.text", + 0, + ); + + agHelper.GetNClick(propPane._actionCard, 0); + agHelper.GetNAssertElementText( + propPane._actionPopupTextLabel, + "a", + "have.text", + 0, + ); + agHelper.ValidateCodeEditorContent(propPane._textView, "hi"); + + propPane.EnterJSContext( + "onClick", + '{{JSObject2.promiseFuncWithArgs().catch(() => showAlert("catch"));}}', + true, + false, + ); + propPane.ToggleJSMode("onClick", false); + + agHelper.GetNAssertElementText( + propPane._actionCard, + "Execute a JS functionJSObject2.promiseFuncWithArgs()", + "have.text", + 0, + ); + + agHelper.GetNClick(propPane._actionCard, 0); + agHelper.GetNAssertElementText( + propPane._actionPopupTextLabel, + "a", + "have.text", + 0, + ); + + propPane.EnterJSContext( + "onClick", + '{{JSObject2.promiseFuncWithArgs().then(() => showAlert("hi")).catch(() => showAlert("bye"));}}', + true, + false, + ); + propPane.ToggleJSMode("onClick", false); + + agHelper.GetNAssertElementText( + propPane._actionCard, + "Execute a JS functionJSObject2.promiseFuncWithArgs()", + "have.text", + 0, + ); + + agHelper.GetNClick(propPane._actionCard, 0); + agHelper.GetNAssertElementText( + propPane._actionPopupTextLabel, + "a", + "have.text", + 0, + ); }); - EditorNavigation.SelectEntityByName("Page1", EntityType.Page); - EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); - - propPane.EnterJSContext( - "onClick", - '{{JSObject2.promiseFuncNoArgs().then(() => showAlert("then"))}}', - true, - false, - ); - propPane.ToggleJSMode("onClick", false); - - agHelper.GetNAssertElementText( - propPane._actionCard, - "Execute a JS functionJSObject2.promiseFuncNoArgs()", - "have.text", - 0, - ); - - agHelper.GetNClick(propPane._actionCard, 0); - agHelper.AssertElementAbsence(propPane._actionPopupTextLabel, 0); - - propPane.EnterJSContext( - "onClick", - '{{JSObject2.promiseFuncNoArgs().catch(() => showAlert("catch"))}}', - true, - false, - ); - propPane.ToggleJSMode("onClick", false); - - agHelper.GetNAssertElementText( - propPane._actionCard, - "Execute a JS functionJSObject2.promiseFuncNoArgs()", - "have.text", - 0, - ); - - agHelper.GetNClick(propPane._actionCard, 0); - agHelper.AssertElementAbsence(propPane._actionPopupTextLabel, 0); - - propPane.EnterJSContext( - "onClick", - '{{JSObject2.promiseFuncNoArgs().then(() => showAlert("then")).catch(() => showAlert("catch"));}}', - true, - false, - ); - propPane.ToggleJSMode("onClick", false); - - agHelper.GetNAssertElementText( - propPane._actionCard, - "Execute a JS functionJSObject2.promiseFuncNoArgs()", - "have.text", - 0, - ); - - agHelper.GetNClick(propPane._actionCard, 0); - agHelper.AssertElementAbsence(propPane._actionPopupTextLabel, 0); - - propPane.EnterJSContext( - "onClick", - '{{JSObject2.promiseFuncNoArgs().catch(() => showAlert("catch")).then(() => showAlert("then"));}}', - true, - false, - ); - propPane.ToggleJSMode("onClick", false); - - agHelper.GetNAssertElementText( - propPane._actionCard, - "Execute a JS functionJSObject2.promiseFuncNoArgs()", - "have.text", - 0, - ); - - agHelper.GetNClick(propPane._actionCard, 0); - agHelper.AssertElementAbsence(propPane._actionPopupTextLabel, 0); - - propPane.EnterJSContext( - "onClick", - '{{JSObject2.promiseFuncWithArgs("hi").then(() => showAlert("hi")).catch(() => showAlert("bye"));}}', - true, - false, - ); - propPane.ToggleJSMode("onClick", false); - - agHelper.GetNAssertElementText( - propPane._actionCard, - 'Execute a JS functionJSObject2.promiseFuncWithArgs("hi")', - "have.text", - 0, - ); - - agHelper.GetNClick(propPane._actionCard, 0); - agHelper.GetNAssertElementText( - propPane._actionPopupTextLabel, - "a", - "have.text", - 0, - ); - agHelper.ValidateCodeEditorContent(propPane._textView, "hi"); - - propPane.EnterJSContext( - "onClick", - '{{JSObject2.promiseFuncWithArgs().catch(() => showAlert("catch"));}}', - true, - false, - ); - propPane.ToggleJSMode("onClick", false); - - agHelper.GetNAssertElementText( - propPane._actionCard, - "Execute a JS functionJSObject2.promiseFuncWithArgs()", - "have.text", - 0, - ); - - agHelper.GetNClick(propPane._actionCard, 0); - agHelper.GetNAssertElementText( - propPane._actionPopupTextLabel, - "a", - "have.text", - 0, - ); - - propPane.EnterJSContext( - "onClick", - '{{JSObject2.promiseFuncWithArgs().then(() => showAlert("hi")).catch(() => showAlert("bye"));}}', - true, - false, - ); - propPane.ToggleJSMode("onClick", false); - - agHelper.GetNAssertElementText( - propPane._actionCard, - "Execute a JS functionJSObject2.promiseFuncWithArgs()", - "have.text", - 0, - ); - - agHelper.GetNClick(propPane._actionCard, 0); - agHelper.GetNAssertElementText( - propPane._actionPopupTextLabel, - "a", - "have.text", - 0, - ); - }); -}); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/ActionExecution/ActionSelector_JsToNonJSMode_2_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/ActionExecution/ActionSelector_JsToNonJSMode_2_spec.ts index f51ad098c736..96e76a479f6f 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/ActionExecution/ActionSelector_JsToNonJSMode_2_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/ActionExecution/ActionSelector_JsToNonJSMode_2_spec.ts @@ -8,651 +8,665 @@ import EditorNavigation, { EntityType, } from "../../../../support/Pages/EditorNavigation"; -describe("JS to non-JS mode in Action Selector", { tags: ["@tag.JS"] }, () => { - before(() => { - entityExplorer.DragDropWidgetNVerify(draggableWidgets.BUTTON); - }); - - it("1. shows fields for navigate to from js to non-js mode", () => { - propPane.EnterJSContext("onClick", "{{navigateTo()}}", true, false); - propPane.ToggleJSMode("onClick", false); - - agHelper.GetNAssertElementText( - propPane._actionCard, - "Navigate toSelect page", - "have.text", - 0, - ); - agHelper.GetNClick(propPane._actionCard, 0); - - agHelper.AssertElementVisibility(propPane._navigateToType("Page name")); - - agHelper.GetNAssertElementText( - propPane._actionOpenDropdownSelectPage, - "Select page", - "have.text", - 0, - ); - - agHelper.GetNAssertElementText( - propPane._actionPopupTextLabel, - "Query params", - "have.text", - 0, - ); - - agHelper.GetNAssertElementText( - propPane._sameWindowDropdownOption, - "Same window", - "have.text", - 0, - ); - - propPane.EnterJSContext( - "onClick", - "{{navigateTo('Page1', {a:1}, 'NEW_WINDOW')}}", - true, - true, - ); - propPane.ToggleJSMode("onClick", false); - - agHelper.GetNAssertElementText( - propPane._actionCard, - "Navigate toPage1", - "have.text", - 0, - ); - agHelper.GetNClick(propPane._actionCard, 0); - - agHelper.AssertElementVisibility(propPane._navigateToType("Page name")); - - agHelper.GetNAssertElementText( - propPane._actionOpenDropdownSelectPage, - "Page1", - "have.text", - 0, - ); - - agHelper.GetNAssertElementText( - propPane._actionPopupTextLabel, - "Query params", - "have.text", - 0, - ); - - agHelper.GetNAssertElementText( - propPane._sameWindowDropdownOption, - "New window", - "have.text", - 0, - ); - - propPane.EnterJSContext( - "onClick", - "{{navigateTo('google.com', {a:1}, 'SAME_WINDOW')}}", - true, - true, - ); - propPane.ToggleJSMode("onClick", false); - - agHelper.GetNAssertElementText( - propPane._actionCard, - "Navigate togoogle.com", - "have.text", - 0, - ); - agHelper.GetNClick(propPane._actionCard, 0); - - agHelper.AssertElementVisibility(propPane._navigateToType("URL")); - - agHelper.GetNAssertElementText( - propPane._actionPopupTextLabel, - "Enter URL", - "have.text", - 0, - ); - - agHelper.GetNAssertElementText( - propPane._actionPopupTextLabel, - "Query params", - "have.text", - 1, - ); - - agHelper.GetNAssertElementText( - propPane._sameWindowDropdownOption, - "Same window", - "have.text", - 0, - ); - }); - - it("2. shows fields for show alert from js to non-js mode", () => { - EditorNavigation.SelectEntityByName("Page1", EntityType.Page); - EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); - - propPane.EnterJSContext("onClick", "{{showAlert()}}", true, false); - propPane.ToggleJSMode("onClick", false); - - agHelper.GetNAssertElementText( - propPane._actionCard, - "Show alertAdd message", - "have.text", - 0, - ); - agHelper.GetNClick(propPane._actionCard, 0); - - agHelper.GetNAssertElementText( - propPane._actionPopupTextLabel, - "Message", - "have.text", - 0, - ); - - agHelper.GetNAssertElementText( - propPane._dropdownSelectType, - "Select type", - "have.text", - 0, - ); - - propPane.EnterJSContext( - "onClick", - "{{showAlert('hello', 'info')}}", - true, - false, - ); - propPane.ToggleJSMode("onClick", false); - - agHelper.GetNAssertElementText( - propPane._actionCard, - "Show alerthello", - "have.text", - 0, - ); - agHelper.GetNClick(propPane._actionCard, 0); - - agHelper.GetNAssertElementText( - propPane._actionPopupTextLabel, - "Message", - "have.text", - 0, - ); - agHelper.ValidateCodeEditorContent(propPane._textView, "hello"); - - agHelper.GetNAssertElementText( - propPane._dropdownSelectType, - "Info", - "have.text", - 0, - ); - }); - - it("3. shows fields for show modal from js to non-js mode", () => { - EditorNavigation.SelectEntityByName("Page1", EntityType.Page); - - entityExplorer.DragDropWidgetNVerify("modalwidget", 300, 400); - EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); - - propPane.EnterJSContext("onClick", "{{showModal()}}", true, false); - propPane.ToggleJSMode("onClick", false); - - agHelper.GetNAssertElementText( - propPane._actionCard, - "Show modalnone", - "have.text", - 0, - ); - agHelper.GetNClick(propPane._actionCard, 0); - - agHelper.GetNAssertElementText( - propPane._actionOpenDropdownSelectModal, - "Select modal", - "have.text", - 0, - ); - - propPane.EnterJSContext( - "onClick", - "{{showModal(Modal1.name)}}", - true, - false, - ); - propPane.ToggleJSMode("onClick", false); - - agHelper.GetNAssertElementText( - propPane._actionCard, - "Show modalModal1", - "have.text", - 0, - ); - agHelper.GetNClick(propPane._actionCard, 0); - - agHelper.GetNAssertElementText( - propPane._actionOpenDropdownSelectModal, - "Modal1", - "have.text", - 0, - ); - }); - - it("4. shows fields for remove modal from js to non-js mode", () => { - EditorNavigation.SelectEntityByName("Page1", EntityType.Page); - EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); - - propPane.EnterJSContext("onClick", "{{closeModal()}}", true, false); - propPane.ToggleJSMode("onClick", false); - - agHelper.GetNAssertElementText( - propPane._actionCard, - "Close modalnone", - "have.text", - 0, - ); - agHelper.GetNClick(propPane._actionCard, 0); - - agHelper.GetNAssertElementText( - propPane._actionOpenDropdownSelectModal, - "Select modal", - "have.text", - 0, - ); - - propPane.EnterJSContext( - "onClick", - "{{closeModal(Modal1.name)}}", - true, - false, - ); - propPane.ToggleJSMode("onClick", false); - - agHelper.GetNAssertElementText( - propPane._actionCard, - "Close modalModal1", - "have.text", - 0, - ); - agHelper.GetNClick(propPane._actionCard, 0); - - agHelper.GetNAssertElementText( - propPane._actionOpenDropdownSelectModal, - "Modal1", - "have.text", - 0, - ); - }); - - it("5. should shows appropriate fields for store value", () => { - EditorNavigation.SelectEntityByName("Page1", EntityType.Page); - EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); - - propPane.EnterJSContext("onClick", "{{storeValue()}}", true, false); - propPane.ToggleJSMode("onClick", false); - - agHelper.GetNAssertElementText( - propPane._actionCard, - "Store valueAdd key", - "have.text", - 0, - ); - agHelper.GetNClick(propPane._actionCard, 0); - - agHelper.GetNAssertElementText( - propPane._actionPopupTextLabel, - "Key", - "have.text", - 0, - ); - agHelper.GetNAssertElementText( - propPane._actionPopupTextLabel, - "Value", - "have.text", - 1, - ); - - propPane.EnterJSContext("onClick", "{{storeValue('a', '')}}", true, false); - propPane.ToggleJSMode("onClick", false); - - agHelper.GetNAssertElementText( - propPane._actionCard, - "Store valuea", - "have.text", - 0, - ); - agHelper.GetNClick(propPane._actionCard, 0); - - propPane.EnterJSContext("onClick", "{{storeValue('a', 1)}}", true, false); - propPane.ToggleJSMode("onClick", false); - - agHelper.GetNAssertElementText( - propPane._actionCard, - "Store valuea", - "have.text", - 0, - ); - agHelper.GetNClick(propPane._actionCard, 0); - - agHelper.ValidateCodeEditorContent(propPane._textView, "a{{1}}"); - - propPane.EnterJSContext("onClick", "{{storeValue('', 1)}}", true, false); - propPane.ToggleJSMode("onClick", false); - - agHelper.GetNAssertElementText( - propPane._actionCard, - "Store valueAdd key", - "have.text", - 0, - ); - agHelper.GetNClick(propPane._actionCard, 0); - }); - - it("6. shows fields for remove value appropriately", () => { - EditorNavigation.SelectEntityByName("Page1", EntityType.Page); - EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); - - propPane.EnterJSContext("onClick", "{{removeValue()}}", true, false); - propPane.ToggleJSMode("onClick", false); - - agHelper.GetNAssertElementText( - propPane._actionCard, - "Remove valueAdd key", - "have.text", - 0, - ); - agHelper.GetNClick(propPane._actionCard, 0); - - agHelper.GetNAssertElementText( - propPane._actionPopupTextLabel, - "Key", - "have.text", - 0, - ); - - propPane.EnterJSContext("onClick", "{{removeValue('a')}}", true, false); - propPane.ToggleJSMode("onClick", false); - - agHelper.GetNAssertElementText( - propPane._actionCard, - "Remove valuea", - "have.text", - 0, - ); - agHelper.GetNClick(propPane._actionCard, 0); - - agHelper.ValidateCodeEditorContent(propPane._textView, "a"); - }); - - it("7. shows fields appropriately for the download function", () => { - EditorNavigation.SelectEntityByName("Page1", EntityType.Page); - EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); - - propPane.EnterJSContext("onClick", "{{download()}}", true, false); - propPane.ToggleJSMode("onClick", false); - - agHelper.GetNAssertElementText( - propPane._actionCard, - "DownloadAdd data to download", - "have.text", - 0, - ); - agHelper.GetNClick(propPane._actionCard, 0); - - agHelper.GetNAssertElementText( - propPane._actionPopupTextLabel, - "Data to download", - "have.text", - 0, - ); - agHelper.GetNAssertElementText( - propPane._actionPopupTextLabel, - "File name with extension", - "have.text", - 1, - ); - agHelper.GetNAssertElementText( - propPane._selectorViewLabel, - "Type", - "have.text", - 0, - ); - - agHelper.GetNAssertElementText( - propPane._selectorViewButton, - "Select file type (optional)", - ); - - propPane.EnterJSContext( - "onClick", - "{{download('a', '', '')}}", - true, - false, - ); - propPane.ToggleJSMode("onClick", false); - - agHelper.GetNAssertElementText( - propPane._actionCard, - "DownloadAdd data to download", - "have.text", - 0, - ); - - propPane.EnterJSContext( - "onClick", - "{{download('a', 'b', '')}}", - true, - false, - ); - propPane.ToggleJSMode("onClick", false); - - agHelper.GetNAssertElementText( - propPane._actionCard, - "Downloadb", - "have.text", - 0, - ); - - propPane.EnterJSContext( - "onClick", - "{{download('a', 'b', 'image/png')}}", - true, - false, - ); - propPane.ToggleJSMode("onClick", false); - - agHelper.GetNAssertElementText( - propPane._actionCard, - "Downloadb", - "have.text", - 0, - ); - agHelper.GetNClick(propPane._actionCard, 0); - agHelper.ValidateCodeEditorContent(propPane._textView, "ab"); - - agHelper.GetNAssertElementText( - propPane._selectorViewButton, - "PNG", - "have.text", - 0, - ); - }); - - it("8. shows fields for copyToClipboard appropriately", () => { - EditorNavigation.SelectEntityByName("Page1", EntityType.Page); - EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); - - propPane.EnterJSContext("onClick", "{{copyToClipboard()}}", true, false); - propPane.ToggleJSMode("onClick", false); - - agHelper.GetNAssertElementText( - propPane._actionCard, - "Copy to clipboardAdd text", - "have.text", - 0, - ); - agHelper.GetNClick(propPane._actionCard, 0); - - agHelper.GetNAssertElementText( - propPane._actionPopupTextLabel, - "Text to be copied to clipboard", - "have.text", - 0, - ); - - propPane.EnterJSContext("onClick", "{{copyToClipboard('a')}}", true, false); - propPane.ToggleJSMode("onClick", false); - - agHelper.GetNAssertElementText( - propPane._actionCard, - "Copy to clipboarda", - "have.text", - 0, - ); - agHelper.GetNClick(propPane._actionCard, 0); - - agHelper.ValidateCodeEditorContent(propPane._textView, "a"); - agHelper.TypeText( - propPane._actionSelectorFieldByLabel("Text to be copied to clipboard"), - "line1{enter}line2{enter}line3", - { parseSpecialCharSeq: true }, - ); - propPane.ToggleJSMode("onClick"); - propPane.ValidatePropertyFieldValue( - "onClick", - `{{copyToClipboard('aline1\\nline2\\nline3');}}`, - ); - }); - - it("9. shows fields for reset widget appropriately", () => { - EditorNavigation.SelectEntityByName("Page1", EntityType.Page); - EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); - - propPane.EnterJSContext("onClick", "{{resetWidget()}}", true, false); - propPane.ToggleJSMode("onClick", false); - - agHelper.GetNAssertElementText( - propPane._actionCard, - "Reset widgetSelect widget", - "have.text", - 0, - ); - agHelper.GetNClick(propPane._actionCard, 0); - - agHelper.GetNAssertElementText( - propPane._selectorViewLabel, - "Widget", - "have.text", - 0, - ); - - agHelper.GetNAssertElementText( - propPane._selectorViewLabel, - "Reset Children", - "have.text", - 1, - ); - - agHelper.GetNAssertElementText( - propPane._selectorViewButton, - "Select widget", - "have.text", - 0, - ); - - agHelper.GetNAssertElementText( - propPane._selectorViewButton, - "true", - "have.text", - 1, - ); - - propPane.EnterJSContext( - "onClick", - '{{resetWidget("Modal1", false)}}', - true, - false, - ); - propPane.ToggleJSMode("onClick", false); - - agHelper.GetNAssertElementText( - propPane._actionCard, - "Reset widgetModal1", - "have.text", - 0, - ); - agHelper.GetNClick(propPane._actionCard, 0); - - agHelper.GetNAssertElementText( - propPane._selectorViewButton, - "Modal1", - "have.text", - 0, - ); - - agHelper.GetNAssertElementText( - propPane._selectorViewButton, - "false", - "have.text", - 1, - ); - - propPane.EnterJSContext( - "onClick", - '{{resetWidget("Modal1")}}', - true, - false, - ); - propPane.ToggleJSMode("onClick", false); - - agHelper.GetNAssertElementText( - propPane._actionCard, - "Reset widgetModal1", - "have.text", - 0, - ); - agHelper.GetNClick(propPane._actionCard, 0); - - agHelper.GetNAssertElementText( - propPane._selectorViewButton, - "Modal1", - "have.text", - 0, - ); - - agHelper.GetNAssertElementText( - propPane._selectorViewButton, - "true", - "have.text", - 1, - ); - - propPane.EnterJSContext( - "onClick", - "{{resetWidget('', false)}}", - true, - false, - ); - propPane.ToggleJSMode("onClick", false); - - agHelper.GetNAssertElementText( - propPane._actionCard, - "Reset widgetSelect widget", - "have.text", - 0, - ); - agHelper.GetNClick(propPane._actionCard, 0); - - agHelper.GetNAssertElementText( - propPane._selectorViewButton, - "Select widget", - "have.text", - 0, - ); - - agHelper.GetNAssertElementText( - propPane._selectorViewButton, - "false", - "have.text", - 1, - ); - }); -}); +describe( + "JS to non-JS mode in Action Selector", + { tags: ["@tag.JS", "@tag.Binding"] }, + () => { + before(() => { + entityExplorer.DragDropWidgetNVerify(draggableWidgets.BUTTON); + }); + + it("1. shows fields for navigate to from js to non-js mode", () => { + propPane.EnterJSContext("onClick", "{{navigateTo()}}", true, false); + propPane.ToggleJSMode("onClick", false); + + agHelper.GetNAssertElementText( + propPane._actionCard, + "Navigate toSelect page", + "have.text", + 0, + ); + agHelper.GetNClick(propPane._actionCard, 0); + + agHelper.AssertElementVisibility(propPane._navigateToType("Page name")); + + agHelper.GetNAssertElementText( + propPane._actionOpenDropdownSelectPage, + "Select page", + "have.text", + 0, + ); + + agHelper.GetNAssertElementText( + propPane._actionPopupTextLabel, + "Query params", + "have.text", + 0, + ); + + agHelper.GetNAssertElementText( + propPane._sameWindowDropdownOption, + "Same window", + "have.text", + 0, + ); + + propPane.EnterJSContext( + "onClick", + "{{navigateTo('Page1', {a:1}, 'NEW_WINDOW')}}", + true, + true, + ); + propPane.ToggleJSMode("onClick", false); + + agHelper.GetNAssertElementText( + propPane._actionCard, + "Navigate toPage1", + "have.text", + 0, + ); + agHelper.GetNClick(propPane._actionCard, 0); + + agHelper.AssertElementVisibility(propPane._navigateToType("Page name")); + + agHelper.GetNAssertElementText( + propPane._actionOpenDropdownSelectPage, + "Page1", + "have.text", + 0, + ); + + agHelper.GetNAssertElementText( + propPane._actionPopupTextLabel, + "Query params", + "have.text", + 0, + ); + + agHelper.GetNAssertElementText( + propPane._sameWindowDropdownOption, + "New window", + "have.text", + 0, + ); + + propPane.EnterJSContext( + "onClick", + "{{navigateTo('google.com', {a:1}, 'SAME_WINDOW')}}", + true, + true, + ); + propPane.ToggleJSMode("onClick", false); + + agHelper.GetNAssertElementText( + propPane._actionCard, + "Navigate togoogle.com", + "have.text", + 0, + ); + agHelper.GetNClick(propPane._actionCard, 0); + + agHelper.AssertElementVisibility(propPane._navigateToType("URL")); + + agHelper.GetNAssertElementText( + propPane._actionPopupTextLabel, + "Enter URL", + "have.text", + 0, + ); + + agHelper.GetNAssertElementText( + propPane._actionPopupTextLabel, + "Query params", + "have.text", + 1, + ); + + agHelper.GetNAssertElementText( + propPane._sameWindowDropdownOption, + "Same window", + "have.text", + 0, + ); + }); + + it("2. shows fields for show alert from js to non-js mode", () => { + EditorNavigation.SelectEntityByName("Page1", EntityType.Page); + EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); + + propPane.EnterJSContext("onClick", "{{showAlert()}}", true, false); + propPane.ToggleJSMode("onClick", false); + + agHelper.GetNAssertElementText( + propPane._actionCard, + "Show alertAdd message", + "have.text", + 0, + ); + agHelper.GetNClick(propPane._actionCard, 0); + + agHelper.GetNAssertElementText( + propPane._actionPopupTextLabel, + "Message", + "have.text", + 0, + ); + + agHelper.GetNAssertElementText( + propPane._dropdownSelectType, + "Select type", + "have.text", + 0, + ); + + propPane.EnterJSContext( + "onClick", + "{{showAlert('hello', 'info')}}", + true, + false, + ); + propPane.ToggleJSMode("onClick", false); + + agHelper.GetNAssertElementText( + propPane._actionCard, + "Show alerthello", + "have.text", + 0, + ); + agHelper.GetNClick(propPane._actionCard, 0); + + agHelper.GetNAssertElementText( + propPane._actionPopupTextLabel, + "Message", + "have.text", + 0, + ); + agHelper.ValidateCodeEditorContent(propPane._textView, "hello"); + + agHelper.GetNAssertElementText( + propPane._dropdownSelectType, + "Info", + "have.text", + 0, + ); + }); + + it("3. shows fields for show modal from js to non-js mode", () => { + EditorNavigation.SelectEntityByName("Page1", EntityType.Page); + + entityExplorer.DragDropWidgetNVerify("modalwidget", 300, 400); + EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); + + propPane.EnterJSContext("onClick", "{{showModal()}}", true, false); + propPane.ToggleJSMode("onClick", false); + + agHelper.GetNAssertElementText( + propPane._actionCard, + "Show modalnone", + "have.text", + 0, + ); + agHelper.GetNClick(propPane._actionCard, 0); + + agHelper.GetNAssertElementText( + propPane._actionOpenDropdownSelectModal, + "Select modal", + "have.text", + 0, + ); + + propPane.EnterJSContext( + "onClick", + "{{showModal(Modal1.name)}}", + true, + false, + ); + propPane.ToggleJSMode("onClick", false); + + agHelper.GetNAssertElementText( + propPane._actionCard, + "Show modalModal1", + "have.text", + 0, + ); + agHelper.GetNClick(propPane._actionCard, 0); + + agHelper.GetNAssertElementText( + propPane._actionOpenDropdownSelectModal, + "Modal1", + "have.text", + 0, + ); + }); + + it("4. shows fields for remove modal from js to non-js mode", () => { + EditorNavigation.SelectEntityByName("Page1", EntityType.Page); + EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); + + propPane.EnterJSContext("onClick", "{{closeModal()}}", true, false); + propPane.ToggleJSMode("onClick", false); + + agHelper.GetNAssertElementText( + propPane._actionCard, + "Close modalnone", + "have.text", + 0, + ); + agHelper.GetNClick(propPane._actionCard, 0); + + agHelper.GetNAssertElementText( + propPane._actionOpenDropdownSelectModal, + "Select modal", + "have.text", + 0, + ); + + propPane.EnterJSContext( + "onClick", + "{{closeModal(Modal1.name)}}", + true, + false, + ); + propPane.ToggleJSMode("onClick", false); + + agHelper.GetNAssertElementText( + propPane._actionCard, + "Close modalModal1", + "have.text", + 0, + ); + agHelper.GetNClick(propPane._actionCard, 0); + + agHelper.GetNAssertElementText( + propPane._actionOpenDropdownSelectModal, + "Modal1", + "have.text", + 0, + ); + }); + + it("5. should shows appropriate fields for store value", () => { + EditorNavigation.SelectEntityByName("Page1", EntityType.Page); + EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); + + propPane.EnterJSContext("onClick", "{{storeValue()}}", true, false); + propPane.ToggleJSMode("onClick", false); + + agHelper.GetNAssertElementText( + propPane._actionCard, + "Store valueAdd key", + "have.text", + 0, + ); + agHelper.GetNClick(propPane._actionCard, 0); + + agHelper.GetNAssertElementText( + propPane._actionPopupTextLabel, + "Key", + "have.text", + 0, + ); + agHelper.GetNAssertElementText( + propPane._actionPopupTextLabel, + "Value", + "have.text", + 1, + ); + + propPane.EnterJSContext( + "onClick", + "{{storeValue('a', '')}}", + true, + false, + ); + propPane.ToggleJSMode("onClick", false); + + agHelper.GetNAssertElementText( + propPane._actionCard, + "Store valuea", + "have.text", + 0, + ); + agHelper.GetNClick(propPane._actionCard, 0); + + propPane.EnterJSContext("onClick", "{{storeValue('a', 1)}}", true, false); + propPane.ToggleJSMode("onClick", false); + + agHelper.GetNAssertElementText( + propPane._actionCard, + "Store valuea", + "have.text", + 0, + ); + agHelper.GetNClick(propPane._actionCard, 0); + + agHelper.ValidateCodeEditorContent(propPane._textView, "a{{1}}"); + + propPane.EnterJSContext("onClick", "{{storeValue('', 1)}}", true, false); + propPane.ToggleJSMode("onClick", false); + + agHelper.GetNAssertElementText( + propPane._actionCard, + "Store valueAdd key", + "have.text", + 0, + ); + agHelper.GetNClick(propPane._actionCard, 0); + }); + + it("6. shows fields for remove value appropriately", () => { + EditorNavigation.SelectEntityByName("Page1", EntityType.Page); + EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); + + propPane.EnterJSContext("onClick", "{{removeValue()}}", true, false); + propPane.ToggleJSMode("onClick", false); + + agHelper.GetNAssertElementText( + propPane._actionCard, + "Remove valueAdd key", + "have.text", + 0, + ); + agHelper.GetNClick(propPane._actionCard, 0); + + agHelper.GetNAssertElementText( + propPane._actionPopupTextLabel, + "Key", + "have.text", + 0, + ); + + propPane.EnterJSContext("onClick", "{{removeValue('a')}}", true, false); + propPane.ToggleJSMode("onClick", false); + + agHelper.GetNAssertElementText( + propPane._actionCard, + "Remove valuea", + "have.text", + 0, + ); + agHelper.GetNClick(propPane._actionCard, 0); + + agHelper.ValidateCodeEditorContent(propPane._textView, "a"); + }); + + it("7. shows fields appropriately for the download function", () => { + EditorNavigation.SelectEntityByName("Page1", EntityType.Page); + EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); + + propPane.EnterJSContext("onClick", "{{download()}}", true, false); + propPane.ToggleJSMode("onClick", false); + + agHelper.GetNAssertElementText( + propPane._actionCard, + "DownloadAdd data to download", + "have.text", + 0, + ); + agHelper.GetNClick(propPane._actionCard, 0); + + agHelper.GetNAssertElementText( + propPane._actionPopupTextLabel, + "Data to download", + "have.text", + 0, + ); + agHelper.GetNAssertElementText( + propPane._actionPopupTextLabel, + "File name with extension", + "have.text", + 1, + ); + agHelper.GetNAssertElementText( + propPane._selectorViewLabel, + "Type", + "have.text", + 0, + ); + + agHelper.GetNAssertElementText( + propPane._selectorViewButton, + "Select file type (optional)", + ); + + propPane.EnterJSContext( + "onClick", + "{{download('a', '', '')}}", + true, + false, + ); + propPane.ToggleJSMode("onClick", false); + + agHelper.GetNAssertElementText( + propPane._actionCard, + "DownloadAdd data to download", + "have.text", + 0, + ); + + propPane.EnterJSContext( + "onClick", + "{{download('a', 'b', '')}}", + true, + false, + ); + propPane.ToggleJSMode("onClick", false); + + agHelper.GetNAssertElementText( + propPane._actionCard, + "Downloadb", + "have.text", + 0, + ); + + propPane.EnterJSContext( + "onClick", + "{{download('a', 'b', 'image/png')}}", + true, + false, + ); + propPane.ToggleJSMode("onClick", false); + + agHelper.GetNAssertElementText( + propPane._actionCard, + "Downloadb", + "have.text", + 0, + ); + agHelper.GetNClick(propPane._actionCard, 0); + agHelper.ValidateCodeEditorContent(propPane._textView, "ab"); + + agHelper.GetNAssertElementText( + propPane._selectorViewButton, + "PNG", + "have.text", + 0, + ); + }); + + it("8. shows fields for copyToClipboard appropriately", () => { + EditorNavigation.SelectEntityByName("Page1", EntityType.Page); + EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); + + propPane.EnterJSContext("onClick", "{{copyToClipboard()}}", true, false); + propPane.ToggleJSMode("onClick", false); + + agHelper.GetNAssertElementText( + propPane._actionCard, + "Copy to clipboardAdd text", + "have.text", + 0, + ); + agHelper.GetNClick(propPane._actionCard, 0); + + agHelper.GetNAssertElementText( + propPane._actionPopupTextLabel, + "Text to be copied to clipboard", + "have.text", + 0, + ); + + propPane.EnterJSContext( + "onClick", + "{{copyToClipboard('a')}}", + true, + false, + ); + propPane.ToggleJSMode("onClick", false); + + agHelper.GetNAssertElementText( + propPane._actionCard, + "Copy to clipboarda", + "have.text", + 0, + ); + agHelper.GetNClick(propPane._actionCard, 0); + + agHelper.ValidateCodeEditorContent(propPane._textView, "a"); + agHelper.TypeText( + propPane._actionSelectorFieldByLabel("Text to be copied to clipboard"), + "line1{enter}line2{enter}line3", + { parseSpecialCharSeq: true }, + ); + propPane.ToggleJSMode("onClick"); + propPane.ValidatePropertyFieldValue( + "onClick", + `{{copyToClipboard('aline1\\nline2\\nline3');}}`, + ); + }); + + it("9. shows fields for reset widget appropriately", () => { + EditorNavigation.SelectEntityByName("Page1", EntityType.Page); + EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); + + propPane.EnterJSContext("onClick", "{{resetWidget()}}", true, false); + propPane.ToggleJSMode("onClick", false); + + agHelper.GetNAssertElementText( + propPane._actionCard, + "Reset widgetSelect widget", + "have.text", + 0, + ); + agHelper.GetNClick(propPane._actionCard, 0); + + agHelper.GetNAssertElementText( + propPane._selectorViewLabel, + "Widget", + "have.text", + 0, + ); + + agHelper.GetNAssertElementText( + propPane._selectorViewLabel, + "Reset Children", + "have.text", + 1, + ); + + agHelper.GetNAssertElementText( + propPane._selectorViewButton, + "Select widget", + "have.text", + 0, + ); + + agHelper.GetNAssertElementText( + propPane._selectorViewButton, + "true", + "have.text", + 1, + ); + + propPane.EnterJSContext( + "onClick", + '{{resetWidget("Modal1", false)}}', + true, + false, + ); + propPane.ToggleJSMode("onClick", false); + + agHelper.GetNAssertElementText( + propPane._actionCard, + "Reset widgetModal1", + "have.text", + 0, + ); + agHelper.GetNClick(propPane._actionCard, 0); + + agHelper.GetNAssertElementText( + propPane._selectorViewButton, + "Modal1", + "have.text", + 0, + ); + + agHelper.GetNAssertElementText( + propPane._selectorViewButton, + "false", + "have.text", + 1, + ); + + propPane.EnterJSContext( + "onClick", + '{{resetWidget("Modal1")}}', + true, + false, + ); + propPane.ToggleJSMode("onClick", false); + + agHelper.GetNAssertElementText( + propPane._actionCard, + "Reset widgetModal1", + "have.text", + 0, + ); + agHelper.GetNClick(propPane._actionCard, 0); + + agHelper.GetNAssertElementText( + propPane._selectorViewButton, + "Modal1", + "have.text", + 0, + ); + + agHelper.GetNAssertElementText( + propPane._selectorViewButton, + "true", + "have.text", + 1, + ); + + propPane.EnterJSContext( + "onClick", + "{{resetWidget('', false)}}", + true, + false, + ); + propPane.ToggleJSMode("onClick", false); + + agHelper.GetNAssertElementText( + propPane._actionCard, + "Reset widgetSelect widget", + "have.text", + 0, + ); + agHelper.GetNClick(propPane._actionCard, 0); + + agHelper.GetNAssertElementText( + propPane._selectorViewButton, + "Select widget", + "have.text", + 0, + ); + + agHelper.GetNAssertElementText( + propPane._selectorViewButton, + "false", + "have.text", + 1, + ); + }); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/ActionExecution/ActionSelector_JsToNonJSMode_3_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/ActionExecution/ActionSelector_JsToNonJSMode_3_spec.ts index fc866652ea6d..1acb2ec201ca 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/ActionExecution/ActionSelector_JsToNonJSMode_3_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/ActionExecution/ActionSelector_JsToNonJSMode_3_spec.ts @@ -7,280 +7,294 @@ import EditorNavigation, { EntityType, } from "../../../../support/Pages/EditorNavigation"; -describe("JS to non-JS mode in Action Selector", { tags: ["@tag.JS"] }, () => { - before(() => { - agHelper.AddDsl("promisesBtnDsl", locators._buttonByText("Submit")); - }); - - it("1. should show fields appropriately for setinterval", () => { - EditorNavigation.SelectEntityByName("Page1", EntityType.Page); - EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); - - propPane.EnterJSContext("onClick", "{{setInterval()}}", true, false); - propPane.ToggleJSMode("onClick", false); - - agHelper.GetNAssertElementText( - propPane._actionCard, - "Set intervalms", - "have.text", - 0, - ); - agHelper.GetNClick(propPane._actionCard, 0); - - agHelper.GetNAssertElementText( - propPane._actionPopupTextLabel, - "Callback function", - "have.text", - 0, - ); - - agHelper.GetNAssertElementText( - propPane._actionPopupTextLabel, - "Delay (ms)", - "have.text", - 1, - ); - - agHelper.GetNAssertElementText( - propPane._actionPopupTextLabel, - "Id", - "have.text", - 2, - ); - - propPane.EnterJSContext( - "onClick", - "{{setInterval(() => {}, 200, '')}}", - true, - false, - ); - propPane.ToggleJSMode("onClick", false); - - agHelper.GetNAssertElementText( - propPane._actionCard, - "Set interval200ms", - "have.text", - 0, - ); - agHelper.GetNClick(propPane._actionCard, 0); - - propPane.EnterJSContext( - "onClick", - "{{setInterval(() => {showAlert('hi')}, 200, 'id1')}}", - true, - false, - ); - propPane.ToggleJSMode("onClick", false); - - agHelper.GetNAssertElementText( - propPane._actionCard, - "Set interval200ms", - "have.text", - 0, - ); - agHelper.GetNClick(propPane._actionCard, 0); - }); - - it("2. should show fields appropriately for clearInterval", () => { - EditorNavigation.SelectEntityByName("Page1", EntityType.Page); - EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); - - propPane.EnterJSContext("onClick", "{{clearInterval()}}", true, false); - propPane.ToggleJSMode("onClick", false); - - agHelper.GetNAssertElementText( - propPane._actionCard, - "Clear intervalAdd Id", - "have.text", - 0, - ); - agHelper.GetNClick(propPane._actionCard, 0); - - agHelper.GetNAssertElementText( - propPane._actionPopupTextLabel, - "Id", - "have.text", - 0, - ); - - propPane.EnterJSContext("onClick", "{{clearInterval('Id1')}}", true, true); - propPane.ToggleJSMode("onClick", false); - - agHelper.GetNAssertElementText( - propPane._actionCard, - "Clear intervalId1", - "have.text", - 0, - ); - agHelper.GetNClick(propPane._actionCard, 0); - - agHelper.ValidateCodeEditorContent(propPane._textView, "Id1"); - }); - - it("3. should show no fields for clear store", () => { - EditorNavigation.SelectEntityByName("Page1", EntityType.Page); - EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); - - propPane.EnterJSContext("onClick", "{{clearStore()}}", true, false); - propPane.ToggleJSMode("onClick", false); - - agHelper.GetNAssertElementText( - propPane._actionCard, - "Clear store", - "have.text", - 0, - ); - agHelper.GetNClick(propPane._actionCard, 0); - - agHelper.AssertElementAbsence(propPane._textView); - agHelper.AssertElementAbsence(propPane._selectorView); - }); - - it("4. should show no fields for watch geolocation position", () => { - EditorNavigation.SelectEntityByName("Page1", EntityType.Page); - EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); - - propPane.EnterJSContext( - "onClick", - "{{appsmith.geolocation.watchPosition()}}", - true, - false, - ); - propPane.ToggleJSMode("onClick", false); - - agHelper.GetNAssertElementText( - propPane._actionCard, - "Watch geolocation", - "have.text", - 0, - ); - agHelper.GetNClick(propPane._actionCard, 0); - - agHelper.AssertElementAbsence(propPane._textView); - agHelper.AssertElementAbsence(propPane._selectorView); - }); - - it("5. should show no fields for stop watching geolocation position", () => { - EditorNavigation.SelectEntityByName("Page1", EntityType.Page); - EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); - - propPane.EnterJSContext( - "onClick", - "{{appsmith.geolocation.clearWatch()}}", - true, - false, - ); - propPane.ToggleJSMode("onClick", false); - - agHelper.GetNAssertElementText( - propPane._actionCard, - "Stop watching geolocation", - "have.text", - 0, - ); - agHelper.GetNClick(propPane._actionCard, 0); - - agHelper.AssertElementAbsence(propPane._textView); - agHelper.AssertElementAbsence(propPane._selectorView); - }); - - it("6. should show appropriate fields for get geolocation", () => { - EditorNavigation.SelectEntityByName("Page1", EntityType.Page); - EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); - - propPane.EnterJSContext( - "onClick", - "{{appsmith.geolocation.getCurrentPosition()}}", - true, - false, - ); - propPane.ToggleJSMode("onClick", false); - - agHelper.GetNAssertElementText( - propPane._actionCard, - "Get geolocationAdd callback", - "have.text", - 0, - ); - agHelper.GetNClick(propPane._actionCard, 0); - - agHelper.GetNAssertElementText( - propPane._actionPopupTextLabel, - "Callback function", - "have.text", - 0, - ); - - propPane.EnterJSContext( - "onClick", - `{{appsmith.geolocation.getCurrentPosition((location) => { +describe( + "JS to non-JS mode in Action Selector", + { tags: ["@tag.JS", "@tag.Binding"] }, + () => { + before(() => { + agHelper.AddDsl("promisesBtnDsl", locators._buttonByText("Submit")); + }); + + it("1. should show fields appropriately for setinterval", () => { + EditorNavigation.SelectEntityByName("Page1", EntityType.Page); + EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); + + propPane.EnterJSContext("onClick", "{{setInterval()}}", true, false); + propPane.ToggleJSMode("onClick", false); + + agHelper.GetNAssertElementText( + propPane._actionCard, + "Set intervalms", + "have.text", + 0, + ); + agHelper.GetNClick(propPane._actionCard, 0); + + agHelper.GetNAssertElementText( + propPane._actionPopupTextLabel, + "Callback function", + "have.text", + 0, + ); + + agHelper.GetNAssertElementText( + propPane._actionPopupTextLabel, + "Delay (ms)", + "have.text", + 1, + ); + + agHelper.GetNAssertElementText( + propPane._actionPopupTextLabel, + "Id", + "have.text", + 2, + ); + + propPane.EnterJSContext( + "onClick", + "{{setInterval(() => {}, 200, '')}}", + true, + false, + ); + propPane.ToggleJSMode("onClick", false); + + agHelper.GetNAssertElementText( + propPane._actionCard, + "Set interval200ms", + "have.text", + 0, + ); + agHelper.GetNClick(propPane._actionCard, 0); + + propPane.EnterJSContext( + "onClick", + "{{setInterval(() => {showAlert('hi')}, 200, 'id1')}}", + true, + false, + ); + propPane.ToggleJSMode("onClick", false); + + agHelper.GetNAssertElementText( + propPane._actionCard, + "Set interval200ms", + "have.text", + 0, + ); + agHelper.GetNClick(propPane._actionCard, 0); + }); + + it("2. should show fields appropriately for clearInterval", () => { + EditorNavigation.SelectEntityByName("Page1", EntityType.Page); + EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); + + propPane.EnterJSContext("onClick", "{{clearInterval()}}", true, false); + propPane.ToggleJSMode("onClick", false); + + agHelper.GetNAssertElementText( + propPane._actionCard, + "Clear intervalAdd Id", + "have.text", + 0, + ); + agHelper.GetNClick(propPane._actionCard, 0); + + agHelper.GetNAssertElementText( + propPane._actionPopupTextLabel, + "Id", + "have.text", + 0, + ); + + propPane.EnterJSContext( + "onClick", + "{{clearInterval('Id1')}}", + true, + true, + ); + propPane.ToggleJSMode("onClick", false); + + agHelper.GetNAssertElementText( + propPane._actionCard, + "Clear intervalId1", + "have.text", + 0, + ); + agHelper.GetNClick(propPane._actionCard, 0); + + agHelper.ValidateCodeEditorContent(propPane._textView, "Id1"); + }); + + it("3. should show no fields for clear store", () => { + EditorNavigation.SelectEntityByName("Page1", EntityType.Page); + EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); + + propPane.EnterJSContext("onClick", "{{clearStore()}}", true, false); + propPane.ToggleJSMode("onClick", false); + + agHelper.GetNAssertElementText( + propPane._actionCard, + "Clear store", + "have.text", + 0, + ); + agHelper.GetNClick(propPane._actionCard, 0); + + agHelper.AssertElementAbsence(propPane._textView); + agHelper.AssertElementAbsence(propPane._selectorView); + }); + + it("4. should show no fields for watch geolocation position", () => { + EditorNavigation.SelectEntityByName("Page1", EntityType.Page); + EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); + + propPane.EnterJSContext( + "onClick", + "{{appsmith.geolocation.watchPosition()}}", + true, + false, + ); + propPane.ToggleJSMode("onClick", false); + + agHelper.GetNAssertElementText( + propPane._actionCard, + "Watch geolocation", + "have.text", + 0, + ); + agHelper.GetNClick(propPane._actionCard, 0); + + agHelper.AssertElementAbsence(propPane._textView); + agHelper.AssertElementAbsence(propPane._selectorView); + }); + + it("5. should show no fields for stop watching geolocation position", () => { + EditorNavigation.SelectEntityByName("Page1", EntityType.Page); + EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); + + propPane.EnterJSContext( + "onClick", + "{{appsmith.geolocation.clearWatch()}}", + true, + false, + ); + propPane.ToggleJSMode("onClick", false); + + agHelper.GetNAssertElementText( + propPane._actionCard, + "Stop watching geolocation", + "have.text", + 0, + ); + agHelper.GetNClick(propPane._actionCard, 0); + + agHelper.AssertElementAbsence(propPane._textView); + agHelper.AssertElementAbsence(propPane._selectorView); + }); + + it("6. should show appropriate fields for get geolocation", () => { + EditorNavigation.SelectEntityByName("Page1", EntityType.Page); + EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); + + propPane.EnterJSContext( + "onClick", + "{{appsmith.geolocation.getCurrentPosition()}}", + true, + false, + ); + propPane.ToggleJSMode("onClick", false); + + agHelper.GetNAssertElementText( + propPane._actionCard, + "Get geolocationAdd callback", + "have.text", + 0, + ); + agHelper.GetNClick(propPane._actionCard, 0); + + agHelper.GetNAssertElementText( + propPane._actionPopupTextLabel, + "Callback function", + "have.text", + 0, + ); + + propPane.EnterJSContext( + "onClick", + `{{appsmith.geolocation.getCurrentPosition((location) => { // add code here });}}`, - true, - true, - ); - propPane.ToggleJSMode("onClick", false); - - agHelper.GetNClick(propPane._actionCard, 0); - - agHelper.GetNAssertElementText( - propPane._actionPopupTextLabel, - "Callback function", - "have.text", - 0, - ); - }); - - it("7. should show post message fields appropriately", () => { - EditorNavigation.SelectEntityByName("Page1", EntityType.Page); - EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); - - propPane.EnterJSContext("onClick", "{{postWindowMessage()}}", true, false); - propPane.ToggleJSMode("onClick", false); - - agHelper.GetNAssertElementText( - propPane._actionCard, - "Post messageAdd message", - "have.text", - 0, - ); - agHelper.GetNClick(propPane._actionCard, 0); - - agHelper.GetNAssertElementText( - propPane._actionPopupTextLabel, - "Message", - "have.text", - 0, - ); - agHelper.GetNAssertElementText( - propPane._windowTargetDropdown, - "Window", - "have.text", - 0, - ); - agHelper.GetNAssertElementText( - propPane._actionPopupTextLabel, - "Allowed origins", - "have.text", - 1, - ); - - propPane.EnterJSContext( - "onClick", - "{{postWindowMessage('hello', 'window', '*')}}", - true, - false, - ); - propPane.ToggleJSMode("onClick", false); - - agHelper.GetNAssertElementText( - propPane._actionCard, - "Post messagehello", - "have.text", - 0, - ); - agHelper.GetNClick(propPane._actionCard, 0); - - agHelper.ValidateCodeEditorContent(propPane._textView, "hellowindow*"); - }); -}); + true, + true, + ); + propPane.ToggleJSMode("onClick", false); + + agHelper.GetNClick(propPane._actionCard, 0); + + agHelper.GetNAssertElementText( + propPane._actionPopupTextLabel, + "Callback function", + "have.text", + 0, + ); + }); + + it("7. should show post message fields appropriately", () => { + EditorNavigation.SelectEntityByName("Page1", EntityType.Page); + EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); + + propPane.EnterJSContext( + "onClick", + "{{postWindowMessage()}}", + true, + false, + ); + propPane.ToggleJSMode("onClick", false); + + agHelper.GetNAssertElementText( + propPane._actionCard, + "Post messageAdd message", + "have.text", + 0, + ); + agHelper.GetNClick(propPane._actionCard, 0); + + agHelper.GetNAssertElementText( + propPane._actionPopupTextLabel, + "Message", + "have.text", + 0, + ); + agHelper.GetNAssertElementText( + propPane._windowTargetDropdown, + "Window", + "have.text", + 0, + ); + agHelper.GetNAssertElementText( + propPane._actionPopupTextLabel, + "Allowed origins", + "have.text", + 1, + ); + + propPane.EnterJSContext( + "onClick", + "{{postWindowMessage('hello', 'window', '*')}}", + true, + false, + ); + propPane.ToggleJSMode("onClick", false); + + agHelper.GetNAssertElementText( + propPane._actionCard, + "Post messagehello", + "have.text", + 0, + ); + agHelper.GetNClick(propPane._actionCard, 0); + + agHelper.ValidateCodeEditorContent(propPane._textView, "hellowindow*"); + }); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/ActionExecution/ActionSelector_JsToNonJSMode_4_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/ActionExecution/ActionSelector_JsToNonJSMode_4_spec.ts index d55f39bb83e4..b4af0af94357 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/ActionExecution/ActionSelector_JsToNonJSMode_4_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/ActionExecution/ActionSelector_JsToNonJSMode_4_spec.ts @@ -7,47 +7,51 @@ import EditorNavigation, { EntityType, } from "../../../../support/Pages/EditorNavigation"; -describe("JS to non-JS mode in Action Selector", { tags: ["@tag.JS"] }, () => { - before(() => { - agHelper.AddDsl("promisesBtnDsl", locators._buttonByText("Submit")); - }); +describe( + "JS to non-JS mode in Action Selector", + { tags: ["@tag.JS", "@tag.Binding"] }, + () => { + before(() => { + agHelper.AddDsl("promisesBtnDsl", locators._buttonByText("Submit")); + }); - it("10. Bug 23167 - Message field in PostMessage should accept all type of values", () => { - EditorNavigation.SelectEntityByName("Page1", EntityType.Page); - EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); + it("10. Bug 23167 - Message field in PostMessage should accept all type of values", () => { + EditorNavigation.SelectEntityByName("Page1", EntityType.Page); + EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); - propPane.EnterJSContext( - "onClick", - "{{postWindowMessage(Input1.text, 'window', '*')}}", - true, - false, - ); - propPane.ToggleJSMode("onClick", false); + propPane.EnterJSContext( + "onClick", + "{{postWindowMessage(Input1.text, 'window', '*')}}", + true, + false, + ); + propPane.ToggleJSMode("onClick", false); - agHelper.GetNAssertElementText( - propPane._actionCard, - "Post message{{Input1.text}}", - "have.text", - 0, - ); - agHelper.GetNClick(propPane._actionCard, 0); + agHelper.GetNAssertElementText( + propPane._actionCard, + "Post message{{Input1.text}}", + "have.text", + 0, + ); + agHelper.GetNClick(propPane._actionCard, 0); - agHelper.ValidateCodeEditorContent( - propPane._textView, - "{{Input1.text}}window*", - ); + agHelper.ValidateCodeEditorContent( + propPane._textView, + "{{Input1.text}}window*", + ); - propPane.EnterJSContext( - "onClick", - "{{postWindowMessage({ x: Input1.text }, 'window', '*')}}", - true, - false, - ); - propPane.ToggleJSMode("onClick", false); - agHelper.GetNClick(propPane._actionCard, 0); - agHelper.ValidateCodeEditorContent( - propPane._textView, - "{{{\n x: Input1.text \n}}}window*", - ); - }); -}); + propPane.EnterJSContext( + "onClick", + "{{postWindowMessage({ x: Input1.text }, 'window', '*')}}", + true, + false, + ); + propPane.ToggleJSMode("onClick", false); + agHelper.GetNClick(propPane._actionCard, 0); + agHelper.ValidateCodeEditorContent( + propPane._textView, + "{{{\n x: Input1.text \n}}}window*", + ); + }); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/ActionExecution/Bug23345_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/ActionExecution/Bug23345_spec.ts index 1a2e4c9205b6..8b082f38963c 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/ActionExecution/Bug23345_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/ActionExecution/Bug23345_spec.ts @@ -7,7 +7,7 @@ import { describe( "Delete No Action card without any error", - { tags: ["@tag.JS"] }, + { tags: ["@tag.JS", "@tag.Binding"] }, () => { it("1. Bug 23345", () => { entityExplorer.DragDropWidgetNVerify(draggableWidgets.BUTTON, 200, 200); diff --git a/app/client/cypress/e2e/Regression/ClientSide/ActionExecution/ClearStore_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/ActionExecution/ClearStore_spec.ts index b8f7c7b38729..988a497ac1f4 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/ActionExecution/ClearStore_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/ActionExecution/ClearStore_spec.ts @@ -9,13 +9,16 @@ import EditorNavigation, { EntityType, } from "../../../../support/Pages/EditorNavigation"; -describe("clearStore Action test", { tags: ["@tag.JS"] }, () => { - before(() => { - entityExplorer.DragDropWidgetNVerify("buttonwidget", 100, 100); - }); +describe( + "clearStore Action test", + { tags: ["@tag.JS", "@tag.Binding"] }, + () => { + before(() => { + entityExplorer.DragDropWidgetNVerify("buttonwidget", 100, 100); + }); - it("1. Feature 11639 : Clear all store value", function () { - const JS_OBJECT_BODY = `export default { + it("1. Feature 11639 : Clear all store value", function () { + const JS_OBJECT_BODY = `export default { storeValue: async () => { let values = [ @@ -32,49 +35,50 @@ describe("clearStore Action test", { tags: ["@tag.JS"] }, () => { } }`; - // Create js object - jsEditor.CreateJSObject(JS_OBJECT_BODY, { - paste: true, - completeReplace: true, - toRun: false, - prettify: false, - shouldCreateNewJSObj: true, - }); + // Create js object + jsEditor.CreateJSObject(JS_OBJECT_BODY, { + paste: true, + completeReplace: true, + toRun: false, + prettify: false, + shouldCreateNewJSObj: true, + }); - EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); - propPane.UpdatePropertyFieldValue("Label", ""); - propPane.TypeTextIntoField("Label", "StoreValue"); - cy.get("@jsObjName").then((jsObj: any) => { - propPane.SelectJSFunctionToExecute( - "onClick", - jsObj as string, - "storeValue", - ); - }); + EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); + propPane.UpdatePropertyFieldValue("Label", ""); + propPane.TypeTextIntoField("Label", "StoreValue"); + cy.get("@jsObjName").then((jsObj: any) => { + propPane.SelectJSFunctionToExecute( + "onClick", + jsObj as string, + "storeValue", + ); + }); + + entityExplorer.DragDropWidgetNVerify("buttonwidget", 100, 200); + EditorNavigation.SelectEntityByName("Button2", EntityType.Widget); + propPane.UpdatePropertyFieldValue("Label", ""); + propPane.TypeTextIntoField("Label", "ClearStore"); + cy.get("@jsObjName").then((jsObj: any) => { + propPane.SelectJSFunctionToExecute( + "onClick", + jsObj as string, + "clearStore", + ); + }); - entityExplorer.DragDropWidgetNVerify("buttonwidget", 100, 200); - EditorNavigation.SelectEntityByName("Button2", EntityType.Widget); - propPane.UpdatePropertyFieldValue("Label", ""); - propPane.TypeTextIntoField("Label", "ClearStore"); - cy.get("@jsObjName").then((jsObj: any) => { - propPane.SelectJSFunctionToExecute( - "onClick", - jsObj as string, - "clearStore", + deployMode.DeployApp(); + agHelper.ClickButton("StoreValue"); + agHelper.AssertContains( + JSON.stringify({ + val1: "value 1", + val2: "value 2", + val3: "value 3", + }), ); + agHelper.ClickButton("ClearStore"); + agHelper.AssertContains(JSON.stringify({})); + deployMode.NavigateBacktoEditor(); }); - - deployMode.DeployApp(); - agHelper.ClickButton("StoreValue"); - agHelper.AssertContains( - JSON.stringify({ - val1: "value 1", - val2: "value 2", - val3: "value 3", - }), - ); - agHelper.ClickButton("ClearStore"); - agHelper.AssertContains(JSON.stringify({})); - deployMode.NavigateBacktoEditor(); - }); -}); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/ActionExecution/Error_handling_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/ActionExecution/Error_handling_spec.ts index eef35878edc1..68671cd03f0f 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/ActionExecution/Error_handling_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/ActionExecution/Error_handling_spec.ts @@ -14,7 +14,7 @@ import EditorNavigation, { describe( "Test Create Api and Bind to Button widget", - { tags: ["@tag.JS"] }, + { tags: ["@tag.JS", "@tag.Binding"] }, function () { before("Test_Add users api and execute api", () => { entityExplorer.DragDropWidgetNVerify(draggableWidgets.BUTTON); diff --git a/app/client/cypress/e2e/Regression/ClientSide/ActionExecution/FieldEvaluation_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/ActionExecution/FieldEvaluation_spec.ts index 1d1ad43a581f..afc733e00bc0 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/ActionExecution/FieldEvaluation_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/ActionExecution/FieldEvaluation_spec.ts @@ -8,15 +8,19 @@ import EditorNavigation, { EntityType, } from "../../../../support/Pages/EditorNavigation"; -describe("Field value evaluation", { tags: ["@tag.JS"] }, () => { - before(() => { - entityExplorer.DragDropWidgetNVerify(draggableWidgets.BUTTON); - }); +describe( + "Field value evaluation", + { tags: ["@tag.JS", "@tag.Binding"] }, + () => { + before(() => { + entityExplorer.DragDropWidgetNVerify(draggableWidgets.BUTTON); + }); - it("1. Evaluation works for fields", () => { - EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); - propPane.SelectPlatformFunction("onClick", "Show alert"); - agHelper.EnterActionValue("Message", "{{Button1.text}}"); - agHelper.VerifyEvaluatedValue("Submit"); - }); -}); + it("1. Evaluation works for fields", () => { + EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); + propPane.SelectPlatformFunction("onClick", "Show alert"); + agHelper.EnterActionValue("Message", "{{Button1.text}}"); + agHelper.VerifyEvaluatedValue("Submit"); + }); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/ActionExecution/NavigateTo_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/ActionExecution/NavigateTo_spec.ts index 827cb3f96149..4f75807dd355 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/ActionExecution/NavigateTo_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/ActionExecution/NavigateTo_spec.ts @@ -13,74 +13,82 @@ import EditorNavigation, { } from "../../../../support/Pages/EditorNavigation"; import PageList from "../../../../support/Pages/PageList"; -describe("Navigate To feature", { tags: ["@tag.JS", "@tag.Sanity"] }, () => { - it("1. Navigates to page name clicked from the page name tab of navigate to", () => { - EditorNavigation.SelectEntityByName("Page1", EntityType.Page); - entityExplorer.DragDropWidgetNVerify(draggableWidgets.TEXT, 500, 600); - EditorNavigation.SelectEntityByName("Text1", EntityType.Widget); - propPane.TypeTextIntoField("Text", "{{appsmith.URL.queryParams.test}}"); - entityExplorer.DragDropWidgetNVerify(draggableWidgets.BUTTON, 300, 300); - EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); - propPane.SelectPlatformFunction("onClick", "Navigate to"); - dataSources.ValidateNSelectDropdown("Choose page", "Select page", "Page1"); - agHelper.GetNClick(propPane._actionCollapsibleHeader("Query params")); - propPane.UpdatePropertyFieldValue( - "Query params", - `{{ +describe( + "Navigate To feature", + { tags: ["@tag.JS", "@tag.Sanity", "@tag.Binding"] }, + () => { + it("1. Navigates to page name clicked from the page name tab of navigate to", () => { + EditorNavigation.SelectEntityByName("Page1", EntityType.Page); + entityExplorer.DragDropWidgetNVerify(draggableWidgets.TEXT, 500, 600); + EditorNavigation.SelectEntityByName("Text1", EntityType.Widget); + propPane.TypeTextIntoField("Text", "{{appsmith.URL.queryParams.test}}"); + entityExplorer.DragDropWidgetNVerify(draggableWidgets.BUTTON, 300, 300); + EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); + propPane.SelectPlatformFunction("onClick", "Navigate to"); + dataSources.ValidateNSelectDropdown( + "Choose page", + "Select page", + "Page1", + ); + agHelper.GetNClick(propPane._actionCollapsibleHeader("Query params")); + propPane.UpdatePropertyFieldValue( + "Query params", + `{{ { test: '123' } }}`, - ); - agHelper.GetNClick(propPane._actionSelectorPopupClose); - agHelper.ClickButton("Submit"); + ); + agHelper.GetNClick(propPane._actionSelectorPopupClose); + agHelper.ClickButton("Submit"); - agHelper.GetNAssertElementText( - WIDGETSKIT.textWidgetContainer, - "123", - "have.text", - 0, - ); + agHelper.GetNAssertElementText( + WIDGETSKIT.textWidgetContainer, + "123", + "have.text", + 0, + ); - cy.url().should("include", "a=b").and("include", "test=123"); - deployMode.DeployApp(locators._widgetInDeployed(draggableWidgets.BUTTON)); - agHelper.WaitUntilEleAppear( - locators._widgetInDeployed(draggableWidgets.BUTTON), - ); - agHelper.ClickButton("Submit"); - cy.url().then(($url) => { - cy.log("deploy url is" + $url); - expect($url).to.contain("test=123"); + cy.url().should("include", "a=b").and("include", "test=123"); + deployMode.DeployApp(locators._widgetInDeployed(draggableWidgets.BUTTON)); + agHelper.WaitUntilEleAppear( + locators._widgetInDeployed(draggableWidgets.BUTTON), + ); + agHelper.ClickButton("Submit"); + cy.url().then(($url) => { + cy.log("deploy url is" + $url); + expect($url).to.contain("test=123"); + }); + deployMode.NavigateBacktoEditor(); + propPane.DeleteWidgetFromPropertyPane("Button1"); }); - deployMode.NavigateBacktoEditor(); - propPane.DeleteWidgetFromPropertyPane("Button1"); - }); - it("2. Gives error message when invalid word is entered in the url tab of navigate to", () => { - entityExplorer.DragDropWidgetNVerify(draggableWidgets.BUTTON, 300, 300); - EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); - propPane.SelectPlatformFunction("onClick", "Navigate to"); - agHelper.GetNClick(propPane._navigateToType("URL")); - agHelper.TypeText( - propPane._actionSelectorFieldByLabel("Enter URL"), - "wrongPage", - ); - agHelper.ClickButton("Submit"); - agHelper.ValidateToastMessage("Enter a valid URL or page name"); - propPane.DeleteWidgetFromPropertyPane("Button1"); - }); + it("2. Gives error message when invalid word is entered in the url tab of navigate to", () => { + entityExplorer.DragDropWidgetNVerify(draggableWidgets.BUTTON, 300, 300); + EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); + propPane.SelectPlatformFunction("onClick", "Navigate to"); + agHelper.GetNClick(propPane._navigateToType("URL")); + agHelper.TypeText( + propPane._actionSelectorFieldByLabel("Enter URL"), + "wrongPage", + ); + agHelper.ClickButton("Submit"); + agHelper.ValidateToastMessage("Enter a valid URL or page name"); + propPane.DeleteWidgetFromPropertyPane("Button1"); + }); - it("3. Navigates to url entered from the url tab of navigate to", () => { - entityExplorer.DragDropWidgetNVerify(draggableWidgets.BUTTON, 300, 300); - EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); - propPane.SelectPlatformFunction("onClick", "Navigate to"); - agHelper.GetNClick(propPane._navigateToType("URL")); - agHelper.TypeText( - propPane._actionSelectorFieldByLabel("Enter URL"), - "www.google.com", - ); - deployMode.DeployApp(); - agHelper.ClickButton("Submit"); - cy.url().should("include", "google.com"); - }); -}); + it("3. Navigates to url entered from the url tab of navigate to", () => { + entityExplorer.DragDropWidgetNVerify(draggableWidgets.BUTTON, 300, 300); + EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); + propPane.SelectPlatformFunction("onClick", "Navigate to"); + agHelper.GetNClick(propPane._navigateToType("URL")); + agHelper.TypeText( + propPane._actionSelectorFieldByLabel("Enter URL"), + "www.google.com", + ); + deployMode.DeployApp(); + agHelper.ClickButton("Submit"); + cy.url().should("include", "google.com"); + }); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/ActionExecution/PostWindowMessage_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/ActionExecution/PostWindowMessage_spec.ts index 87ee86ff3157..21827b0f56e5 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/ActionExecution/PostWindowMessage_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/ActionExecution/PostWindowMessage_spec.ts @@ -10,21 +10,24 @@ import EditorNavigation, { EntityType, } from "../../../../support/Pages/EditorNavigation"; -describe("Post window message", { tags: ["@tag.JS", "@tag.Sanity"] }, () => { - it("1. Posts message to an iframe within Appsmith", () => { - entityExplorer.DragDropWidgetNVerify(draggableWidgets.BUTTON, 200, 200); - entityExplorer.DragDropWidgetNVerify(draggableWidgets.IFRAME, 200, 300); +describe( + "Post window message", + { tags: ["@tag.JS", "@tag.Sanity", "@tag.Binding"] }, + () => { + it("1. Posts message to an iframe within Appsmith", () => { + entityExplorer.DragDropWidgetNVerify(draggableWidgets.BUTTON, 200, 200); + entityExplorer.DragDropWidgetNVerify(draggableWidgets.IFRAME, 200, 300); - EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); - propPane.SelectPlatformFunction("onClick", "Post message"); - agHelper.EnterActionValue("Message", "After postMessage"); - agHelper.GetNClick(propPane._windowTargetDropdown); - agHelper.GetNClick(locators._dropDownValue("Iframe1"), 0, true); + EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); + propPane.SelectPlatformFunction("onClick", "Post message"); + agHelper.EnterActionValue("Message", "After postMessage"); + agHelper.GetNClick(propPane._windowTargetDropdown); + agHelper.GetNClick(locators._dropDownValue("Iframe1"), 0, true); - EditorNavigation.SelectEntityByName("Iframe1", EntityType.Widget); - propPane.UpdatePropertyFieldValue( - "srcDoc", - ` + EditorNavigation.SelectEntityByName("Iframe1", EntityType.Widget); + propPane.UpdatePropertyFieldValue( + "srcDoc", + ` post msg @@ -42,28 +45,31 @@ describe("Post window message", { tags: ["@tag.JS", "@tag.Sanity"] }, () => { `, - ); - propPane.SelectPlatformFunction("onMessageReceived", "Show alert"); - agHelper.EnterActionValue("Message", "I got a message from iframe"); - deployMode.DeployApp(locators._buttonByText("Submit")); - agHelper.WaitUntilEleAppear(locators._buttonByText("Submit")); - agHelper.WaitUntilEleAppear("#iframe-Iframe1"); - agHelper.AssertElementVisibility("#iframe-Iframe1"); - cy.get("#iframe-Iframe1").then((element) => { - element.contents().find("body").find("#iframe-button").click(); - }); - agHelper.ValidateToastMessage("I got a message from iframe"); + ); + propPane.SelectPlatformFunction("onMessageReceived", "Show alert"); + agHelper.EnterActionValue("Message", "I got a message from iframe"); + deployMode.DeployApp(locators._buttonByText("Submit")); + agHelper.WaitUntilEleAppear(locators._buttonByText("Submit")); + agHelper.WaitUntilEleAppear("#iframe-Iframe1"); + agHelper.AssertElementVisibility("#iframe-Iframe1"); + cy.get("#iframe-Iframe1").then((element) => { + element.contents().find("body").find("#iframe-button").click(); + }); + agHelper.ValidateToastMessage("I got a message from iframe"); - cy.get("#iframe-Iframe1").then(($element) => { - const $body = $element.contents().find("body"); - cy.wrap($body).find("#txtMsg").should("have.text", "Before postMessage"); - }); + cy.get("#iframe-Iframe1").then(($element) => { + const $body = $element.contents().find("body"); + cy.wrap($body) + .find("#txtMsg") + .should("have.text", "Before postMessage"); + }); - agHelper.ClickButton("Submit"); - cy.get("#iframe-Iframe1").then(($element) => { - const $body = $element.contents().find("body"); - cy.wrap($body).find("#txtMsg").should("have.text", "After postMessage"); + agHelper.ClickButton("Submit"); + cy.get("#iframe-Iframe1").then(($element) => { + const $body = $element.contents().find("body"); + cy.wrap($body).find("#txtMsg").should("have.text", "After postMessage"); + }); + deployMode.NavigateBacktoEditor(); }); - deployMode.NavigateBacktoEditor(); - }); -}); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/ActionExecution/RemoveValue_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/ActionExecution/RemoveValue_spec.ts index b2f03e558fa1..f570db0e3272 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/ActionExecution/RemoveValue_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/ActionExecution/RemoveValue_spec.ts @@ -11,14 +11,17 @@ import EditorNavigation, { PagePaneSegment, } from "../../../../support/Pages/EditorNavigation"; -describe("removeValue Action test", { tags: ["@tag.JS"] }, () => { - before(() => { - entityExplorer.DragDropWidgetNVerify("buttonwidget", 100, 100); - PageLeftPane.switchSegment(PagePaneSegment.JS); - }); +describe( + "removeValue Action test", + { tags: ["@tag.JS", "@tag.Binding"] }, + () => { + before(() => { + entityExplorer.DragDropWidgetNVerify("buttonwidget", 100, 100); + PageLeftPane.switchSegment(PagePaneSegment.JS); + }); - it("1. Feature 11639 : Remove store value", function () { - const JS_OBJECT_BODY = `export default { + it("1. Feature 11639 : Remove store value", function () { + const JS_OBJECT_BODY = `export default { storeValue: async () => { await storeValue('val1', 'value 1'); await storeValue('val2', 'value 2'); @@ -30,52 +33,53 @@ describe("removeValue Action test", { tags: ["@tag.JS"] }, () => { } }`; - // Create js object - jsEditor.CreateJSObject(JS_OBJECT_BODY, { - paste: true, - completeReplace: true, - toRun: false, - prettify: false, - shouldCreateNewJSObj: true, - }); + // Create js object + jsEditor.CreateJSObject(JS_OBJECT_BODY, { + paste: true, + completeReplace: true, + toRun: false, + prettify: false, + shouldCreateNewJSObj: true, + }); - EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); - propPane.UpdatePropertyFieldValue("Label", ""); - propPane.TypeTextIntoField("Label", "StoreValue"); - cy.get("@jsObjName").then((jsObj: any) => { - propPane.SelectJSFunctionToExecute( - "onClick", - jsObj as string, - "storeValue", - ); - }); + EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); + propPane.UpdatePropertyFieldValue("Label", ""); + propPane.TypeTextIntoField("Label", "StoreValue"); + cy.get("@jsObjName").then((jsObj: any) => { + propPane.SelectJSFunctionToExecute( + "onClick", + jsObj as string, + "storeValue", + ); + }); - entityExplorer.DragDropWidgetNVerify("buttonwidget", 100, 200); - EditorNavigation.SelectEntityByName("Button2", EntityType.Widget); - propPane.UpdatePropertyFieldValue("Label", ""); - propPane.TypeTextIntoField("Label", "RemoveValue"); - cy.get("@jsObjName").then((jsObj: any) => { - propPane.SelectJSFunctionToExecute( - "onClick", - jsObj as string, - "removeValue", + entityExplorer.DragDropWidgetNVerify("buttonwidget", 100, 200); + EditorNavigation.SelectEntityByName("Button2", EntityType.Widget); + propPane.UpdatePropertyFieldValue("Label", ""); + propPane.TypeTextIntoField("Label", "RemoveValue"); + cy.get("@jsObjName").then((jsObj: any) => { + propPane.SelectJSFunctionToExecute( + "onClick", + jsObj as string, + "removeValue", + ); + }); + + deployMode.DeployApp(); + agHelper.ClickButton("StoreValue"); + agHelper.AssertContains( + JSON.stringify({ + val1: "value 1", + val2: "value 2", + }), + ); + agHelper.ClickButton("RemoveValue"); + agHelper.AssertContains( + JSON.stringify({ + val2: "value 2", + }), ); + deployMode.NavigateBacktoEditor(); }); - - deployMode.DeployApp(); - agHelper.ClickButton("StoreValue"); - agHelper.AssertContains( - JSON.stringify({ - val1: "value 1", - val2: "value 2", - }), - ); - agHelper.ClickButton("RemoveValue"); - agHelper.AssertContains( - JSON.stringify({ - val2: "value 2", - }), - ); - deployMode.NavigateBacktoEditor(); - }); -}); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/ActionExecution/StoreValue_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/ActionExecution/StoreValue_spec.ts index 683fcc7bd66d..fcc4d49b2b4e 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/ActionExecution/StoreValue_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/ActionExecution/StoreValue_spec.ts @@ -14,14 +14,17 @@ import EditorNavigation, { PagePaneSegment, } from "../../../../support/Pages/EditorNavigation"; -describe("storeValue Action test", { tags: ["@tag.JS", "@tag.Sanity"] }, () => { - before(() => { - entityExplorer.DragDropWidgetNVerify("buttonwidget", 100, 100); - PageLeftPane.switchSegment(PagePaneSegment.JS); - }); - - it("1. Bug 14653: Running consecutive storeValue actions and await", function () { - const jsObjectBody = `export default { +describe( + "storeValue Action test", + { tags: ["@tag.JS", "@tag.Sanity", "@tag.Binding"] }, + () => { + before(() => { + entityExplorer.DragDropWidgetNVerify("buttonwidget", 100, 100); + PageLeftPane.switchSegment(PagePaneSegment.JS); + }); + + it("1. Bug 14653: Running consecutive storeValue actions and await", function () { + const jsObjectBody = `export default { storeTest: () => { let values = [ @@ -40,48 +43,48 @@ describe("storeValue Action test", { tags: ["@tag.JS", "@tag.Sanity"] }, () => { } }`; - jsEditor.CreateJSObject(jsObjectBody, { - paste: true, - completeReplace: true, - toRun: false, - shouldCreateNewJSObj: true, - }); + jsEditor.CreateJSObject(jsObjectBody, { + paste: true, + completeReplace: true, + toRun: false, + shouldCreateNewJSObj: true, + }); - EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); - propPane.UpdatePropertyFieldValue("Label", ""); - propPane.TypeTextIntoField("Label", "StoreTest"); - cy.get("@jsObjName").then((jsObj: any) => { - propPane.SelectJSFunctionToExecute( - "onClick", - jsObj as string, - "storeTest", + EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); + propPane.UpdatePropertyFieldValue("Label", ""); + propPane.TypeTextIntoField("Label", "StoreTest"); + cy.get("@jsObjName").then((jsObj: any) => { + propPane.SelectJSFunctionToExecute( + "onClick", + jsObj as string, + "storeTest", + ); + }); + + deployMode.DeployApp(); + agHelper.AssertElementVisibility( + locators._widgetInDeployed(draggableWidgets.BUTTON), + ); + agHelper.ClickButton("StoreTest"); + agHelper.AssertContains( + JSON.stringify({ + val1: "number 1", + val2: "number 2", + val3: "number 3", + val4: "number 4", + }), ); + deployMode.NavigateBacktoEditor(); }); - deployMode.DeployApp(); - agHelper.AssertElementVisibility( - locators._widgetInDeployed(draggableWidgets.BUTTON), - ); - agHelper.ClickButton("StoreTest"); - agHelper.AssertContains( - JSON.stringify({ - val1: "number 1", - val2: "number 2", - val3: "number 3", - val4: "number 4", - }), - ); - deployMode.NavigateBacktoEditor(); - }); - - it("2. Bug 14827 : Accepts paths as keys and doesn't update paths in store but creates a new field with path as key", function () { - const DEFAULT_STUDENT_OBJECT = { - details: { isTopper: true, name: "Abhah", grade: 1 }, - }; - const MODIFIED_STUDENT_OBJECT = { - details: { isTopper: false, name: "Alia", grade: 3 }, - }; - const JS_OBJECT_BODY = `export default { + it("2. Bug 14827 : Accepts paths as keys and doesn't update paths in store but creates a new field with path as key", function () { + const DEFAULT_STUDENT_OBJECT = { + details: { isTopper: true, name: "Abhah", grade: 1 }, + }; + const MODIFIED_STUDENT_OBJECT = { + details: { isTopper: false, name: "Alia", grade: 3 }, + }; + const JS_OBJECT_BODY = `export default { storePathTest: async ()=> { await storeValue("student", ${JSON.stringify( DEFAULT_STUDENT_OBJECT, @@ -103,63 +106,67 @@ describe("storeValue Action test", { tags: ["@tag.JS", "@tag.Sanity"] }, () => { } `; - // Create js object - jsEditor.CreateJSObject(JS_OBJECT_BODY, { - paste: true, - completeReplace: true, - toRun: false, - shouldCreateNewJSObj: true, - }); + // Create js object + jsEditor.CreateJSObject(JS_OBJECT_BODY, { + paste: true, + completeReplace: true, + toRun: false, + shouldCreateNewJSObj: true, + }); + + // Button1 + EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); + propPane.UpdatePropertyFieldValue("Label", "StorePathTest"); + cy.get(".action-block-tree").click({ force: true }); + cy.get("@jsObjName").then((jsObj: any) => { + propPane.SelectJSFunctionToExecuteInExistingActionBlock( + jsObj, + "storePathTest", + ); + }); + + // Button 2 + entityExplorer.DragDropWidgetNVerify("buttonwidget", 100, 200); + EditorNavigation.SelectEntityByName("Button2", EntityType.Widget); + propPane.UpdatePropertyFieldValue("Label", "modifyStorePath"); + cy.get("@jsObjName").then((jsObj: any) => { + propPane.SelectJSFunctionToExecute( + "onClick", + jsObj as string, + "modifyStorePath", + ); + }); - // Button1 - EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); - propPane.UpdatePropertyFieldValue("Label", "StorePathTest"); - cy.get(".action-block-tree").click({ force: true }); - cy.get("@jsObjName").then((jsObj: any) => { - propPane.SelectJSFunctionToExecuteInExistingActionBlock( - jsObj, - "storePathTest", + deployMode.DeployApp(); + agHelper.ClickButton("StorePathTest"); + agHelper.ValidateToastMessage( + JSON.stringify(DEFAULT_STUDENT_OBJECT), + 0, + 1, ); - }); + agHelper.ValidateToastMessage(DEFAULT_STUDENT_OBJECT.details.name, 1, 2); + agHelper.ValidateToastMessage("Annah", 2, 3); - // Button 2 - entityExplorer.DragDropWidgetNVerify("buttonwidget", 100, 200); - EditorNavigation.SelectEntityByName("Button2", EntityType.Widget); - propPane.UpdatePropertyFieldValue("Label", "modifyStorePath"); - cy.get("@jsObjName").then((jsObj: any) => { - propPane.SelectJSFunctionToExecute( - "onClick", - jsObj as string, - "modifyStorePath", + agHelper.WaitUntilAllToastsDisappear(); + agHelper.ClickButton("modifyStorePath"); + agHelper.ValidateToastMessage( + JSON.stringify(MODIFIED_STUDENT_OBJECT.details), + 0, + 1, + ); + agHelper.ValidateToastMessage( + `${MODIFIED_STUDENT_OBJECT.details.isTopper}`, + 1, + 2, ); + agHelper.ValidateToastMessage(`true`, 2, 3); + deployMode.NavigateBacktoEditor(); }); - deployMode.DeployApp(); - agHelper.ClickButton("StorePathTest"); - agHelper.ValidateToastMessage(JSON.stringify(DEFAULT_STUDENT_OBJECT), 0, 1); - agHelper.ValidateToastMessage(DEFAULT_STUDENT_OBJECT.details.name, 1, 2); - agHelper.ValidateToastMessage("Annah", 2, 3); - - agHelper.WaitUntilAllToastsDisappear(); - agHelper.ClickButton("modifyStorePath"); - agHelper.ValidateToastMessage( - JSON.stringify(MODIFIED_STUDENT_OBJECT.details), - 0, - 1, - ); - agHelper.ValidateToastMessage( - `${MODIFIED_STUDENT_OBJECT.details.isTopper}`, - 1, - 2, - ); - agHelper.ValidateToastMessage(`true`, 2, 3); - deployMode.NavigateBacktoEditor(); - }); - - it("3. Bug 14827 : Accepts paths as keys and doesn't update paths in store but creates a new field with path as key - object keys", function () { - const TEST_OBJECT = { a: 1, two: {} }; - - const JS_OBJECT_BODY = `export default { + it("3. Bug 14827 : Accepts paths as keys and doesn't update paths in store but creates a new field with path as key - object keys", function () { + const TEST_OBJECT = { a: 1, two: {} }; + + const JS_OBJECT_BODY = `export default { setStore: async () => { await storeValue("test", ${JSON.stringify(TEST_OBJECT)}, false); await showAlert(JSON.stringify(appsmith.store.test)); @@ -171,47 +178,47 @@ describe("storeValue Action test", { tags: ["@tag.JS", "@tag.Sanity"] }, () => { showAlert(JSON.stringify(appsmith.store.test));} }`; - // create js object - jsEditor.CreateJSObject(JS_OBJECT_BODY, { - paste: true, - completeReplace: true, - toRun: false, - shouldCreateNewJSObj: true, - }); + // create js object + jsEditor.CreateJSObject(JS_OBJECT_BODY, { + paste: true, + completeReplace: true, + toRun: false, + shouldCreateNewJSObj: true, + }); - EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); - propPane.UpdatePropertyFieldValue("Label", "SetStore"); - cy.get(".action-block-tree").click({ force: true }); - cy.get("@jsObjName").then((jsObj: any) => { - propPane.SelectJSFunctionToExecuteInExistingActionBlock( - jsObj, - "setStore", - ); - }); + EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); + propPane.UpdatePropertyFieldValue("Label", "SetStore"); + cy.get(".action-block-tree").click({ force: true }); + cy.get("@jsObjName").then((jsObj: any) => { + propPane.SelectJSFunctionToExecuteInExistingActionBlock( + jsObj, + "setStore", + ); + }); - EditorNavigation.SelectEntityByName("Button2", EntityType.Widget); - propPane.UpdatePropertyFieldValue("Label", "ShowStore"); - cy.get(".action-block-tree").click({ force: true }); - cy.get("@jsObjName").then((jsObj: any) => { - propPane.SelectJSFunctionToExecuteInExistingActionBlock( - jsObj, - "showStore", - ); - }); + EditorNavigation.SelectEntityByName("Button2", EntityType.Widget); + propPane.UpdatePropertyFieldValue("Label", "ShowStore"); + cy.get(".action-block-tree").click({ force: true }); + cy.get("@jsObjName").then((jsObj: any) => { + propPane.SelectJSFunctionToExecuteInExistingActionBlock( + jsObj, + "showStore", + ); + }); - deployMode.DeployApp(); - agHelper.ClickButton("SetStore"); - agHelper.ValidateToastMessage(JSON.stringify(TEST_OBJECT), 0, 1); - agHelper.ValidateToastMessage(JSON.stringify(TEST_OBJECT.two), 1, 2); - agHelper.ValidateToastMessage(`{"b":2}`, 2, 3); + deployMode.DeployApp(); + agHelper.ClickButton("SetStore"); + agHelper.ValidateToastMessage(JSON.stringify(TEST_OBJECT), 0, 1); + agHelper.ValidateToastMessage(JSON.stringify(TEST_OBJECT.two), 1, 2); + agHelper.ValidateToastMessage(`{"b":2}`, 2, 3); - agHelper.ClickButton("ShowStore"); - agHelper.ValidateToastMessage(JSON.stringify(TEST_OBJECT), 0); - deployMode.NavigateBacktoEditor(); - }); + agHelper.ClickButton("ShowStore"); + agHelper.ValidateToastMessage(JSON.stringify(TEST_OBJECT), 0); + deployMode.NavigateBacktoEditor(); + }); - it("4. Bug 24882. StoreValue, removeValue and clearStore should emit platform generated logs", function () { - const jsObjectBody = `export default { + it("4. Bug 24882. StoreValue, removeValue and clearStore should emit platform generated logs", function () { + const jsObjectBody = `export default { storeFns: () => { storeValue("xyz", 123); removeValue("xyz"); @@ -219,30 +226,31 @@ describe("storeValue Action test", { tags: ["@tag.JS", "@tag.Sanity"] }, () => { } }`; - jsEditor.CreateJSObject(jsObjectBody, { - paste: true, - completeReplace: true, - toRun: true, - shouldCreateNewJSObj: true, - }); + jsEditor.CreateJSObject(jsObjectBody, { + paste: true, + completeReplace: true, + toRun: true, + shouldCreateNewJSObj: true, + }); - entityExplorer.DragDropWidgetNVerify("buttonwidget", 400, 400); - EditorNavigation.SelectEntityByName("Button3", EntityType.Widget); - propPane.UpdatePropertyFieldValue("Label", "Test store logs"); - cy.get("@jsObjName").then((jsObj: any) => { - propPane.SelectJSFunctionToExecute( - "onClick", - jsObj as string, - "storeFns", - ); + entityExplorer.DragDropWidgetNVerify("buttonwidget", 400, 400); + EditorNavigation.SelectEntityByName("Button3", EntityType.Widget); + propPane.UpdatePropertyFieldValue("Label", "Test store logs"); + cy.get("@jsObjName").then((jsObj: any) => { + propPane.SelectJSFunctionToExecute( + "onClick", + jsObj as string, + "storeFns", + ); + }); + agHelper.ClickButton("Test store logs"); + + debuggerHelper.OpenDebugger(); + debuggerHelper.ClickLogsTab(); + debuggerHelper.changeLogsGroup("System logs"); + debuggerHelper.DoesConsoleLogExist("storeValue('xyz', '123', true)"); + debuggerHelper.DoesConsoleLogExist("removeValue('xyz')"); + debuggerHelper.DoesConsoleLogExist("clearStore()"); }); - agHelper.ClickButton("Test store logs"); - - debuggerHelper.OpenDebugger(); - debuggerHelper.ClickLogsTab(); - debuggerHelper.changeLogsGroup("System logs"); - debuggerHelper.DoesConsoleLogExist("storeValue('xyz', '123', true)"); - debuggerHelper.DoesConsoleLogExist("removeValue('xyz')"); - debuggerHelper.DoesConsoleLogExist("clearStore()"); - }); -}); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/ActionExecution/disableJSToggle_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/ActionExecution/disableJSToggle_spec.ts index 85c141bc79a7..6c9d1d7ca8d1 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/ActionExecution/disableJSToggle_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/ActionExecution/disableJSToggle_spec.ts @@ -11,7 +11,7 @@ import EditorNavigation, { describe( "Disable JS toggle when Action selector code is not parsable", - { tags: ["@tag.JS"] }, + { tags: ["@tag.JS", "@tag.Binding"] }, () => { before(() => { entityExplorer.DragDropWidgetNVerify(draggableWidgets.BUTTON, 200, 200); diff --git a/app/client/cypress/e2e/Regression/ClientSide/ActionExecution/setInterval_spec.js b/app/client/cypress/e2e/Regression/ClientSide/ActionExecution/setInterval_spec.js index debf75e8d1ad..de27e31520e2 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/ActionExecution/setInterval_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/ActionExecution/setInterval_spec.js @@ -12,7 +12,7 @@ import EditorNavigation, { describe( "Test Create Api and Bind to Button widget", - { tags: ["@tag.JS"] }, + { tags: ["@tag.JS", "@tag.Binding"] }, function () { before("Test_Add users api and execute api", () => { agHelper.AddDsl("buttonApiDsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/ActionExecution/uiToCode_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/ActionExecution/uiToCode_spec.ts index 375553cbb9a5..07381359fcb5 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/ActionExecution/uiToCode_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/ActionExecution/uiToCode_spec.ts @@ -11,7 +11,7 @@ import EditorNavigation, { EntityType, } from "../../../../support/Pages/EditorNavigation"; -describe("UI to Code", { tags: ["@tag.JS"] }, () => { +describe("UI to Code", { tags: ["@tag.JS", "@tag.Binding"] }, () => { before(() => { entityExplorer.DragDropWidgetNVerify(draggableWidgets.BUTTON); apiPage.CreateApi(); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Anvil/AnvilAppNavigation_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Anvil/AnvilAppNavigation_spec.ts index 01942fda6081..0919d36625d8 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Anvil/AnvilAppNavigation_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Anvil/AnvilAppNavigation_spec.ts @@ -12,7 +12,7 @@ import { anvilLocators } from "../../../../support/Pages/Anvil/Locators"; describe( `${ANVIL_EDITOR_TEST}: Validating multiple widgets in anvil layout mode with App navigation settings`, - { tags: ["@tag.Anvil", "@tag.IDE"] }, + { tags: ["@tag.Anvil", "@tag.IDE", "@tag.PropertyPane"] }, function () { beforeEach(() => { // intercept features call for Anvil + WDS tests diff --git a/app/client/cypress/e2e/Regression/ClientSide/AppNavigation/AppNavigationWithAutoLayout_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/AppNavigation/AppNavigationWithAutoLayout_spec.ts index 88e5caf99d35..7c4f6e6fa5a8 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/AppNavigation/AppNavigationWithAutoLayout_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/AppNavigation/AppNavigationWithAutoLayout_spec.ts @@ -15,7 +15,7 @@ import EditorNavigation, { describe( "Validating multiple widgets in auto layout mode with App navigation settings", - { tags: ["@tag.IDE"] }, + { tags: ["@tag.IDE", "@tag.PropertyPane"] }, function () { it("1. Drag and Drop multiple widgets in auto layout mode", function () { autoLayout.ConvertToAutoLayoutAndVerify(false); diff --git a/app/client/cypress/e2e/Regression/ClientSide/AppNavigation/AppNavigationWithGit_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/AppNavigation/AppNavigationWithGit_spec.ts index 477cc3c87dd9..f5ced5a0c99a 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/AppNavigation/AppNavigationWithGit_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/AppNavigation/AppNavigationWithGit_spec.ts @@ -12,7 +12,21 @@ import PageList from "../../../../support/Pages/PageList"; describe( "General checks for app navigation with Git", - { tags: ["@tag.IDE", "@tag.Git", "@tag.Sanity"] }, + { + tags: [ + "@tag.IDE", + "@tag.Git", + "@tag.Sanity", + "@tag.AccessControl", + "@tag.Workflows", + "@tag.Module", + "@tag.Theme", + "@tag.JS", + "@tag.Container", + "@tag.ImportExport", + "@tag.PropertyPane", + ], + }, function () { it("Issue #32050 - Branch parameter should not be removed when navigating from the inline nav more dropdown", () => { gitSync.CreateNConnectToGit(); diff --git a/app/client/cypress/e2e/Regression/ClientSide/AppNavigation/AppNavigationWithMultiplePages_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/AppNavigation/AppNavigationWithMultiplePages_spec.ts index d3e11d7f5d7d..26761b4f4a51 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/AppNavigation/AppNavigationWithMultiplePages_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/AppNavigation/AppNavigationWithMultiplePages_spec.ts @@ -18,7 +18,7 @@ let currentUrl: string; describe( "Page orientation and navigation related usecases ", - { tags: ["@tag.IDE", "@tag.Sanity"] }, + { tags: ["@tag.IDE", "@tag.Sanity", "@tag.PropertyPane"] }, function () { it("1. Change 'Orientation' to 'Side', sidebar should appear", () => { AppSidebar.navigate(AppSidebarButton.Settings); diff --git a/app/client/cypress/e2e/Regression/ClientSide/AppNavigation/AppNavigation_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/AppNavigation/AppNavigation_spec.ts index 6d45b8df590a..de59164a3391 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/AppNavigation/AppNavigation_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/AppNavigation/AppNavigation_spec.ts @@ -10,7 +10,7 @@ import PageList from "../../../../support/Pages/PageList"; describe( "General checks for app navigation", - { tags: ["@tag.IDE", "@tag.ImportExport"] }, + { tags: ["@tag.IDE", "@tag.ImportExport", "@tag.PropertyPane", "@tag.Git"] }, function () { it("1. App header should appear when there is a single page in the application, and navigation should appear alongside app header when there are two pages", () => { // App header should appear when there is a single page in the application diff --git a/app/client/cypress/e2e/Regression/ClientSide/AppNavigation/NavigationSettings_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/AppNavigation/NavigationSettings_spec.ts index b1abc8d29f12..ef140d3a0737 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/AppNavigation/NavigationSettings_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/AppNavigation/NavigationSettings_spec.ts @@ -12,7 +12,7 @@ import PageList from "../../../../support/Pages/PageList"; describe( "Test app's navigation settings", - { tags: ["@tag.IDE", "@tag.Sanity"] }, + { tags: ["@tag.IDE", "@tag.Sanity", "@tag.PropertyPane"] }, function () { it("1. Open app settings and navigation tab should be there and when the navigation tab is selected, navigation preview should be visible", () => { AppSidebar.navigate(AppSidebarButton.Settings); diff --git a/app/client/cypress/e2e/Regression/ClientSide/AppNavigation/SidebarCollapse_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/AppNavigation/SidebarCollapse_spec.ts index 1d30a1219b4d..191da0755950 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/AppNavigation/SidebarCollapse_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/AppNavigation/SidebarCollapse_spec.ts @@ -8,30 +8,34 @@ import { AppSidebarButton, } from "../../../../support/Pages/EditorNavigation"; -describe("Test Sidebar Collapse", { tags: ["@tag.IDE"] }, function () { - it("1. Sidebar collapse button should be there", () => { - // First make sure that nav orientation is set to side - AppSidebar.navigate(AppSidebarButton.Settings); - agHelper.GetNClick(appSettings.locators._navigationSettingsTab); - agHelper.GetNClick( - appSettings.locators._navigationSettings._orientationOptions._side, - 0, - true, - ); - deployMode.DeployApp(); - agHelper.AssertElementVisibility( - appSettings.locators._sidebarCollapseButton, - ); - //Sidebar should collapse and open on click of collapse button again - // Collapse - agHelper.GetNClick(appSettings.locators._sidebarCollapseButton, 0, true); - agHelper - .GetElement(appSettings.locators._sideNavbar) - .should("not.have.class", "is-open"); - // Open - agHelper.GetNClick(appSettings.locators._sidebarCollapseButton); - agHelper - .GetElement(appSettings.locators._sideNavbar) - .should("have.class", "is-open"); - }); -}); +describe( + "Test Sidebar Collapse", + { tags: ["@tag.IDE", "@tag.PropertyPane"] }, + function () { + it("1. Sidebar collapse button should be there", () => { + // First make sure that nav orientation is set to side + AppSidebar.navigate(AppSidebarButton.Settings); + agHelper.GetNClick(appSettings.locators._navigationSettingsTab); + agHelper.GetNClick( + appSettings.locators._navigationSettings._orientationOptions._side, + 0, + true, + ); + deployMode.DeployApp(); + agHelper.AssertElementVisibility( + appSettings.locators._sidebarCollapseButton, + ); + //Sidebar should collapse and open on click of collapse button again + // Collapse + agHelper.GetNClick(appSettings.locators._sidebarCollapseButton, 0, true); + agHelper + .GetElement(appSettings.locators._sideNavbar) + .should("not.have.class", "is-open"); + // Open + agHelper.GetNClick(appSettings.locators._sidebarCollapseButton); + agHelper + .GetElement(appSettings.locators._sideNavbar) + .should("have.class", "is-open"); + }); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/AppNavigation/Sidebar_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/AppNavigation/Sidebar_spec.ts index 47f5ece90134..41f24a205514 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/AppNavigation/Sidebar_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/AppNavigation/Sidebar_spec.ts @@ -13,7 +13,7 @@ import { describe( "Test Sidebar navigation style", - { tags: ["@tag.IDE", "@tag.ImportExport"] }, + { tags: ["@tag.IDE", "@tag.ImportExport", "@tag.PropertyPane", "@tag.Git"] }, function () { before(() => { // Import an application diff --git a/app/client/cypress/e2e/Regression/ClientSide/AppNavigation/TopInline_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/AppNavigation/TopInline_spec.ts index c3fe5429ea14..887639ff7339 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/AppNavigation/TopInline_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/AppNavigation/TopInline_spec.ts @@ -13,7 +13,7 @@ import { describe( "Test Top + Inline navigation style", - { tags: ["@tag.IDE", "@tag.ImportExport"] }, + { tags: ["@tag.IDE", "@tag.ImportExport", "@tag.PropertyPane", "@tag.Git"] }, function () { before(() => { // Import an application diff --git a/app/client/cypress/e2e/Regression/ClientSide/AppNavigation/TopStacked_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/AppNavigation/TopStacked_spec.ts index 42f80ccb5846..b1dc6ba298cc 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/AppNavigation/TopStacked_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/AppNavigation/TopStacked_spec.ts @@ -13,7 +13,7 @@ import { describe( "Test Top + Stacked navigation style", - { tags: ["@tag.IDE", "@tag.ImportExport"] }, + { tags: ["@tag.IDE", "@tag.ImportExport", "@tag.PropertyPane", "@tag.Git"] }, function () { before(() => { // Import an application diff --git a/app/client/cypress/e2e/Regression/ClientSide/Autocomplete/Autocomplete_setters_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Autocomplete/Autocomplete_setters_spec.ts index 3a0261578512..9685a068612b 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Autocomplete/Autocomplete_setters_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Autocomplete/Autocomplete_setters_spec.ts @@ -21,90 +21,98 @@ const jsObjectBody = `export default { } }`; -describe("Autocomplete tests for setters", { tags: ["@tag.JS"] }, () => { - before(() => { - entityExplorer.DragDropWidgetNVerify(draggableWidgets.BUTTON, 100, 100); - entityExplorer.DragDropWidgetNVerify(draggableWidgets.INPUT_V2, 200, 200); - entityExplorer.DragDropWidgetNVerify(draggableWidgets.CHECKBOX, 300, 300); - entityExplorer.DragDropWidgetNVerify(draggableWidgets.SWITCH, 400, 400); - }); - - it("1. Check if setters are present in autocomplete for widgets in JsObject", () => { - jsEditor.CreateJSObject(jsObjectBody, { - paste: true, - completeReplace: true, - toRun: false, - shouldCreateNewJSObj: true, - prettify: false, +describe( + "Autocomplete tests for setters", + { tags: ["@tag.JS", "@tag.Binding"] }, + () => { + before(() => { + entityExplorer.DragDropWidgetNVerify(draggableWidgets.BUTTON, 100, 100); + entityExplorer.DragDropWidgetNVerify(draggableWidgets.INPUT_V2, 200, 200); + entityExplorer.DragDropWidgetNVerify(draggableWidgets.CHECKBOX, 300, 300); + entityExplorer.DragDropWidgetNVerify(draggableWidgets.SWITCH, 400, 400); }); - agHelper.GetNClick(jsEditor._lineinJsEditor(5)); - agHelper.TypeText(locators._codeMirrorTextArea, "Button1"); + it("1. Check if setters are present in autocomplete for widgets in JsObject", () => { + jsEditor.CreateJSObject(jsObjectBody, { + paste: true, + completeReplace: true, + toRun: false, + shouldCreateNewJSObj: true, + prettify: false, + }); + + agHelper.GetNClick(jsEditor._lineinJsEditor(5)); + agHelper.TypeText(locators._codeMirrorTextArea, "Button1"); - agHelper.GetElementsNAssertTextPresence( - locators._hints, - "Button1.setColor", - ); - agHelper.GetElementsNAssertTextPresence( - locators._hints, - "Button1.setDisabled", - ); - agHelper.GetElementsNAssertTextPresence( - locators._hints, - "Button1.setVisibility", - ); + agHelper.GetElementsNAssertTextPresence( + locators._hints, + "Button1.setColor", + ); + agHelper.GetElementsNAssertTextPresence( + locators._hints, + "Button1.setDisabled", + ); + agHelper.GetElementsNAssertTextPresence( + locators._hints, + "Button1.setVisibility", + ); - agHelper.RemoveCharsNType(locators._codeMirrorTextArea, 7, "Input1.set"); + agHelper.RemoveCharsNType(locators._codeMirrorTextArea, 7, "Input1.set"); - agHelper.GetElementsNAssertTextPresence(locators._hints, "setValue"); - agHelper.GetElementsNAssertTextPresence(locators._hints, "setDisabled"); - agHelper.GetElementsNAssertTextPresence(locators._hints, "setVisibility"); + agHelper.GetElementsNAssertTextPresence(locators._hints, "setValue"); + agHelper.GetElementsNAssertTextPresence(locators._hints, "setDisabled"); + agHelper.GetElementsNAssertTextPresence(locators._hints, "setVisibility"); - agHelper.RemoveCharsNType( - locators._codeMirrorTextArea, - 10, - "Checkbox1.set", - ); + agHelper.RemoveCharsNType( + locators._codeMirrorTextArea, + 10, + "Checkbox1.set", + ); - agHelper.GetElementsNAssertTextPresence(locators._hints, "setValue"); - agHelper.GetElementsNAssertTextPresence(locators._hints, "setDisabled"); - agHelper.GetElementsNAssertTextPresence(locators._hints, "setVisibility"); + agHelper.GetElementsNAssertTextPresence(locators._hints, "setValue"); + agHelper.GetElementsNAssertTextPresence(locators._hints, "setDisabled"); + agHelper.GetElementsNAssertTextPresence(locators._hints, "setVisibility"); - agHelper.RemoveCharsNType(locators._codeMirrorTextArea, 13, "Switch1.set"); + agHelper.RemoveCharsNType( + locators._codeMirrorTextArea, + 13, + "Switch1.set", + ); - agHelper.GetElementsNAssertTextPresence(locators._hints, "setDisabled"); - agHelper.GetElementsNAssertTextPresence(locators._hints, "setRequired"); - }); + agHelper.GetElementsNAssertTextPresence(locators._hints, "setDisabled"); + agHelper.GetElementsNAssertTextPresence(locators._hints, "setRequired"); + }); - it("2. Check if setters are present in autocomplete for widgets in property Pane", () => { - entityExplorer.DragDropWidgetNVerify(draggableWidgets.INPUT_V2, 500, 500); - EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); - propPane.EnterJSContext("onClick", "{{Input1.set", true, false); - agHelper.GetElementsNAssertTextPresence(locators._hints, "setDisabled"); - }); + it("2. Check if setters are present in autocomplete for widgets in property Pane", () => { + entityExplorer.DragDropWidgetNVerify(draggableWidgets.INPUT_V2, 500, 500); + EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); + propPane.EnterJSContext("onClick", "{{Input1.set", true, false); + agHelper.GetElementsNAssertTextPresence(locators._hints, "setDisabled"); + }); - it("3. function arguments hint shows up", () => { - EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); - propPane.EnterJSContext("onClick", "{{", true, false); - agHelper.GetNClickByContains(locators._hints, "appsmith", 0, false); - agHelper.AssertElementVisibility(locators._evalValuePopover); - propPane.EnterJSContext("onClick", "{{showAlert", true, false); - agHelper.GetElementsNAssertTextPresence(locators._hints, "showAlert"); - agHelper.AssertElementAbsence(locators._evalValuePopover); - agHelper.GetNClickByContains(locators._hints, "showAlert", 0, false); - agHelper.GetNAssertElementText( - locators._argHintFnName, - "showAlert", - "contain.text", - ); - agHelper.AssertElementAbsence(locators._evalValuePopover); - }); + it("3. function arguments hint shows up", () => { + EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); + propPane.EnterJSContext("onClick", "{{", true, false); + agHelper.GetNClickByContains(locators._hints, "appsmith", 0, false); + agHelper.AssertElementVisibility(locators._evalValuePopover); + propPane.EnterJSContext("onClick", "{{showAlert", true, false); + agHelper.GetElementsNAssertTextPresence(locators._hints, "showAlert"); + agHelper.AssertElementAbsence(locators._evalValuePopover); + agHelper.GetNClickByContains(locators._hints, "showAlert", 0, false); + agHelper.GetNAssertElementText( + locators._argHintFnName, + "showAlert", + "contain.text", + ); + agHelper.AssertElementAbsence(locators._evalValuePopover); + }); - it("4. function description tooltip shows up", () => { - entityExplorer.DragDropWidgetNVerify(draggableWidgets.BUTTON, 100, 100); - EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); - propPane.EnterJSContext("onClick", "{{showAlert", true, false); - agHelper.GetElementsNAssertTextPresence(locators._hints, "showAlert"); - agHelper.AssertElementExist(locators._tern_doc); - }); -}); + it("4. function description tooltip shows up", () => { + entityExplorer.DragDropWidgetNVerify(draggableWidgets.BUTTON, 100, 100); + EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); + propPane.EnterJSContext("onClick", "{{showAlert", true, false); + agHelper.GetElementsNAssertTextPresence(locators._hints, "showAlert"); + agHelper.AssertElementExist(locators._tern_doc); + }); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Autocomplete/BracketNotation_AC_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Autocomplete/BracketNotation_AC_spec.ts index bfbc91ef3d1f..d7979bbf777c 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Autocomplete/BracketNotation_AC_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Autocomplete/BracketNotation_AC_spec.ts @@ -6,7 +6,7 @@ import { describe( "Test cases around bracket notation", - { tags: ["@tag.JS"] }, + { tags: ["@tag.JS", "@tag.Binding"] }, function () { const jsObjectBody = `export default { "my variable 1": [], diff --git a/app/client/cypress/e2e/Regression/ClientSide/Autocomplete/Bug23641_Spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Autocomplete/Bug23641_Spec.ts index 3275e4c483c2..103f3cca08fb 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Autocomplete/Bug23641_Spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Autocomplete/Bug23641_Spec.ts @@ -9,22 +9,38 @@ import EditorNavigation, { EntityType, } from "../../../../support/Pages/EditorNavigation"; -describe("Autocomplete bug fixes", { tags: ["@tag.JS"] }, function () { - it("1. Bug #23641 Verifies if 'children' shows up in autocomplete list", function () { - entityExplorer.DragDropWidgetNVerify( - draggableWidgets.MULTITREESELECT, - 200, - 200, - ); - entityExplorer.DragDropWidgetNVerify(draggableWidgets.TREESELECT, 200, 400); - entityExplorer.DragDropWidgetNVerify(draggableWidgets.TEXT, 200, 600); - EditorNavigation.SelectEntityByName("Text1", EntityType.Widget); - propPane.TypeTextIntoField("Text", "{{TreeSelect1.options[0].c"); - agHelper.AssertElementExist(locators._hints); - agHelper.GetNAssertElementText(locators._hints, "children", "contain.text"); +describe( + "Autocomplete bug fixes", + { tags: ["@tag.JS", "@tag.Binding"] }, + function () { + it("1. Bug #23641 Verifies if 'children' shows up in autocomplete list", function () { + entityExplorer.DragDropWidgetNVerify( + draggableWidgets.MULTITREESELECT, + 200, + 200, + ); + entityExplorer.DragDropWidgetNVerify( + draggableWidgets.TREESELECT, + 200, + 400, + ); + entityExplorer.DragDropWidgetNVerify(draggableWidgets.TEXT, 200, 600); + EditorNavigation.SelectEntityByName("Text1", EntityType.Widget); + propPane.TypeTextIntoField("Text", "{{TreeSelect1.options[0].c"); + agHelper.AssertElementExist(locators._hints); + agHelper.GetNAssertElementText( + locators._hints, + "children", + "contain.text", + ); - propPane.TypeTextIntoField("Text", "{{MultiTreeSelect1.options[0].c"); - agHelper.AssertElementExist(locators._hints); - agHelper.GetNAssertElementText(locators._hints, "children", "contain.text"); - }); -}); + propPane.TypeTextIntoField("Text", "{{MultiTreeSelect1.options[0].c"); + agHelper.AssertElementExist(locators._hints); + agHelper.GetNAssertElementText( + locators._hints, + "children", + "contain.text", + ); + }); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Autocomplete/Bugs_AC_Spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Autocomplete/Bugs_AC_Spec.ts index 3a31df30341b..6f149a7b49ee 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Autocomplete/Bugs_AC_Spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Autocomplete/Bugs_AC_Spec.ts @@ -14,163 +14,167 @@ import EditorNavigation, { AppSidebar, } from "../../../../support/Pages/EditorNavigation"; -describe("Autocomplete bug fixes", { tags: ["@tag.JS"] }, function () { - it("1. Bug #12790 Verifies if selectedRow is in best match", function () { - entityExplorer.DragDropWidgetNVerify(draggableWidgets.TABLE, 200, 200); - table.AddSampleTableData(); - entityExplorer.DragDropWidgetNVerify(draggableWidgets.TEXT, 200, 600); - EditorNavigation.SelectEntityByName("Text1", EntityType.Widget); - propPane.TypeTextIntoField("Text", "{{Table1."); - agHelper.AssertElementExist(locators._hints); - agHelper.GetNAssertElementText(locators._hints, "Best match"); - agHelper.GetNAssertElementText( - locators._hints, - "selectedRow", - "have.text", - 1, - ); - }); - - it("2. Bug #13983 Verifies if object properties are in autocomplete list", function () { - EditorNavigation.SelectEntityByName("Text1", EntityType.Widget); - propPane.TypeTextIntoField("Text", '{{Table1.selectedRow["'); - agHelper.AssertElementExist(locators._hints); - agHelper.GetNAssertElementText(locators._hints, "status", "contain.text"); - - propPane.TypeTextIntoField("Text", "{{Table1.selectedRow['"); - agHelper.AssertElementExist(locators._hints); - agHelper.GetNAssertElementText(locators._hints, "status", "contain.text"); - }); - - it("3. Bug #13983 Verifies if object properties are in autocomplete list", function () { - EditorNavigation.SelectEntityByName("Text1", EntityType.Widget); - propPane.TypeTextIntoField("Text", '{{Table1.selectedRo"'); - agHelper.AssertElementAbsence(locators._hints); - - propPane.TypeTextIntoField("Text", '{{"'); - agHelper.AssertElementAbsence(locators._hints); - }); - - it("4. Bug #14990 Checks if copied widget show up on autocomplete suggestions", function () { - entityExplorer.CopyPasteWidget("Text1"); - EditorNavigation.SelectEntityByName("Text1", EntityType.Widget); - propPane.UpdatePropertyFieldValue("Text", ""); - propPane.TypeTextIntoField("Text", "{{Te"); - agHelper.AssertElementExist(locators._hints); - agHelper.GetNAssertElementText(locators._hints, "Best match"); - agHelper.GetNAssertElementText( - locators._hints, - "Text1Copy.text", - "have.text", - 1, - ); - }); - - it("5. Bug #14100 Custom columns name label change should reflect in autocomplete", function () { - // select table widget - EditorNavigation.SelectEntityByName("Table1", EntityType.Widget); - // add new column - cy.get(".t--add-column-btn").click(); - // edit column name - cy.get( - "[data-rbd-draggable-id='customColumn1'] .t--edit-column-btn", - ).click(); - - propPane.UpdatePropertyFieldValue("Property Name", "columnAlias"); - // select text widget - EditorNavigation.SelectEntityByName("Text1", EntityType.Widget); - - // type {{Table1.selectedRow. and check for autocompletion suggestion having edited column name - propPane.TypeTextIntoField("Text", "{{Table1.selectedRow."); - agHelper.GetNAssertElementText( - locators._hints, - "columnAlias", - "have.text", - 0, - ); - }); - - it( - "7. Installed library should show up in autocomplete", - { tags: ["@tag.excludeForAirgap"] }, - function () { - AppSidebar.navigate(AppSidebarButton.Libraries); - installer.OpenInstaller(); - installer.InstallLibrary("uuidjs", "UUID"); - installer.CloseInstaller(); - AppSidebar.navigate(AppSidebarButton.Editor); +describe( + "Autocomplete bug fixes", + { tags: ["@tag.JS", "@tag.Binding"] }, + function () { + it("1. Bug #12790 Verifies if selectedRow is in best match", function () { + entityExplorer.DragDropWidgetNVerify(draggableWidgets.TABLE, 200, 200); + table.AddSampleTableData(); + entityExplorer.DragDropWidgetNVerify(draggableWidgets.TEXT, 200, 600); EditorNavigation.SelectEntityByName("Text1", EntityType.Widget); - propPane.TypeTextIntoField("Text", "{{UUI"); - agHelper.GetNAssertElementText(locators._hints, "UUID"); - }, - ); - - it( - "8. No autocomplete for Removed libraries", - { tags: ["@tag.excludeForAirgap"] }, - function () { - entityExplorer.RenameEntityFromExplorer("Text1Copy", "UUIDTEXT"); - AppSidebar.navigate(AppSidebarButton.Libraries); - installer.uninstallLibrary("uuidjs"); - AppSidebar.navigate(AppSidebarButton.Editor); - propPane.TypeTextIntoField("Text", "{{UUID."); + propPane.TypeTextIntoField("Text", "{{Table1."); + agHelper.AssertElementExist(locators._hints); + agHelper.GetNAssertElementText(locators._hints, "Best match"); + agHelper.GetNAssertElementText( + locators._hints, + "selectedRow", + "have.text", + 1, + ); + }); + + it("2. Bug #13983 Verifies if object properties are in autocomplete list", function () { + EditorNavigation.SelectEntityByName("Text1", EntityType.Widget); + propPane.TypeTextIntoField("Text", '{{Table1.selectedRow["'); + agHelper.AssertElementExist(locators._hints); + agHelper.GetNAssertElementText(locators._hints, "status", "contain.text"); + + propPane.TypeTextIntoField("Text", "{{Table1.selectedRow['"); + agHelper.AssertElementExist(locators._hints); + agHelper.GetNAssertElementText(locators._hints, "status", "contain.text"); + }); + + it("3. Bug #13983 Verifies if object properties are in autocomplete list", function () { + EditorNavigation.SelectEntityByName("Text1", EntityType.Widget); + propPane.TypeTextIntoField("Text", '{{Table1.selectedRo"'); agHelper.AssertElementAbsence(locators._hints); - }, - ); - it("9. Bug #20449 Cursor should be between parenthesis when function is autocompleted (Property Pane)", function () { - EditorNavigation.SelectEntityByName("Text1", EntityType.Widget); - propPane.TypeTextIntoField("Text", "{{console.l"); + propPane.TypeTextIntoField("Text", '{{"'); + agHelper.AssertElementAbsence(locators._hints); + }); - agHelper.GetNClickByContains(locators._hints, "log"); + it("4. Bug #14990 Checks if copied widget show up on autocomplete suggestions", function () { + entityExplorer.CopyPasteWidget("Text1"); + EditorNavigation.SelectEntityByName("Text1", EntityType.Widget); + propPane.UpdatePropertyFieldValue("Text", ""); + propPane.TypeTextIntoField("Text", "{{Te"); + agHelper.AssertElementExist(locators._hints); + agHelper.GetNAssertElementText(locators._hints, "Best match"); + agHelper.GetNAssertElementText( + locators._hints, + "Text1Copy.text", + "have.text", + 1, + ); + }); + + it("5. Bug #14100 Custom columns name label change should reflect in autocomplete", function () { + // select table widget + EditorNavigation.SelectEntityByName("Table1", EntityType.Widget); + // add new column + cy.get(".t--add-column-btn").click(); + // edit column name + cy.get( + "[data-rbd-draggable-id='customColumn1'] .t--edit-column-btn", + ).click(); + + propPane.UpdatePropertyFieldValue("Property Name", "columnAlias"); + // select text widget + EditorNavigation.SelectEntityByName("Text1", EntityType.Widget); - propPane.TypeTextIntoField("Text", '"hello"', false); + // type {{Table1.selectedRow. and check for autocompletion suggestion having edited column name + propPane.TypeTextIntoField("Text", "{{Table1.selectedRow."); + agHelper.GetNAssertElementText( + locators._hints, + "columnAlias", + "have.text", + 0, + ); + }); + + it( + "7. Installed library should show up in autocomplete", + { tags: ["@tag.excludeForAirgap"] }, + function () { + AppSidebar.navigate(AppSidebarButton.Libraries); + installer.OpenInstaller(); + installer.InstallLibrary("uuidjs", "UUID"); + installer.CloseInstaller(); + AppSidebar.navigate(AppSidebarButton.Editor); + EditorNavigation.SelectEntityByName("Text1", EntityType.Widget); + propPane.TypeTextIntoField("Text", "{{UUI"); + agHelper.GetNAssertElementText(locators._hints, "UUID"); + }, + ); - // If the cursor was not between parenthesis, the following command will fail - propPane.ValidatePropertyFieldValue("Text", '{{console.log("hello")}}'); - }); + it( + "8. No autocomplete for Removed libraries", + { tags: ["@tag.excludeForAirgap"] }, + function () { + entityExplorer.RenameEntityFromExplorer("Text1Copy", "UUIDTEXT"); + AppSidebar.navigate(AppSidebarButton.Libraries); + installer.uninstallLibrary("uuidjs"); + AppSidebar.navigate(AppSidebarButton.Editor); + propPane.TypeTextIntoField("Text", "{{UUID."); + agHelper.AssertElementAbsence(locators._hints); + }, + ); + + it("9. Bug #20449 Cursor should be between parenthesis when function is autocompleted (Property Pane)", function () { + EditorNavigation.SelectEntityByName("Text1", EntityType.Widget); + propPane.TypeTextIntoField("Text", "{{console.l"); + + agHelper.GetNClickByContains(locators._hints, "log"); + + propPane.TypeTextIntoField("Text", '"hello"', false); + + // If the cursor was not between parenthesis, the following command will fail + propPane.ValidatePropertyFieldValue("Text", '{{console.log("hello")}}'); + }); - it("10. Bug #20449 Cursor should be between parenthesis when function is autocompleted (JS Object)", function () { - jsEditor.CreateJSObject( - `export default { + it("10. Bug #20449 Cursor should be between parenthesis when function is autocompleted (JS Object)", function () { + jsEditor.CreateJSObject( + `export default { myFun1: () => { }, }`, - { - paste: true, - completeReplace: true, - toRun: false, - shouldCreateNewJSObj: true, - prettify: false, - }, - ); + { + paste: true, + completeReplace: true, + toRun: false, + shouldCreateNewJSObj: true, + prettify: false, + }, + ); - agHelper.GetNClick(jsEditor._lineinJsEditor(3)); + agHelper.GetNClick(jsEditor._lineinJsEditor(3)); - agHelper.TypeText(locators._codeMirrorTextArea, "console.l"); + agHelper.TypeText(locators._codeMirrorTextArea, "console.l"); - agHelper.GetNClickByContains(locators._hints, "log"); + agHelper.GetNClickByContains(locators._hints, "log"); - agHelper.TypeText(locators._codeMirrorTextArea, "'hello'"); + agHelper.TypeText(locators._codeMirrorTextArea, "'hello'"); - // If the cursor was not between parenthesis, the following command will fail - agHelper.GetNAssertContains( - jsEditor._lineinJsEditor(3), - "console.log('hello')", - ); - }); - - it("11. Bug #31114 Verify Object Properties in Autocomplete List for isVisible Field in JSONForm Widget", function () { - entityExplorer.DragDropWidgetNVerify(draggableWidgets.JSONFORM, 400, 800); - EditorNavigation.SelectEntityByName("Text1", EntityType.Widget); - propPane.EnterJSContext("Visible", ""); - propPane.TypeTextIntoField("Visible", "{{JSONForm1.isVis"); - agHelper.AssertElementExist(locators._hints); - agHelper.GetNAssertElementText( - locators._hints, - "isVisible", - "contain.text", - ); - }); -}); + // If the cursor was not between parenthesis, the following command will fail + agHelper.GetNAssertContains( + jsEditor._lineinJsEditor(3), + "console.log('hello')", + ); + }); + + it("11. Bug #31114 Verify Object Properties in Autocomplete List for isVisible Field in JSONForm Widget", function () { + entityExplorer.DragDropWidgetNVerify(draggableWidgets.JSONFORM, 400, 800); + EditorNavigation.SelectEntityByName("Text1", EntityType.Widget); + propPane.EnterJSContext("Visible", ""); + propPane.TypeTextIntoField("Visible", "{{JSONForm1.isVis"); + agHelper.AssertElementExist(locators._hints); + agHelper.GetNAssertElementText( + locators._hints, + "isVisible", + "contain.text", + ); + }); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Autocomplete/JS_AC1_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Autocomplete/JS_AC1_spec.ts index 37fd2bbaf4fb..f8190d48f01a 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Autocomplete/JS_AC1_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Autocomplete/JS_AC1_spec.ts @@ -29,7 +29,7 @@ const jsObjectBody = `export default { } }`; -describe("Autocomplete tests", { tags: ["@tag.JS"] }, () => { +describe("Autocomplete tests", { tags: ["@tag.JS", "@tag.Binding"] }, () => { it("1. Bug #13613 Verify widgets autocomplete: ButtonGroup & Document viewer widget", () => { entityExplorer.DragDropWidgetNVerify( draggableWidgets.BUTTON_GROUP, diff --git a/app/client/cypress/e2e/Regression/ClientSide/Autocomplete/JS_AC2_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Autocomplete/JS_AC2_spec.ts index ee83327369a2..603edff0c980 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Autocomplete/JS_AC2_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Autocomplete/JS_AC2_spec.ts @@ -22,7 +22,7 @@ const jsObjectBody = `export default { } }`; -describe("Autocomplete tests", { tags: ["@tag.JS"] }, () => { +describe("Autocomplete tests", { tags: ["@tag.JS", "@tag.Binding"] }, () => { it("1. Bug #17059 Autocomplete does not suggest same function name that belongs to a different object", () => { // create js object - JSObject1 jsEditor.CreateJSObject(jsObjectBody, { @@ -111,7 +111,7 @@ describe("Autocomplete tests", { tags: ["@tag.JS"] }, () => { }); }); - it.skip("3. Bug #15429 Random keystrokes trigger autocomplete to show up", () => { + it("3. Bug #15429 Random keystrokes trigger autocomplete to show up", () => { // create js object & assert no hints just show up jsEditor.CreateJSObject( `export default diff --git a/app/client/cypress/e2e/Regression/ClientSide/Autocomplete/PropertyPaneSlashCommand_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Autocomplete/PropertyPaneSlashCommand_spec.ts index 31f4b1c7feb1..919b1c39aab2 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Autocomplete/PropertyPaneSlashCommand_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Autocomplete/PropertyPaneSlashCommand_spec.ts @@ -1,12 +1,7 @@ -import { featureFlagIntercept } from "../../../../support/Objects/FeatureFlags"; import { agHelper, locators, - entityExplorer, propPane, - draggableWidgets, - apiPage, - entityItems, homePage, assertHelper, } from "../../../../support/Objects/ObjectsCore"; @@ -14,63 +9,61 @@ import EditorNavigation, { EntityType, } from "../../../../support/Pages/EditorNavigation"; -describe("Property Pane Suggestions", { tags: ["@tag.JS"] }, () => { - before(() => { - featureFlagIntercept({ - ab_learnability_ease_of_initial_use_enabled: true, +describe( + "Property Pane Suggestions", + { tags: ["@tag.JS", "@tag.Binding"] }, + () => { + before(function () { + agHelper.ClearLocalStorageCache(); }); - }); - before(function () { - agHelper.ClearLocalStorageCache(); - }); - - beforeEach(() => { - agHelper.RestoreLocalStorageCache(); - }); + beforeEach(() => { + agHelper.RestoreLocalStorageCache(); + }); - afterEach(() => { - agHelper.SaveLocalStorageCache(); - }); + afterEach(() => { + agHelper.SaveLocalStorageCache(); + }); - it("1. Should show Property Pane Suggestions on / command & when typing {{}}", () => { - homePage.NavigateToHome(); - homePage.ImportApp("PropertyPaneSlashMenuBindings.json"); - assertHelper.WaitForNetworkCall("importNewApplication"); + it("1. Should show Property Pane Suggestions on / command & when typing {{}}", () => { + homePage.NavigateToHome(); + homePage.ImportApp("PropertyPaneSlashMenuBindings.json"); + assertHelper.WaitForNetworkCall("importNewApplication"); - // Select table and check for slash menu command popup - EditorNavigation.SelectEntityByName("Table1", EntityType.Widget); - propPane.ToggleJSMode("Table data", true); - propPane.FocusIntoTextField("Table data"); - agHelper.GetElementsNAssertTextPresence(locators._hints, "Add a binding"); - agHelper.GetNClickByContains(locators._hints, "Add a binding"); - propPane.ValidatePropertyFieldValue("Table data", "{{}}"); + // Select table and check for slash menu command popup + EditorNavigation.SelectEntityByName("Table1", EntityType.Widget); + propPane.ToggleJSMode("Table data", true); + propPane.FocusIntoTextField("Table data"); + agHelper.GetElementsNAssertTextPresence(locators._hints, "Add a binding"); + agHelper.GetNClickByContains(locators._hints, "Add a binding"); + propPane.ValidatePropertyFieldValue("Table data", "{{}}"); - // Select json form widget and check for slash menu command popup - EditorNavigation.SelectEntityByName("JSONForm1", EntityType.Widget); - propPane.ToggleJSMode("Source data", true); - propPane.FocusIntoTextField("Source data"); - agHelper.GetElementsNAssertTextPresence(locators._hints, "Add a binding"); - agHelper.GetNClickByContains(locators._hints, "Add a binding"); - propPane.ValidatePropertyFieldValue("Source data", "{{}}"); - }); + // Select json form widget and check for slash menu command popup + EditorNavigation.SelectEntityByName("JSONForm1", EntityType.Widget); + propPane.ToggleJSMode("Source data", true); + propPane.FocusIntoTextField("Source data"); + agHelper.GetElementsNAssertTextPresence(locators._hints, "Add a binding"); + agHelper.GetNClickByContains(locators._hints, "Add a binding"); + propPane.ValidatePropertyFieldValue("Source data", "{{}}"); + }); - it("2. Should show `load more` option in case number of queries are more than 5", () => { - // Navigate to table and open slash menu command - EditorNavigation.SelectEntityByName("Table1", EntityType.Widget); - propPane.ToggleJSMode("Table data", true); - propPane.UpdatePropertyFieldValue("Table data", ""); - propPane.FocusIntoTextField("Table data"); - agHelper.GetElementsNAssertTextPresence(locators._hints, "Add a binding"); + it("2. Should show `load more` option in case number of queries are more than 5", () => { + // Navigate to table and open slash menu command + EditorNavigation.SelectEntityByName("Table1", EntityType.Widget); + propPane.ToggleJSMode("Table data", true); + propPane.UpdatePropertyFieldValue("Table data", ""); + propPane.FocusIntoTextField("Table data"); + agHelper.GetElementsNAssertTextPresence(locators._hints, "Add a binding"); - // Assert that count of Codemirror-hints is 10, as the whole list is not expanded yet - agHelper.AssertElementLength(locators._hints_apis, 5); - agHelper.GetElementsNAssertTextPresence(locators._hints, "Load 3 more"); + // Assert that count of Codemirror-hints is 10, as the whole list is not expanded yet + agHelper.AssertElementLength(locators._hints_apis, 5); + agHelper.GetElementsNAssertTextPresence(locators._hints, "Load 3 more"); - // Click on load more to expand all options - agHelper.GetNClickByContains(locators._hints, "Load 3 more"); + // Click on load more to expand all options + agHelper.GetNClickByContains(locators._hints, "Load 3 more"); - // Assert that all elements are visible now - agHelper.AssertElementLength(locators._hints_apis, 8); - }); -}); + // Assert that all elements are visible now + agHelper.AssertElementLength(locators._hints_apis, 8); + }); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Autocomplete/PropertyPaneSuggestion_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Autocomplete/PropertyPaneSuggestion_spec.ts index f93026f9ee59..60407e48079e 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Autocomplete/PropertyPaneSuggestion_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Autocomplete/PropertyPaneSuggestion_spec.ts @@ -10,44 +10,48 @@ import EditorNavigation, { EntityType, } from "../../../../support/Pages/EditorNavigation"; -describe("Property Pane Suggestions", { tags: ["@tag.JS"] }, () => { - before(() => { - entityExplorer.DragDropWidgetNVerify(draggableWidgets.BUTTON); - }); +describe( + "Property Pane Suggestions", + { tags: ["@tag.JS", "@tag.Binding"] }, + () => { + before(() => { + entityExplorer.DragDropWidgetNVerify(draggableWidgets.BUTTON); + }); - it("1. Should show Property Pane Suggestions on / command & when typing {{}}", () => { - EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); - propPane.TypeTextIntoField("Label", "/"); - agHelper.GetElementsNAssertTextPresence(locators._hints, "Add a binding"); - agHelper.GetNClickByContains(locators._hints, "Add a binding"); - propPane.ValidatePropertyFieldValue("Label", "{{}}"); + it("1. Should show Property Pane Suggestions on / command & when typing {{}}", () => { + EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); + propPane.TypeTextIntoField("Label", "/"); + agHelper.GetElementsNAssertTextPresence(locators._hints, "Add a binding"); + agHelper.GetNClickByContains(locators._hints, "Add a binding"); + propPane.ValidatePropertyFieldValue("Label", "{{}}"); - //typing {{}} - EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); - propPane.TypeTextIntoField("Label", "{{"); - agHelper.GetElementsNAssertTextPresence(locators._hints, "appsmith"); - agHelper.GetNClickByContains(locators._hints, "appsmith"); - propPane.ValidatePropertyFieldValue("Label", "{{appsmith}}"); - }); + //typing {{}} + EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); + propPane.TypeTextIntoField("Label", "{{"); + agHelper.GetElementsNAssertTextPresence(locators._hints, "appsmith"); + agHelper.GetNClickByContains(locators._hints, "appsmith"); + propPane.ValidatePropertyFieldValue("Label", "{{appsmith}}"); + }); - it("2. [Bug]-[2040]: undefined binding on / command dropdown", () => { - // Create js object - jsEditor.CreateJSObject(""); - EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); - propPane.TypeTextIntoField("Label", "/"); - agHelper.GetElementsNAssertTextPresence( - locators._slashCommandHintText, - "JSObject1", - ); - }); + it("2. [Bug]-[2040]: undefined binding on / command dropdown", () => { + // Create js object + jsEditor.CreateJSObject(""); + EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); + propPane.TypeTextIntoField("Label", "/"); + agHelper.GetElementsNAssertTextPresence( + locators._slashCommandHintText, + "JSObject1", + ); + }); - it("3. Should add Autocomplete Suggestions on Tab press", () => { - EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); - propPane.TypeTextIntoField("Label", "{{"); - agHelper.GetElementsNAssertTextPresence(locators._hints, "appsmith"); - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore - cy.get("body").tab(); - propPane.ValidatePropertyFieldValue("Label", "{{JSObject1}}"); - }); -}); + it("3. Should add Autocomplete Suggestions on Tab press", () => { + EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); + propPane.TypeTextIntoField("Label", "{{"); + agHelper.GetElementsNAssertTextPresence(locators._hints, "appsmith"); + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore + cy.get("body").tab(); + propPane.ValidatePropertyFieldValue("Label", "{{JSObject1}}"); + }); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Autocomplete/Sql_AC_Spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Autocomplete/Sql_AC_Spec.ts index bc0f17e737ba..bc4d9917497e 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Autocomplete/Sql_AC_Spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Autocomplete/Sql_AC_Spec.ts @@ -6,7 +6,7 @@ import { let dsName: any; -describe("SQL Autocompletion", { tags: ["@tag.JS"] }, () => { +describe("SQL Autocompletion", { tags: ["@tag.JS", "@tag.Binding"] }, () => { it("1. Create DS for SQL autocompletion testing", () => { dataSources.CreateDataSource("Postgres"); cy.get("@dsName").then(($dsName) => { diff --git a/app/client/cypress/e2e/Regression/ClientSide/Autocomplete/autocomplete_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Autocomplete/autocomplete_spec.ts index d5525d2dc546..017172ca76ce 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Autocomplete/autocomplete_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Autocomplete/autocomplete_spec.ts @@ -7,7 +7,7 @@ const dynamicInputLocators = require("../../../../locators/DynamicInput.json"); describe( "Dynamic input autocomplete", - { tags: ["@tag.JS", "@tag.Sanity"] }, + { tags: ["@tag.JS", "@tag.Sanity", "@tag.Binding"] }, () => { before(() => { agHelper.AddDsl("autocomp"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Binding/DatePicker_Text_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Binding/DatePicker_Text_spec.js index 037e637f8cd7..52c699902baf 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Binding/DatePicker_Text_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Binding/DatePicker_Text_spec.js @@ -14,7 +14,7 @@ describe( _.agHelper.AddDsl("uiBindDsl"); }); // Skipping tests due to issue - https://www.notion.so/appsmith/f353d8c6bd664f79ad858a42010cdfc8?v=f04cde23f6424aeb9d5a6e389cd172bd&p=0717892d43684c40bae4e2c87b8308cb&pm=s - it.skip("1. DatePicker-Text, Validate selectedDate functionality", function () { + it("1. DatePicker-Text, Validate selectedDate functionality", function () { /** * Bind DatePicker1 to Text for "selectedDate" */ @@ -25,9 +25,8 @@ describe( * Set the Calender for today's date in DatePicker1 */ cy.openPropertyPane("datepickerwidget"); - cy.get(formWidgetsPage.defaultDate).click(); - cy.ClearDateFooter(); - cy.SetDateToToday(); + cy.get(formWidgetsPage.datepickerWidget).first().click(); + cy.get(formWidgetsPage.datepickerFooter).contains("Today").click(); cy.getDate(1, "YYYY-MM-DD").then((date) => { cy.log("retured date" + date); @@ -43,15 +42,15 @@ describe( cy.get(publishPage.datepickerWidget + commonlocators.inputField) .eq(0) .click(); - cy.ClearDateFooter(); - cy.setDate(1, "ddd MMM DD YYYY"); + cy.SetDateToToday(); + cy.setDate(1, "ddd MMM DD YYYY", "v1"); cy.get(commonlocators.labelTextStyle).should("contain", nextDay); }); cy.get(commonlocators.backToEditor).click(); }); - it.skip("2. DatePicker1-text: Change the date in DatePicker1 and Validate the same in text widget", function () { + it("2. DatePicker1-text: Change the date in DatePicker1 and Validate the same in text widget", function () { cy.openPropertyPane("textwidget"); /** @@ -75,9 +74,9 @@ describe( */ cy.openPropertyPane("datepickerwidget"); cy.get(formWidgetsPage.defaultDate).click(); - cy.ClearDateFooter(); - cy.setDate(1, "ddd MMM DD YYYY"); - // cy.get(commonlocators.onDateSelectedField).click(); + cy.get(formWidgetsPage.dayPickerToday).click(); + cy.get(formWidgetsPage.defaultDate).click(); + cy.setDate(1); /** *Validate the date in text widget @@ -89,7 +88,7 @@ describe( }); }); - it.skip("3. Validate the Date is not changed in DatePicker2", function () { + it("3. Validate the Date is not changed in DatePicker2", function () { cy.log("dateDp2:" + dateDp2); cy.get(formWidgetsPage.datepickerWidget + commonlocators.inputField) .eq(1) @@ -124,7 +123,7 @@ describe( _.deployMode.NavigateBacktoEditor(); }); - it.skip("5. Checks if on deselection of date triggers the onDateSelected action or not.", function () { + it("5. Checks if on deselection of date triggers the onDateSelected action or not.", function () { /** * bind datepicker to show a message "Hello" on date selected */ @@ -135,7 +134,6 @@ describe( * checking if on selecting the date triggers the message */ cy.get(formWidgetsPage.datepickerWidget).first().click(); - cy.ClearDateFooter(); cy.SetDateToToday(); cy.get(commonlocators.toastmsg).contains("hello"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Binding/InputWidget_TableV2_Sorting_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Binding/InputWidget_TableV2_Sorting_spec.js index ba5b040609b1..7fad7eb5d0f8 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Binding/InputWidget_TableV2_Sorting_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Binding/InputWidget_TableV2_Sorting_spec.js @@ -4,10 +4,7 @@ import EditorNavigation, { const publish = require("../../../../locators/publishWidgetspage.json"); const testdata = require("../../../../fixtures/testdata.json"); -import { - agHelper, - entityExplorer, -} from "../../../../support/Objects/ObjectsCore"; +import { agHelper, propPane } from "../../../../support/Objects/ObjectsCore"; describe( "Binding the Table and input Widget", @@ -32,7 +29,7 @@ describe( it("2. validation of data displayed in input widgets based on sorting", function () { EditorNavigation.SelectEntityByName("Table1", EntityType.Widget); - + propPane.ExpandIfCollapsedSection("rowselection"); cy.testJsontext("defaultselectedrow", "0"); cy.get(".draggable-header").contains("id").click({ force: true }); cy.wait(1000); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Binding/Promises_1_Spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Binding/Promises_1_Spec.ts index 7e97e10dc94e..e988d2ba54d8 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Binding/Promises_1_Spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Binding/Promises_1_Spec.ts @@ -172,7 +172,7 @@ return WhatTrumpThinks.run().then((res) => { showAlert("Today's Trump quote for ); agHelper.ValidateToastMessage( "will be executed automatically on page load", - ); //Validating 'Run API on Page Load' is set once api response is mapped + ); //Validating 'Run the API on Page Load' is set once api response is mapped EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); propPane.EnterJSContext( "onClick", diff --git a/app/client/cypress/e2e/Regression/ClientSide/Binding/TableV2TextPagination_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Binding/TableV2TextPagination_spec.js index d8d0a262ff30..490e40de6f97 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Binding/TableV2TextPagination_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Binding/TableV2TextPagination_spec.js @@ -6,7 +6,6 @@ const commonlocators = require("../../../../locators/commonlocators.json"); const testdata = require("../../../../fixtures/testdata.json"); import apiPageLocators from "../../../../locators/ApiEditor"; import { - entityExplorer, apiPage, deployMode, propPane, @@ -91,6 +90,7 @@ describe( it("3. Table-Text, Validate Server Side Pagination of Paginate with Total v2 Records Count", function () { deployMode.NavigateBacktoEditor(); EditorNavigation.SelectEntityByName("Table1", EntityType.Widget); + propPane.ExpandIfCollapsedSection("pagination"); propPane.UpdatePropertyFieldValue("Total Records", "20"); deployMode.DeployApp(); cy.wait("@postExecute"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Binding/TableV2Widget_selectedRow_Input_widget_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Binding/TableV2Widget_selectedRow_Input_widget_spec.js index 5bec54443d47..6ba248fe1a63 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Binding/TableV2Widget_selectedRow_Input_widget_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Binding/TableV2Widget_selectedRow_Input_widget_spec.js @@ -30,6 +30,7 @@ describe( it("2. validation of data displayed in input widgets based on selected row", function () { EditorNavigation.SelectEntityByName("Table1", EntityType.Widget); + _.propPane.ExpandIfCollapsedSection("rowselection"); cy.testJsontext("defaultselectedrow", "2"); cy.readTableV2dataPublish("2", "0").then((tabData) => { const tabValue = tabData; diff --git a/app/client/cypress/e2e/Regression/ClientSide/Binding/TableV2_ClientSide_Search_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Binding/TableV2_ClientSide_Search_spec.js index e3b110fbc9d6..322323850394 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Binding/TableV2_ClientSide_Search_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Binding/TableV2_ClientSide_Search_spec.js @@ -20,6 +20,7 @@ describe( cy.readTableV2dataPublish("0", "0").then((tabData) => { expect(tabData).to.eq("#2"); }); + _.propPane.ExpandIfCollapsedSection("search\\&filters"); // Input onsearchtextchanged control cy.get(".t--property-control-onsearchtextchanged .t--js-toggle") .first() diff --git a/app/client/cypress/e2e/Regression/ClientSide/Binding/TableV2_DefaultSearch_Input_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Binding/TableV2_DefaultSearch_Input_spec.js index 457593fec0f3..c21342e793f0 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Binding/TableV2_DefaultSearch_Input_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Binding/TableV2_DefaultSearch_Input_spec.js @@ -27,6 +27,7 @@ describe( ); // validation of data displayed in input widgets based on search value set EditorNavigation.SelectEntityByName("Table1", EntityType.Widget); + _.propPane.ExpandIfCollapsedSection("search\\&filters"); cy.get(".t--property-control-allowsearching input").click({ force: true, }); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Binding/TableV2_Widget_API_Pagination_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Binding/TableV2_Widget_API_Pagination_spec.js index 03a7d1e93afe..ef31811f782f 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Binding/TableV2_Widget_API_Pagination_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Binding/TableV2_Widget_API_Pagination_spec.js @@ -30,6 +30,7 @@ describe( //Validate Table V2 with API data and then add a column EditorNavigation.SelectEntityByName("Table1", EntityType.Widget); propPane.UpdatePropertyFieldValue("Table data", "{{Api1.data}}"); + propPane.ExpandIfCollapsedSection("pagination"); cy.CheckWidgetProperties(commonlocators.serverSidePaginationCheckbox); cy.get(`.t--widget-tablewidgetv2 .page-item`) .first() diff --git a/app/client/cypress/e2e/Regression/ClientSide/Binding/TextTableV2_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Binding/TextTableV2_spec.js index e30b11a03156..b42f2840c89e 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Binding/TextTableV2_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Binding/TextTableV2_spec.js @@ -5,7 +5,6 @@ import EditorNavigation, { const commonlocators = require("../../../../locators/commonlocators.json"); const publish = require("../../../../locators/publishWidgetspage.json"); import { - entityExplorer, agHelper, deployMode, propPane, @@ -113,6 +112,7 @@ describe( EditorNavigation.SelectEntityByName("Table1", EntityType.Widget, {}, [ "Container3", ]); + propPane.ExpandIfCollapsedSection("rowselection"); cy.testJsontext("defaultselectedrow", "2"); cy.wait("@updateLayout"); cy.get(commonlocators.TableV2Row) diff --git a/app/client/cypress/e2e/Regression/ClientSide/BugTests/AbortAction_Spec.ts b/app/client/cypress/e2e/Regression/ClientSide/BugTests/AbortAction_Spec.ts index 3030cd8521f6..244efea2281e 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/BugTests/AbortAction_Spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/BugTests/AbortAction_Spec.ts @@ -7,47 +7,51 @@ import { entityItems, } from "../../../../support/Objects/ObjectsCore"; -describe("Abort Action Execution", { tags: ["@tag.Datasource"] }, function () { - it("1. Bug #14006, #16093 - Cancel request button should abort API action execution", function () { - apiPage.CreateAndFillApi( - dataManager.dsValues[dataManager.defaultEnviorment].mockApiUrl + "00", - "AbortApi", - 0, - ); - apiPage.RunAPI(false, 0); - agHelper.GetNClick(locators._cancelActionExecution, 0, true); - agHelper.AssertContains( - Cypress.env("MESSAGES").ACTION_EXECUTION_CANCELLED("AbortApi"), - ); - agHelper.AssertElementAbsence(locators._specificToast("{}")); //Assert that empty toast does not appear - Bug #16093 - agHelper.ActionContextMenuWithInPane({ - action: "Delete", - entityType: entityItems.Api, - }); - }); - - // Queries were resolving quicker than we could cancel them - // Commenting this out till we can find a query that resolves slow enough for us to cancel its execution. - - it("2. Bug #14006, #16093 Cancel request button should abort Query action execution", function () { - dataSources.CreateDataSource("MySql"); - cy.get("@dsName").then(($dsName) => { - dataSources.CreateQueryAfterDSSaved( - "SELECT * FROM worldCountryInfo wc join countryFlags cf on wc.Name = cf.Country CROSS JOIN customers cc", - "AbortQuery", +describe( + "Abort Action Execution", + { tags: ["@tag.Datasource", "@tag.Git", "@tag.AccessControl"] }, + function () { + it("1. Bug #14006, #16093 - Cancel request button should abort API action execution", function () { + apiPage.CreateAndFillApi( + dataManager.dsValues[dataManager.defaultEnviorment].mockApiUrl + "00", + "AbortApi", + 0, ); - dataSources.SetQueryTimeout(0); - agHelper.GetNClick(dataSources._runQueryBtn, 0, true, 0); + apiPage.RunAPI(false, 0); agHelper.GetNClick(locators._cancelActionExecution, 0, true); agHelper.AssertContains( - Cypress.env("MESSAGES").ACTION_EXECUTION_CANCELLED("AbortQuery"), + Cypress.env("MESSAGES").ACTION_EXECUTION_CANCELLED("AbortApi"), ); agHelper.AssertElementAbsence(locators._specificToast("{}")); //Assert that empty toast does not appear - Bug #16093 agHelper.ActionContextMenuWithInPane({ action: "Delete", - entityType: entityItems.Query, + entityType: entityItems.Api, + }); + }); + + // Queries were resolving quicker than we could cancel them + // Commenting this out till we can find a query that resolves slow enough for us to cancel its execution. + + it("2. Bug #14006, #16093 Cancel request button should abort Query action execution", function () { + dataSources.CreateDataSource("MySql"); + cy.get("@dsName").then(($dsName) => { + dataSources.CreateQueryAfterDSSaved( + "SELECT * FROM worldCountryInfo wc join countryFlags cf on wc.Name = cf.Country CROSS JOIN customers cc", + "AbortQuery", + ); + dataSources.SetQueryTimeout(0); + agHelper.GetNClick(dataSources._runQueryBtn, 0, true, 0); + agHelper.GetNClick(locators._cancelActionExecution, 0, true); + agHelper.AssertContains( + Cypress.env("MESSAGES").ACTION_EXECUTION_CANCELLED("AbortQuery"), + ); + agHelper.AssertElementAbsence(locators._specificToast("{}")); //Assert that empty toast does not appear - Bug #16093 + agHelper.ActionContextMenuWithInPane({ + action: "Delete", + entityType: entityItems.Query, + }); + dataSources.DeleteDatasourceFromWithinDS($dsName as unknown as string); }); - dataSources.DeleteDatasourceFromWithinDS($dsName as unknown as string); }); - }); -}); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/BugTests/AllWidgets_Reset_Spec.ts b/app/client/cypress/e2e/Regression/ClientSide/BugTests/AllWidgets_Reset_Spec.ts index 523dd65efee5..88e09e31a43f 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/BugTests/AllWidgets_Reset_Spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/BugTests/AllWidgets_Reset_Spec.ts @@ -414,7 +414,7 @@ function filePickerWidgetAndReset() { Object.entries(widgetsToTest).forEach(([widgetSelector, testConfig]) => { describe( `${testConfig.widgetName} widget test for validating reset assertWidgetReset`, - { tags: ["@tag.Widget", "@tag.Sanity"] }, + { tags: ["@tag.Widget", "@tag.Sanity", "@tag.Binding"] }, () => { beforeEach(() => { _.agHelper.RestoreLocalStorageCache(); diff --git a/app/client/cypress/e2e/Regression/ClientSide/BugTests/ApiBug6732_Spec.ts b/app/client/cypress/e2e/Regression/ClientSide/BugTests/ApiBug6732_Spec.ts index 3df84846bcad..a859be45aafb 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/BugTests/ApiBug6732_Spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/BugTests/ApiBug6732_Spec.ts @@ -4,7 +4,7 @@ const { apiPage } = _; describe( "Bug 6732 - this.params in IIFE function in API editor", - { tags: ["@tag.Datasource"] }, + { tags: ["@tag.Datasource", "@tag.Git", "@tag.AccessControl"] }, () => { it("1. this.params should be available in IIFE function in API editor", () => { apiPage.CreateApi("Api1", "GET"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/BugTests/ApiBugs_Spec.ts b/app/client/cypress/e2e/Regression/ClientSide/BugTests/ApiBugs_Spec.ts index a31c13ac81ec..2402bbe3ab72 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/BugTests/ApiBugs_Spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/BugTests/ApiBugs_Spec.ts @@ -17,111 +17,117 @@ import { AppSidebarButton, } from "../../../../support/Pages/EditorNavigation"; -describe("API Bugs", { tags: ["@tag.Datasource"] }, function () { - it("1. Bug 14037, 25432: User gets an error even when table widget is added from the API page successfully", function () { - // Case where api returns array response - apiPage.CreateAndFillApi( - dataManager.dsValues[dataManager.defaultEnviorment].mockApiUrl, - ); - apiPage.RunAPI(); - dataSources.AddSuggestedWidget(Widgets.Table); - debuggerHelper.AssertErrorCount(0); - table.WaitUntilTableLoad(0, 0, "v2"); - propPane.AssertPropertiesDropDownCurrentValue("Table data", "Api1"); +describe( + "API Bugs", + { tags: ["@tag.Datasource", "@tag.Git", "@tag.AccessControl"] }, + function () { + it("1. Bug 14037, 25432: User gets an error even when table widget is added from the API page successfully", function () { + // Case where api returns array response + apiPage.CreateAndFillApi( + dataManager.dsValues[dataManager.defaultEnviorment].mockApiUrl, + ); + apiPage.RunAPI(); + dataSources.AddSuggestedWidget(Widgets.Table); + debuggerHelper.AssertErrorCount(0); + table.WaitUntilTableLoad(0, 0, "v2"); + propPane.AssertPropertiesDropDownCurrentValue("Table data", "Api1"); - // Create another API so that it returns object response - apiPage.CreateAndFillApi( - dataManager.dsValues[dataManager.defaultEnviorment].mockApiObjectUrl, - ); - apiPage.RunAPI(); - dataSources.AddSuggestedWidget(Widgets.Table); - table.WaitUntilTableLoad(0, 0, "v2"); - propPane.ValidatePropertyFieldValue("Table data", "{{Api2.data.users}}"); - }); + // Create another API so that it returns object response + apiPage.CreateAndFillApi( + dataManager.dsValues[dataManager.defaultEnviorment].mockApiObjectUrl, + ); + apiPage.RunAPI(); + dataSources.AddSuggestedWidget(Widgets.Table); + table.WaitUntilTableLoad(0, 0, "v2"); + propPane.ValidatePropertyFieldValue("Table data", "{{Api2.data.users}}"); + }); - it("2. Bug 16377, When Api url has dynamic binding expressions, ensure the url and path derived is not corrupting Api execution", function () { - //Since the specified expression always returns true - it will never run mock-apis - which actually doesn't exist - const apiUrl = `http://host.docker.internal:5001/v1/{{true ? 'mock-api' : 'mock-apis'}}?records=10`; + it("2. Bug 16377, When Api url has dynamic binding expressions, ensure the url and path derived is not corrupting Api execution", function () { + //Since the specified expression always returns true - it will never run mock-apis - which actually doesn't exist + const apiUrl = `http://host.docker.internal:5001/v1/{{true ? 'mock-api' : 'mock-apis'}}?records=10`; - apiPage.CreateAndFillApi(apiUrl, "BindingExpressions"); - agHelper.VerifyEvaluatedValue( - dataManager.dsValues[dataManager.defaultEnviorment].mockApiUrl, - ); - apiPage.RunAPI(); - agHelper.AssertElementAbsence( - locators._specificToast( - Cypress.env("MESSAGES").ERROR_ACTION_EXECUTE_FAIL("BindingExpressions"), - ), - ); //Assert that an error is not returned. - apiPage.ResponseStatusCheck("200 OK"); - agHelper.ActionContextMenuWithInPane({ - action: "Delete", - entityType: entityItems.Api, + apiPage.CreateAndFillApi(apiUrl, "BindingExpressions"); + agHelper.VerifyEvaluatedValue( + dataManager.dsValues[dataManager.defaultEnviorment].mockApiUrl, + ); + apiPage.RunAPI(); + agHelper.AssertElementAbsence( + locators._specificToast( + Cypress.env("MESSAGES").ERROR_ACTION_EXECUTE_FAIL( + "BindingExpressions", + ), + ), + ); //Assert that an error is not returned. + apiPage.ResponseStatusCheck("200 OK"); + agHelper.ActionContextMenuWithInPane({ + action: "Delete", + entityType: entityItems.Api, + }); + AppSidebar.navigate(AppSidebarButton.Editor); }); - AppSidebar.navigate(AppSidebarButton.Editor); - }); - it("3. Bug 18876 Ensures application does not crash when saving datasource", () => { - apiPage.CreateAndFillApi( - dataManager.dsValues[dataManager.defaultEnviorment].mockApiUrl, - "FirstAPI", - 10000, - "POST", - ); - apiPage.SelectPaneTab("Authentication"); - cy.get(apiPage._saveAsDS).last().click({ force: true }); - cy.go("back"); - cy.get(dataSources._datasourceModalSave).click(); - // ensures app does not crash and datasource is saved. - cy.contains("Edit datasource to access authentication settings").should( - "exist", - ); - }); + it("3. Bug 18876 Ensures application does not crash when saving datasource", () => { + apiPage.CreateAndFillApi( + dataManager.dsValues[dataManager.defaultEnviorment].mockApiUrl, + "FirstAPI", + 10000, + "POST", + ); + apiPage.SelectPaneTab("Authentication"); + cy.get(apiPage._saveAsDS).last().click({ force: true }); + cy.go("back"); + cy.get(dataSources._datasourceModalSave).click(); + // ensures app does not crash and datasource is saved. + cy.contains("Edit datasource to access authentication settings").should( + "exist", + ); + }); - it("4. Bug 16683, When Api url has dynamic binding expressions, ensures the query params is not truncated", function () { - const apiUrl = `http://host.docker.internal:5001/v1/mock-api?records=4{{Math.random() > 0.5 ? '¶m1=5' : '¶m2=6'}}`; + it("4. Bug 16683, When Api url has dynamic binding expressions, ensures the query params is not truncated", function () { + const apiUrl = `http://host.docker.internal:5001/v1/mock-api?records=4{{Math.random() > 0.5 ? '¶m1=5' : '¶m2=6'}}`; - apiPage.CreateAndFillApi(apiUrl, "BindingExpressions"); - apiPage.ValidateQueryParams({ - key: "records", - value: "4{{Math.random() > 0.5 ? '¶m1=5' : '¶m2=6'}}", + apiPage.CreateAndFillApi(apiUrl, "BindingExpressions"); + apiPage.ValidateQueryParams({ + key: "records", + value: "4{{Math.random() > 0.5 ? '¶m1=5' : '¶m2=6'}}", + }); }); - }); - it("5. Bug 26897, Invalid binding of table data when used existing suggested widgets for an action returning object & array", function () { - entityExplorer.DragDropWidgetNVerify(draggableWidgets.TABLE); + it("5. Bug 26897, Invalid binding of table data when used existing suggested widgets for an action returning object & array", function () { + entityExplorer.DragDropWidgetNVerify(draggableWidgets.TABLE); - // Case where api returns array response - apiPage.CreateAndFillApi( - dataManager.dsValues[dataManager.defaultEnviorment].mockApiUrl, - "ARRAY_RESPONSE", - ); - apiPage.RunAPI(); - dataSources.AddSuggestedWidget( - Widgets.Table, - dataSources._addSuggestedExisting, - ); - debuggerHelper.AssertErrorCount(0); - table.WaitUntilTableLoad(0, 0, "v2"); - propPane.AssertPropertiesDropDownCurrentValue( - "Table data", - "ARRAY_RESPONSE", - ); + // Case where api returns array response + apiPage.CreateAndFillApi( + dataManager.dsValues[dataManager.defaultEnviorment].mockApiUrl, + "ARRAY_RESPONSE", + ); + apiPage.RunAPI(); + dataSources.AddSuggestedWidget( + Widgets.Table, + dataSources._addSuggestedExisting, + ); + debuggerHelper.AssertErrorCount(0); + table.WaitUntilTableLoad(0, 0, "v2"); + propPane.AssertPropertiesDropDownCurrentValue( + "Table data", + "ARRAY_RESPONSE", + ); - // Create API so that it returns object response - apiPage.CreateAndFillApi( - dataManager.dsValues[dataManager.defaultEnviorment].mockApiObjectUrl, - "OBJECT_RESPONSE", - ); - apiPage.RunAPI(); - dataSources.AddSuggestedWidget( - Widgets.Table, - dataSources._addSuggestedExisting, - ); - table.WaitUntilTableLoad(0, 0, "v2"); - propPane.ValidatePropertyFieldValue( - "Table data", - "{{OBJECT_RESPONSE.data.users}}", - ); - }); -}); + // Create API so that it returns object response + apiPage.CreateAndFillApi( + dataManager.dsValues[dataManager.defaultEnviorment].mockApiObjectUrl, + "OBJECT_RESPONSE", + ); + apiPage.RunAPI(); + dataSources.AddSuggestedWidget( + Widgets.Table, + dataSources._addSuggestedExisting, + ); + table.WaitUntilTableLoad(0, 0, "v2"); + propPane.ValidatePropertyFieldValue( + "Table data", + "{{OBJECT_RESPONSE.data.users}}", + ); + }); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/BugTests/Binding_Bug28731_Spec.ts b/app/client/cypress/e2e/Regression/ClientSide/BugTests/Binding_Bug28731_Spec.ts index ed61181c8f5d..824cb29695fe 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/BugTests/Binding_Bug28731_Spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/BugTests/Binding_Bug28731_Spec.ts @@ -10,7 +10,7 @@ import { describe( "transformed one-click binding", - { tags: ["@tag.JS", "@tag.Binding"] }, + { tags: ["@tag.JS", "@tag.Binding", "@tag.Binding"] }, function () { it("Transforms API data to match widget exppected type ", function () { // Create anAPI that mreturns object response diff --git a/app/client/cypress/e2e/Regression/ClientSide/BugTests/Bug14987_spec.js b/app/client/cypress/e2e/Regression/ClientSide/BugTests/Bug14987_spec.js index 4d73e1c3f2c0..ace0a7d92fed 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/BugTests/Bug14987_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/BugTests/Bug14987_spec.js @@ -7,7 +7,14 @@ import { describe( "Verify setting tab form controls not to have tooltip and tooltip (underline) styles", - { tags: ["@tag.Datasource", "@tag.Settings"] }, + { + tags: [ + "@tag.Datasource", + "@tag.Settings", + "@tag.Git", + "@tag.AccessControl", + ], + }, function () { let guid, datasourceName; @@ -24,7 +31,7 @@ describe( cy.xpath(queryLocators.querySettingsTab).click(); cy.get(".label-icon-wrapper") - .contains("Run query on page load") + .contains("Run the query on page load") .parent() .then(($el) => { cy.window().then((win) => { @@ -38,7 +45,7 @@ describe( }); cy.get(".label-icon-wrapper") - .contains("Request confirmation before running query") + .contains("Request confirmation before running this query") .parent() .then(($el) => { cy.window().then((win) => { diff --git a/app/client/cypress/e2e/Regression/ClientSide/BugTests/CatchBlock_Spec.ts b/app/client/cypress/e2e/Regression/ClientSide/BugTests/CatchBlock_Spec.ts index 2b912acca439..14e12af8c708 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/BugTests/CatchBlock_Spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/BugTests/CatchBlock_Spec.ts @@ -12,7 +12,7 @@ import EditorNavigation, { describe( "Bug #15372 Catch block was not triggering in Safari/firefox", - { tags: ["@tag.Datasource"] }, + { tags: ["@tag.Datasource", "@tag.Git", "@tag.AccessControl"] }, () => { it("1. Triggers the catch block when the API hits a 404", () => { apiPage.CreateAndFillApi( diff --git a/app/client/cypress/e2e/Regression/ClientSide/BugTests/DSDiscardBugs_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/BugTests/DSDiscardBugs_spec.ts index c8142f9bf7ad..fa47f87c3aa1 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/BugTests/DSDiscardBugs_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/BugTests/DSDiscardBugs_spec.ts @@ -9,7 +9,7 @@ const testString = "test"; describe( "datasource unsaved changes popup shows even without changes", - { tags: ["@tag.Datasource"] }, + { tags: ["@tag.Datasource", "@tag.Git", "@tag.AccessControl"] }, function () { // In case of postgres and other plugins, host address and port key values are initialized by default making form dirty it("1. Bug 18664: Create postgres datasource, save it and edit it and go back, now unsaved changes popup should not be shown", () => { diff --git a/app/client/cypress/e2e/Regression/ClientSide/BugTests/DS_Bug18035_Spec.ts b/app/client/cypress/e2e/Regression/ClientSide/BugTests/DS_Bug18035_Spec.ts index 70ee2c897897..b1f8170cfb72 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/BugTests/DS_Bug18035_Spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/BugTests/DS_Bug18035_Spec.ts @@ -9,7 +9,14 @@ const dataSources = ObjectsRegistry.DataSources, describe( "Bug 18035: Updates save button text on datasource discard popup", - { tags: ["@tag.Datasource", "@tag.excludeForAirgap"] }, + { + tags: [ + "@tag.Datasource", + "@tag.excludeForAirgap", + "@tag.Git", + "@tag.AccessControl", + ], + }, function () { it("1. Create gsheet datasource, click on back button, discard popup should contain save and authorize", function () { dataSources.NavigateToDSCreateNew(); diff --git a/app/client/cypress/e2e/Regression/ClientSide/BugTests/DS_Bug19893_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/BugTests/DS_Bug19893_spec.ts index e309a25afc01..a82491e9c6c3 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/BugTests/DS_Bug19893_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/BugTests/DS_Bug19893_spec.ts @@ -4,7 +4,7 @@ let dsName: any; describe( "Bug 19893: Authenticated API DS in case of OAuth2, should have save and authorise button enabled all the times", - { tags: ["@tag.Datasource"] }, + { tags: ["@tag.Datasource", "@tag.Git", "@tag.AccessControl"] }, function () { it("1. Create Auth API DS, save i, now edit again and check the save and authorise button state", function () { _.dataSources.NavigateToDSCreateNew(); diff --git a/app/client/cypress/e2e/Regression/ClientSide/BugTests/DS_Bug21734_Spec.ts b/app/client/cypress/e2e/Regression/ClientSide/BugTests/DS_Bug21734_Spec.ts index 3ec5cd9906c8..d798a36bc318 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/BugTests/DS_Bug21734_Spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/BugTests/DS_Bug21734_Spec.ts @@ -11,7 +11,7 @@ const dataSources = ObjectsRegistry.DataSources, describe( "Bug 21734: On exiting from the Datasources page without saving changes, an error is thrown and the app becomes unresponsive.", - { tags: ["@tag.Datasource"] }, + { tags: ["@tag.Datasource", "@tag.Git", "@tag.AccessControl"] }, function () { it("1. Navigating from intermediary datasource to new page", function () { dataSources.NavigateToDSCreateNew(); diff --git a/app/client/cypress/e2e/Regression/ClientSide/BugTests/DS_Bug25148_Spec.ts b/app/client/cypress/e2e/Regression/ClientSide/BugTests/DS_Bug25148_Spec.ts index 96c6aaf84c61..6002c827a39d 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/BugTests/DS_Bug25148_Spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/BugTests/DS_Bug25148_Spec.ts @@ -5,7 +5,7 @@ let dsName: any; describe( "Bug 25148 - Edit Datasource button was disabled on Authentication tab of Api action", - { tags: ["@tag.Datasource"] }, + { tags: ["@tag.Datasource", "@tag.Git", "@tag.AccessControl"] }, () => { it("1. Checking if the Edit datasource button is enabled or not", () => { dataSources.NavigateToDSCreateNew(); diff --git a/app/client/cypress/e2e/Regression/ClientSide/BugTests/DS_Bug25982_Spec.ts b/app/client/cypress/e2e/Regression/ClientSide/BugTests/DS_Bug25982_Spec.ts index a2607fb6a0dc..07e2107300b1 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/BugTests/DS_Bug25982_Spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/BugTests/DS_Bug25982_Spec.ts @@ -3,28 +3,32 @@ import EditorNavigation, { EntityType, } from "../../../../support/Pages/EditorNavigation"; -describe("Fix UQI query switching", { tags: ["@tag.Datasource"] }, function () { - it("1. The command of the query must be preserved and should not default to initial value after changed.", function () { - dataSources.NavigateToDSCreateNew(); - dataSources.CreateDataSource("Mongo", false, false); - dataSources.CreateQueryAfterDSSaved("", "MongoQuery"); - dataSources.ValidateNSelectDropdown( - "Command", - "Find document(s)", - "Insert document(s)", - ); - dataSources.NavigateToDSCreateNew(); - dataSources.CreateDataSource("S3", false, false); - dataSources.CreateQueryAfterDSSaved("", "S3Query"); - dataSources.ValidateNSelectDropdown( - "Command", - "List files in bucket", - "Create a new file", - ); - EditorNavigation.SelectEntityByName("MongoQuery", EntityType.Query); - dataSources.ValidateNSelectDropdown("Command", "Insert document(s)"); +describe( + "Fix UQI query switching", + { tags: ["@tag.Datasource", "@tag.Git", "@tag.AccessControl"] }, + function () { + it("1. The command of the query must be preserved and should not default to initial value after changed.", function () { + dataSources.NavigateToDSCreateNew(); + dataSources.CreateDataSource("Mongo", false, false); + dataSources.CreateQueryAfterDSSaved("", "MongoQuery"); + dataSources.ValidateNSelectDropdown( + "Command", + "Find document(s)", + "Insert document(s)", + ); + dataSources.NavigateToDSCreateNew(); + dataSources.CreateDataSource("S3", false, false); + dataSources.CreateQueryAfterDSSaved("", "S3Query"); + dataSources.ValidateNSelectDropdown( + "Command", + "List files in bucket", + "Create a new file", + ); + EditorNavigation.SelectEntityByName("MongoQuery", EntityType.Query); + dataSources.ValidateNSelectDropdown("Command", "Insert document(s)"); - EditorNavigation.SelectEntityByName("S3Query", EntityType.Query); - dataSources.ValidateNSelectDropdown("Command", "Create a new file"); - }); -}); + EditorNavigation.SelectEntityByName("S3Query", EntityType.Query); + dataSources.ValidateNSelectDropdown("Command", "Create a new file"); + }); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/BugTests/DS_Bug26126_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/BugTests/DS_Bug26126_spec.ts index 0d87bb6561a0..6945c429b86f 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/BugTests/DS_Bug26126_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/BugTests/DS_Bug26126_spec.ts @@ -5,7 +5,7 @@ import { describe( "Bug 26126: Fix DS button disability", - { tags: ["@tag.Datasource"] }, + { tags: ["@tag.Datasource", "@tag.Git", "@tag.AccessControl"] }, function () { it("ensures save button is correctly updated when DS required fields change", function () { dataSources.NavigateToDSCreateNew(); diff --git a/app/client/cypress/e2e/Regression/ClientSide/BugTests/DS_Bug26716_Spec.ts b/app/client/cypress/e2e/Regression/ClientSide/BugTests/DS_Bug26716_Spec.ts index daefc982b73c..0c4e9bea2992 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/BugTests/DS_Bug26716_Spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/BugTests/DS_Bug26716_Spec.ts @@ -10,7 +10,14 @@ let dsName: any, userMock: string, movieMock: string; describe( "Bug 26716: Datasource selected from entity explorer should be correctly highlighted", - { tags: ["@tag.Datasource", "@tag.excludeForAirgap"] }, + { + tags: [ + "@tag.Datasource", + "@tag.excludeForAirgap", + "@tag.Git", + "@tag.AccessControl", + ], + }, function () { it("1. Create users and movies mock datasources and switch between them through entity explorer, check the active state", function () { dataSources.CreateMockDB("Users").then((mockDBName) => { diff --git a/app/client/cypress/e2e/Regression/ClientSide/BugTests/DS_Bug26941_Spec.ts b/app/client/cypress/e2e/Regression/ClientSide/BugTests/DS_Bug26941_Spec.ts index 1293b4c16f02..3dcc34f07880 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/BugTests/DS_Bug26941_Spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/BugTests/DS_Bug26941_Spec.ts @@ -7,7 +7,7 @@ import { describe( "Inconsistent Api error after the invalid chars are removed from header key", - { tags: ["@tag.Datasource"] }, + { tags: ["@tag.Datasource", "@tag.Git", "@tag.AccessControl"] }, function () { it("1. Checking whether the appropriate error is displayed even after the removal of invalid chars in header key.", function () { const randomApi = `${ diff --git a/app/client/cypress/e2e/Regression/ClientSide/BugTests/DS_Bug27817_Spec.ts b/app/client/cypress/e2e/Regression/ClientSide/BugTests/DS_Bug27817_Spec.ts index 9ea04dc143ab..a72076e663af 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/BugTests/DS_Bug27817_Spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/BugTests/DS_Bug27817_Spec.ts @@ -7,7 +7,7 @@ import { featureFlagIntercept } from "../../../../support/Objects/FeatureFlags"; describe( "Datasource structure schema preview data", - { tags: ["@tag.Datasource"] }, + { tags: ["@tag.Datasource", "@tag.Git", "@tag.AccessControl"] }, () => { before(() => { dataSources.CreateDataSource("Postgres"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/BugTests/DS_Bug28750_Spec.ts b/app/client/cypress/e2e/Regression/ClientSide/BugTests/DS_Bug28750_Spec.ts index 18b2f9b146c6..faccd0776546 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/BugTests/DS_Bug28750_Spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/BugTests/DS_Bug28750_Spec.ts @@ -3,7 +3,14 @@ import { featureFlagIntercept } from "../../../../support/Objects/FeatureFlags"; describe( "Datasource structure schema preview data", - { tags: ["@tag.Datasource", "@tag.excludeForAirgap"] }, + { + tags: [ + "@tag.Datasource", + "@tag.excludeForAirgap", + "@tag.Git", + "@tag.AccessControl", + ], + }, () => { before(() => { dataSources.CreateMockDB("Users"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/BugTests/DS_Bug28985_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/BugTests/DS_Bug28985_spec.ts index e5f2c97cacf0..e5f126865a33 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/BugTests/DS_Bug28985_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/BugTests/DS_Bug28985_spec.ts @@ -7,7 +7,7 @@ import EditorNavigation, { describe( "Api execution results test cases", - { tags: ["@tag.Datasource"] }, + { tags: ["@tag.Datasource", "@tag.Git", "@tag.AccessControl"] }, () => { it("1. Check to see if API execution results are preserved after it is renamed", () => { const { diff --git a/app/client/cypress/e2e/Regression/ClientSide/BugTests/DS_Bugs26410_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/BugTests/DS_Bugs26410_spec.ts index a9bea83f71d6..32dc87074a7e 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/BugTests/DS_Bugs26410_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/BugTests/DS_Bugs26410_spec.ts @@ -5,7 +5,14 @@ import EditorNavigation, { describe( "Fix UQI query switching", - { tags: ["@tag.Datasource", "@tag.excludeForAirgap"] }, + { + tags: [ + "@tag.Datasource", + "@tag.excludeForAirgap", + "@tag.Git", + "@tag.AccessControl", + ], + }, function () { it("1. The command of the Mongo query must be preserved and should not default to initial value after changed.", function () { dataSources.NavigateToDSCreateNew(); diff --git a/app/client/cypress/e2e/Regression/ClientSide/BugTests/DatasourceSchema_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/BugTests/DatasourceSchema_spec.ts index d0a02c28e0bb..9608ee564cbd 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/BugTests/DatasourceSchema_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/BugTests/DatasourceSchema_spec.ts @@ -15,7 +15,7 @@ let guid; let dataSourceName: string; describe( "Datasource form related tests", - { tags: ["@tag.Datasource"] }, + { tags: ["@tag.Datasource", "@tag.Git", "@tag.AccessControl"] }, function () { before(() => { homePage.CreateNewWorkspace("FetchSchemaOnce", true); diff --git a/app/client/cypress/e2e/Regression/ClientSide/BugTests/GitBugs_Spec.ts b/app/client/cypress/e2e/Regression/ClientSide/BugTests/GitBugs_Spec.ts index f7bc432e1cf3..722cbe524d38 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/BugTests/GitBugs_Spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/BugTests/GitBugs_Spec.ts @@ -13,158 +13,173 @@ let tempBranch1: any; let tempBranch2: any; let tempBranch3: any; -describe("Git Bugs", { tags: ["@tag.Git"] }, function () { - before(() => { - _.agHelper.GenerateUUID(); - cy.get("@guid").then((uid) => { - _.homePage.CreateNewWorkspace("GitBugs" + uid, true); - _.homePage.CreateAppInWorkspace("GitBugs" + uid); +describe( + "Git Bugs", + { + tags: [ + "@tag.Git", + "@tag.AccessControl", + "@tag.Workflows", + "@tag.Module", + "@tag.Theme", + "@tag.JS", + "@tag.Container", + "@tag.ImportExport", + ], + }, + function () { + before(() => { + _.agHelper.GenerateUUID(); + cy.get("@guid").then((uid) => { + _.homePage.CreateNewWorkspace("GitBugs" + uid, true); + _.homePage.CreateAppInWorkspace("GitBugs" + uid); + }); }); - }); - it("1. Bug 16248, When GitSync modal is open, block shortcut action execution", function () { - const modifierKey = Cypress.platform === "darwin" ? "meta" : "ctrl"; - _.apiPage.CreateAndFillApi( - _.dataManager.dsValues[_.dataManager.defaultEnviorment].mockApiUrl, - "GitSyncTest", - ); - _.gitSync.OpenGitSyncModal(); - cy.get("body").type(`{${modifierKey}}{enter}`); - cy.get("@postExecute").should("not.exist"); - _.gitSync.CloseGitSyncModal(); - cy.get("body").type(`{${modifierKey}}{enter}`); - _.assertHelper.AssertNetworkStatus("@postExecute"); - }); + it("1. Bug 16248, When GitSync modal is open, block shortcut action execution", function () { + const modifierKey = Cypress.platform === "darwin" ? "meta" : "ctrl"; + _.apiPage.CreateAndFillApi( + _.dataManager.dsValues[_.dataManager.defaultEnviorment].mockApiUrl, + "GitSyncTest", + ); + _.gitSync.OpenGitSyncModal(); + cy.get("body").type(`{${modifierKey}}{enter}`); + cy.get("@postExecute").should("not.exist"); + _.gitSync.CloseGitSyncModal(); + cy.get("body").type(`{${modifierKey}}{enter}`); + _.assertHelper.AssertNetworkStatus("@postExecute"); + }); - it("2. Bug 18665 : Creates a new Git branch, Create datasource, discard it and check current branch", function () { - _.gitSync.CreateNConnectToGit(); - _.gitSync.CreateGitBranch(tempBranch, false); + it("2. Bug 18665 : Creates a new Git branch, Create datasource, discard it and check current branch", function () { + _.gitSync.CreateNConnectToGit(); + _.gitSync.CreateGitBranch(tempBranch, false); - cy.get("@gitbranchName").then((branchName) => { - tempBranch = branchName; - _.dataSources.NavigateToDSCreateNew(); - _.dataSources.CreatePlugIn("PostgreSQL"); - _.dataSources.FillPostgresDSForm(); - _.dataSources.SaveDSFromDialog(false); - _.agHelper.AssertElementVisibility(_.gitSync._branchButton); - cy.get("@gitRepoName").then((repName) => { - repoName = repName; + cy.get("@gitbranchName").then((branchName) => { + tempBranch = branchName; + _.dataSources.NavigateToDSCreateNew(); + _.dataSources.CreatePlugIn("PostgreSQL"); + _.dataSources.FillPostgresDSForm(); + _.dataSources.SaveDSFromDialog(false); + _.agHelper.AssertElementVisibility(_.gitSync._branchButton); + cy.get("@gitRepoName").then((repName) => { + repoName = repName; + }); }); }); - }); - - it("3. Bug 18376: navigateTo fails to set queryParams if the app is connected to Git", () => { - PageList.AddNewPage(); - _.entityExplorer.DragDropWidgetNVerify(_.draggableWidgets.TEXT); - EditorNavigation.SelectEntityByName("Page1", EntityType.Page); - _.entityExplorer.DragDropWidgetNVerify(_.draggableWidgets.BUTTON); - _.propPane.EnterJSContext( - "onClick", - "{{navigateTo('Page2', {testQP: 'Yes'}, 'SAME_WINDOW')}}", - true, - true, - ); - _.propPane.ToggleJSMode("onClick", false); - _.agHelper.Sleep(500); - EditorNavigation.SelectEntityByName("Page2", EntityType.Page); - EditorNavigation.SelectEntityByName("Text1", EntityType.Widget); - _.propPane.UpdatePropertyFieldValue( - "Text", - "{{appsmith.URL.queryParams.testQP}}", - ); - EditorNavigation.SelectEntityByName("Page1", EntityType.Page); - _.agHelper.ClickButton("Submit"); - _.agHelper.Sleep(500); - _.agHelper - .GetText(_.locators._textWidget) - .then(($qp) => expect($qp).to.eq("Yes")); - _.agHelper.AssertURL("branch=" + tempBranch); //Validate we are still in Git branch - _.agHelper.AssertURL("testQP=Yes"); //Validate we also ve the Query Params from Page1 - }); - it("4. Bug 24946 : Discard message is missing when only navigation settings are changed", function () { - _.gitSync.SwitchGitBranch("master"); - _.gitSync.CreateGitBranch(`b24946`, true); - cy.get("@gitbranchName").then((branchName) => { - statusBranch = branchName; - AppSidebar.navigate(AppSidebarButton.Settings); - _.agHelper.GetNClick(_.locators._appNavigationSettings); - _.agHelper.GetNClick(_.locators._appNavigationSettingsShowTitle); - AppSidebar.navigate(AppSidebarButton.Editor); - _.agHelper.GetNClick(_.locators._publishButton); - _.agHelper.WaitUntilEleAppear(_.gitSync._gitStatusChanges); - _.agHelper.GetNClick(_.gitSync._discardChanges); - _.agHelper.WaitUntilEleAppear(_.gitSync._discardCallout); - _.agHelper.AssertContains( - Cypress.env("MESSAGES").DISCARD_CHANGES_WARNING(), - "exist", - _.gitSync._discardCallout, + it("3. Bug 18376: navigateTo fails to set queryParams if the app is connected to Git", () => { + PageList.AddNewPage(); + _.entityExplorer.DragDropWidgetNVerify(_.draggableWidgets.TEXT); + EditorNavigation.SelectEntityByName("Page1", EntityType.Page); + _.entityExplorer.DragDropWidgetNVerify(_.draggableWidgets.BUTTON); + _.propPane.EnterJSContext( + "onClick", + "{{navigateTo('Page2', {testQP: 'Yes'}, 'SAME_WINDOW')}}", + true, + true, ); - _.agHelper.AssertContains( - Cypress.env("MESSAGES").DISCARD_MESSAGE(), - "exist", - _.gitSync._discardCallout, + _.propPane.ToggleJSMode("onClick", false); + _.agHelper.Sleep(500); + EditorNavigation.SelectEntityByName("Page2", EntityType.Page); + EditorNavigation.SelectEntityByName("Text1", EntityType.Widget); + _.propPane.UpdatePropertyFieldValue( + "Text", + "{{appsmith.URL.queryParams.testQP}}", ); - _.agHelper.GetNClick(_.locators._dialogCloseButton); + EditorNavigation.SelectEntityByName("Page1", EntityType.Page); + _.agHelper.ClickButton("Submit"); + _.agHelper.Sleep(500); + _.agHelper + .GetText(_.locators._textWidget) + .then(($qp) => expect($qp).to.eq("Yes")); + _.agHelper.AssertURL("branch=" + tempBranch); //Validate we are still in Git branch + _.agHelper.AssertURL("testQP=Yes"); //Validate we also ve the Query Params from Page1 + }); + + it("4. Bug 24946 : Discard message is missing when only navigation settings are changed", function () { + _.gitSync.SwitchGitBranch("master"); + _.gitSync.CreateGitBranch(`b24946`, true); + cy.get("@gitbranchName").then((branchName) => { + statusBranch = branchName; + AppSidebar.navigate(AppSidebarButton.Settings); + _.agHelper.GetNClick(_.locators._appNavigationSettings); + _.agHelper.GetNClick(_.locators._appNavigationSettingsShowTitle); + AppSidebar.navigate(AppSidebarButton.Editor); + _.agHelper.GetNClick(_.locators._publishButton); + _.agHelper.WaitUntilEleAppear(_.gitSync._gitStatusChanges); + _.agHelper.GetNClick(_.gitSync._discardChanges); + _.agHelper.WaitUntilEleAppear(_.gitSync._discardCallout); + _.agHelper.AssertContains( + Cypress.env("MESSAGES").DISCARD_CHANGES_WARNING(), + "exist", + _.gitSync._discardCallout, + ); + _.agHelper.AssertContains( + Cypress.env("MESSAGES").DISCARD_MESSAGE(), + "exist", + _.gitSync._discardCallout, + ); + _.agHelper.GetNClick(_.locators._dialogCloseButton); + }); }); - }); - it("5. Bug 24486 : Loading state for remote branches", function () { - _.gitSync.CreateRemoteBranch(repoName, "test-24486"); - _.gitSync.SwitchGitBranch("origin/test-24486", false, true); - }); + it("5. Bug 24486 : Loading state for remote branches", function () { + _.gitSync.CreateRemoteBranch(repoName, "test-24486"); + _.gitSync.SwitchGitBranch("origin/test-24486", false, true); + }); - it("6. Bug 24920: Not able to discard app settings changes for the first time in git connected app ", function () { - _.gitSync.SwitchGitBranch("master", false, true); - // add navigation settings changes - AppSidebar.navigate(AppSidebarButton.Settings); - _.agHelper.GetNClick(_.appSettings.locators._navigationSettingsTab); - _.agHelper.GetNClick( - _.appSettings.locators._navigationSettings._orientationOptions._side, - ); - _.agHelper.AssertElementExist(_.appSettings.locators._sideNavbar); - // discard changes and verify - _.gitSync.DiscardChanges(); - _.gitSync.VerifyChangeLog(false); - }); + it("6. Bug 24920: Not able to discard app settings changes for the first time in git connected app ", function () { + _.gitSync.SwitchGitBranch("master", false, true); + // add navigation settings changes + AppSidebar.navigate(AppSidebarButton.Settings); + _.agHelper.GetNClick(_.appSettings.locators._navigationSettingsTab); + _.agHelper.GetNClick( + _.appSettings.locators._navigationSettings._orientationOptions._side, + ); + _.agHelper.AssertElementExist(_.appSettings.locators._sideNavbar); + // discard changes and verify + _.gitSync.DiscardChanges(); + _.gitSync.VerifyChangeLog(false); + }); - it("7. Bug 23858 : Branch list in git sync modal is not scrollable", function () { - // create git branches - _.gitSync.CreateGitBranch(tempBranch1, true); - _.gitSync.CreateGitBranch(tempBranch2, true); - _.gitSync.CreateGitBranch(tempBranch3, true); - _.agHelper.AssertElementExist(_.gitSync._bottomBarPull); - _.agHelper.GetNClick(_.gitSync._bottomBarMergeButton); - _.agHelper.AssertElementEnabledDisabled( - _.gitSync._mergeBranchDropdownDestination, - 0, - false, - ); - _.agHelper.Sleep(6000); // adding wait for branch list to load - _.agHelper.GetNClick(_.gitSync._mergeBranchDropdownDestination); - // to verify scroll works and clicks on last branch in list - _.agHelper.GetNClick(_.gitSync._dropdownmenu, 5); - _.gitSync.CloseGitSyncModal(); - }); + it("7. Bug 23858 : Branch list in git sync modal is not scrollable", function () { + // create git branches + _.gitSync.CreateGitBranch(tempBranch1, true); + _.gitSync.CreateGitBranch(tempBranch2, true); + _.gitSync.CreateGitBranch(tempBranch3, true); + _.agHelper.AssertElementExist(_.gitSync._bottomBarPull); + _.agHelper.GetNClick(_.gitSync._bottomBarMergeButton); + _.agHelper.AssertElementEnabledDisabled( + _.gitSync._mergeBranchDropdownDestination, + 0, + false, + ); + _.agHelper.Sleep(6000); // adding wait for branch list to load + _.agHelper.GetNClick(_.gitSync._mergeBranchDropdownDestination); + // to verify scroll works and clicks on last branch in list + _.agHelper.GetNClick(_.gitSync._dropdownmenu, 5); + _.gitSync.CloseGitSyncModal(); + }); - it("8. Bug 24206 : Open repository button is not functional in git sync modal", function () { - _.gitSync.SwitchGitBranch("master"); - _.appSettings.OpenPaneAndChangeTheme("Moon"); - _.gitSync.CommitAndPush(); - _.gitSync.SwitchGitBranch(tempBranch); - _.appSettings.OpenPaneAndChangeTheme("Pampas"); - _.gitSync.CommitAndPush(); - _.gitSync.CheckMergeConflicts("master"); - cy.window().then((win) => { - cy.stub(win, "open", (url) => { - win.location.href = "http://host.docker.internal/"; - }).as("repoURL"); + it("8. Bug 24206 : Open repository button is not functional in git sync modal", function () { + _.gitSync.SwitchGitBranch("master"); + _.appSettings.OpenPaneAndChangeTheme("Moon"); + _.gitSync.CommitAndPush(); + _.gitSync.SwitchGitBranch(tempBranch); + _.appSettings.OpenPaneAndChangeTheme("Pampas"); + _.gitSync.CommitAndPush(); + _.gitSync.CheckMergeConflicts("master"); + cy.window().then((win) => { + cy.stub(win, "open", (url) => { + win.location.href = "http://host.docker.internal/"; + }).as("repoURL"); + }); + _.gitSync.OpenRepositoryAndVerify(); + cy.get("@repoURL").should("be.called"); }); - _.gitSync.OpenRepositoryAndVerify(); - cy.get("@repoURL").should("be.called"); - }); - after(() => { - _.gitSync.DeleteTestGithubRepo(repoName); - }); -}); + after(() => { + _.gitSync.DeleteTestGithubRepo(repoName); + }); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/BugTests/GraphQL_Binding_Bug16702_Spec.ts b/app/client/cypress/e2e/Regression/ClientSide/BugTests/GraphQL_Binding_Bug16702_Spec.ts index 4fc0e617f10e..60b440114b7a 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/BugTests/GraphQL_Binding_Bug16702_Spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/BugTests/GraphQL_Binding_Bug16702_Spec.ts @@ -18,7 +18,9 @@ const GRAPHQL_RESPONSE = { describe( "Binding Expressions should not be truncated in Url and path extraction", - { tags: ["@tag.Datasource", "@tag.Binding"] }, + { + tags: ["@tag.Datasource", "@tag.Binding", "@tag.Git", "@tag.AccessControl"], + }, function () { it("Bug 16702, Moustache+Quotes formatting goes wrong in graphql body resulting in autocomplete failure", function () { const jsObjectBody = `export default { diff --git a/app/client/cypress/e2e/Regression/ClientSide/BugTests/InvalidURL_Spec.ts b/app/client/cypress/e2e/Regression/ClientSide/BugTests/InvalidURL_Spec.ts index eb68c3904507..61f94ea3b776 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/BugTests/InvalidURL_Spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/BugTests/InvalidURL_Spec.ts @@ -3,7 +3,7 @@ import { ObjectsRegistry } from "../../../../support/Objects/Registry"; const jsEditor = ObjectsRegistry.JSEditor, agHelper = ObjectsRegistry.AggregateHelper; -describe("Invalid page routing", { tags: ["@tag.JS"] }, () => { +describe("Invalid page routing", { tags: ["@tag.JS", "@tag.Binding"] }, () => { it("1. Bug #16047 - Shows Invalid URL UI for invalid JS Object page url", () => { const JS_OBJECT_BODY = `export default { myVar1: [], diff --git a/app/client/cypress/e2e/Regression/ClientSide/BugTests/JSParse_Spec.ts b/app/client/cypress/e2e/Regression/ClientSide/BugTests/JSParse_Spec.ts index 674e9b33457e..728d4410e3d9 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/BugTests/JSParse_Spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/BugTests/JSParse_Spec.ts @@ -29,7 +29,7 @@ const assertLintErrorAndOutput = ( describe( "Bug #15283 - Correctly parses JS Function", - { tags: ["@tag.JS"] }, + { tags: ["@tag.JS", "@tag.Binding"] }, () => { before(() => { ee.DragDropWidgetNVerify("singleselecttreewidget", 300, 500); diff --git a/app/client/cypress/e2e/Regression/ClientSide/BugTests/JS_Bug14002_Spec.ts b/app/client/cypress/e2e/Regression/ClientSide/BugTests/JS_Bug14002_Spec.ts index 58fb3672aa90..13b84feab23a 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/BugTests/JS_Bug14002_Spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/BugTests/JS_Bug14002_Spec.ts @@ -2,7 +2,7 @@ import * as _ from "../../../../support/Objects/ObjectsCore"; describe( "Invalid JSObject export statement", - { tags: ["@tag.JS"] }, + { tags: ["@tag.JS", "@tag.Binding"] }, function () { it("1. Shows error toast for invalid js object export statement", function () { const JSObjectWithInvalidExport = `{ diff --git a/app/client/cypress/e2e/Regression/ClientSide/BugTests/JS_Bug15056_Spec.ts b/app/client/cypress/e2e/Regression/ClientSide/BugTests/JS_Bug15056_Spec.ts index 8b2bd104cab2..85dfc41dff88 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/BugTests/JS_Bug15056_Spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/BugTests/JS_Bug15056_Spec.ts @@ -9,18 +9,21 @@ import EditorNavigation, { EntityType, } from "../../../../support/Pages/EditorNavigation"; -describe("JS data update on button click", { tags: ["@tag.JS"] }, function () { - before(() => { - agHelper.AddDsl("jsFunctionTriggerDsl"); - }); +describe( + "JS data update on button click", + { tags: ["@tag.JS", "@tag.Binding"] }, + function () { + before(() => { + agHelper.AddDsl("jsFunctionTriggerDsl"); + }); - it("1. Populates js function data when triggered via button click", function () { - apiPage.CreateAndFillApi( - dataManager.dsValues[dataManager.defaultEnviorment].mockApiUrl, - "Api1", - ); + it("1. Populates js function data when triggered via button click", function () { + apiPage.CreateAndFillApi( + dataManager.dsValues[dataManager.defaultEnviorment].mockApiUrl, + "Api1", + ); - const jsObjectString = `export default { + const jsObjectString = `export default { myVar1: [], myVar2: {}, myFun1: async () => { @@ -35,15 +38,16 @@ describe("JS data update on button click", { tags: ["@tag.JS"] }, function () { } }`; - jsEditor.CreateJSObject(jsObjectString, { - paste: true, - completeReplace: true, - toRun: false, - shouldCreateNewJSObj: true, + jsEditor.CreateJSObject(jsObjectString, { + paste: true, + completeReplace: true, + toRun: false, + shouldCreateNewJSObj: true, + }); + EditorNavigation.SelectEntityByName("Button2", EntityType.Widget); + agHelper.ClickButton("Submit"); + agHelper.AssertContains("myFun1 Data", "exist"); + agHelper.AssertContains("myFun2 Data", "exist"); }); - EditorNavigation.SelectEntityByName("Button2", EntityType.Widget); - agHelper.ClickButton("Submit"); - agHelper.AssertContains("myFun1 Data", "exist"); - agHelper.AssertContains("myFun2 Data", "exist"); - }); -}); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/BugTests/JS_Bug15909_Spec.ts b/app/client/cypress/e2e/Regression/ClientSide/BugTests/JS_Bug15909_Spec.ts index ba4be8142893..257586a5d037 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/BugTests/JS_Bug15909_Spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/BugTests/JS_Bug15909_Spec.ts @@ -3,13 +3,20 @@ import EditorNavigation, { EntityType, } from "../../../../support/Pages/EditorNavigation"; -describe("JS Function Execution", { tags: ["@tag.JS"] }, function () { - before(() => { - _.entityExplorer.DragDropWidgetNVerify(_.draggableWidgets.BUTTON, 200, 200); - }); - it("1. Shows js function data as part of autocompletion hints", function () { - _.jsEditor.CreateJSObject( - `export default { +describe( + "JS Function Execution", + { tags: ["@tag.JS", "@tag.Binding"] }, + function () { + before(() => { + _.entityExplorer.DragDropWidgetNVerify( + _.draggableWidgets.BUTTON, + 200, + 200, + ); + }); + it("1. Shows js function data as part of autocompletion hints", function () { + _.jsEditor.CreateJSObject( + `export default { myFun1: ()=>{ return "yes" }, @@ -17,17 +24,18 @@ describe("JS Function Execution", { tags: ["@tag.JS"] }, function () { return [{name: "test"}] } }`, - { - paste: true, - completeReplace: true, - toRun: false, - shouldCreateNewJSObj: true, - prettify: false, - }, - ); - EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); - _.propPane.EnterJSContext("onClick", `{{JSObject1.`, true, false); - _.agHelper.AssertContains("myFun1.data"); - _.agHelper.AssertContains("myFun2.data"); - }); -}); + { + paste: true, + completeReplace: true, + toRun: false, + shouldCreateNewJSObj: true, + prettify: false, + }, + ); + EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); + _.propPane.EnterJSContext("onClick", `{{JSObject1.`, true, false); + _.agHelper.AssertContains("myFun1.data"); + _.agHelper.AssertContains("myFun2.data"); + }); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/BugTests/JS_Bug18369_Spec.ts b/app/client/cypress/e2e/Regression/ClientSide/BugTests/JS_Bug18369_Spec.ts index f09e1c097a02..4ec8686dbc11 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/BugTests/JS_Bug18369_Spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/BugTests/JS_Bug18369_Spec.ts @@ -6,14 +6,18 @@ import EditorNavigation, { const locator = ObjectsRegistry.CommonLocators, agHelper = ObjectsRegistry.AggregateHelper; -describe("JS Function Execution", { tags: ["@tag.JS"] }, function () { - before(() => { - agHelper.AddDsl("formWithtabdsl"); - }); +describe( + "JS Function Execution", + { tags: ["@tag.JS", "@tag.Binding"] }, + function () { + before(() => { + agHelper.AddDsl("formWithtabdsl"); + }); - it("1. Doesn't show lint errors for 'form.hasChanges' for form in inactive tab", () => { - EditorNavigation.SelectEntityByName("Text2", EntityType.Widget); - agHelper.Sleep(4000); - agHelper.AssertElementAbsence(locator._lintErrorElement); - }); -}); + it("1. Doesn't show lint errors for 'form.hasChanges' for form in inactive tab", () => { + EditorNavigation.SelectEntityByName("Text2", EntityType.Widget); + agHelper.Sleep(4000); + agHelper.AssertElementAbsence(locator._lintErrorElement); + }); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/BugTests/JS_Bug19982_Spec.ts b/app/client/cypress/e2e/Regression/ClientSide/BugTests/JS_Bug19982_Spec.ts index a63330f66859..61e43c409208 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/BugTests/JS_Bug19982_Spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/BugTests/JS_Bug19982_Spec.ts @@ -5,7 +5,7 @@ const jsEditor = ObjectsRegistry.JSEditor, describe( "JS Execution of Higher-order-functions", - { tags: ["@tag.JS"] }, + { tags: ["@tag.JS", "@tag.Binding"] }, function () { it("1. Completes execution properly", function () { const JSObjectWithHigherOrderFunction = `export default{ diff --git a/app/client/cypress/e2e/Regression/ClientSide/BugTests/JS_Bug20841_Spec.ts b/app/client/cypress/e2e/Regression/ClientSide/BugTests/JS_Bug20841_Spec.ts index 105ea013df46..ee72668e4382 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/BugTests/JS_Bug20841_Spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/BugTests/JS_Bug20841_Spec.ts @@ -6,7 +6,7 @@ import PageList from "../../../../support/Pages/PageList"; describe( "Evaluations causing error when page is cloned", - { tags: ["@tag.JS"] }, + { tags: ["@tag.JS", "@tag.Binding"] }, function () { it("1. Bug: 20841: JSObjects | Sync methods | Not run consistently when Page is cloned", function () { const JS_OBJECT_BODY = `export default{ diff --git a/app/client/cypress/e2e/Regression/ClientSide/BugTests/JS_Bug24194_Spec.ts b/app/client/cypress/e2e/Regression/ClientSide/BugTests/JS_Bug24194_Spec.ts index 5c9be26ffae6..d09b978db3d2 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/BugTests/JS_Bug24194_Spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/BugTests/JS_Bug24194_Spec.ts @@ -9,12 +9,15 @@ import EditorNavigation, { EntityType, } from "../../../../support/Pages/EditorNavigation"; -describe("Responsiveness of linting", { tags: ["@tag.JS"] }, () => { - before(() => { - entityExplorer.DragDropWidgetNVerify("buttonwidget", 300, 300); - }); - it("Should update linting when entity is added/renamed", () => { - const JS_OBJECT = `export default { +describe( + "Responsiveness of linting", + { tags: ["@tag.JS", "@tag.Binding"] }, + () => { + before(() => { + entityExplorer.DragDropWidgetNVerify("buttonwidget", 300, 300); + }); + it("Should update linting when entity is added/renamed", () => { + const JS_OBJECT = `export default { myFun1: () => { return ""; }, @@ -22,21 +25,22 @@ describe("Responsiveness of linting", { tags: ["@tag.JS"] }, () => { return "" } }`; - propPane.UpdatePropertyFieldValue("Tooltip", "{{JSObject1.myFun1}}"); - agHelper.AssertElementExist(locators._lintErrorElement); - jsEditor.CreateJSObject(JS_OBJECT, { - paste: true, - completeReplace: true, - toRun: false, - shouldCreateNewJSObj: true, - }); + propPane.UpdatePropertyFieldValue("Tooltip", "{{JSObject1.myFun1}}"); + agHelper.AssertElementExist(locators._lintErrorElement); + jsEditor.CreateJSObject(JS_OBJECT, { + paste: true, + completeReplace: true, + toRun: false, + shouldCreateNewJSObj: true, + }); - EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); - agHelper.AssertElementAbsence(locators._lintErrorElement); - agHelper.RefreshPage(); - EditorNavigation.SelectEntityByName("JSObject1", EntityType.JSObject); - jsEditor.RenameJSObjFromPane("JSObject2"); - EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); - agHelper.AssertElementAbsence(locators._lintErrorElement); - }); -}); + EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); + agHelper.AssertElementAbsence(locators._lintErrorElement); + agHelper.RefreshPage(); + EditorNavigation.SelectEntityByName("JSObject1", EntityType.JSObject); + jsEditor.RenameJSObjFromPane("JSObject2"); + EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); + agHelper.AssertElementAbsence(locators._lintErrorElement); + }); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/BugTests/JS_Bug25894_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/BugTests/JS_Bug25894_spec.ts index c45dd898b845..4eb8874dd867 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/BugTests/JS_Bug25894_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/BugTests/JS_Bug25894_spec.ts @@ -10,7 +10,7 @@ import EditorNavigation, { describe( "Bug 25894 - Moustache brackets should be highlighted", - { tags: ["@tag.JS"] }, + { tags: ["@tag.JS", "@tag.Binding"] }, () => { it("1. should show {{ }} in bold", () => { entityExplorer.DragDropWidgetNVerify(draggableWidgets.BUTTON); diff --git a/app/client/cypress/e2e/Regression/ClientSide/BugTests/JS_Bug28764_Spec.ts b/app/client/cypress/e2e/Regression/ClientSide/BugTests/JS_Bug28764_Spec.ts index 3083962c588c..5885ba6da5a5 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/BugTests/JS_Bug28764_Spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/BugTests/JS_Bug28764_Spec.ts @@ -7,11 +7,14 @@ import EditorNavigation, { EntityType, } from "../../../../support/Pages/EditorNavigation"; -describe("JS Function Execution", { tags: ["@tag.JS"] }, function () { - it("Retains lint errors after navigation", function () { - // JS Object 1 - jsEditor.CreateJSObject( - `export default { +describe( + "JS Function Execution", + { tags: ["@tag.JS", "@tag.Binding"] }, + function () { + it("Retains lint errors after navigation", function () { + // JS Object 1 + jsEditor.CreateJSObject( + `export default { myVar1: [], myVar2: {}, myFun1 () { @@ -24,17 +27,17 @@ describe("JS Function Execution", { tags: ["@tag.JS"] }, function () { fff } }`, - { - paste: true, - completeReplace: true, - toRun: false, - shouldCreateNewJSObj: true, - prettify: false, - }, - ); - // JS Object 2 - jsEditor.CreateJSObject( - `export default { + { + paste: true, + completeReplace: true, + toRun: false, + shouldCreateNewJSObj: true, + prettify: false, + }, + ); + // JS Object 2 + jsEditor.CreateJSObject( + `export default { myVar1: [], myVar2: {}, myFun1 () { @@ -45,28 +48,29 @@ describe("JS Function Execution", { tags: ["@tag.JS"] }, function () { // use async-await or promises } }`, - { - paste: true, - completeReplace: true, - toRun: false, - shouldCreateNewJSObj: true, - prettify: false, - }, - ); + { + paste: true, + completeReplace: true, + toRun: false, + shouldCreateNewJSObj: true, + prettify: false, + }, + ); - EditorNavigation.SelectEntityByName("JSObject1", EntityType.JSObject); - // Assert lint error - agHelper.AssertElementLength(locators._lintErrorElement, 1); - agHelper.HoverElement(locators._lintErrorElement); - agHelper.AssertContains(`'fff' is not defined`); + EditorNavigation.SelectEntityByName("JSObject1", EntityType.JSObject); + // Assert lint error + agHelper.AssertElementLength(locators._lintErrorElement, 1); + agHelper.HoverElement(locators._lintErrorElement); + agHelper.AssertContains(`'fff' is not defined`); - EditorNavigation.SelectEntityByName("JSObject2", EntityType.JSObject); - agHelper.AssertElementAbsence(locators._lintErrorElement); + EditorNavigation.SelectEntityByName("JSObject2", EntityType.JSObject); + agHelper.AssertElementAbsence(locators._lintErrorElement); - EditorNavigation.SelectEntityByName("JSObject1", EntityType.JSObject); - // Assert lint error - agHelper.AssertElementLength(locators._lintErrorElement, 1); - agHelper.HoverElement(locators._lintErrorElement); - agHelper.AssertContains(`'fff' is not defined`); - }); -}); + EditorNavigation.SelectEntityByName("JSObject1", EntityType.JSObject); + // Assert lint error + agHelper.AssertElementLength(locators._lintErrorElement, 1); + agHelper.HoverElement(locators._lintErrorElement); + agHelper.AssertContains(`'fff' is not defined`); + }); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/BugTests/JS_Bug29131_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/BugTests/JS_Bug29131_spec.ts index 0f424f4845d5..a2743b4a4d2b 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/BugTests/JS_Bug29131_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/BugTests/JS_Bug29131_spec.ts @@ -13,41 +13,45 @@ const jsObjectBody = `export default { } }`; -describe("Verifies JS object rename bug", { tags: ["@tag.JS"] }, () => { - it("Verify that a JS Object name is up for taking after it is deleted", () => { - jsEditor.CreateJSObject(jsObjectBody, { - paste: true, - completeReplace: true, - toRun: false, - shouldCreateNewJSObj: true, - prettify: false, +describe( + "Verifies JS object rename bug", + { tags: ["@tag.JS", "@tag.Binding"] }, + () => { + it("Verify that a JS Object name is up for taking after it is deleted", () => { + jsEditor.CreateJSObject(jsObjectBody, { + paste: true, + completeReplace: true, + toRun: false, + shouldCreateNewJSObj: true, + prettify: false, + }); + + jsEditor.CreateJSObject(jsObjectBody, { + paste: true, + completeReplace: true, + toRun: false, + shouldCreateNewJSObj: true, + prettify: false, + }); + + jsEditor.RenameJSObjFromPane("JSObj2"); + + agHelper.ActionContextMenuWithInPane({ + action: "Delete", + entityType: EntityItems.JSObject, + }); + + jsEditor.CreateJSObject(jsObjectBody, { + paste: true, + completeReplace: true, + toRun: false, + shouldCreateNewJSObj: true, + prettify: false, + }); + + jsEditor.RenameJSObjFromPane("JSObj2"); + + PageLeftPane.assertPresence("JSObj2"); }); - - jsEditor.CreateJSObject(jsObjectBody, { - paste: true, - completeReplace: true, - toRun: false, - shouldCreateNewJSObj: true, - prettify: false, - }); - - jsEditor.RenameJSObjFromPane("JSObj2"); - - agHelper.ActionContextMenuWithInPane({ - action: "Delete", - entityType: EntityItems.JSObject, - }); - - jsEditor.CreateJSObject(jsObjectBody, { - paste: true, - completeReplace: true, - toRun: false, - shouldCreateNewJSObj: true, - prettify: false, - }); - - jsEditor.RenameJSObjFromPane("JSObj2"); - - PageLeftPane.assertPresence("JSObj2"); - }); -}); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/BugTests/ListWidgetOnPageLoad_Spec.ts b/app/client/cypress/e2e/Regression/ClientSide/BugTests/ListWidgetOnPageLoad_Spec.ts index 4826088ab6d7..f53f3a2e2c18 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/BugTests/ListWidgetOnPageLoad_Spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/BugTests/ListWidgetOnPageLoad_Spec.ts @@ -15,7 +15,7 @@ import EditorNavigation, { describe( "JS Function execution data mutation", - { tags: ["@tag.Widget", "@tag.List"] }, + { tags: ["@tag.Widget", "@tag.List", "@tag.Binding"] }, function () { before(() => { agHelper.AddDsl("Listv2/simpleList"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/BugTests/Moment_Spec.ts b/app/client/cypress/e2e/Regression/ClientSide/BugTests/Moment_Spec.ts index a17f26f09537..95b189ec2a55 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/BugTests/Moment_Spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/BugTests/Moment_Spec.ts @@ -21,7 +21,9 @@ let dsName: any, query: string; describe( "Bug #14299 - The data from the query does not show up on the widget", - { tags: ["@tag.Widget", "@tag.Datasource"] }, + { + tags: ["@tag.Widget", "@tag.Datasource", "@tag.Git", "@tag.AccessControl"], + }, function () { before("Create Postgress DS & set theme", () => { agHelper.AddDsl("Bugs/14299dsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/BugTests/SelectWidget_Bug9334_Spec.ts b/app/client/cypress/e2e/Regression/ClientSide/BugTests/SelectWidget_Bug9334_Spec.ts index 4ebc73776bc5..f1840e1bb546 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/BugTests/SelectWidget_Bug9334_Spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/BugTests/SelectWidget_Bug9334_Spec.ts @@ -17,7 +17,7 @@ let dsName: any; describe( "Bug 9334: The Select widget value is sent as null when user switches between the pages", - { tags: ["@tag.Widget"] }, + { tags: ["@tag.Widget", "@tag.Binding"] }, function () { before("Change Theme & Create Postgress DS", () => { appSettings.OpenPaneAndChangeTheme("Pampas"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/BugTests/Widget_Bug27119_Spec.ts b/app/client/cypress/e2e/Regression/ClientSide/BugTests/Widget_Bug27119_Spec.ts index e9aa3e6cb90d..f971ac85c024 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/BugTests/Widget_Bug27119_Spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/BugTests/Widget_Bug27119_Spec.ts @@ -8,51 +8,54 @@ import { jsEditor, } from "../../../../support/Objects/ObjectsCore"; -describe("Reset widget action", { tags: ["@tag.Widget"] }, () => { - it("Reset widget to default after setValue has been applied", () => { - entityExplorer.DragDropWidgetNVerify(draggableWidgets.INPUT_V2); - propPane.UpdatePropertyFieldValue("Default value", "John"); +describe( + "Reset widget action", + { tags: ["@tag.Widget", "@tag.Binding"] }, + () => { + it("Reset widget to default after setValue has been applied", () => { + entityExplorer.DragDropWidgetNVerify(draggableWidgets.INPUT_V2); + propPane.UpdatePropertyFieldValue("Default value", "John"); - entityExplorer.DragDropWidgetNVerify(draggableWidgets.BUTTON, 300, 300); - propPane.EnterJSContext("onClick", `{{Input1.setValue('Hello!')}}`); - propPane.UpdatePropertyFieldValue("Label", "Set value"); + entityExplorer.DragDropWidgetNVerify(draggableWidgets.BUTTON, 300, 300); + propPane.EnterJSContext("onClick", `{{Input1.setValue('Hello!')}}`); + propPane.UpdatePropertyFieldValue("Label", "Set value"); - entityExplorer.DragDropWidgetNVerify(draggableWidgets.BUTTON, 500, 100); - propPane.EnterJSContext("onClick", `{{resetWidget("Input1")}}`); - propPane.UpdatePropertyFieldValue("Label", "Reset value"); + entityExplorer.DragDropWidgetNVerify(draggableWidgets.BUTTON, 500, 100); + propPane.EnterJSContext("onClick", `{{resetWidget("Input1")}}`); + propPane.UpdatePropertyFieldValue("Label", "Reset value"); - deployMode.DeployApp(); + deployMode.DeployApp(); - agHelper.ClickButton("Set value"); - agHelper.AssertText( - locators._widgetInDeployed(draggableWidgets.INPUT_V2) + " input", - "val", - "Hello!", - ); + agHelper.ClickButton("Set value"); + agHelper.AssertText( + locators._widgetInDeployed(draggableWidgets.INPUT_V2) + " input", + "val", + "Hello!", + ); - agHelper.ClickButton("Reset value"); - agHelper.AssertText( - locators._widgetInDeployed(draggableWidgets.INPUT_V2) + " input", - "val", - "John", - ); + agHelper.ClickButton("Reset value"); + agHelper.AssertText( + locators._widgetInDeployed(draggableWidgets.INPUT_V2) + " input", + "val", + "John", + ); - agHelper.ClearNType( - locators._widgetInDeployed(draggableWidgets.INPUT_V2) + " input", - "Testing", - ); - agHelper.ClickButton("Reset value"); - agHelper.AssertText( - locators._widgetInDeployed(draggableWidgets.INPUT_V2) + " input", - "val", - "John", - ); - }); - it("Reset value is accessible after 'awaiting'", () => { - deployMode.NavigateBacktoEditor(); - agHelper.ClearNType(locators._input, "Meta Text"); + agHelper.ClearNType( + locators._widgetInDeployed(draggableWidgets.INPUT_V2) + " input", + "Testing", + ); + agHelper.ClickButton("Reset value"); + agHelper.AssertText( + locators._widgetInDeployed(draggableWidgets.INPUT_V2) + " input", + "val", + "John", + ); + }); + it("Reset value is accessible after 'awaiting'", () => { + deployMode.NavigateBacktoEditor(); + agHelper.ClearNType(locators._input, "Meta Text"); - const JS_OBJECT_BODY = `export default { + const JS_OBJECT_BODY = `export default { async resetInputWithoutAwait () { resetWidget('Input1') showAlert(Input1.text) @@ -63,21 +66,22 @@ describe("Reset widget action", { tags: ["@tag.Widget"] }, () => { } }`; - // Create js object - jsEditor.CreateJSObject(JS_OBJECT_BODY, { - paste: true, - completeReplace: true, - toRun: false, - prettify: false, - shouldCreateNewJSObj: true, - }); - agHelper.Sleep(4000); - jsEditor.SelectFunctionDropdown("resetInputWithoutAwait"); - agHelper.ClickButton("Run"); - agHelper.AssertContains("Meta Text"); + // Create js object + jsEditor.CreateJSObject(JS_OBJECT_BODY, { + paste: true, + completeReplace: true, + toRun: false, + prettify: false, + shouldCreateNewJSObj: true, + }); + agHelper.Sleep(4000); + jsEditor.SelectFunctionDropdown("resetInputWithoutAwait"); + agHelper.ClickButton("Run"); + agHelper.AssertContains("Meta Text"); - jsEditor.SelectFunctionDropdown("resetInputWithAwait"); - agHelper.ClickButton("Run"); - agHelper.AssertContains("John"); - }); -}); + jsEditor.SelectFunctionDropdown("resetInputWithAwait"); + agHelper.ClickButton("Run"); + agHelper.AssertContains("John"); + }); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/BugTests/defaultFilterTextValue_Spec.ts b/app/client/cypress/e2e/Regression/ClientSide/BugTests/defaultFilterTextValue_Spec.ts index 0a6e6665b9ac..4f457f88602b 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/BugTests/defaultFilterTextValue_Spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/BugTests/defaultFilterTextValue_Spec.ts @@ -2,12 +2,16 @@ import { ObjectsRegistry } from "../../../../support/Objects/Registry"; const agHelper = ObjectsRegistry.AggregateHelper; -describe("Select widget filterText", { tags: ["@tag.Widget"] }, () => { - before(() => { - agHelper.AddDsl("defaultFilterText"); - }); +describe( + "Select widget filterText", + { tags: ["@tag.Widget", "@tag.Binding"] }, + () => { + before(() => { + agHelper.AddDsl("defaultFilterText"); + }); - it("1. default value should be an empty string", () => { - agHelper.AssertContains("string"); - }); -}); + it("1. default value should be an empty string", () => { + agHelper.AssertContains("string"); + }); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/BugTests/formHasChanged_Spec.ts b/app/client/cypress/e2e/Regression/ClientSide/BugTests/formHasChanged_Spec.ts index 46dca4c26246..3949f0615452 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/BugTests/formHasChanged_Spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/BugTests/formHasChanged_Spec.ts @@ -7,14 +7,18 @@ const ee = ObjectsRegistry.EntityExplorer, locator = ObjectsRegistry.CommonLocators, agHelper = ObjectsRegistry.AggregateHelper; -describe("JS Function Execution", { tags: ["@tag.JS"] }, function () { - before(() => { - agHelper.AddDsl("formChangeDSL"); - }); +describe( + "JS Function Execution", + { tags: ["@tag.JS", "@tag.Binding"] }, + function () { + before(() => { + agHelper.AddDsl("formChangeDSL"); + }); - it("1. Doesn't show lint errors for 'form.hasChanges'", () => { - EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); - agHelper.Sleep(4000); - agHelper.AssertElementAbsence(locator._lintErrorElement); - }); -}); + it("1. Doesn't show lint errors for 'form.hasChanges'", () => { + EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); + agHelper.Sleep(4000); + agHelper.AssertElementAbsence(locator._lintErrorElement); + }); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/BugTests/invalidLintError_Spec.ts b/app/client/cypress/e2e/Regression/ClientSide/BugTests/invalidLintError_Spec.ts index 7ccf899196a9..7d6d52e3fa0f 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/BugTests/invalidLintError_Spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/BugTests/invalidLintError_Spec.ts @@ -5,7 +5,7 @@ const jsEditor = ObjectsRegistry.JSEditor, ee = ObjectsRegistry.EntityExplorer, agHelper = ObjectsRegistry.AggregateHelper; -describe("Linting", { tags: ["@tag.JS"] }, () => { +describe("Linting", { tags: ["@tag.JS", "@tag.Binding"] }, () => { before(() => { ee.DragDropWidgetNVerify("buttonwidget", 300, 300); }); diff --git a/app/client/cypress/e2e/Regression/ClientSide/CodeComment/PropertyPaneCodeComment_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/CodeComment/PropertyPaneCodeComment_spec.ts index cd3fd14d61d9..cdf97d94a7ef 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/CodeComment/PropertyPaneCodeComment_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/CodeComment/PropertyPaneCodeComment_spec.ts @@ -3,22 +3,26 @@ import EditorNavigation, { EntityType, } from "../../../../support/Pages/EditorNavigation"; -describe("Property Pane Code Commenting", { tags: ["@tag.JS"] }, () => { - before(() => { - agHelper.AddDsl("buttondsl"); - }); +describe( + "Property Pane Code Commenting", + { tags: ["@tag.JS", "@tag.Binding"] }, + () => { + before(() => { + agHelper.AddDsl("buttondsl"); + }); - it("1. Should comment code in Property Pane", () => { - EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); - propPane.TypeTextIntoField("Label", "{{appsmith}}"); - propPane.ToggleCommentInTextField("Label"); + it("1. Should comment code in Property Pane", () => { + EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); + propPane.TypeTextIntoField("Label", "{{appsmith}}"); + propPane.ToggleCommentInTextField("Label"); - propPane.ValidatePropertyFieldValue("Label", "{{// appsmith}}"); + propPane.ValidatePropertyFieldValue("Label", "{{// appsmith}}"); - //Uncomment - EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); - propPane.TypeTextIntoField("Label", "{{// appsmith}}"); - propPane.ToggleCommentInTextField("Label"); - propPane.ValidatePropertyFieldValue("Label", "{{appsmith}}"); - }); -}); + //Uncomment + EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); + propPane.TypeTextIntoField("Label", "{{// appsmith}}"); + propPane.ToggleCommentInTextField("Label"); + propPane.ValidatePropertyFieldValue("Label", "{{appsmith}}"); + }); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/CommunityTemplate/PublishCommunityTemplatesFlow_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/CommunityTemplate/PublishCommunityTemplatesFlow_spec.ts index 97b3537d98d8..e0c464b3b8b5 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/CommunityTemplate/PublishCommunityTemplatesFlow_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/CommunityTemplate/PublishCommunityTemplatesFlow_spec.ts @@ -8,7 +8,15 @@ import { const communityForm = communityTemplates.locators._communityForm; describe( "Publish app to Community flow", - { tags: ["@tag.Templates", " @tag.excludeForAirgap"] }, + { + tags: [ + "@tag.Templates", + " @tag.excludeForAirgap", + "@tag.Git", + "@tag.ImportExport", + "@tag.Fork", + ], + }, () => { afterEach(() => { agHelper.RefreshPage(); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Debugger/Api_pane_navigation_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Debugger/Api_pane_navigation_spec.ts index 5bacf30fa3d1..094d5fd8f876 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Debugger/Api_pane_navigation_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Debugger/Api_pane_navigation_spec.ts @@ -11,7 +11,14 @@ import EditorNavigation from "../../../../support/Pages/EditorNavigation"; describe( "Api pane navigation", - { tags: ["@tag.Datasource", " @tag.excludeForAirgap"] }, + { + tags: [ + "@tag.Datasource", + " @tag.excludeForAirgap", + "@tag.Git", + "@tag.AccessControl", + ], + }, () => { it("1. Navigation to Graphql pagination field", () => { apiPage.CreateGraphqlApi("Api1"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Debugger/Widget_property_navigation_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Debugger/Widget_property_navigation_spec.ts index 30a27209444a..dd4821a3e662 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Debugger/Widget_property_navigation_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Debugger/Widget_property_navigation_spec.ts @@ -6,7 +6,7 @@ import EditorNavigation, { describe( "Widget property navigation", - { tags: ["@tag.Widget", "@tag.excludeForAirgap"] }, + { tags: ["@tag.Widget", "@tag.excludeForAirgap", "@tag.Binding"] }, () => { it("1. Collapsed field navigation", () => { _.entityExplorer.DragDropWidgetNVerify(_.draggableWidgets.AUDIO); diff --git a/app/client/cypress/e2e/Regression/ClientSide/DynamicHeight/JsonForm_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/DynamicHeight/JsonForm_spec.ts index 6ecade613423..c20df368d0e2 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/DynamicHeight/JsonForm_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/DynamicHeight/JsonForm_spec.ts @@ -1,5 +1,4 @@ import { - entityExplorer, locators, agHelper, propPane, @@ -17,6 +16,7 @@ describe( agHelper.AddDsl("jsonFormDynamicHeightDsl"); EditorNavigation.SelectEntityByName("JSONForm1", EntityType.Widget); + propPane.ExpandIfCollapsedSection("general"); agHelper .GetWidgetCSSHeight( locators._widgetInDeployed(draggableWidgets.JSONFORM), diff --git a/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/API_Pane_spec.js b/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/API_Pane_spec.js index 23c509869ddf..11e9fd975b15 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/API_Pane_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/API_Pane_spec.js @@ -17,7 +17,7 @@ let ee = ObjectsRegistry.EntityExplorer, describe( "Entity explorer API pane related testcases", - { tags: ["@tag.IDE"] }, + { tags: ["@tag.IDE", "@tag.PropertyPane"] }, function () { it("1. Empty Message validation for Widgets/API/Queries", function () { homePage.CreateNewWorkspace("EmptyMsgCheck", true); diff --git a/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Admin_settings_1_spec.js b/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Admin_settings_1_spec.js index 95c62141598b..058193b1279d 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Admin_settings_1_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Admin_settings_1_spec.js @@ -2,155 +2,161 @@ import adminsSettings from "../../../../locators/AdminsSettings"; import { adminSettings as adminSettingsHelper } from "../../../../support/Objects/ObjectsCore"; -describe("Admin settings page", { tags: ["@tag.IDE"] }, function () { - beforeEach(() => { - cy.intercept("GET", "/api/v1/admin/env", { - body: { responseMeta: { status: 200, success: true }, data: {} }, - }).as("getEnvVariables"); - cy.intercept("PUT", "/api/v1/admin/env", { - body: { responseMeta: { status: 200, success: true }, data: {} }, - }).as("postEnvVariables"); - cy.intercept("PUT", "/api/v1/tenants", { - body: { responseMeta: { status: 200, success: true }, data: {} }, - }).as("postTenantConfig"); - }); - - it("1. should test that settings page is accessible to super user", () => { - cy.LogOut(); - cy.LoginFromAPI(Cypress.env("USERNAME"), Cypress.env("PASSWORD")); - cy.get(".admin-settings-menu-option").should("be.visible"); - cy.get(".admin-settings-menu-option").click(); - cy.url().should("contain", adminSettingsHelper.routes.GENERAL); - cy.wait("@getEnvVariables"); - }); +describe( + "Admin settings page", + { tags: ["@tag.IDE", "@tag.PropertyPane"] }, + function () { + beforeEach(() => { + cy.intercept("GET", "/api/v1/admin/env", { + body: { responseMeta: { status: 200, success: true }, data: {} }, + }).as("getEnvVariables"); + cy.intercept("PUT", "/api/v1/admin/env", { + body: { responseMeta: { status: 200, success: true }, data: {} }, + }).as("postEnvVariables"); + cy.intercept("PUT", "/api/v1/tenants", { + body: { responseMeta: { status: 200, success: true }, data: {} }, + }).as("postTenantConfig"); + }); - it("2. should test that page header is visible", () => { - cy.get(adminsSettings.appsmithHeader).should("be.visible"); - cy.visit(adminSettingsHelper.routes.DEVELOPER_SETTINGS, { timeout: 60000 }); - cy.url().should("contain", "/developer-settings"); - cy.wait(2000); //page to load properly - cy.get(adminsSettings.appsmithHeader).should("be.visible"); - cy.visit(adminSettingsHelper.routes.GOOGLEAUTH, { timeout: 60000 }); - cy.url().should("contain", "/google-auth"); - cy.wait(2000); //page to load properly - cy.get(adminsSettings.appsmithHeader).should("be.visible"); - }); + it("1. should test that settings page is accessible to super user", () => { + cy.LogOut(); + cy.LoginFromAPI(Cypress.env("USERNAME"), Cypress.env("PASSWORD")); + cy.get(".admin-settings-menu-option").should("be.visible"); + cy.get(".admin-settings-menu-option").click(); + cy.url().should("contain", adminSettingsHelper.routes.GENERAL); + cy.wait("@getEnvVariables"); + }); - it("3. should test that clicking on logo should redirect to applications page", () => { - cy.visit(adminSettingsHelper.routes.GENERAL, { timeout: 60000 }); - cy.get(adminsSettings.appsmithHeader).should("be.visible"); - cy.get(adminsSettings.appsmithLogo).should("be.visible"); - cy.get(adminsSettings.appsmithLogo).click(); - cy.url().should("contain", adminSettingsHelper.routes.APPLICATIONS); - }); + it("2. should test that page header is visible", () => { + cy.get(adminsSettings.appsmithHeader).should("be.visible"); + cy.visit(adminSettingsHelper.routes.DEVELOPER_SETTINGS, { + timeout: 60000, + }); + cy.url().should("contain", "/developer-settings"); + cy.wait(2000); //page to load properly + cy.get(adminsSettings.appsmithHeader).should("be.visible"); + cy.visit(adminSettingsHelper.routes.GOOGLEAUTH, { timeout: 60000 }); + cy.url().should("contain", "/google-auth"); + cy.wait(2000); //page to load properly + cy.get(adminsSettings.appsmithHeader).should("be.visible"); + }); - it("4. should test that settings page is redirected to default tab", () => { - cy.LoginFromAPI(Cypress.env("USERNAME"), Cypress.env("PASSWORD")); - cy.visit(adminSettingsHelper.routes.SETTINGS, { timeout: 60000 }); - cy.url().should("contain", adminSettingsHelper.routes.GENERAL); - }); + it("3. should test that clicking on logo should redirect to applications page", () => { + cy.visit(adminSettingsHelper.routes.GENERAL, { timeout: 60000 }); + cy.get(adminsSettings.appsmithHeader).should("be.visible"); + cy.get(adminsSettings.appsmithLogo).should("be.visible"); + cy.get(adminsSettings.appsmithLogo).click(); + cy.url().should("contain", adminSettingsHelper.routes.APPLICATIONS); + }); - it( - "airgap", - "5. should test that settings page tab redirects and google maps doesn't exist - airgap", - () => { - cy.visit(adminSettingsHelper.routes.APPLICATIONS, { timeout: 60000 }); - cy.wait(3000); - cy.get(".admin-settings-menu-option").click(); - cy.get(adminsSettings.generalTab).click(); + it("4. should test that settings page is redirected to default tab", () => { + cy.LoginFromAPI(Cypress.env("USERNAME"), Cypress.env("PASSWORD")); + cy.visit(adminSettingsHelper.routes.SETTINGS, { timeout: 60000 }); cy.url().should("contain", adminSettingsHelper.routes.GENERAL); - cy.get(adminsSettings.advancedTab).click(); - cy.url().should("contain", adminSettingsHelper.routes.ADVANCED); - cy.get(adminsSettings.authenticationTab).click(); - cy.url().should("contain", adminSettingsHelper.routes.AUTHENTICATION); - cy.get(adminsSettings.emailTab).click(); - cy.get(adminsSettings.developerSettingsTab).should("not.exist"); - cy.url().should("contain", adminSettingsHelper.routes.EMAIL); - cy.get(adminsSettings.versionTab).click(); - cy.url().should("contain", adminSettingsHelper.routes.VERSION); - }, - ); + }); - it("6. should test save and clear buttons disabled state", () => { - cy.visit(adminSettingsHelper.routes.GENERAL, { timeout: 60000 }); - const assertVisibilityAndDisabledState = () => { + it( + "airgap", + "5. should test that settings page tab redirects and google maps doesn't exist - airgap", + () => { + cy.visit(adminSettingsHelper.routes.APPLICATIONS, { timeout: 60000 }); + cy.wait(3000); + cy.get(".admin-settings-menu-option").click(); + cy.get(adminsSettings.generalTab).click(); + cy.url().should("contain", adminSettingsHelper.routes.GENERAL); + cy.get(adminsSettings.advancedTab).click(); + cy.url().should("contain", adminSettingsHelper.routes.ADVANCED); + cy.get(adminsSettings.authenticationTab).click(); + cy.url().should("contain", adminSettingsHelper.routes.AUTHENTICATION); + cy.get(adminsSettings.emailTab).click(); + cy.get(adminsSettings.developerSettingsTab).should("not.exist"); + cy.url().should("contain", adminSettingsHelper.routes.EMAIL); + cy.get(adminsSettings.versionTab).click(); + cy.url().should("contain", adminSettingsHelper.routes.VERSION); + }, + ); + + it("6. should test save and clear buttons disabled state", () => { + cy.visit(adminSettingsHelper.routes.GENERAL, { timeout: 60000 }); + const assertVisibilityAndDisabledState = () => { + cy.get(adminsSettings.saveButton).should("be.visible"); + cy.get(adminsSettings.saveButton).should("be.disabled"); + cy.get(adminsSettings.resetButton).should("be.visible"); + cy.get(adminsSettings.resetButton).should("be.disabled"); + }; + assertVisibilityAndDisabledState(); + cy.get(adminsSettings.instanceName).should("be.visible"); + cy.get(adminsSettings.instanceName).clear().type("AppsmithInstance"); cy.get(adminsSettings.saveButton).should("be.visible"); - cy.get(adminsSettings.saveButton).should("be.disabled"); + cy.get(adminsSettings.saveButton).should("not.be.disabled"); cy.get(adminsSettings.resetButton).should("be.visible"); - cy.get(adminsSettings.resetButton).should("be.disabled"); - }; - assertVisibilityAndDisabledState(); - cy.get(adminsSettings.instanceName).should("be.visible"); - cy.get(adminsSettings.instanceName).clear().type("AppsmithInstance"); - cy.get(adminsSettings.saveButton).should("be.visible"); - cy.get(adminsSettings.saveButton).should("not.be.disabled"); - cy.get(adminsSettings.resetButton).should("be.visible"); - cy.get(adminsSettings.resetButton).should("not.be.disabled"); - cy.get(adminsSettings.resetButton).click(); - assertVisibilityAndDisabledState(); - }); - - it("7. should test saving a setting value", () => { - cy.visit(adminSettingsHelper.routes.GENERAL, { timeout: 60000 }); - cy.get(adminsSettings.restartNotice).should("not.exist"); - cy.get(adminsSettings.instanceName).should("be.visible"); - let instanceName; - cy.generateUUID().then((uuid) => { - instanceName = uuid; - cy.get(adminsSettings.instanceName).clear().type(uuid); + cy.get(adminsSettings.resetButton).should("not.be.disabled"); + cy.get(adminsSettings.resetButton).click(); + assertVisibilityAndDisabledState(); }); - cy.get(adminsSettings.saveButton).should("be.visible"); - cy.get(adminsSettings.saveButton).should("not.be.disabled"); - cy.get(adminsSettings.saveButton).click(); - cy.wait("@postTenantConfig").then((interception) => { - expect(interception.request.body.instanceName).to.equal(instanceName); - }); - cy.get(adminsSettings.restartNotice).should("not.exist"); - cy.wait(3000); - }); - it("8. should test saving settings value from different tabs", () => { - cy.visit(adminSettingsHelper.routes.GENERAL, { timeout: 60000 }); - cy.get(adminsSettings.restartNotice).should("not.exist"); - cy.get(adminsSettings.instanceName).should("be.visible"); - let instanceName; - cy.generateUUID().then((uuid) => { - instanceName = uuid; - cy.get(adminsSettings.instanceName).clear().type(uuid); - }); - cy.get(adminsSettings.saveButton).should("be.visible"); - cy.get(adminsSettings.saveButton).should("not.be.disabled"); - cy.get(adminsSettings.emailTab).click(); - cy.get(adminsSettings.saveButton).should("be.visible"); - cy.get(adminsSettings.saveButton).should("not.be.disabled"); - cy.get(adminsSettings.fromAddress).should("be.visible"); - let fromAddress; - cy.generateUUID().then((uuid) => { - fromAddress = uuid; - cy.get(adminsSettings.fromAddress).clear().type(`${uuid}@appsmith.com`); - }); - cy.intercept("POST", "/api/v1/admin/restart", { - body: { responseMeta: { status: 200, success: true }, data: true }, - }); - cy.get(adminsSettings.saveButton).click(); - cy.wait("@postTenantConfig").then((interception) => { - expect(interception.request.body.instanceName).to.equal(instanceName); + it("7. should test saving a setting value", () => { + cy.visit(adminSettingsHelper.routes.GENERAL, { timeout: 60000 }); + cy.get(adminsSettings.restartNotice).should("not.exist"); + cy.get(adminsSettings.instanceName).should("be.visible"); + let instanceName; + cy.generateUUID().then((uuid) => { + instanceName = uuid; + cy.get(adminsSettings.instanceName).clear().type(uuid); + }); + cy.get(adminsSettings.saveButton).should("be.visible"); + cy.get(adminsSettings.saveButton).should("not.be.disabled"); + cy.get(adminsSettings.saveButton).click(); + cy.wait("@postTenantConfig").then((interception) => { + expect(interception.request.body.instanceName).to.equal(instanceName); + }); + cy.get(adminsSettings.restartNotice).should("not.exist"); + cy.wait(3000); }); - cy.wait("@postEnvVariables").then((interception) => { - expect(interception.request.body.APPSMITH_MAIL_FROM).to.equal( - `${fromAddress}@appsmith.com`, + + it("8. should test saving settings value from different tabs", () => { + cy.visit(adminSettingsHelper.routes.GENERAL, { timeout: 60000 }); + cy.get(adminsSettings.restartNotice).should("not.exist"); + cy.get(adminsSettings.instanceName).should("be.visible"); + let instanceName; + cy.generateUUID().then((uuid) => { + instanceName = uuid; + cy.get(adminsSettings.instanceName).clear().type(uuid); + }); + cy.get(adminsSettings.saveButton).should("be.visible"); + cy.get(adminsSettings.saveButton).should("not.be.disabled"); + cy.get(adminsSettings.emailTab).click(); + cy.get(adminsSettings.saveButton).should("be.visible"); + cy.get(adminsSettings.saveButton).should("not.be.disabled"); + cy.get(adminsSettings.fromAddress).should("be.visible"); + let fromAddress; + cy.generateUUID().then((uuid) => { + fromAddress = uuid; + cy.get(adminsSettings.fromAddress).clear().type(`${uuid}@appsmith.com`); + }); + cy.intercept("POST", "/api/v1/admin/restart", { + body: { responseMeta: { status: 200, success: true }, data: true }, + }); + cy.get(adminsSettings.saveButton).click(); + cy.wait("@postTenantConfig").then((interception) => { + expect(interception.request.body.instanceName).to.equal(instanceName); + }); + cy.wait("@postEnvVariables").then((interception) => { + expect(interception.request.body.APPSMITH_MAIL_FROM).to.equal( + `${fromAddress}@appsmith.com`, + ); + }); + cy.waitUntil(() => + cy.contains("General", { timeout: 180000 }).should("be.visible"), ); + cy.get(adminsSettings.restartNotice).should("not.exist"); + cy.wait(3000); }); - cy.waitUntil(() => - cy.contains("General", { timeout: 180000 }).should("be.visible"), - ); - cy.get(adminsSettings.restartNotice).should("not.exist"); - cy.wait(3000); - }); - it("9. should test that instance name and admin emails exist on general tab", () => { - cy.visit(adminSettingsHelper.routes.GENERAL, { timeout: 60000 }); - cy.get(adminsSettings.instanceName).should("be.visible"); - cy.get(adminsSettings.adminEmails).should("be.visible"); - }); -}); + it("9. should test that instance name and admin emails exist on general tab", () => { + cy.visit(adminSettingsHelper.routes.GENERAL, { timeout: 60000 }); + cy.get(adminsSettings.instanceName).should("be.visible"); + cy.get(adminsSettings.adminEmails).should("be.visible"); + }); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Admin_settings_2_spec.js b/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Admin_settings_2_spec.js index cc5790f476a2..fdc9e5bbfff0 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Admin_settings_2_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Admin_settings_2_spec.js @@ -6,52 +6,61 @@ const { GOOGLE_MAPS_SETUP_DOC, } = require("../../../../../src/constants/ThirdPartyConstants"); -describe("Admin settings page", { tags: ["@tag.IDE"] }, function () { - it("1. should test that configure link redirects to google maps setup doc", () => { - cy.visit(adminSettingsHelper.routes.DEVELOPER_SETTINGS, { timeout: 60000 }); - cy.get(adminsSettings.readMoreLink).within(() => { - cy.get("a") - .should("have.attr", "target", "_blank") - .invoke("removeAttr", "target") - .click() - .wait(3000); //for page to load fully; - cy.url().should("contain", GOOGLE_MAPS_SETUP_DOC); +describe( + "Admin settings page", + { tags: ["@tag.IDE", "@tag.PropertyPane"] }, + function () { + it("1. should test that configure link redirects to google maps setup doc", () => { + cy.visit(adminSettingsHelper.routes.DEVELOPER_SETTINGS, { + timeout: 60000, + }); + cy.get(adminsSettings.readMoreLink).within(() => { + cy.get("a") + .should("have.attr", "target", "_blank") + .invoke("removeAttr", "target") + .click() + .wait(3000); //for page to load fully; + cy.url().should("contain", GOOGLE_MAPS_SETUP_DOC); + }); }); - }); - it( - "airgap", - "2. should test that authentication page redirects and google and github auth doesn't exist - airgap", - () => { - cy.visit(adminSettingsHelper.routes.GENERAL, { timeout: 60000 }); - cy.get(adminsSettings.authenticationTab).click(); - cy.url().should("contain", adminSettingsHelper.routes.AUTHENTICATION); - cy.get(adminsSettings.googleButton).should("not.exist"); - cy.get(adminsSettings.githubButton).should("not.exist"); - cy.get(adminsSettings.formloginButton).click(); - cy.url().should("contain", adminSettingsHelper.routes.FORMLOGIN); - }, - ); + it( + "airgap", + "2. should test that authentication page redirects and google and github auth doesn't exist - airgap", + () => { + cy.visit(adminSettingsHelper.routes.GENERAL, { timeout: 60000 }); + cy.get(adminsSettings.authenticationTab).click(); + cy.url().should("contain", adminSettingsHelper.routes.AUTHENTICATION); + cy.get(adminsSettings.googleButton).should("not.exist"); + cy.get(adminsSettings.githubButton).should("not.exist"); + cy.get(adminsSettings.formloginButton).click(); + cy.url().should("contain", adminSettingsHelper.routes.FORMLOGIN); + }, + ); - it( - "airgap", - "5. should test that read more on version is hidden for airgap", - () => { - cy.visit(adminSettingsHelper.routes.GENERAL, { timeout: 60000 }); - cy.get(adminsSettings.versionTab).click(); - cy.url().should("contain", adminSettingsHelper.routes.VERSION); - cy.get(adminsSettings.readMoreLink).should("not.exist"); - }, - ); + it( + "airgap", + "5. should test that read more on version is hidden for airgap", + () => { + cy.visit(adminSettingsHelper.routes.GENERAL, { timeout: 60000 }); + cy.get(adminsSettings.versionTab).click(); + cy.url().should("contain", adminSettingsHelper.routes.VERSION); + cy.get(adminsSettings.readMoreLink).should("not.exist"); + }, + ); - it("6. should test that settings page is not accessible to normal users", () => { - cy.LogOut(false); - cy.wait(2000); - cy.LoginFromAPI(Cypress.env("TESTUSERNAME3"), Cypress.env("TESTPASSWORD3")); - cy.get(".admin-settings-menu-option").should("not.exist"); - cy.visit(adminSettingsHelper.routes.GENERAL, { timeout: 60000 }); - // non super users are redirected to home page - cy.url().should("contain", adminSettingsHelper.routes.APPLICATIONS); - cy.LogOut(false); - }); -}); + it("6. should test that settings page is not accessible to normal users", () => { + cy.LogOut(false); + cy.wait(2000); + cy.LoginFromAPI( + Cypress.env("TESTUSERNAME3"), + Cypress.env("TESTPASSWORD3"), + ); + cy.get(".admin-settings-menu-option").should("not.exist"); + cy.visit(adminSettingsHelper.routes.GENERAL, { timeout: 60000 }); + // non super users are redirected to home page + cy.url().should("contain", adminSettingsHelper.routes.APPLICATIONS); + cy.LogOut(false); + }); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Admin_settings_3_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Admin_settings_3_spec.ts index b0f71965592a..54fb59551011 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Admin_settings_3_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Admin_settings_3_spec.ts @@ -10,7 +10,7 @@ const { describe( "Admin settings page", - { tags: ["@tag.IDE", "@tag.excludeForAirgap"] }, + { tags: ["@tag.IDE", "@tag.excludeForAirgap", "@tag.PropertyPane"] }, function () { it("1. should test that authentication page redirects", () => { cy.visit(adminSettingsHelper.routes.GENERAL, { timeout: 60000 }); diff --git a/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Bindings_Widgets_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Bindings_Widgets_spec.ts index 926bfaeee830..f9111b4486a3 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Bindings_Widgets_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Bindings_Widgets_spec.ts @@ -11,7 +11,7 @@ import PageList from "../../../../support/Pages/PageList"; describe( "Entity explorer tests related to widgets and validation", - { tags: ["@tag.IDE"] }, + { tags: ["@tag.IDE", "@tag.PropertyPane"] }, function () { beforeEach(() => { agHelper.RestoreLocalStorageCache(); diff --git a/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/CopyQuery_RenameDatasource_spec.js b/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/CopyQuery_RenameDatasource_spec.js index e38696d62478..535ec4df3c5c 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/CopyQuery_RenameDatasource_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/CopyQuery_RenameDatasource_spec.js @@ -16,7 +16,7 @@ let datasourceName; describe( "Entity explorer tests related to copy query", - { tags: ["@tag.IDE"] }, + { tags: ["@tag.IDE", "@tag.PropertyPane"] }, function () { beforeEach(() => { dataSources.StartDataSourceRoutes(); diff --git a/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/DragAndDropWidget_spec.js b/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/DragAndDropWidget_spec.js index f8fc4b443857..a0ee177944ed 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/DragAndDropWidget_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/DragAndDropWidget_spec.js @@ -11,7 +11,7 @@ import * as _ from "../../../../support/Objects/ObjectsCore"; describe( "Entity explorer Drag and Drop widgets testcases", - { tags: ["@tag.IDE"] }, + { tags: ["@tag.IDE", "@tag.PropertyPane"] }, function () { it("1. Drag and drop form widget and validate", function () { cy.get(commonlocators.entityExplorersearch).should("be.visible"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Drag_Drop_Building_Blocks_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Drag_Drop_Building_Blocks_spec.ts index db34cc51dae9..2bdeb3c0fb6d 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Drag_Drop_Building_Blocks_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Drag_Drop_Building_Blocks_spec.ts @@ -19,6 +19,11 @@ describe( "@tag.Widget", "@tag.Templates", "@tag.excludeForAirgap", + "@tag.PropertyPane", + "@tag.Git", + "@tag.ImportExport", + "@tag.Fork", + "@tag.Binding", ], }, () => { diff --git a/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Entity_Naming_conflict_spec.js b/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Entity_Naming_conflict_spec.js index 3c6c68c2306d..65705fcab66c 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Entity_Naming_conflict_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Entity_Naming_conflict_spec.js @@ -7,25 +7,29 @@ const apiwidget = require("../../../../locators/apiWidgetslocator.json"); import * as _ from "../../../../support/Objects/ObjectsCore"; -describe("Tab widget test", { tags: ["@tag.IDE"] }, function () { - const apiName = "Table1"; - const tableName = "Table1"; - before(() => { - _.agHelper.AddDsl("basicTabledsl"); - }); +describe( + "Tab widget test", + { tags: ["@tag.IDE", "@tag.PropertyPane"] }, + function () { + const apiName = "Table1"; + const tableName = "Table1"; + before(() => { + _.agHelper.AddDsl("basicTabledsl"); + }); - it("1. Rename API with table widget name validation test", function () { - cy.log("Login Successful"); - cy.CreateApiAndValidateUniqueEntityName(apiName); - cy.get(apiwidget.apiTxt) - .clear() - .type(tableName, { force: true }) - .should("have.value", tableName); - //Rename Table widget with api name validation test - PageLeftPane.switchSegment(PagePaneSegment.UI); - PageLeftPane.assertPresence("Table1"); - PageLeftPane.switchSegment(PagePaneSegment.Queries); - cy.RenameEntity(apiName); - cy.validateMessage(apiName); - }); -}); + it("1. Rename API with table widget name validation test", function () { + cy.log("Login Successful"); + cy.CreateApiAndValidateUniqueEntityName(apiName); + cy.get(apiwidget.apiTxt) + .clear() + .type(tableName, { force: true }) + .should("have.value", tableName); + //Rename Table widget with api name validation test + PageLeftPane.switchSegment(PagePaneSegment.UI); + PageLeftPane.assertPresence("Table1"); + PageLeftPane.switchSegment(PagePaneSegment.Queries); + cy.RenameEntity(apiName); + cy.validateMessage(apiName); + }); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Hide_Page_spec.js b/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Hide_Page_spec.js index 90f5ba7b7ace..985faa158dff 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Hide_Page_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Hide_Page_spec.js @@ -9,7 +9,7 @@ import { EntityItems } from "../../../../support/Pages/AssertHelper"; describe( "Hide / Show page test functionality", - { tags: ["@tag.IDE"] }, + { tags: ["@tag.IDE", "@tag.PropertyPane"] }, function () { it("1. Hide/Show page test ", function () { PageList.AddNewPage(); // Page2 diff --git a/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/JSEditorContextMenu_Spec.ts b/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/JSEditorContextMenu_Spec.ts index c6f892cde2f0..c132f969099e 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/JSEditorContextMenu_Spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/JSEditorContextMenu_Spec.ts @@ -13,7 +13,7 @@ import { EntityItems } from "../../../../support/Pages/AssertHelper"; describe( "Validate basic operations on Entity explorer JSEditor structure", - { tags: ["@tag.IDE"] }, + { tags: ["@tag.IDE", "@tag.PropertyPane"] }, () => { const pageId = "Page1"; diff --git a/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Long_Name_Tooltip_spec.js b/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Long_Name_Tooltip_spec.js index 1de4d9a46e4f..fa2e9654bea2 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Long_Name_Tooltip_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Long_Name_Tooltip_spec.js @@ -12,7 +12,7 @@ const alternateName = "AlternateName"; const tooltTipQuery = `.rc-tooltip.ads-v2-tooltip:not(.rc-tooltip-hidden) > .rc-tooltip-content > .rc-tooltip-inner > .ads-v2-text`; describe( "Entity Explorer showing tooltips on long names", - { tags: ["@tag.IDE"] }, + { tags: ["@tag.IDE", "@tag.PropertyPane"] }, function () { it("1. Expect tooltip on long names only", function () { // create an API with a short name diff --git a/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Page_Load_Spec.js b/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Page_Load_Spec.js index fb68eabeb0cc..66286db42006 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Page_Load_Spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Page_Load_Spec.js @@ -11,7 +11,7 @@ import { import PageList from "../../../../support/Pages/PageList"; import { EntityItems } from "../../../../support/Pages/AssertHelper"; -describe("Page Load tests", { tags: ["@tag.IDE"] }, () => { +describe("Page Load tests", { tags: ["@tag.IDE", "@tag.PropertyPane"] }, () => { afterEach(() => { agHelper.SaveLocalStorageCache(); }); diff --git a/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Pages_spec.js b/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Pages_spec.js index cf1d77b9dd19..b0189631403f 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Pages_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Pages_spec.js @@ -4,7 +4,7 @@ import EditorNavigation, { } from "../../../../support/Pages/EditorNavigation"; import PageList from "../../../../support/Pages/PageList"; -describe("Pages", { tags: ["@tag.IDE"] }, function () { +describe("Pages", { tags: ["@tag.IDE", "@tag.PropertyPane"] }, function () { let veryLongPageName = `abcdefghijklmnopqrstuvwxyz1234`; let apiName = "someApi"; diff --git a/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Query_Datasource_spec.js b/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Query_Datasource_spec.js index db02a87e71de..70e051f3101e 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Query_Datasource_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Query_Datasource_spec.js @@ -17,7 +17,7 @@ let datasourceName; describe( "Entity explorer tests related to query and datasource", - { tags: ["@tag.IDE"] }, + { tags: ["@tag.IDE", "@tag.PropertyPane"] }, function () { before(() => { cy.generateUUID().then((uid) => { diff --git a/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Renaming_spec.js b/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Renaming_spec.js index 95bb8d422533..8df62d3156c0 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Renaming_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Renaming_spec.js @@ -19,7 +19,7 @@ const secondApiName = "Second"; describe( "Api Naming conflict on a page test", - { tags: ["@tag.IDE"] }, + { tags: ["@tag.IDE", "@tag.PropertyPane"] }, function () { it("1. Expects actions on the same page cannot have identical names", function () { // create an API diff --git a/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Select_Widget_spec.js b/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Select_Widget_spec.js index 193f72ce28ca..419b2b2c5acb 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Select_Widget_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Select_Widget_spec.js @@ -6,94 +6,111 @@ import EditorNavigation, { EntityType, } from "../../../../support/Pages/EditorNavigation"; -describe("Explorer hidden widget Selection", { tags: ["@tag.IDE"] }, () => { - before(() => { - _.agHelper.AddDsl("explorerHiddenWidgets"); - }); - afterEach(() => { - cy.get(commonLocators.canvas).click({ force: true }); - }); - it("1. Opens modal when selecting a modal", () => { - EditorNavigation.SelectEntityByName("SimpleModal", EntityType.Widget); +describe( + "Explorer hidden widget Selection", + { tags: ["@tag.IDE", "@tag.PropertyPane"] }, + () => { + before(() => { + _.agHelper.AddDsl("explorerHiddenWidgets"); + }); + afterEach(() => { + cy.get(commonLocators.canvas).click({ force: true }); + }); + it("1. Opens modal when selecting a modal", () => { + EditorNavigation.SelectEntityByName("SimpleModal", EntityType.Widget); - cy.get(widgetLocators.modalWidget).should("have.length", 1); - cy.get(commonLocators.propertyPaneTitle).should("contain", "SimpleModal"); - cy.get(widgets.modalCloseButton).click({ force: true }); - }); + cy.get(widgetLocators.modalWidget).should("have.length", 1); + cy.get(commonLocators.propertyPaneTitle).should("contain", "SimpleModal"); + cy.get(widgets.modalCloseButton).click({ force: true }); + }); - it("2. Opens modal when selecting a widget inside a modal", () => { - EditorNavigation.SelectEntityByName("Simple_Modal_Text", EntityType.Widget); + it("2. Opens modal when selecting a widget inside a modal", () => { + EditorNavigation.SelectEntityByName( + "Simple_Modal_Text", + EntityType.Widget, + ); - cy.get(widgetLocators.modalWidget).should("have.length", 1); - cy.get(commonLocators.propertyPaneTitle).should( - "contain", - "Simple_Modal_Text", - ); - cy.get(widgets.modalCloseButton).click({ force: true }); - }); + cy.get(widgetLocators.modalWidget).should("have.length", 1); + cy.get(commonLocators.propertyPaneTitle).should( + "contain", + "Simple_Modal_Text", + ); + cy.get(widgets.modalCloseButton).click({ force: true }); + }); - it("3. Switches tabs when selecting a tab", () => { - EditorNavigation.SelectEntityByName( - "UnselectedTab", - EntityType.Widget, - {}, - ["Tabs1"], - ); + it("3. Switches tabs when selecting a tab", () => { + EditorNavigation.SelectEntityByName( + "UnselectedTab", + EntityType.Widget, + {}, + ["Tabs1"], + ); - // Assert correct tab is open - cy.wait(1000); - cy.get(".t--page-switch-tab.is-active").contains("UnselectedTab"); - }); + // Assert correct tab is open + cy.wait(1000); + cy.get(".t--page-switch-tab.is-active").contains("UnselectedTab"); + }); - it("4. Switches tabs when selecting a widget inside other tab", () => { - EditorNavigation.SelectEntityByName("Button6", EntityType.Widget, {}, [ - "UnselectedTab", - ]); + it("4. Switches tabs when selecting a widget inside other tab", () => { + EditorNavigation.SelectEntityByName("Button6", EntityType.Widget, {}, [ + "UnselectedTab", + ]); - // Assert correct tab is open and button selected - cy.wait(1000); - cy.get(".t--page-switch-tab.is-active").contains("UnselectedTab"); - cy.get(commonLocators.propertyPaneTitle).should("contain", "Button6"); - }); - it("5. Switches tabs with a button inside the tab", () => { - cy.get(".t--page-switch-tab") - .contains("UnselectedTab") - .click({ force: true }); - cy.wait(1000); - cy.get(widgets.buttonWidget).contains("Unselected").click({ force: true }); - // Assert tab is switched - cy.get(".t--page-switch-tab.is-active").should("contain", "InternalTab"); - cy.get(commonLocators.propertyPaneTitle).should("contain", "Button6"); - }); - it("6. Switches tabs when selecting a widget inside hidden tab", () => { - EditorNavigation.SelectEntityByName("Button7", EntityType.Widget, {}, [ - "Tab 3", - ]); + // Assert correct tab is open and button selected + cy.wait(1000); + cy.get(".t--page-switch-tab.is-active").contains("UnselectedTab"); + cy.get(commonLocators.propertyPaneTitle).should("contain", "Button6"); + }); + it("5. Switches tabs with a button inside the tab", () => { + cy.get(".t--page-switch-tab") + .contains("UnselectedTab") + .click({ force: true }); + cy.wait(1000); + cy.get(widgets.buttonWidget) + .contains("Unselected") + .click({ force: true }); + // Assert tab is switched + cy.get(".t--page-switch-tab.is-active").should("contain", "InternalTab"); + cy.get(commonLocators.propertyPaneTitle).should("contain", "Button6"); + }); + it("6. Switches tabs when selecting a widget inside hidden tab", () => { + EditorNavigation.SelectEntityByName("Button7", EntityType.Widget, {}, [ + "Tab 3", + ]); - // Assert button is selected - cy.wait(1000); - cy.get(".t--page-switch-tab.is-active").should("not.exist"); - cy.get(commonLocators.propertyPaneTitle).should("contain", "Button7"); - }); + // Assert button is selected + cy.wait(1000); + cy.get(".t--page-switch-tab.is-active").should("not.exist"); + cy.get(commonLocators.propertyPaneTitle).should("contain", "Button7"); + }); - it("7. Assert the overkill", () => { - EditorNavigation.SelectEntityByName("OverKillText", EntityType.Widget, {}, [ - "Overkill_Modal", - "Tabs2", - "Tab 2", - "Tabs3", - "Canvas9", - "Tabs4", - "Canvas11", - "Tabs5", - "Canvas13", - ]); + it("7. Assert the overkill", () => { + EditorNavigation.SelectEntityByName( + "OverKillText", + EntityType.Widget, + {}, + [ + "Overkill_Modal", + "Tabs2", + "Tab 2", + "Tabs3", + "Canvas9", + "Tabs4", + "Canvas11", + "Tabs5", + "Canvas13", + ], + ); - // Assert that widget is seen - cy.get(commonLocators.propertyPaneTitle).should("contain", "OverKillText"); - cy.get(`div[data-testid='t--selected']`) - .should("have.length", 1) - .should("have.class", "t--draggable-textwidget") - .contains("Overkill Widget"); - }); -}); + // Assert that widget is seen + cy.get(commonLocators.propertyPaneTitle).should( + "contain", + "OverKillText", + ); + cy.get(`div[data-testid='t--selected']`) + .should("have.length", 1) + .should("have.class", "t--draggable-textwidget") + .contains("Overkill Widget"); + }); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Tab_rename_Delete_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Tab_rename_Delete_spec.ts index fe76b3118a28..df52ca57622b 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Tab_rename_Delete_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Tab_rename_Delete_spec.ts @@ -9,36 +9,39 @@ import EditorNavigation, { PageLeftPane, } from "../../../../support/Pages/EditorNavigation"; -describe("Tab widget test", { tags: ["@tag.IDE"] }, function () { - const tabname = "UpdatedTab"; - before(() => { - agHelper.AddDsl("tabdsl"); - }); +describe( + "Tab widget test", + { tags: ["@tag.IDE", "@tag.PropertyPane"] }, + function () { + const tabname = "UpdatedTab"; + before(() => { + agHelper.AddDsl("tabdsl"); + }); - it("1. Tab Widget Functionality To rename Tabs from entity explorer", function () { - EditorNavigation.SelectEntityByName("Tabs1", EntityType.Widget); - PageLeftPane.expandCollapseItem("Tabs1"); - entityExplorer.RenameEntityFromExplorer("Tab1", tabname, true); - }); + it("1. Tab Widget Functionality To rename Tabs from entity explorer", function () { + EditorNavigation.SelectEntityByName("Tabs1", EntityType.Widget); + PageLeftPane.expandCollapseItem("Tabs1"); + entityExplorer.RenameEntityFromExplorer("Tab1", tabname, true); + }); - it("2. Tab Widget Functionality To delete Tabs from entity explorer", function () { - EditorNavigation.SelectEntityByName("Tabs1", EntityType.Widget); - PageLeftPane.expandCollapseItem("Tabs1"); - entityExplorer.ActionContextMenuByEntityName({ - entityNameinLeftSidebar: "Tab2", - action: "Rename", + it("2. Tab Widget Functionality To delete Tabs from entity explorer", function () { + EditorNavigation.SelectEntityByName("Tabs1", EntityType.Widget); + PageLeftPane.expandCollapseItem("Tabs1"); + entityExplorer.ActionContextMenuByEntityName({ + entityNameinLeftSidebar: "Tab2", + action: "Rename", + }); + agHelper.TypeText(locators._entityNameEditing("Tab2"), tabname); + agHelper.Sleep(2000); + entityExplorer.ValidateDuplicateMessageToolTip(tabname); + cy.get(explorer.editEntity) + .last() + .click() + .type("Tab2" + "{enter}", { force: true }); + entityExplorer.DeleteWidgetFromEntityExplorer(tabname + "Tab2"); }); - agHelper.TypeText(locators._entityNameEditing("Tab2"), tabname); - agHelper.Sleep(2000); - entityExplorer.ValidateDuplicateMessageToolTip(tabname); - cy.get(explorer.editEntity) - .last() - .click() - .type("Tab2" + "{enter}", { force: true }); - entityExplorer.DeleteWidgetFromEntityExplorer(tabname + "Tab2"); - }); - /* To be enabled once the bug is fixed + /* To be enabled once the bug is fixed it("Publish app and check for the widget name", function() { deployMode.DeployApp(); cy.get(publish.tabWidget) @@ -61,7 +64,8 @@ deployMode.NavigateBacktoEditor(); .should("not.be.visible"); }); */ -}); + }, +); afterEach(() => { // put your clean up code if any diff --git a/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Widgets_Copy_Delete_Undo_spec.js b/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Widgets_Copy_Delete_Undo_spec.js index 9c8d981cda5e..ac48486220e0 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Widgets_Copy_Delete_Undo_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Widgets_Copy_Delete_Undo_spec.js @@ -17,7 +17,7 @@ before(() => { describe( "Test Suite to validate copy/delete/undo functionalites", - { tags: ["@tag.IDE", "@tag.Sanity"] }, + { tags: ["@tag.IDE", "@tag.Sanity", "@tag.PropertyPane"] }, function () { const modifierKey = Cypress.platform === "darwin" ? "meta" : "ctrl"; diff --git a/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Widgets_Copy_Paste_Delete_Undo_Keyboard_Event_spec.js b/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Widgets_Copy_Paste_Delete_Undo_Keyboard_Event_spec.js index dab2b9f5b084..350e4b008565 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Widgets_Copy_Paste_Delete_Undo_Keyboard_Event_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Widgets_Copy_Paste_Delete_Undo_Keyboard_Event_spec.js @@ -16,7 +16,7 @@ before(() => { describe( "Test Suite to validate copy/delete/undo functionalites", - { tags: ["@tag.IDE"] }, + { tags: ["@tag.IDE", "@tag.PropertyPane"] }, function () { it("1. Drag and drop form widget and validate copy widget via toast message", function () { const modifierKey = Cypress.platform === "darwin" ? "meta" : "ctrl"; diff --git a/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Widgets_spec.js b/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Widgets_spec.js index c08e88e2ca38..552b50ca0720 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Widgets_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Widgets_spec.js @@ -7,7 +7,7 @@ import * as _ from "../../../../support/Objects/ObjectsCore"; describe( "Entity explorer tests related to widgets and validation", - { tags: ["@tag.IDE"] }, + { tags: ["@tag.IDE", "@tag.PropertyPane"] }, function () { before(() => { _.agHelper.AddDsl("displayWidgetDsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Fork/ForkAppWithMultipleDS_Spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Fork/ForkAppWithMultipleDS_Spec.ts index 1ff3847aa8dc..34d2bd4c1660 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Fork/ForkAppWithMultipleDS_Spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Fork/ForkAppWithMultipleDS_Spec.ts @@ -9,7 +9,9 @@ let targetWorkspaceId: string; describe( "Fork application with multiple datasources", - { tags: ["@tag.Fork"] }, + { + tags: ["@tag.Fork", "@tag.Datasource", "@tag.Git", "@tag.Table", "@tag.JS"], + }, function () { it("1. Bug Id: 24708 - fork and test the forked application", function () { // Create a new workspace and fork application diff --git a/app/client/cypress/e2e/Regression/ClientSide/Fork/ForkApplicationInDeployedMode_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Fork/ForkApplicationInDeployedMode_spec.ts index 9de8b3ef1688..637d705ec7ed 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Fork/ForkApplicationInDeployedMode_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Fork/ForkApplicationInDeployedMode_spec.ts @@ -8,7 +8,9 @@ import applicationLocators from "../../../../locators/Applications.json"; describe( "Fork application in deployed mode", - { tags: ["@tag.Fork"] }, + { + tags: ["@tag.Fork", "@tag.Datasource", "@tag.Git", "@tag.Table", "@tag.JS"], + }, function () { it("1. Fork modal should open and close", function () { appSettings.OpenAppSettings(); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Fork/ForkApplicationReconnectModal_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Fork/ForkApplicationReconnectModal_spec.ts index 3495f3942d8e..9b3d2056ac4b 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Fork/ForkApplicationReconnectModal_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Fork/ForkApplicationReconnectModal_spec.ts @@ -8,7 +8,16 @@ let currentWorkspace: string, currentAppName: string, forkWorkspaceName: string; describe( "Fork application across workspaces", - { tags: ["@tag.Fork", "@tag.Sanity"] }, + { + tags: [ + "@tag.Fork", + "@tag.Sanity", + "@tag.Datasource", + "@tag.Git", + "@tag.Table", + "@tag.JS", + ], + }, function () { it("Bug 24702: Signed user should be able to fork a public forkable app & Check if the forked application has the same dsl as the original", function () { // Create new workspace to create App in diff --git a/app/client/cypress/e2e/Regression/ClientSide/Fork/ForkApplicationWithinAppEditor_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Fork/ForkApplicationWithinAppEditor_spec.ts index 0f45c14af7b3..bcef1ac1fa49 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Fork/ForkApplicationWithinAppEditor_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Fork/ForkApplicationWithinAppEditor_spec.ts @@ -5,7 +5,9 @@ import EditorNavigation, { describe( "Fork application across workspaces", - { tags: ["@tag.Fork"] }, + { + tags: ["@tag.Fork", "@tag.Datasource", "@tag.Git", "@tag.Table", "@tag.JS"], + }, function () { before(() => { _.agHelper.AddDsl("basicDsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Fork/ForkApplication_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Fork/ForkApplication_spec.ts index 8a2bfbebb65b..a4612d360b92 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Fork/ForkApplication_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Fork/ForkApplication_spec.ts @@ -25,7 +25,9 @@ let forkableAppUrl: any; describe( "Fork application across workspaces", - { tags: ["@tag.Fork"] }, + { + tags: ["@tag.Fork", "@tag.Datasource", "@tag.Git", "@tag.Table", "@tag.JS"], + }, function () { it("1. Mark application as forkable", () => { cy.LoginFromAPI(Cypress.env("USERNAME"), Cypress.env("PASSWORD")); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Git/ExistingApps/v1.9.24/DSCrudAndBindings_Spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Git/ExistingApps/v1.9.24/DSCrudAndBindings_Spec.ts index 85eb6edf6ec1..909105a76031 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Git/ExistingApps/v1.9.24/DSCrudAndBindings_Spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Git/ExistingApps/v1.9.24/DSCrudAndBindings_Spec.ts @@ -4,24 +4,31 @@ import { dataSources, deployMode, draggableWidgets, - entityExplorer, gitSync, homePage, - jsEditor, locators, - propPane, table, } from "../../../../../../support/Objects/ObjectsCore"; -import EditorNavigation, { - EntityType, - PageLeftPane, -} from "../../../../../../support/Pages/EditorNavigation"; +import PageList from "../../../../../../support/Pages/PageList"; describe( "Import and validate older app (app created in older versions of Appsmith) from Gitea", - { tags: ["@tag.Git", "@tag.Sanity"] }, + { + tags: [ + "@tag.Git", + "@tag.Sanity", + "@tag.TedMigration", + "@tag.AccessControl", + "@tag.Workflows", + "@tag.Module", + "@tag.Theme", + "@tag.JS", + "@tag.Container", + "@tag.ImportExport", + ], + }, function () { - let appRepoName = "TestMigration", + let appRepoName = "TED-migration-test-1", appName = "UpgradeAppToLatestVersion", keyId: any, workspaceName: any; @@ -41,68 +48,21 @@ describe( dataSources.ReconnectDSbyType("MongoDB"); dataSources.ReconnectDSbyType("MySQL"); dataSources.ReconnectDSbyType("PostgreSQL"); - agHelper.Sleep(3000); //for CI to reconnect successfully homePage.AssertNCloseImport(); - }); - - it("1. Validate merge status + Bug23822", () => { - PageLeftPane.assertPresence("ListingAndReviews"); - //Wait for the app to settle - agHelper.Sleep(3000); homePage.RenameApplication(appName); + PageList.assertPresence("ListingAndReviews"); + + // this logic will have to be removed after decimal issue with auto-commit is resolved assertHelper.AssertNetworkResponseData("gitStatus"); agHelper.AssertElementExist(gitSync._bottomBarCommit, 0, 30000); - agHelper.AssertText(gitSync._gitPullCount, "text", "4"); agHelper.GetNClick(gitSync._bottomBarCommit); agHelper.AssertElementVisibility(gitSync._gitSyncModal); - - //This is expected due to Canvas Splitting PR changes in v1.9.24 - agHelper.GetNAssertContains( - gitSync._gitStatusChanges, - /[0-9] page(|s) modified/, - ); - - // Commenting it as part of #28012 - to be added back later - // agHelper.GetNAssertElementText( - // gitSync._gitStatusChanges, - // "Application settings modified", - // "not.contain.text", - // ); - agHelper.GetNAssertElementText( - gitSync._gitStatusChanges, - "Theme modified", - "not.contain.text", - ); - agHelper.AssertContains(/[0-9] quer(y|ies) modified/, "not.exist"); - - // Commented out due to #25739 - to be fixed by dev later - // agHelper.GetNAssertElementText( - // gitSync._gitStatusChanges, - // "datasource modified", - // "not.contain.text", - // ); - - agHelper.AssertContains(/[0-9] JS Object(|s) modified/, "not.exist"); - - // Commenting it as part of #28012 - to be added back later - // agHelper.AssertContains(/[0-9] librar(y|ies) modified/, "not.exist"); - - // This assertions is commented out due to issue #https://github.com/appsmithorg/appsmith/issues/28563 - // Since we don't want this specific message appearing when we are just migrating the metadata, - // this assertion is not required. - // Slack conversation: https://theappsmith.slack.com/archives/C04HERDNZPA/p1698851532418569 - - // agHelper.GetNAssertElementText( - // gitSync._gitStatusChanges, - // "Some of the changes above are due to an improved file structure designed to reduce merge conflicts. You can safely commit them to your repository.", - // "contain.text", - // ); agHelper.GetNClick(gitSync._commitButton); assertHelper.AssertNetworkStatus("@commit", 201); gitSync.CloseGitSyncModal(); }); - it("2. Deploy the app & Validate CRUD pages - Mongo , MySql, Postgres pages", () => { + it("1. Deploy the app & Validate CRUD pages - Mongo , MySql, Postgres pages", () => { //Mongo CRUD page validation //Assert table data cy.latestDeployPreview(); @@ -112,7 +72,7 @@ describe( "listingAndReviews Data", ); agHelper.AssertElementVisibility(locators._widgetByName("data_table")); - table.WaitUntilTableLoad(0, 0, "v2"); + table.WaitUntilTableLoad(0, 0); //Filter & validate table data table.OpenNFilterTable("_id", "is exactly", "15665837"); @@ -131,7 +91,7 @@ describe( "countryFlags Data", ); agHelper.AssertElementVisibility(locators._widgetByName("data_table")); - table.WaitUntilTableLoad(0, 0, "v2"); + table.WaitUntilTableLoad(0, 0); //Filter & validate table data table.OpenNFilterTable("Country", "starts with", "Ba"); @@ -152,7 +112,7 @@ describe( "public_astronauts Data", ); agHelper.AssertElementVisibility(locators._widgetByName("data_table")); - table.WaitUntilTableLoad(0, 0, "v2"); + table.WaitUntilTableLoad(0, 0); //Filter & validate table data table.OpenNFilterTable("id", "is exactly", "196"); @@ -164,10 +124,8 @@ describe( //Update table data deployMode.EnterJSONInputValue("Statusid", "5", 0, true); deployMode.EnterJSONInputValue("Statusname", "Active", 0, true); - agHelper.Sleep(500); agHelper.ClickButton("Update"); - agHelper.Sleep(2000); //for CI update to be successful - table.WaitUntilTableLoad(0, 0, "v1"); + table.WaitUntilTableLoad(0, 0); //Validate updated values in table table.ReadTableRowColumnData(0, 3).then(($cellData) => { @@ -176,10 +134,9 @@ describe( table.ReadTableRowColumnData(0, 4).then(($cellData) => { expect($cellData).to.eq("Active"); }); - agHelper.Sleep(500); }); - it("3. Validate widgets & bindings", () => { + it("2. Validate widgets & bindings", () => { agHelper.GetNClickByContains(locators._deployedPage, "Widgets"); agHelper.AssertElementVisibility( locators._widgetInDeployed(draggableWidgets.AUDIO), @@ -194,22 +151,35 @@ describe( locators._widgetInDeployed(draggableWidgets.CHART), ); - //Button - agHelper.ClickButton("Alert button"); - agHelper.Sleep(500); - agHelper.WaitUntilToastDisappear( - "404 hit : invalidApi failed to execute", - ); - //Checkbox group agHelper.AssertElementVisibility( locators._widgetInDeployed(draggableWidgets.CHECKBOXGROUP), ); - agHelper.GetNAssertElementText( + agHelper.GetNAssertContains( + locators._widgetInDeployed(draggableWidgets.CHECKBOXGROUP), + "Select Astronaut", + ); + agHelper.GetNAssertContains( + locators._widgetInDeployed(draggableWidgets.CHECKBOXGROUP), + "Ulf Merbold", + ); + agHelper.GetNAssertContains( + locators._widgetInDeployed(draggableWidgets.CHECKBOXGROUP), + "Andreas Mogensen", + ); + agHelper.GetNAssertContains( + locators._widgetInDeployed(draggableWidgets.CHECKBOXGROUP), + "Wubbo Ockels", + ); + agHelper.GetNAssertContains( + locators._widgetInDeployed(draggableWidgets.CHECKBOXGROUP), + "Thomas Reiter", + ); + agHelper.GetNAssertContains( locators._widgetInDeployed(draggableWidgets.CHECKBOXGROUP), - "Select AstronautUlf MerboldAndreas MogensenWubbo OckelsThomas ReiterAnil Menon", - "have.text", + "Anil Menon", ); + agHelper .GetElement(locators._checkboxTypeByOption("Ulf Merbold")) .should("be.checked"); @@ -219,10 +189,8 @@ describe( agHelper .ScrollIntoView(locators._sliderThumb) .focus() - .type("{rightArrow}") - .wait(500); + .type("{rightArrow}"); - agHelper.Sleep(500); agHelper.WaitUntilToastDisappear("Category Value Changed!"); //Currency input @@ -261,51 +229,6 @@ describe( agHelper.WaitUntilToastDisappear("Delete customer successful!"); agHelper.ClickButton("Close"); agHelper.AssertElementAbsence(locators._modal); - agHelper.Sleep(2000); - }); - - it.skip("4. Edit JSObject & Check Updated Data ", () => { - deployMode.NavigateBacktoEditor(); - //Edit existing JS object - EditorNavigation.SelectEntityByName("users", EntityType.JSObject); - jsEditor.EditJSObj(`export default { - fun: async () => { - return await invalidApi.run().catch((e) => showAlert("404 hit : " + e.message)); - }, - myFun1: async () => { - //write code here - const data = JSON.stringify(await usersApi.run()) - return data - }, - myFun2: async () => { - //use async-await or promises - await this.myFun1() - return showAlert("myFun2 Data") - } - }`); - - //Update property field for button - EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); - propPane.EnterJSContext("onClick", `{{users.myFun2()}}`, true, false); - - //Drag n drop text widget & bind it to myFun1 - entityExplorer.DragDropWidgetNVerify(draggableWidgets.TEXT); - propPane.TypeTextIntoField("Text", `{{users.myFun1.data}}`); - agHelper.ValidateToastMessage( - "[users.myFun1] will be executed automatically on page load", - ); - - //Commit & push new changes - gitSync.CommitAndPush(); - cy.latestDeployPreview(); - - //Validate new response for button & text widget - agHelper.GetNClickByContains(locators._deployedPage, "Widgets"); - agHelper.ClickButton("Submit"); - agHelper.ValidateToastMessage("myFun2 Data"); - agHelper - .GetText(locators._widgetInDeployed(draggableWidgets.TEXT), "text") - .should("not.be.empty"); }); after(() => { diff --git a/app/client/cypress/e2e/Regression/ClientSide/Git/GitAutocommit_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Git/GitAutocommit_spec.ts index c55b51711cea..fc6e6ff070bb 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Git/GitAutocommit_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Git/GitAutocommit_spec.ts @@ -16,6 +16,13 @@ describe( "@tag.GitAutocommit", "@tag.Sanity", "@tag.TedMigration", + "@tag.AccessControl", + "@tag.Workflows", + "@tag.Module", + "@tag.Theme", + "@tag.JS", + "@tag.Container", + "@tag.ImportExport", ], }, function () { diff --git a/app/client/cypress/e2e/Regression/ClientSide/Git/GitDiscardChange/DiscardChanges_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Git/GitDiscardChange/DiscardChanges_spec.js index fd1877ce5c20..2a2a4818b929 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Git/GitDiscardChange/DiscardChanges_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Git/GitDiscardChange/DiscardChanges_spec.js @@ -19,7 +19,19 @@ import PageList from "../../../../../support/Pages/PageList"; describe( "Git discard changes:", - { tags: ["@tag.Git", "@tag.Sanity"] }, + { + tags: [ + "@tag.Git", + "@tag.Sanity", + "@tag.AccessControl", + "@tag.Workflows", + "@tag.Module", + "@tag.Theme", + "@tag.JS", + "@tag.Container", + "@tag.ImportExport", + ], + }, function () { let datasourceName; let repoName; diff --git a/app/client/cypress/e2e/Regression/ClientSide/Git/GitImport/GitImport_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Git/GitImport/GitImport_spec.js index 0c64032af71b..118bcb335e36 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Git/GitImport/GitImport_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Git/GitImport/GitImport_spec.js @@ -23,7 +23,19 @@ import PageList from "../../../../../support/Pages/PageList"; describe( "Git import flow ", - { tags: ["@tag.Git", "@tag.Sanity"] }, + { + tags: [ + "@tag.Git", + "@tag.Sanity", + "@tag.AccessControl", + "@tag.Workflows", + "@tag.Module", + "@tag.Theme", + "@tag.JS", + "@tag.Container", + "@tag.ImportExport", + ], + }, function () { it("1. Import an app from JSON with Postgres, MySQL, Mongo db & then connect it to Git", () => { homePage.NavigateToHome(); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Git/GitImport/ImportEmptyRepo_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Git/GitImport/ImportEmptyRepo_spec.js index 50ba0fb3a345..04b1d6c65551 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Git/GitImport/ImportEmptyRepo_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Git/GitImport/ImportEmptyRepo_spec.js @@ -2,39 +2,54 @@ import homePage from "../../../../../locators/HomePage"; import gitSyncLocators from "../../../../../locators/gitSyncLocators"; import * as _ from "../../../../../support/Objects/ObjectsCore"; -describe("Git import empty repository", { tags: ["@tag.Git"] }, function () { - let repoName; - const assertConnectFailure = true; - const failureMessage = - "git import failed. \nDetails: Cannot import app from an empty repo"; - before(() => { - _.homePage.NavigateToHome(); - cy.createWorkspace(); - cy.wait("@createWorkspace").then((interception) => { - const newWorkspaceName = interception.response.body.data.name; - cy.CreateAppForWorkspace(newWorkspaceName, newWorkspaceName); - }); - cy.generateUUID().then((uid) => { - repoName = uid; - _.gitSync.CreateTestGiteaRepo(repoName); +describe( + "Git import empty repository", + { + tags: [ + "@tag.Git", + "@tag.AccessControl", + "@tag.Workflows", + "@tag.Module", + "@tag.Theme", + "@tag.JS", + "@tag.Container", + "@tag.ImportExport", + ], + }, + function () { + let repoName; + const assertConnectFailure = true; + const failureMessage = + "git import failed. \nDetails: Cannot import app from an empty repo"; + before(() => { + _.homePage.NavigateToHome(); + cy.createWorkspace(); + cy.wait("@createWorkspace").then((interception) => { + const newWorkspaceName = interception.response.body.data.name; + cy.CreateAppForWorkspace(newWorkspaceName, newWorkspaceName); + }); + cy.generateUUID().then((uid) => { + repoName = uid; + _.gitSync.CreateTestGiteaRepo(repoName); + }); }); - }); - it("1. Bug #12749 Git Import - Empty Repo NullPointerException", () => { - cy.generateUUID().then((uid) => { - repoName = uid; - _.gitSync.CreateTestGiteaRepo(repoName); - _.gitSync.ImportAppFromGit(undefined, repoName, false); - cy.wait("@importFromGit").then((interception) => { - const status = interception.response.body.responseMeta.status; - const message = interception.response.body.responseMeta.error.message; - expect(status).to.be.gte(400); - expect(message).to.contain(failureMessage); - cy.get(gitSyncLocators.closeGitSyncModal).click(); + it("1. Bug #12749 Git Import - Empty Repo NullPointerException", () => { + cy.generateUUID().then((uid) => { + repoName = uid; + _.gitSync.CreateTestGiteaRepo(repoName); + _.gitSync.ImportAppFromGit(undefined, repoName, false); + cy.wait("@importFromGit").then((interception) => { + const status = interception.response.body.responseMeta.status; + const message = interception.response.body.responseMeta.error.message; + expect(status).to.be.gte(400); + expect(message).to.contain(failureMessage); + cy.get(gitSyncLocators.closeGitSyncModal).click(); + }); }); }); - }); - after(() => { - _.gitSync.DeleteTestGithubRepo(repoName); - }); -}); + after(() => { + _.gitSync.DeleteTestGithubRepo(repoName); + }); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Git/GitPersistBranch_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Git/GitPersistBranch_spec.ts new file mode 100644 index 000000000000..a0bbf7d0817a --- /dev/null +++ b/app/client/cypress/e2e/Regression/ClientSide/Git/GitPersistBranch_spec.ts @@ -0,0 +1,45 @@ +import { featureFlagIntercept } from "../../../../support/Objects/FeatureFlags"; +import { + agHelper, + gitSync, + homePage, +} from "../../../../support/Objects/ObjectsCore"; + +let wsName: string; +let appName: string; +let repoName: string; + +describe( + "Git Persist Branch", + { + tags: ["@tag.Git", "@tag.GitPersistBranch"], + }, + function () { + before(() => { + agHelper.GenerateUUID(); + cy.get("@guid").then((uid) => { + wsName = "GitPB-" + uid; + appName = "GitPB1-" + uid; + homePage.CreateNewWorkspace(wsName, true); + homePage.CreateAppInWorkspace(wsName, appName); + gitSync.CreateNConnectToGit("test-git-perssit-branch", true, true); + cy.get("@gitRepoName").then((resRepoName) => { + repoName = resRepoName.toString(); + homePage.NavigateToHome(); + }); + }); + }); + it("Check if branch persist after changing branch and exiting the app", function () { + featureFlagIntercept({ release_git_persist_branch_enabled: true }, true); + homePage.EditAppFromAppHover(appName); + gitSync.CreateGitBranch("b1", false); + cy.get("@gitbranchName").then((resBranchName) => { + const branchName = resBranchName.toString(); + homePage.NavigateToHome(); + homePage.EditAppFromAppHover(appName); + gitSync.AssertBranchName(branchName); + gitSync.AssertBranchNameInUrl(branchName); + }); + }); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Git/GitSync/DeleteBranch_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Git/GitSync/DeleteBranch_spec.js index f1259df417de..69ebc80ffda2 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Git/GitSync/DeleteBranch_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Git/GitSync/DeleteBranch_spec.js @@ -7,112 +7,128 @@ import { } from "../../../../../support/Pages/EditorNavigation"; let repoName, branchName; -describe("Delete branch flow", { tags: ["@tag.Git", "@tag.Sanity"] }, () => { - it("1. Connect app to git, create new branch and delete it", () => { - // create git repo and connect app to git - gitSync.CreateNConnectToGit(); - cy.get("@gitRepoName").then((repName) => { - repoName = repName; +describe( + "Delete branch flow", + { + tags: [ + "@tag.Git", + "@tag.Sanity", + "@tag.AccessControl", + "@tag.Workflows", + "@tag.Module", + "@tag.Theme", + "@tag.JS", + "@tag.Container", + "@tag.ImportExport", + ], + }, + () => { + it("1. Connect app to git, create new branch and delete it", () => { + // create git repo and connect app to git + gitSync.CreateNConnectToGit(); + cy.get("@gitRepoName").then((repName) => { + repoName = repName; + }); + gitSync.CreateGitBranch(); + //cy.createGitBranch(branchName); + cy.wait(1000); + // verify can not delete the checked out branch + DeleteBranchFromUI(1); + cy.get("@gitbranchName").then((branName) => { + branchName = branName; + agHelper.ValidateToastMessage( + `Cannot delete checked out branch. Please check out other branch before deleting ${branchName}.`, + ); + cy.get(gitSyncLocators.closeBranchList).click({ force: true }); + // switch to master and delete new branch created + cy.switchGitBranch("master"); + cy.wait(2000); + + DeleteBranchFromUI(1); + cy.wait("@deleteBranch").should( + "have.nested.property", + "response.body.responseMeta.status", + 200, + ); + cy.get(gitSyncLocators.closeBranchList).click({ force: true }); + // verify remote branch is there for the deleted local branch + cy.wait(2000); + cy.switchGitBranch(`origin/${branchName}`); + cy.wait(2000); + }); }); - gitSync.CreateGitBranch(); - //cy.createGitBranch(branchName); - cy.wait(1000); - // verify can not delete the checked out branch - DeleteBranchFromUI(1); - cy.get("@gitbranchName").then((branName) => { - branchName = branName; - agHelper.ValidateToastMessage( - `Cannot delete checked out branch. Please check out other branch before deleting ${branchName}.`, - ); - cy.get(gitSyncLocators.closeBranchList).click({ force: true }); - // switch to master and delete new branch created + + it("2. Create child branch, merge data from child branch, delete child branch verify the data should reflect in master ", () => { + cy.switchGitBranch("master"); + gitSync.CreateGitBranch("", true); + cy.wait(1000); + PageLeftPane.switchSegment(PagePaneSegment.UI); + cy.dragAndDropToCanvas("checkboxwidget", { x: 100, y: 200 }); + cy.get(".t--draggable-checkboxwidget").should("exist"); + cy.wait(2000); + cy.commitAndPush(); + cy.merge("master"); + gitSync.CloseGitSyncModal(); cy.switchGitBranch("master"); cy.wait(2000); DeleteBranchFromUI(1); + cy.wait("@deleteBranch").should( "have.nested.property", "response.body.responseMeta.status", 200, ); cy.get(gitSyncLocators.closeBranchList).click({ force: true }); - // verify remote branch is there for the deleted local branch - cy.wait(2000); - cy.switchGitBranch(`origin/${branchName}`); - cy.wait(2000); + cy.get(".t--draggable-checkboxwidget").should("be.visible"); }); - }); - - it("2. Create child branch, merge data from child branch, delete child branch verify the data should reflect in master ", () => { - cy.switchGitBranch("master"); - gitSync.CreateGitBranch("", true); - cy.wait(1000); - PageLeftPane.switchSegment(PagePaneSegment.UI); - cy.dragAndDropToCanvas("checkboxwidget", { x: 100, y: 200 }); - cy.get(".t--draggable-checkboxwidget").should("exist"); - cy.wait(2000); - cy.commitAndPush(); - cy.merge("master"); - gitSync.CloseGitSyncModal(); - cy.switchGitBranch("master"); - cy.wait(2000); - - DeleteBranchFromUI(1); - - cy.wait("@deleteBranch").should( - "have.nested.property", - "response.body.responseMeta.status", - 200, - ); - cy.get(gitSyncLocators.closeBranchList).click({ force: true }); - cy.get(".t--draggable-checkboxwidget").should("be.visible"); - }); - it("3. Create new branch, commit data in that branch , delete the branch, verify data should not reflect in master ", () => { - gitSync.CreateGitBranch("", true); - cy.wait(1000); - PageLeftPane.switchSegment(PagePaneSegment.UI); - cy.dragAndDropToCanvas("chartwidget", { x: 210, y: 300 }); - cy.get(".t--widget-chartwidget").should("exist"); - cy.wait(2000); - cy.commitAndPush(); - cy.wait(1000); - cy.switchGitBranch("master"); - cy.wait(3000); + it("3. Create new branch, commit data in that branch , delete the branch, verify data should not reflect in master ", () => { + gitSync.CreateGitBranch("", true); + cy.wait(1000); + PageLeftPane.switchSegment(PagePaneSegment.UI); + cy.dragAndDropToCanvas("chartwidget", { x: 210, y: 300 }); + cy.get(".t--widget-chartwidget").should("exist"); + cy.wait(2000); + cy.commitAndPush(); + cy.wait(1000); + cy.switchGitBranch("master"); + cy.wait(3000); - DeleteBranchFromUI(1); + DeleteBranchFromUI(1); - cy.wait("@deleteBranch").should( - "have.nested.property", - "response.body.responseMeta.status", - 200, - ); - cy.get(".--widget-chartwidget").should("not.exist"); - cy.get(gitSyncLocators.closeBranchList).click({ force: true }); - }); + cy.wait("@deleteBranch").should( + "have.nested.property", + "response.body.responseMeta.status", + 200, + ); + cy.get(".--widget-chartwidget").should("not.exist"); + cy.get(gitSyncLocators.closeBranchList).click({ force: true }); + }); - it("4. Verify Default branch deletion not allowed ", () => { - agHelper.Sleep(2000); //for toasts to appear then wait for disappear - agHelper.WaitUntilAllToastsDisappear(); - DeleteBranchFromUI(0); - cy.get(gitSyncLocators.closeBranchList).click({ force: true }); - agHelper.ValidateToastMessage("Cannot delete default branch: master"); - }); + it("4. Verify Default branch deletion not allowed ", () => { + agHelper.Sleep(2000); //for toasts to appear then wait for disappear + agHelper.WaitUntilAllToastsDisappear(); + DeleteBranchFromUI(0); + cy.get(gitSyncLocators.closeBranchList).click({ force: true }); + agHelper.ValidateToastMessage("Cannot delete default branch: master"); + }); - function DeleteBranchFromUI(index = 1) { - cy.get(gitSyncLocators.branchButton).click(); - cy.get(gitSyncLocators.branchListItem) - .eq(index) - .trigger("mouseenter") - .wait(1000); - cy.get(gitSyncLocators.gitBranchContextMenu).click({ force: true }); - cy.xpath("//div[@role='menu']//span[text()='Delete']") - .should("be.visible") - .click({ force: true }); - } + function DeleteBranchFromUI(index = 1) { + cy.get(gitSyncLocators.branchButton).click(); + cy.get(gitSyncLocators.branchListItem) + .eq(index) + .trigger("mouseenter") + .wait(1000); + cy.get(gitSyncLocators.gitBranchContextMenu).click({ force: true }); + cy.xpath("//div[@role='menu']//span[text()='Delete']") + .should("be.visible") + .click({ force: true }); + } - after(() => { - //clean up - gitSync.DeleteTestGithubRepo(repoName); - }); -}); + after(() => { + //clean up + gitSync.DeleteTestGithubRepo(repoName); + }); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Git/GitSync/Deploy_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Git/GitSync/Deploy_spec.js index e2d3411a371c..ed78013ecc09 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Git/GitSync/Deploy_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Git/GitSync/Deploy_spec.js @@ -5,7 +5,19 @@ import * as _ from "../../../../../support/Objects/ObjectsCore"; let repoName; describe( "Git sync modal: deploy tab", - { tags: ["@tag.Git", "@tag.Sanity"] }, + { + tags: [ + "@tag.Git", + "@tag.Sanity", + "@tag.AccessControl", + "@tag.Workflows", + "@tag.Module", + "@tag.Theme", + "@tag.JS", + "@tag.Container", + "@tag.ImportExport", + ], + }, function () { before(() => { _.homePage.NavigateToHome(); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Git/GitSync/DisconnectGit_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Git/GitSync/DisconnectGit_spec.js index 1b69edeef302..77855eef72c4 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Git/GitSync/DisconnectGit_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Git/GitSync/DisconnectGit_spec.js @@ -3,113 +3,130 @@ import * as _ from "../../../../../support/Objects/ObjectsCore"; let repoName; let windowOpenSpy; -describe("Git disconnect modal:", { tags: ["@tag.Git"] }, function () { - before(() => { - _.homePage.NavigateToHome(); - cy.createWorkspace(); - cy.wait("@createWorkspace").then((interception) => { - const newWorkspaceName = interception.response.body.data.name; - cy.CreateAppForWorkspace(newWorkspaceName, newWorkspaceName); +describe( + "Git disconnect modal:", + { + tags: [ + "@tag.Git", + "@tag.AccessControl", + "@tag.Workflows", + "@tag.Module", + "@tag.Theme", + "@tag.JS", + "@tag.Container", + "@tag.ImportExport", + ], + }, + function () { + before(() => { + _.homePage.NavigateToHome(); + cy.createWorkspace(); + cy.wait("@createWorkspace").then((interception) => { + const newWorkspaceName = interception.response.body.data.name; + cy.CreateAppForWorkspace(newWorkspaceName, newWorkspaceName); + }); }); - }); - it("1. should be opened with proper components", function () { - cy.generateUUID().then((uid) => { - _.gitSync.CreateNConnectToGit(uid); - cy.get("@gitRepoName").then((repName) => { - repoName = repName; + it("1. should be opened with proper components", function () { + cy.generateUUID().then((uid) => { + _.gitSync.CreateNConnectToGit(uid); + cy.get("@gitRepoName").then((repName) => { + repoName = repName; + }); }); - }); - cy.get(_.gitSync._bottomSettingsBtn).click(); - cy.get(_.gitSync._settingsTabGeneral).click(); - // after clicked disconnect on connection modal, - // it should be closed and disconnect modal should be opened - cy.get(_.gitSync._disconnectGitBtn).click(); - cy.get(gitSyncLocators.gitSyncModal).should("not.exist"); - cy.get(gitSyncLocators.disconnectGitModal).should("exist"); + cy.get(_.gitSync._bottomSettingsBtn).click(); + cy.get(_.gitSync._settingsTabGeneral).click(); + // after clicked disconnect on connection modal, + // it should be closed and disconnect modal should be opened + cy.get(_.gitSync._disconnectGitBtn).click(); + cy.get(gitSyncLocators.gitSyncModal).should("not.exist"); + cy.get(gitSyncLocators.disconnectGitModal).should("exist"); - cy.get(gitSyncLocators.disconnectGitModal).contains( - Cypress.env("MESSAGES").NONE_REVERSIBLE_MESSAGE(), - ); + cy.get(gitSyncLocators.disconnectGitModal).contains( + Cypress.env("MESSAGES").NONE_REVERSIBLE_MESSAGE(), + ); - // Stubbing window.open - cy.window().then((window) => { - windowOpenSpy = cy.stub(window, "open").callsFake((url) => { - expect(url.startsWith("https://docs.appsmith.com/")).to.be.true; - windowOpenSpy.restore(); + // Stubbing window.open + cy.window().then((window) => { + windowOpenSpy = cy.stub(window, "open").callsFake((url) => { + expect(url.startsWith("https://docs.appsmith.com/")).to.be.true; + windowOpenSpy.restore(); + }); }); - }); - cy.get(gitSyncLocators.disconnectLearnMoreLink).click(); + cy.get(gitSyncLocators.disconnectLearnMoreLink).click(); - cy.window() - .its("store") - .invoke("getState") - .then((state) => { - const { name } = state.ui.gitSync.disconnectingGitApp; - cy.get(gitSyncLocators.disconnectGitModal).contains( - Cypress.env("MESSAGES").GIT_REVOKE_ACCESS(name), - ); - cy.get(gitSyncLocators.disconnectGitModal).contains( - Cypress.env("MESSAGES").GIT_TYPE_REPO_NAME_FOR_REVOKING_ACCESS(name), - ); - }); + cy.window() + .its("store") + .invoke("getState") + .then((state) => { + const { name } = state.ui.gitSync.disconnectingGitApp; + cy.get(gitSyncLocators.disconnectGitModal).contains( + Cypress.env("MESSAGES").GIT_REVOKE_ACCESS(name), + ); + cy.get(gitSyncLocators.disconnectGitModal).contains( + Cypress.env("MESSAGES").GIT_TYPE_REPO_NAME_FOR_REVOKING_ACCESS( + name, + ), + ); + }); - // disconnect button should be disabled - cy.get(gitSyncLocators.disconnectButton).should("be.disabled"); - cy.get(gitSyncLocators.closeDisconnectModal).click(); - cy.wait(2000); - }); + // disconnect button should be disabled + cy.get(gitSyncLocators.disconnectButton).should("be.disabled"); + cy.get(gitSyncLocators.closeDisconnectModal).click(); + cy.wait(2000); + }); - it("2. should have disconnect repo button", function () { - cy.get(_.gitSync._bottomSettingsBtn).click(); - cy.get(_.gitSync._settingsTabGeneral).click(); + it("2. should have disconnect repo button", function () { + cy.get(_.gitSync._bottomSettingsBtn).click(); + cy.get(_.gitSync._settingsTabGeneral).click(); - // after clicked disconnect on connection modal, - // it should be closed and disconnect modal should be opened - cy.get(_.gitSync._disconnectGitBtn).click(); - cy.get(gitSyncLocators.disconnectButton).should("be.disabled"); + // after clicked disconnect on connection modal, + // it should be closed and disconnect modal should be opened + cy.get(_.gitSync._disconnectGitBtn).click(); + cy.get(gitSyncLocators.disconnectButton).should("be.disabled"); - cy.get(gitSyncLocators.disconnectAppNameInput).type( - `{selectAll}${repoName}`, - ); - cy.get(gitSyncLocators.disconnectButton).should("be.disabled"); + cy.get(gitSyncLocators.disconnectAppNameInput).type( + `{selectAll}${repoName}`, + ); + cy.get(gitSyncLocators.disconnectButton).should("be.disabled"); - cy.window() - .its("store") - .invoke("getState") - .then((state) => { - const { name } = state.ui.gitSync.disconnectingGitApp; - cy.get(gitSyncLocators.disconnectAppNameInput).type( - `{selectAll}${name}`, - ); - cy.get(gitSyncLocators.disconnectButton).should("be.enabled"); - }); + cy.window() + .its("store") + .invoke("getState") + .then((state) => { + const { name } = state.ui.gitSync.disconnectingGitApp; + cy.get(gitSyncLocators.disconnectAppNameInput).type( + `{selectAll}${name}`, + ); + cy.get(gitSyncLocators.disconnectButton).should("be.enabled"); + }); - // disconnecting validation - cy.intercept("POST", "api/v1/git/disconnect/app/*").as("disconnect"); - cy.get(gitSyncLocators.disconnectButton).click(); - cy.wait(3000); - //cy.get(gitSyncLocators.disconnectButton).should("be.disabled"); - cy.wait("@disconnect").should( - "have.nested.property", - "response.body.responseMeta.status", - 200, - ); + // disconnecting validation + cy.intercept("POST", "api/v1/git/disconnect/app/*").as("disconnect"); + cy.get(gitSyncLocators.disconnectButton).click(); + cy.wait(3000); + //cy.get(gitSyncLocators.disconnectButton).should("be.disabled"); + cy.wait("@disconnect").should( + "have.nested.property", + "response.body.responseMeta.status", + 200, + ); - // validation store after disconnected - cy.window() - .its("store") - .invoke("getState") - .then((state) => { - const { id, name } = state.ui.gitSync.disconnectingGitApp; - expect(name).to.eq(""); - expect(id).to.eq(""); - }); + // validation store after disconnected + cy.window() + .its("store") + .invoke("getState") + .then((state) => { + const { id, name } = state.ui.gitSync.disconnectingGitApp; + expect(name).to.eq(""); + expect(id).to.eq(""); + }); - cy.get(gitSyncLocators.disconnectGitModal).should("not.exist"); - }); + cy.get(gitSyncLocators.disconnectGitModal).should("not.exist"); + }); - after(() => { - _.gitSync.DeleteTestGithubRepo(repoName); - }); -}); + after(() => { + _.gitSync.DeleteTestGithubRepo(repoName); + }); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Git/GitSync/GitBranchProtect_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Git/GitSync/GitBranchProtect_spec.ts index 6a27f57bb7b1..5864a9215017 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Git/GitSync/GitBranchProtect_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Git/GitSync/GitBranchProtect_spec.ts @@ -7,55 +7,70 @@ import { let guid: any; let repoName: any; -describe("Git Branch Protection", { tags: ["@tag.Git"] }, function () { - it("Issue 28056 - 2 : Check if protection is enabled when feature flag is enabled", function () { - _.agHelper.GenerateUUID(); - cy.get("@guid").then((uid) => { - guid = uid; - const wsName = "GitBranchProtect-2" + uid; - const appName = "GitBranchProtect-2" + uid; - _.homePage.CreateNewWorkspace(wsName, true); - _.homePage.CreateAppInWorkspace(wsName, appName); - _.gitSync.CreateNConnectToGit("repoprotect", true, true); - cy.wait(1000); +describe( + "Git Branch Protection", + { + tags: [ + "@tag.Git", + "@tag.AccessControl", + "@tag.Workflows", + "@tag.Module", + "@tag.Theme", + "@tag.JS", + "@tag.Container", + "@tag.ImportExport", + ], + }, + function () { + it("Issue 28056 - 2 : Check if protection is enabled when feature flag is enabled", function () { + _.agHelper.GenerateUUID(); + cy.get("@guid").then((uid) => { + guid = uid; + const wsName = "GitBranchProtect-2" + uid; + const appName = "GitBranchProtect-2" + uid; + _.homePage.CreateNewWorkspace(wsName, true); + _.homePage.CreateAppInWorkspace(wsName, appName); + _.gitSync.CreateNConnectToGit("repoprotect", true, true); + cy.wait(1000); - cy.intercept({ - method: "POST", - url: /\/api\/v1\/git\/branch\/app\/.*\/protected/, - }).as("gitProtectApi"); - cy.get("@gitRepoName").then((repName) => { - repoName = repName; - _.gitSync.OpenGitSettingsModal(); - _.agHelper.GetNClick(_.gitSync._settingsTabBranch); - _.agHelper.GetNClick(_.gitSync._protectedBranchesSelect); - _.agHelper.GetNClick( - `${_.gitSync._protectedBranchesSelect} .rc-select-item`, - 0, - ); - _.agHelper.GetNClick(_.gitSync._branchProtectionUpdateBtn); - cy.wait("@gitProtectApi").then((res1) => { - _.agHelper.GetNClick(_.gitSync._closeGitSettingsModal); - expect(res1.response).to.have.property("statusCode", 200); - _.agHelper.AssertElementAbsence(AppSidebar.locators.sidebar); - _.agHelper.AssertElementVisibility( - PageLeftPane.locators.selector, - false, - ); - _.agHelper.AssertElementVisibility( - _.propPane._propertyPaneSidebar, - false, - ); - _.agHelper.AssertElementEnabledDisabled( - _.gitSync._bottomBarCommit, + cy.intercept({ + method: "POST", + url: /\/api\/v1\/git\/branch\/app\/.*\/protected/, + }).as("gitProtectApi"); + cy.get("@gitRepoName").then((repName) => { + repoName = repName; + _.gitSync.OpenGitSettingsModal(); + _.agHelper.GetNClick(_.gitSync._settingsTabBranch); + _.agHelper.GetNClick(_.gitSync._protectedBranchesSelect); + _.agHelper.GetNClick( + `${_.gitSync._protectedBranchesSelect} .rc-select-item`, 0, - true, ); + _.agHelper.GetNClick(_.gitSync._branchProtectionUpdateBtn); + cy.wait("@gitProtectApi").then((res1) => { + _.agHelper.GetNClick(_.gitSync._closeGitSettingsModal); + expect(res1.response).to.have.property("statusCode", 200); + _.agHelper.AssertElementAbsence(AppSidebar.locators.sidebar); + _.agHelper.AssertElementVisibility( + PageLeftPane.locators.selector, + false, + ); + _.agHelper.AssertElementVisibility( + _.propPane._propertyPaneSidebar, + false, + ); + _.agHelper.AssertElementEnabledDisabled( + _.gitSync._bottomBarCommit, + 0, + true, + ); + }); }); }); }); - }); - after(() => { - _.gitSync.DeleteTestGithubRepo(repoName); - }); -}); + after(() => { + _.gitSync.DeleteTestGithubRepo(repoName); + }); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Git/GitSync/GitConnectV2_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Git/GitSync/GitConnectV2_spec.ts index 26cbff86c2af..64da08fe67d3 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Git/GitSync/GitConnectV2_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Git/GitSync/GitConnectV2_spec.ts @@ -1,4 +1,3 @@ -import { featureFlagIntercept } from "../../../../../support/Objects/FeatureFlags"; import * as _ from "../../../../../support/Objects/ObjectsCore"; import EditorNavigation, { EntityType, @@ -10,45 +9,65 @@ let app1Name: string; let repoName: any; let branchName: any; -describe("Git Connect V2", { tags: ["@tag.Git", "@tag.Sanity"] }, function () { - before(() => { - _.agHelper.GenerateUUID(); - cy.get("@guid").then((uid) => { - ws1Name = "GCV2-1" + uid; - ws2Name = "GCV2-2" + uid; - app1Name = "GCV2" + uid; - _.homePage.CreateNewWorkspace(ws1Name, true); - _.homePage.CreateNewWorkspace(ws2Name, true); - _.homePage.SelectWorkspace(ws1Name); - _.homePage.CreateAppInWorkspace(ws1Name, app1Name); +describe( + "Git Connect V2", + { + tags: [ + "@tag.Git", + "@tag.Sanity", + "@tag.AccessControl", + "@tag.Workflows", + "@tag.Module", + "@tag.Theme", + "@tag.JS", + "@tag.Container", + "@tag.ImportExport", + ], + }, + function () { + before(() => { + _.agHelper.GenerateUUID(); + cy.get("@guid").then((uid) => { + ws1Name = "GCV2-1" + uid; + ws2Name = "GCV2-2" + uid; + app1Name = "GCV2" + uid; + _.homePage.CreateNewWorkspace(ws1Name, true); + _.homePage.CreateNewWorkspace(ws2Name, true); + _.homePage.SelectWorkspace(ws1Name); + _.homePage.CreateAppInWorkspace(ws1Name, app1Name); + }); }); - }); - it("Testing connect to git flow - V2", function () { - _.gitSync.CreateNConnectToGit(); + it("Testing connect to git flow - V2", function () { + _.gitSync.CreateNConnectToGit(); - cy.get("@gitRepoName").then((repName) => { - repoName = repName; + cy.get("@gitRepoName").then((repName) => { + repoName = repName; + }); }); - }); - it("Testing import via git flow - V2", function () { - _.gitSync.CreateGitBranch("test", true); - cy.get("@gitbranchName").then((bName) => { - branchName = bName; - _.entityExplorer.DragDropWidgetNVerify(_.draggableWidgets.TEXT, 300, 300); - _.propPane.RenameWidget("Text1", "MyText"); - _.propPane.UpdatePropertyFieldValue("Text", "Hello World"); - _.gitSync.CommitAndPush(); + it("Testing import via git flow - V2", function () { + _.gitSync.CreateGitBranch("test", true); + cy.get("@gitbranchName").then((bName) => { + branchName = bName; + _.entityExplorer.DragDropWidgetNVerify( + _.draggableWidgets.TEXT, + 300, + 300, + ); + _.propPane.RenameWidget("Text1", "MyText"); + _.propPane.UpdatePropertyFieldValue("Text", "Hello World"); + _.gitSync.CommitAndPush(); - _.gitSync.ImportAppFromGit(ws2Name, repoName); - _.gitSync.SwitchGitBranch(branchName); - EditorNavigation.SelectEntityByName("MyText", EntityType.Widget); - _.propPane.ValidatePropertyFieldValue("Text", "Hello World"); + _.gitSync.ImportAppFromGit(ws2Name, repoName); + _.gitSync.SwitchGitBranch(branchName); + EditorNavigation.SelectEntityByName("MyText", EntityType.Widget); + _.propPane.ValidatePropertyFieldValue("Text", "Hello World"); + }); }); - }); - after(() => { - _.gitSync.DeleteTestGithubRepo(repoName); - }); -}); + after(() => { + _.gitSync.DeleteTestGithubRepo(repoName); + }); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Git/GitSync/GitStatusLite_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Git/GitSync/GitStatusLite_spec.ts index ced7d8b756b0..480b0696f6ac 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Git/GitSync/GitStatusLite_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Git/GitSync/GitStatusLite_spec.ts @@ -4,39 +4,54 @@ let wsName: string; let appName: string; let repoName: any; -describe("Git Connect V2", { tags: ["@tag.Git"] }, function () { - before(() => { - _.agHelper.GenerateUUID(); - cy.get("@guid").then((uid) => { - wsName = "GitStatusLite" + uid; - appName = "GitStatusLite" + uid; - _.homePage.CreateNewWorkspace(wsName, true); - _.homePage.CreateAppInWorkspace(wsName, appName); - _.gitSync.CreateNConnectToGit(); - cy.get("@gitRepoName").then((repName) => { - repoName = repName; +describe( + "Git Connect V2", + { + tags: [ + "@tag.Git", + "@tag.AccessControl", + "@tag.Workflows", + "@tag.Module", + "@tag.Theme", + "@tag.JS", + "@tag.Container", + "@tag.ImportExport", + ], + }, + function () { + before(() => { + _.agHelper.GenerateUUID(); + cy.get("@guid").then((uid) => { + wsName = "GitStatusLite" + uid; + appName = "GitStatusLite" + uid; + _.homePage.CreateNewWorkspace(wsName, true); + _.homePage.CreateAppInWorkspace(wsName, appName); + _.gitSync.CreateNConnectToGit(); + cy.get("@gitRepoName").then((repName) => { + repoName = repName; + }); }); }); - }); - it("Issue 26038 : No simultaneous git status and remote compare api calls on commit modal", function () { - cy.wait(1000); + it("Issue 26038 : No simultaneous git status and remote compare api calls on commit modal", function () { + cy.wait(1000); - cy.intercept({ - method: "GET", - url: "/api/v1/git/status/app/**", - query: { compareRemote: "true" }, - }).as("gitStatusApi"); + cy.intercept({ + method: "GET", + url: "/api/v1/git/status/app/**", + query: { compareRemote: "true" }, + }).as("gitStatusApi"); - _.agHelper.GetNClick(_.locators._publishButton); + _.agHelper.GetNClick(_.locators._publishButton); - cy.wait("@gitStatusApi").then((res1) => { - expect(res1.response).to.have.property("statusCode", 200); - _.agHelper.GetNClick(_.locators._dialogCloseButton); + cy.wait("@gitStatusApi").then((res1) => { + expect(res1.response).to.have.property("statusCode", 200); + _.agHelper.GetNClick(_.locators._dialogCloseButton); + }); }); - }); - after(() => { - _.gitSync.DeleteTestGithubRepo(repoName); - }); -}); + after(() => { + _.gitSync.DeleteTestGithubRepo(repoName); + }); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Git/GitSync/GitSyncGitBugs_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Git/GitSync/GitSyncGitBugs_spec.js index e803036ac36f..03717e871899 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Git/GitSync/GitSyncGitBugs_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Git/GitSync/GitSyncGitBugs_spec.js @@ -27,7 +27,19 @@ let repoName; describe( "Git sync Bug #10773", - { tags: ["@tag.Git", "@tag.Sanity"] }, + { + tags: [ + "@tag.Git", + "@tag.Sanity", + "@tag.AccessControl", + "@tag.Workflows", + "@tag.Module", + "@tag.Theme", + "@tag.JS", + "@tag.Container", + "@tag.ImportExport", + ], + }, function () { beforeEach(() => { agHelper.RestoreLocalStorageCache(); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Git/GitSync/GitSyncedApps_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Git/GitSync/GitSyncedApps_spec.js index fbabcd599f09..e3d4b01a7ad4 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Git/GitSync/GitSyncedApps_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Git/GitSync/GitSyncedApps_spec.js @@ -41,408 +41,427 @@ const mainBranch = "master"; let datasourceName; let repoName; -describe("Git sync apps", { tags: ["@tag.Git"] }, function () { - it("1. Generate postgreSQL crud page , connect to git, clone the page, rename page with special character in it", () => { - homePage.NavigateToHome(); - homePage.CreateNewApplication(); +describe( + "Git sync apps", + { + tags: [ + "@tag.Git", + "@tag.AccessControl", + "@tag.Workflows", + "@tag.Module", + "@tag.Theme", + "@tag.JS", + "@tag.Container", + "@tag.ImportExport", + ], + }, + function () { + it("1. Generate postgreSQL crud page , connect to git, clone the page, rename page with special character in it", () => { + homePage.NavigateToHome(); + homePage.CreateNewApplication(); + + // create New App and generate Postgres CRUD page + PageList.AddNewPage("Generate page with data"); + //cy.get(generatePage.generateCRUDPageActionCard).click(); + + cy.get(generatePage.selectDatasourceDropdown).click(); + + cy.contains("Connect new datasource").click({ force: true }); + + agHelper.GetNClick(datasource.PostgreSQL); + + cy.fillPostgresDatasourceForm(); + + cy.generateUUID().then((UUID) => { + datasourceName = `${UUID}`; + cy.renameDatasource(datasourceName); + }); - // create New App and generate Postgres CRUD page - PageList.AddNewPage("Generate page with data"); - //cy.get(generatePage.generateCRUDPageActionCard).click(); + cy.get(".t--save-datasource").click(); + cy.wait("@saveDatasource").should( + "have.nested.property", + "response.body.responseMeta.status", + 201, + ); - cy.get(generatePage.selectDatasourceDropdown).click(); + cy.wait("@getDatasourceStructure").should( + "have.nested.property", + "response.body.responseMeta.status", + 200, + ); - cy.contains("Connect new datasource").click({ force: true }); + cy.get(generatePage.selectTableDropdown).click(); - agHelper.GetNClick(datasource.PostgreSQL); + cy.get(generatePage.dropdownOption).contains("public.configs").click(); - cy.fillPostgresDatasourceForm(); + // skip optional search column selection. + cy.get(generatePage.generatePageFormSubmitBtn).click(); - cy.generateUUID().then((UUID) => { - datasourceName = `${UUID}`; - cy.renameDatasource(datasourceName); - }); + cy.wait("@replaceLayoutWithCRUDPage").should( + "have.nested.property", + "response.body.responseMeta.status", + 201, + ); + cy.wait("@getActions"); + cy.wait("@postExecute").should( + "have.nested.property", + "response.body.responseMeta.status", + 200, + ); - cy.get(".t--save-datasource").click(); - cy.wait("@saveDatasource").should( - "have.nested.property", - "response.body.responseMeta.status", - 201, - ); - - cy.wait("@getDatasourceStructure").should( - "have.nested.property", - "response.body.responseMeta.status", - 200, - ); - - cy.get(generatePage.selectTableDropdown).click(); - - cy.get(generatePage.dropdownOption).contains("public.configs").click(); - - // skip optional search column selection. - cy.get(generatePage.generatePageFormSubmitBtn).click(); - - cy.wait("@replaceLayoutWithCRUDPage").should( - "have.nested.property", - "response.body.responseMeta.status", - 201, - ); - cy.wait("@getActions"); - cy.wait("@postExecute").should( - "have.nested.property", - "response.body.responseMeta.status", - 200, - ); - - cy.get("span:contains('Got it')").click(); - - // connect app to git - gitSync.CreateNConnectToGit(repoName); - cy.get("@gitRepoName").then((repName) => { - repoName = repName; - }); - table.ReadTableRowColumnData(0, 1, "v2").then((cellData) => { - expect(cellData).to.be.equal("New Config"); + cy.get("span:contains('Got it')").click(); + + // connect app to git + gitSync.CreateNConnectToGit(repoName); + cy.get("@gitRepoName").then((repName) => { + repoName = repName; + }); + table.ReadTableRowColumnData(0, 1, "v2").then((cellData) => { + expect(cellData).to.be.equal("New Config"); + }); + // rename page to crud_page + entityExplorer.RenameEntityFromExplorer( + "Page1", + pageName, + false, + EntityItems.Page, + ); + PageList.ClonePage(pageName); + + PageList.ShowList(); + PageLeftPane.assertPresence(`${pageName} Copy`); + table.ReadTableRowColumnData(0, 1, "v2").then((cellData) => { + expect(cellData).to.be.equal("New Config"); + }); }); - // rename page to crud_page - entityExplorer.RenameEntityFromExplorer( - "Page1", - pageName, - false, - EntityItems.Page, - ); - PageList.ClonePage(pageName); - - PageList.ShowList(); - PageLeftPane.assertPresence(`${pageName} Copy`); - table.ReadTableRowColumnData(0, 1, "v2").then((cellData) => { - expect(cellData).to.be.equal("New Config"); + + it("2. Create api queries from api pane and cURL import , bind it to widget and clone page from page settings", () => { + cy.fixture("datasources").then((datasourceFormData) => { + cy.Createpage(newPage); + EditorNavigation.SelectEntityByName(newPage, EntityType.Page); + + // create a get api call + apiPage.CreateAndFillApi(datasourceFormData["echoApiUrl"], "get_data"); + apiPage.EnterHeader("info", "This is a test"); + apiPage.RunAPI(); + apiPage.ResponseStatusCheck("200 OK"); + // curl import + apiPage.FillCurlNImport( + `curl -d \'{"name":"morpheus","job":"leader"}\' -H Content-Type:application/json -X POST '` + + datasourceFormData["echoApiUrl"], + ); + cy.RunAPI(); + apiPage.ResponseStatusCheck("200 OK"); + cy.get("@curlImport").then((response) => { + cy.expect(response.response.body.responseMeta.success).to.eq(true); + cy.get(apiwidget.ApiName) + .invoke("text") + .then((text) => { + const someText = text; + expect(someText).to.equal(response.response.body.data.name); + }); + }); + EditorNavigation.ShowCanvas(); + // bind input widgets to the api calls responses + cy.dragAndDropToCanvas("inputwidgetv2", { x: 300, y: 300 }); + cy.get(".t--widget-inputwidgetv2").should("exist"); + cy.EnableAllCodeEditors(); + cy.get( + `.t--property-control-defaultvalue ${dynamicInputLocators.input}`, + ) + .last() + .click({ force: true }) + .type("{{Api1.data.body.name}}", { + parseSpecialCharSequences: false, + }); + cy.dragAndDropToCanvas("inputwidgetv2", { x: 300, y: 500 }); + propPane.UpdatePropertyFieldValue( + "Default value", + "{{get_data.data.headers.Info}}", + ); + agHelper.WaitUntilToastDisappear( + "will be executed automatically on page load", + ); + // clone the page from page settings + PageList.ClonePage(newPage); + EditorNavigation.SelectEntityByName(newPage, EntityType.Page); + }); }); - }); - it("2. Create api queries from api pane and cURL import , bind it to widget and clone page from page settings", () => { - cy.fixture("datasources").then((datasourceFormData) => { - cy.Createpage(newPage); + it("3. Commit and push changes, validate data binding on all pages in edit and deploy mode on master", () => { + // verfiy data binding on all pages in edit mode + cy.get(widgetsPage.inputWidget).should("be.visible"); + cy.get(widgetsPage.inputWidget) + .first() + .find(widgetsPage.dataclass) + .invoke("val") + .should("be.oneOf", ["morpheus", "This is a test"]); + cy.get(widgetsPage.inputWidget) + .last() + .find(widgetsPage.dataclass) + .invoke("val") + .should("be.oneOf", ["morpheus", "This is a test"]); + + PageList.ShowList(); EditorNavigation.SelectEntityByName(newPage, EntityType.Page); + cy.get(widgetsPage.inputWidget) + .first() + .find(widgetsPage.dataclass) + .should("have.value", "morpheus"); + cy.get(widgetsPage.inputWidget) + .last() + .find(widgetsPage.dataclass) + .should("have.value", "This is a test"); + + PageList.ShowList(); + EditorNavigation.SelectEntityByName(pageName, EntityType.Page); + table.ReadTableRowColumnData(0, 1, "v2").then((cellData) => { + expect(cellData).to.be.equal("New Config"); + }); + + PageList.ShowList(); + EditorNavigation.SelectEntityByName(`${pageName} Copy`, EntityType.Page); + table.ReadTableRowColumnData(0, 1, "v2").then((cellData) => { + expect(cellData).to.be.equal("New Config"); + }); + // commit and push the changes + gitSync.CommitAndPush(true); + // verify data binding on all pages in deploy mode + cy.latestDeployPreview(); + agHelper.GetNClickByContains(locators._deployedPage, pageName); + table.ReadTableRowColumnData(0, 1, "v2").then((cellData) => { + expect(cellData).to.be.equal("New Config"); + }); + agHelper.GetNClickByContains(locators._deployedPage, `${pageName} Copy`); + table.ReadTableRowColumnData(0, 1, "v2").then((cellData) => { + expect(cellData).to.be.equal("New Config"); + }); + agHelper.GetNClickByContains(locators._deployedPage, `${newPage}`); + agHelper.RefreshPage("getConsolidatedData"); + cy.get(widgetsPage.dataclass) + .first() + .invoke("val") + .should("be.oneOf", ["morpheus", "This is a test"]); + cy.get(widgetsPage.dataclass) + .last() + .invoke("val") + .should("be.oneOf", ["morpheus", "This is a test"]); + cy.get(".t--page-switch-tab") + .contains(`${newPage} Copy`) + .click({ force: true }); + cy.get(widgetsPage.dataclass) + .first() + .invoke("val") + .should("be.oneOf", ["morpheus", "This is a test"]); + cy.get(widgetsPage.dataclass) + .last() + .invoke("val") + .should("be.oneOf", ["morpheus", "This is a test"]); + agHelper.AssertElementLength( + locators._widgetInDeployed(draggableWidgets.INPUT_V2), + 2, + ); + deployMode.NavigateBacktoEditor(); + }); - // create a get api call - apiPage.CreateAndFillApi(datasourceFormData["echoApiUrl"], "get_data"); - apiPage.EnterHeader("info", "This is a test"); - apiPage.RunAPI(); - apiPage.ResponseStatusCheck("200 OK"); - // curl import - apiPage.FillCurlNImport( - `curl -d \'{"name":"morpheus","job":"leader"}\' -H Content-Type:application/json -X POST '` + - datasourceFormData["echoApiUrl"], + it("4. Create a new branch tempBranch, add jsObject and datasource query, move them to new page i.e. Child_Page and bind to widgets", () => { + gitSync.CreateGitBranch(tempBranch, true); + cy.get("@gitbranchName").then((branName) => { + tempBranch = branName; + }); + // create jsObject and rename it + EditorNavigation.SelectEntityByName(`${newPage} Copy`, EntityType.Page); + + jsEditor.CreateJSObject('return "Success";'); + // create postgres select query + dataSources.CreateQueryForDS( + datasourceName, + "SELECT * FROM users ORDER BY id LIMIT 10;", + "get_users", ); - cy.RunAPI(); - apiPage.ResponseStatusCheck("200 OK"); - cy.get("@curlImport").then((response) => { - cy.expect(response.response.body.responseMeta.success).to.eq(true); - cy.get(apiwidget.ApiName) - .invoke("text") - .then((text) => { - const someText = text; - expect(someText).to.equal(response.response.body.data.name); - }); + dataSources.RunQuery(); + // create a new page + cy.Createpage("Child_Page"); + EditorNavigation.SelectEntityByName(`${newPage} Copy`, EntityType.Page); + EditorNavigation.SelectEntityByName("get_users", EntityType.Query); + agHelper.ActionContextMenuWithInPane({ + action: "Move to page", + subAction: "Child_Page", + toastToValidate: "moved to page", + }); + agHelper.WaitUntilAllToastsDisappear(); + dataSources.RunQuery(); + EditorNavigation.SelectEntityByName(`${newPage} Copy`, EntityType.Page); + EditorNavigation.SelectEntityByName("JSObject1", EntityType.JSObject); + entityExplorer.ActionContextMenuByEntityName({ + entityNameinLeftSidebar: "JSObject1", + action: "Move to page", + subAction: "Child_Page", + toastToValidate: "moved to page", }); - EditorNavigation.ShowCanvas(); - // bind input widgets to the api calls responses + agHelper.WaitUntilAllToastsDisappear(); + // bind input widgets to the jsObject and query response cy.dragAndDropToCanvas("inputwidgetv2", { x: 300, y: 300 }); cy.get(".t--widget-inputwidgetv2").should("exist"); cy.EnableAllCodeEditors(); cy.get(`.t--property-control-defaultvalue ${dynamicInputLocators.input}`) .last() .click({ force: true }) - .type("{{Api1.data.body.name}}", { parseSpecialCharSequences: false }); + .type("{{JSObject1.myFun1()}}", { parseSpecialCharSequences: false }); cy.dragAndDropToCanvas("inputwidgetv2", { x: 300, y: 500 }); + cy.get(".t--widget-inputwidgetv2").should("exist"); propPane.UpdatePropertyFieldValue( "Default value", - "{{get_data.data.headers.Info}}", - ); - agHelper.WaitUntilToastDisappear( - "will be executed automatically on page load", + "{{get_users.data[0].name}}", ); - // clone the page from page settings - PageList.ClonePage(newPage); - EditorNavigation.SelectEntityByName(newPage, EntityType.Page); - }); - }); - - it("3. Commit and push changes, validate data binding on all pages in edit and deploy mode on master", () => { - // verfiy data binding on all pages in edit mode - cy.get(widgetsPage.inputWidget).should("be.visible"); - cy.get(widgetsPage.inputWidget) - .first() - .find(widgetsPage.dataclass) - .invoke("val") - .should("be.oneOf", ["morpheus", "This is a test"]); - cy.get(widgetsPage.inputWidget) - .last() - .find(widgetsPage.dataclass) - .invoke("val") - .should("be.oneOf", ["morpheus", "This is a test"]); - - PageList.ShowList(); - EditorNavigation.SelectEntityByName(newPage, EntityType.Page); - cy.get(widgetsPage.inputWidget) - .first() - .find(widgetsPage.dataclass) - .should("have.value", "morpheus"); - cy.get(widgetsPage.inputWidget) - .last() - .find(widgetsPage.dataclass) - .should("have.value", "This is a test"); - - PageList.ShowList(); - EditorNavigation.SelectEntityByName(pageName, EntityType.Page); - table.ReadTableRowColumnData(0, 1, "v2").then((cellData) => { - expect(cellData).to.be.equal("New Config"); + PageLeftPane.switchSegment(PagePaneSegment.Queries); + EditorNavigation.SelectEntityByName("get_users", EntityType.Query); + dataSources.RunQuery(); }); - PageList.ShowList(); - EditorNavigation.SelectEntityByName(`${pageName} Copy`, EntityType.Page); - table.ReadTableRowColumnData(0, 1, "v2").then((cellData) => { - expect(cellData).to.be.equal("New Config"); - }); - // commit and push the changes - gitSync.CommitAndPush(true); - // verify data binding on all pages in deploy mode - cy.latestDeployPreview(); - agHelper.GetNClickByContains(locators._deployedPage, pageName); - table.ReadTableRowColumnData(0, 1, "v2").then((cellData) => { - expect(cellData).to.be.equal("New Config"); + it("5. Commit and push changes, validate data binding on all pages in edit and deploy mode on tempBranch", () => { + // commit and push changes + cy.get(homePageLocators.publishButton).click(); + cy.get(gitSyncLocators.commitCommentInput).type("Initial Commit"); + cy.get(gitSyncLocators.commitButton).click(); + cy.get(gitSyncLocators.closeGitSyncModal).click(); + // verfiy data binding on all pages in deploy mode + cy.latestDeployPreview(); + cy.get(widgetsPage.dataclass).should("be.visible"); + cy.get(widgetsPage.dataclass) + .first() + .invoke("val") + .should("be.oneOf", ["Success", "Test user 7"]); + cy.get(widgetsPage.dataclass) + .last() + .invoke("val") + .should("be.oneOf", ["Success", "Test user 7"]); + agHelper.GetNClickByContains(locators._deployedPage, `${pageName}`); + table.ReadTableRowColumnData(0, 1, "v2").then((cellData) => { + expect(cellData).to.be.equal("New Config"); + }); + agHelper.GetNClickByContains(locators._deployedPage, `${pageName} Copy`); + table.ReadTableRowColumnData(0, 1, "v2").then((cellData) => { + expect(cellData).to.be.equal("New Config"); + }); + agHelper.GetNClickByContains(locators._deployedPage, `${newPage}`); + cy.get(widgetsPage.dataclass) + .first() + .invoke("val") + .should("be.oneOf", ["morpheus", "This is a test"]); + cy.get(widgetsPage.dataclass) + .last() + .invoke("val") + .should("be.oneOf", ["morpheus", "This is a test"]); + + agHelper.GetNClickByContains(locators._deployedPage, `${newPage} Copy`); + cy.get(widgetsPage.dataclass) + .first() + .invoke("val") + .should("be.oneOf", ["morpheus", "This is a test"]); + cy.get(widgetsPage.dataclass) + .last() + .invoke("val") + .should("be.oneOf", ["morpheus", "This is a test"]); + deployMode.NavigateBacktoEditor(); }); - agHelper.GetNClickByContains(locators._deployedPage, `${pageName} Copy`); - table.ReadTableRowColumnData(0, 1, "v2").then((cellData) => { - expect(cellData).to.be.equal("New Config"); + + it("6. Switch to master and verify no uncommitted changes should be shown on master", () => { + cy.switchGitBranch("master"); + // verify commit input box is disabled + cy.get(homePageLocators.publishButton).click(); + cy.get(gitSyncLocators.commitCommentInput) + .should("be.disabled") + .and("have.text", "No changes to commit"); + cy.get(gitSyncLocators.closeGitSyncModal).click(); }); - agHelper.GetNClickByContains(locators._deployedPage, `${newPage}`); - agHelper.RefreshPage("getConsolidatedData"); - cy.get(widgetsPage.dataclass) - .first() - .invoke("val") - .should("be.oneOf", ["morpheus", "This is a test"]); - cy.get(widgetsPage.dataclass) - .last() - .invoke("val") - .should("be.oneOf", ["morpheus", "This is a test"]); - cy.get(".t--page-switch-tab") - .contains(`${newPage} Copy`) - .click({ force: true }); - cy.get(widgetsPage.dataclass) - .first() - .invoke("val") - .should("be.oneOf", ["morpheus", "This is a test"]); - cy.get(widgetsPage.dataclass) - .last() - .invoke("val") - .should("be.oneOf", ["morpheus", "This is a test"]); - agHelper.AssertElementLength( - locators._widgetInDeployed(draggableWidgets.INPUT_V2), - 2, - ); - deployMode.NavigateBacktoEditor(); - }); - - it("4. Create a new branch tempBranch, add jsObject and datasource query, move them to new page i.e. Child_Page and bind to widgets", () => { - gitSync.CreateGitBranch(tempBranch, true); - cy.get("@gitbranchName").then((branName) => { - tempBranch = branName; + + it("7. Switch to tempBranch , Clone the Child_Page, change it's visiblity to hidden and deploy, merge to master", () => { + cy.switchGitBranch(tempBranch); + // clone the Child_Page + EditorNavigation.SelectEntityByName("Child_Page", EntityType.Page); + PageList.ClonePage("Child_Page"); + // change cloned page visiblity to hidden + EditorNavigation.SelectEntityByName("Child_Page Copy", EntityType.Page); + PageList.HidePage("Child_Page"); + + EditorNavigation.SelectEntityByName("Child_Page", EntityType.Page); + cy.wait("@getConsolidatedData"); + cy.get(homePageLocators.publishButton).click(); + cy.get(gitSyncLocators.commitCommentInput).type("Initial Commit"); + cy.get(gitSyncLocators.commitButton).click(); + cy.get(gitSyncLocators.closeGitSyncModal).click(); + + gitSync.MergeToMaster(); + + cy.latestDeployPreview(); + // verify page is hidden on deploy mode + agHelper.AssertContains("Child_Page Copy", "not.exist"); + deployMode.NavigateBacktoEditor(); }); - // create jsObject and rename it - EditorNavigation.SelectEntityByName(`${newPage} Copy`, EntityType.Page); - - jsEditor.CreateJSObject('return "Success";'); - // create postgres select query - dataSources.CreateQueryForDS( - datasourceName, - "SELECT * FROM users ORDER BY id LIMIT 10;", - "get_users", - ); - dataSources.RunQuery(); - // create a new page - cy.Createpage("Child_Page"); - EditorNavigation.SelectEntityByName(`${newPage} Copy`, EntityType.Page); - EditorNavigation.SelectEntityByName("get_users", EntityType.Query); - agHelper.ActionContextMenuWithInPane({ - action: "Move to page", - subAction: "Child_Page", - toastToValidate: "moved to page", + + it("8. Verify Page visiblity on master in edit and deploy mode", () => { + cy.switchGitBranch(mainBranch); + cy.latestDeployPreview(); + agHelper.AssertContains("Child_Page Copy", "not.exist"); + deployMode.NavigateBacktoEditor(); }); - agHelper.WaitUntilAllToastsDisappear(); - dataSources.RunQuery(); - EditorNavigation.SelectEntityByName(`${newPage} Copy`, EntityType.Page); - EditorNavigation.SelectEntityByName("JSObject1", EntityType.JSObject); - entityExplorer.ActionContextMenuByEntityName({ - entityNameinLeftSidebar: "JSObject1", - action: "Move to page", - subAction: "Child_Page", - toastToValidate: "moved to page", + + it("9. Create new branch, delete a page and merge back to master, verify page is deleted on master", () => { + //cy.createGitBranch(tempBranch1); + gitSync.CreateGitBranch(tempBranch1, true); + // delete page from page settings + EditorNavigation.SelectEntityByName("Child_Page Copy", EntityType.Page); + cy.wait("@getConsolidatedData"); + PageList.DeletePage("Child_Page Copy"); + cy.get(homePageLocators.publishButton).click(); + cy.get(gitSyncLocators.commitCommentInput).type("Initial Commit"); + cy.get(gitSyncLocators.commitButton).click(); + cy.get(gitSyncLocators.closeGitSyncModal).click(); + gitSync.MergeToMaster(); + cy.latestDeployPreview(); + // verify page is hidden on deploy mode + agHelper.AssertContains("Child_Page Copy", "not.exist"); + deployMode.NavigateBacktoEditor(); }); - agHelper.WaitUntilAllToastsDisappear(); - // bind input widgets to the jsObject and query response - cy.dragAndDropToCanvas("inputwidgetv2", { x: 300, y: 300 }); - cy.get(".t--widget-inputwidgetv2").should("exist"); - cy.EnableAllCodeEditors(); - cy.get(`.t--property-control-defaultvalue ${dynamicInputLocators.input}`) - .last() - .click({ force: true }) - .type("{{JSObject1.myFun1()}}", { parseSpecialCharSequences: false }); - cy.dragAndDropToCanvas("inputwidgetv2", { x: 300, y: 500 }); - cy.get(".t--widget-inputwidgetv2").should("exist"); - propPane.UpdatePropertyFieldValue( - "Default value", - "{{get_users.data[0].name}}", - ); - PageLeftPane.switchSegment(PagePaneSegment.Queries); - EditorNavigation.SelectEntityByName("get_users", EntityType.Query); - dataSources.RunQuery(); - }); - - it("5. Commit and push changes, validate data binding on all pages in edit and deploy mode on tempBranch", () => { - // commit and push changes - cy.get(homePageLocators.publishButton).click(); - cy.get(gitSyncLocators.commitCommentInput).type("Initial Commit"); - cy.get(gitSyncLocators.commitButton).click(); - cy.get(gitSyncLocators.closeGitSyncModal).click(); - // verfiy data binding on all pages in deploy mode - cy.latestDeployPreview(); - cy.get(widgetsPage.dataclass).should("be.visible"); - cy.get(widgetsPage.dataclass) - .first() - .invoke("val") - .should("be.oneOf", ["Success", "Test user 7"]); - cy.get(widgetsPage.dataclass) - .last() - .invoke("val") - .should("be.oneOf", ["Success", "Test user 7"]); - agHelper.GetNClickByContains(locators._deployedPage, `${pageName}`); - table.ReadTableRowColumnData(0, 1, "v2").then((cellData) => { - expect(cellData).to.be.equal("New Config"); + + //Skipping these since these are causing chrome crash in CI, passes in electron. + it.skip("10. After merge back to master, verify page is deleted on master", () => { + // verify Child_Page is not on master + cy.switchGitBranch(mainBranch); + assertHelper.AssertDocumentReady(); + table.WaitUntilTableLoad(); + cy.readTabledataPublish("0", "1").then((cellData) => { + expect(cellData).to.be.equal("New Config"); + }); + agHelper.AssertAutoSave(); + PageList.ShowList(); + PageLeftPane.assertAbsence("Child_Page Copy"); + // create another branch and verify deleted page doesn't exist on it + gitSync.CreateGitBranch(tempBranch0, true); + PageList.ShowList(); + PageLeftPane.assertAbsence("Child_Page Copy"); }); - agHelper.GetNClickByContains(locators._deployedPage, `${pageName} Copy`); - table.ReadTableRowColumnData(0, 1, "v2").then((cellData) => { - expect(cellData).to.be.equal("New Config"); + + it.skip("11. Import app from git and verify page order should not change", () => { + cy.get(homePageLocators.homeIcon).click(); + agHelper.GetNClick(homePageLocators.createNew, 0); + cy.get(homePageLocators.workspaceImportAppOption).click({ force: true }); + cy.get(".t--import-json-card").next().click(); + // import application from git + cy.importAppFromGit(repoName); + // verify page order remains same as in orignal app + PageList.ShowList(); + cy.get(".t--entity-item").eq(1).contains("crudpage_1"); + cy.get(".t--entity-item").eq(2).contains("crudpage_1 Copy"); + cy.get(".t--entity-item").eq(3).contains("ApiCalls_1"); + cy.get(".t--entity-item").eq(4).contains("ApiCalls_1 Copy"); + cy.get(".t--entity-item").eq(5).contains("Child_Page"); }); - agHelper.GetNClickByContains(locators._deployedPage, `${newPage}`); - cy.get(widgetsPage.dataclass) - .first() - .invoke("val") - .should("be.oneOf", ["morpheus", "This is a test"]); - cy.get(widgetsPage.dataclass) - .last() - .invoke("val") - .should("be.oneOf", ["morpheus", "This is a test"]); - - agHelper.GetNClickByContains(locators._deployedPage, `${newPage} Copy`); - cy.get(widgetsPage.dataclass) - .first() - .invoke("val") - .should("be.oneOf", ["morpheus", "This is a test"]); - cy.get(widgetsPage.dataclass) - .last() - .invoke("val") - .should("be.oneOf", ["morpheus", "This is a test"]); - deployMode.NavigateBacktoEditor(); - }); - - it("6. Switch to master and verify no uncommitted changes should be shown on master", () => { - cy.switchGitBranch("master"); - // verify commit input box is disabled - cy.get(homePageLocators.publishButton).click(); - cy.get(gitSyncLocators.commitCommentInput) - .should("be.disabled") - .and("have.text", "No changes to commit"); - cy.get(gitSyncLocators.closeGitSyncModal).click(); - }); - - it("7. Switch to tempBranch , Clone the Child_Page, change it's visiblity to hidden and deploy, merge to master", () => { - cy.switchGitBranch(tempBranch); - // clone the Child_Page - EditorNavigation.SelectEntityByName("Child_Page", EntityType.Page); - PageList.ClonePage("Child_Page"); - // change cloned page visiblity to hidden - EditorNavigation.SelectEntityByName("Child_Page Copy", EntityType.Page); - PageList.HidePage("Child_Page"); - - EditorNavigation.SelectEntityByName("Child_Page", EntityType.Page); - cy.wait("@getConsolidatedData"); - cy.get(homePageLocators.publishButton).click(); - cy.get(gitSyncLocators.commitCommentInput).type("Initial Commit"); - cy.get(gitSyncLocators.commitButton).click(); - cy.get(gitSyncLocators.closeGitSyncModal).click(); - - gitSync.MergeToMaster(); - - cy.latestDeployPreview(); - // verify page is hidden on deploy mode - agHelper.AssertContains("Child_Page Copy", "not.exist"); - deployMode.NavigateBacktoEditor(); - }); - - it("8. Verify Page visiblity on master in edit and deploy mode", () => { - cy.switchGitBranch(mainBranch); - cy.latestDeployPreview(); - agHelper.AssertContains("Child_Page Copy", "not.exist"); - deployMode.NavigateBacktoEditor(); - }); - - it("9. Create new branch, delete a page and merge back to master, verify page is deleted on master", () => { - //cy.createGitBranch(tempBranch1); - gitSync.CreateGitBranch(tempBranch1, true); - // delete page from page settings - EditorNavigation.SelectEntityByName("Child_Page Copy", EntityType.Page); - cy.wait("@getConsolidatedData"); - PageList.DeletePage("Child_Page Copy"); - cy.get(homePageLocators.publishButton).click(); - cy.get(gitSyncLocators.commitCommentInput).type("Initial Commit"); - cy.get(gitSyncLocators.commitButton).click(); - cy.get(gitSyncLocators.closeGitSyncModal).click(); - gitSync.MergeToMaster(); - cy.latestDeployPreview(); - // verify page is hidden on deploy mode - agHelper.AssertContains("Child_Page Copy", "not.exist"); - deployMode.NavigateBacktoEditor(); - }); - - //Skipping these since these are causing chrome crash in CI, passes in electron. - it.skip("10. After merge back to master, verify page is deleted on master", () => { - // verify Child_Page is not on master - cy.switchGitBranch(mainBranch); - assertHelper.AssertDocumentReady(); - table.WaitUntilTableLoad(); - cy.readTabledataPublish("0", "1").then((cellData) => { - expect(cellData).to.be.equal("New Config"); + + after(() => { + //clean up + gitSync.DeleteTestGithubRepo(repoName); }); - agHelper.AssertAutoSave(); - PageList.ShowList(); - PageLeftPane.assertAbsence("Child_Page Copy"); - // create another branch and verify deleted page doesn't exist on it - gitSync.CreateGitBranch(tempBranch0, true); - PageList.ShowList(); - PageLeftPane.assertAbsence("Child_Page Copy"); - }); - - it.skip("11. Import app from git and verify page order should not change", () => { - cy.get(homePageLocators.homeIcon).click(); - agHelper.GetNClick(homePageLocators.createNew, 0); - cy.get(homePageLocators.workspaceImportAppOption).click({ force: true }); - cy.get(".t--import-json-card").next().click(); - // import application from git - cy.importAppFromGit(repoName); - // verify page order remains same as in orignal app - PageList.ShowList(); - cy.get(".t--entity-item").eq(1).contains("crudpage_1"); - cy.get(".t--entity-item").eq(2).contains("crudpage_1 Copy"); - cy.get(".t--entity-item").eq(3).contains("ApiCalls_1"); - cy.get(".t--entity-item").eq(4).contains("ApiCalls_1 Copy"); - cy.get(".t--entity-item").eq(5).contains("Child_Page"); - }); - - after(() => { - //clean up - gitSync.DeleteTestGithubRepo(repoName); - }); -}); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Git/GitSync/MergeViaRemote_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Git/GitSync/MergeViaRemote_spec.ts index 10cf74d2fd09..ec5a302d5a58 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Git/GitSync/MergeViaRemote_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Git/GitSync/MergeViaRemote_spec.ts @@ -29,7 +29,18 @@ let repoName: any; describe( "Git sync: Merge changes via remote", - { tags: ["@tag.Git"] }, + { + tags: [ + "@tag.Git", + "@tag.AccessControl", + "@tag.Workflows", + "@tag.Module", + "@tag.Theme", + "@tag.JS", + "@tag.Container", + "@tag.ImportExport", + ], + }, function () { before(() => { _.homePage.NavigateToHome(); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Git/GitSync/Merge_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Git/GitSync/Merge_spec.js index 59e708234980..82f17e6d1cb5 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Git/GitSync/Merge_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Git/GitSync/Merge_spec.js @@ -7,7 +7,19 @@ let childBranchKey = "ChildBranch"; let mainBranch = "master"; describe( "Git sync modal: merge tab", - { tags: ["@tag.Git", "@tag.Git", "@tag.Sanity"] }, + { + tags: [ + "@tag.Git", + "@tag.Sanity", + "@tag.AccessControl", + "@tag.Workflows", + "@tag.Module", + "@tag.Theme", + "@tag.JS", + "@tag.Container", + "@tag.ImportExport", + ], + }, function () { before(() => { _.homePage.NavigateToHome(); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Git/GitSync/PreConnect_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Git/GitSync/PreConnect_spec.ts index 633de9d4984f..139ca0d4da5d 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Git/GitSync/PreConnect_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Git/GitSync/PreConnect_spec.ts @@ -2,39 +2,54 @@ import homePage from "../../../../../locators/HomePage"; import * as _ from "../../../../../support/Objects/ObjectsCore"; import gitSyncLocators from "../../../../../locators/gitSyncLocators"; -describe("Pre git connection spec:", { tags: ["@tag.Git"] }, function () { - it("1. Deploy menu at the application dropdown menu", () => { - // create new app - _.homePage.NavigateToHome(); - cy.createWorkspace(); - cy.wait("@createWorkspace").then((interception) => { - const newWorkspaceName = interception.response.body.data.name; - cy.CreateAppForWorkspace(newWorkspaceName, newWorkspaceName); - }); +describe( + "Pre git connection spec:", + { + tags: [ + "@tag.Git", + "@tag.AccessControl", + "@tag.Workflows", + "@tag.Module", + "@tag.Theme", + "@tag.JS", + "@tag.Container", + "@tag.ImportExport", + ], + }, + function () { + it("1. Deploy menu at the application dropdown menu", () => { + // create new app + _.homePage.NavigateToHome(); + cy.createWorkspace(); + cy.wait("@createWorkspace").then((interception) => { + const newWorkspaceName = interception.response.body.data.name; + cy.CreateAppForWorkspace(newWorkspaceName, newWorkspaceName); + }); - cy.intercept("POST", "/api/v1/applications/publish/*").as("publishApp"); + cy.intercept("POST", "/api/v1/applications/publish/*").as("publishApp"); - cy.window().then((window) => { - cy.stub(window, "open").callsFake((url) => { - expect(!!url).to.be.true; + cy.window().then((window) => { + cy.stub(window, "open").callsFake((url) => { + expect(!!url).to.be.true; + }); }); - }); - // deploy - _.agHelper.GetNClick(_.locators._publishButton); - cy.wait("@publishApp"); + // deploy + _.agHelper.GetNClick(_.locators._publishButton); + cy.wait("@publishApp"); - // current deployed version - _.agHelper.GetNClick(homePage.deployPopupOptionTrigger); - _.agHelper.AssertElementExist(homePage.currentDeployedPreviewBtn); + // current deployed version + _.agHelper.GetNClick(homePage.deployPopupOptionTrigger); + _.agHelper.AssertElementExist(homePage.currentDeployedPreviewBtn); - // connect to git - _.agHelper.GetNClick(homePage.connectToGitBtn); - _.agHelper.AssertElementVisibility(gitSyncLocators.gitSyncModal); - cy.get(gitSyncLocators.closeGitSyncModal).click(); + // connect to git + _.agHelper.GetNClick(homePage.connectToGitBtn); + _.agHelper.AssertElementVisibility(gitSyncLocators.gitSyncModal); + cy.get(gitSyncLocators.closeGitSyncModal).click(); - cy.get(gitSyncLocators.connectGitBottomBar).click(); - _.agHelper.AssertElementVisibility(gitSyncLocators.gitSyncModal); - cy.get(gitSyncLocators.closeGitSyncModal).click(); - }); -}); + cy.get(gitSyncLocators.connectGitBottomBar).click(); + _.agHelper.AssertElementVisibility(gitSyncLocators.gitSyncModal); + cy.get(gitSyncLocators.closeGitSyncModal).click(); + }); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Git/GitSync/RepoLimitExceededErrorModal_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Git/GitSync/RepoLimitExceededErrorModal_spec.js index cf275ba1ddfc..879543ef43b2 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Git/GitSync/RepoLimitExceededErrorModal_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Git/GitSync/RepoLimitExceededErrorModal_spec.js @@ -11,7 +11,18 @@ import { REPO, CURRENT_REPO } from "../../../../../fixtures/REPO"; let repoName1, repoName2, repoName3, repoName4, windowOpenSpy; describe( "Repo Limit Exceeded Error Modal", - { tags: ["@tag.Git"] }, + { + tags: [ + "@tag.Git", + "@tag.AccessControl", + "@tag.Workflows", + "@tag.Module", + "@tag.Theme", + "@tag.JS", + "@tag.Container", + "@tag.ImportExport", + ], + }, function () { before(() => { const uuid = require("uuid"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Git/GitSync/SwitchBranches_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Git/GitSync/SwitchBranches_spec.js index b411c8b79192..c652285ef448 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Git/GitSync/SwitchBranches_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Git/GitSync/SwitchBranches_spec.js @@ -23,258 +23,276 @@ let parentBranchKey = "ParentBranch", branchQueryKey = "branch"; let repoName; -describe("Git sync:", { tags: ["@tag.Git", "@tag.Sanity"] }, function () { - before(() => { - gitSync.CreateNConnectToGit(); - cy.get("@gitRepoName").then((repName) => { - repoName = repName; +describe( + "Git sync:", + { + tags: [ + "@tag.Git", + "@tag.Sanity", + "@tag.AccessControl", + "@tag.Workflows", + "@tag.Module", + "@tag.Theme", + "@tag.JS", + "@tag.Container", + "@tag.ImportExport", + ], + }, + function () { + before(() => { + gitSync.CreateNConnectToGit(); + cy.get("@gitRepoName").then((repName) => { + repoName = repName; + }); }); - }); - - it("1. create branch input", function () { - PageLeftPane.switchSegment(PagePaneSegment.UI); - cy.get(gitSyncLocators.branchButton).click(); - // validate of the branch name - const hypenBranchName = "hypen-branch-name"; - cy.get(gitSyncLocators.branchSearchInput).type( - `{selectall}${hypenBranchName}`, - ); - agHelper.AssertAttribute( - gitSyncLocators.branchSearchInput, - "value", - "hypen-branch-name", - ); - const specialBranchName = "special&branch-name~@#$%^&*()_+={}[]><,."; - cy.get(gitSyncLocators.branchSearchInput).type( - `{selectall}${specialBranchName}`, - ); - agHelper.AssertAttribute( - gitSyncLocators.branchSearchInput, - "value", - "special_branch-name_____________________", - ); - cy.get(gitSyncLocators.closeBranchList).click(); - }); + it("1. create branch input", function () { + PageLeftPane.switchSegment(PagePaneSegment.UI); + cy.get(gitSyncLocators.branchButton).click(); - it("2. creates a new branch and create branch specific resources", function () { - cy.get(commonLocators.canvas).click({ force: true }); - //cy.createGitBranch(parentBranchKey); - gitSync.CreateGitBranch(parentBranchKey, true); - cy.get("@gitbranchName").then((branName) => { - parentBranchKey = branName; + // validate of the branch name + const hypenBranchName = "hypen-branch-name"; + cy.get(gitSyncLocators.branchSearchInput).type( + `{selectall}${hypenBranchName}`, + ); + agHelper.AssertAttribute( + gitSyncLocators.branchSearchInput, + "value", + "hypen-branch-name", + ); + const specialBranchName = "special&branch-name~@#$%^&*()_+={}[]><,."; + cy.get(gitSyncLocators.branchSearchInput).type( + `{selectall}${specialBranchName}`, + ); + agHelper.AssertAttribute( + gitSyncLocators.branchSearchInput, + "value", + "special_branch-name_____________________", + ); + cy.get(gitSyncLocators.closeBranchList).click(); }); - PageList.AddNewPage(); - entityExplorer.RenameEntityFromExplorer( - "Page2", - "ParentPage1", - false, - EntityItems.Page, - ); - dataSources.NavigateToDSCreateNew(); - apiPage.CreateApi("ParentApi1"); - jsEditor.CreateJSObject(); - // Added because api name edit takes some time to - // reflect in api sidebar after the call passes. - // eslint-disable-next-line cypress/no-unnecessary-waiting - cy.wait(2000); - gitSync.CreateGitBranch(childBranchKey, true); - cy.get("@gitbranchName").then((branName) => { - childBranchKey = branName; - }); - PageList.AddNewPage(); - entityExplorer.RenameEntityFromExplorer( - "Page2", - "ChildPage1", - false, - EntityItems.Page, - ); - dataSources.NavigateToDSCreateNew(); - apiPage.CreateApi("ChildApi1"); - jsEditor.CreateJSObject(); - // Added because api name edit takes some time to - // reflect in api sidebar after the call passes. - // eslint-disable-next-line cypress/no-unnecessary-waiting - cy.wait(2000); + it("2. creates a new branch and create branch specific resources", function () { + cy.get(commonLocators.canvas).click({ force: true }); + //cy.createGitBranch(parentBranchKey); + gitSync.CreateGitBranch(parentBranchKey, true); + cy.get("@gitbranchName").then((branName) => { + parentBranchKey = branName; + }); - // A switch here should not show a 404 page - cy.switchGitBranch(parentBranchKey); - // When entity not found, takes them to the home page - PageList.VerifyIsCurrentPage("Page1"); + PageList.AddNewPage(); + entityExplorer.RenameEntityFromExplorer( + "Page2", + "ParentPage1", + false, + EntityItems.Page, + ); + dataSources.NavigateToDSCreateNew(); + apiPage.CreateApi("ParentApi1"); + jsEditor.CreateJSObject(); + // Added because api name edit takes some time to + // reflect in api sidebar after the call passes. + // eslint-disable-next-line cypress/no-unnecessary-waiting + cy.wait(2000); + gitSync.CreateGitBranch(childBranchKey, true); + cy.get("@gitbranchName").then((branName) => { + childBranchKey = branName; + }); + PageList.AddNewPage(); + entityExplorer.RenameEntityFromExplorer( + "Page2", + "ChildPage1", + false, + EntityItems.Page, + ); + dataSources.NavigateToDSCreateNew(); + apiPage.CreateApi("ChildApi1"); + jsEditor.CreateJSObject(); + // Added because api name edit takes some time to + // reflect in api sidebar after the call passes. + // eslint-disable-next-line cypress/no-unnecessary-waiting + cy.wait(2000); - EditorNavigation.SelectEntityByName("ParentPage1", EntityType.Page); - PageList.assertAbsence("ChildPage1"); - PageLeftPane.switchSegment(PagePaneSegment.Queries); - PageLeftPane.assertAbsence("ChildApi1"); - PageLeftPane.switchSegment(PagePaneSegment.JS); - PageLeftPane.assertAbsence("ChildJSAction1"); - }); + // A switch here should not show a 404 page + cy.switchGitBranch(parentBranchKey); + // When entity not found, takes them to the home page + PageList.VerifyIsCurrentPage("Page1"); + + EditorNavigation.SelectEntityByName("ParentPage1", EntityType.Page); + PageList.assertAbsence("ChildPage1"); + PageLeftPane.switchSegment(PagePaneSegment.Queries); + PageLeftPane.assertAbsence("ChildApi1"); + PageLeftPane.switchSegment(PagePaneSegment.JS); + PageLeftPane.assertAbsence("ChildJSAction1"); + }); - // rename entities - it("3. makes branch specific resource updates", function () { - cy.switchGitBranch(childBranchKey); - EditorNavigation.SelectEntityByName("ParentPage1", EntityType.Page); - entityExplorer.RenameEntityFromExplorer( - "ParentPage1", - "ParentPageRenamed", - false, - EntityItems.Page, - ); - agHelper.RemoveUIElement( - "Tooltip", - Cypress.env("MESSAGES").ADD_QUERY_JS_TOOLTIP(), - ); - PageLeftPane.switchSegment(PagePaneSegment.Queries); - entityExplorer.RenameEntityFromExplorer("ParentApi1", "ParentApiRenamed"); + // rename entities + it("3. makes branch specific resource updates", function () { + cy.switchGitBranch(childBranchKey); + EditorNavigation.SelectEntityByName("ParentPage1", EntityType.Page); + entityExplorer.RenameEntityFromExplorer( + "ParentPage1", + "ParentPageRenamed", + false, + EntityItems.Page, + ); + agHelper.RemoveUIElement( + "Tooltip", + Cypress.env("MESSAGES").ADD_QUERY_JS_TOOLTIP(), + ); + PageLeftPane.switchSegment(PagePaneSegment.Queries); + entityExplorer.RenameEntityFromExplorer("ParentApi1", "ParentApiRenamed"); - cy.switchGitBranch(parentBranchKey); + cy.switchGitBranch(parentBranchKey); - PageList.assertAbsence("ParentPageRenamed"); - PageLeftPane.switchSegment(PagePaneSegment.Queries); - PageLeftPane.assertAbsence("ParentApiRenamed"); - }); + PageList.assertAbsence("ParentPageRenamed"); + PageLeftPane.switchSegment(PagePaneSegment.Queries); + PageLeftPane.assertAbsence("ParentApiRenamed"); + }); - it("4. enables switching branch from the URL", () => { - cy.url().then((url) => { - EditorNavigation.SelectEntityByName("ParentPage1", EntityType.Page); - cy.dragAndDropToCanvas("tablewidgetv2", { x: 200, y: 200 }); - cy.get(".t--widget-tablewidgetv2").should("exist"); - cy.commitAndPush(); + it("4. enables switching branch from the URL", () => { + cy.url().then((url) => { + EditorNavigation.SelectEntityByName("ParentPage1", EntityType.Page); + cy.dragAndDropToCanvas("tablewidgetv2", { x: 200, y: 200 }); + cy.get(".t--widget-tablewidgetv2").should("exist"); + cy.commitAndPush(); - const urlObject = new URL(url); - urlObject.searchParams.set(branchQueryKey, childBranchKey); - cy.visit(urlObject.toString(), { timeout: 60000 }); + const urlObject = new URL(url); + urlObject.searchParams.set(branchQueryKey, childBranchKey); + cy.visit(urlObject.toString(), { timeout: 60000 }); - cy.get(".ads-v2-spinner").should("exist"); - cy.get(".ads-v2-spinner").should("not.exist"); + cy.get(".ads-v2-spinner").should("exist"); + cy.get(".ads-v2-spinner").should("not.exist"); - cy.get(".t--widget-tablewidgetv2").should("not.exist"); + cy.get(".t--widget-tablewidgetv2").should("not.exist"); - cy.commitAndPush(); + cy.commitAndPush(); - cy.latestDeployPreview(); + cy.latestDeployPreview(); - cy.get(".t--widget-tablewidgetv2").should("not.exist"); - //cy.get(commonLocators.backToEditor).click(); - cy.wait(2000); - cy.url().then((url) => { - const urlObject = new URL(url); - urlObject.searchParams.set(branchQueryKey, parentBranchKey); - cy.visit(urlObject.toString(), { timeout: 60000 }); + cy.get(".t--widget-tablewidgetv2").should("not.exist"); + //cy.get(commonLocators.backToEditor).click(); + cy.wait(2000); + cy.url().then((url) => { + const urlObject = new URL(url); + urlObject.searchParams.set(branchQueryKey, parentBranchKey); + cy.visit(urlObject.toString(), { timeout: 60000 }); - cy.wait("@getConsolidatedData").should( - "have.nested.property", - "response.body.responseMeta.status", - 200, - ); - cy.get(".t--page-switch-tab").contains("ParentPage1").click(); - cy.get(".t--widget-tablewidgetv2").should("exist"); + cy.wait("@getConsolidatedData").should( + "have.nested.property", + "response.body.responseMeta.status", + 200, + ); + cy.get(".t--page-switch-tab").contains("ParentPage1").click(); + cy.get(".t--widget-tablewidgetv2").should("exist"); + }); }); }); - }); - //Rename - hence skipping for Gitea - it.skip("5. test sync and prune branches", () => { - // uncomment once prune branch flow is complete - let tempBranch = "featureA"; - const tempBranchRenamed = "newFeatureA"; - deployMode.NavigateBacktoEditor(); - gitSync.CreateGitBranch(tempBranch, true); - cy.get("@gitbranchName").then((branName) => { - tempBranch = branName; + //Rename - hence skipping for Gitea + it.skip("5. test sync and prune branches", () => { + // uncomment once prune branch flow is complete + let tempBranch = "featureA"; + const tempBranchRenamed = "newFeatureA"; + deployMode.NavigateBacktoEditor(); + gitSync.CreateGitBranch(tempBranch, true); + cy.get("@gitbranchName").then((branName) => { + tempBranch = branName; + }); + gitSync.CreateGitBranch(`${tempBranch}-1`, true); + // cy.get("@gitbranchName").then((branName) => { + // tempBranch = branName; + // }); + // rename branch API missing in TED. + // cy.renameBranchViaGithubApi(repoName, tempBranch, tempBranchRenamed); + cy.get(gitSyncLocators.branchButton).click(); + cy.get(gitSyncLocators.branchSearchInput).type( + `{selectall}${tempBranch}`, + ); + const tempBranchRegex = new RegExp(`^${tempBranch}$`); + const tempBranchRenamedRegex = new RegExp(`^${tempBranchRenamed}$`); + const remoteTempBranchRenamedRegex = new RegExp( + `^origin/${tempBranchRenamed}$`, + ); + cy.get(gitSyncLocators.branchListItem).contains(tempBranchRegex); + cy.get(gitSyncLocators.syncBranches).click(); + cy.get(gitSyncLocators.branchListItem) + .contains(tempBranchRegex) + .should("exist"); + cy.get(gitSyncLocators.branchListItem) + .contains(remoteTempBranchRenamedRegex) + .should("exist"); + cy.get(gitSyncLocators.closeBranchList).click(); + cy.switchGitBranch(`origin/${tempBranchRenamed}`); + cy.switchGitBranch(`origin/${tempBranchRenamed}`, true); + cy.wait(4000); // wait for switch branch + // assert error toast + cy.contains(`origin/${tempBranchRenamed} already exists`); + cy.get(gitSyncLocators.closeBranchList).click(); }); - gitSync.CreateGitBranch(`${tempBranch}-1`, true); - // cy.get("@gitbranchName").then((branName) => { - // tempBranch = branName; - // }); - // rename branch API missing in TED. - // cy.renameBranchViaGithubApi(repoName, tempBranch, tempBranchRenamed); - cy.get(gitSyncLocators.branchButton).click(); - cy.get(gitSyncLocators.branchSearchInput).type(`{selectall}${tempBranch}`); - const tempBranchRegex = new RegExp(`^${tempBranch}$`); - const tempBranchRenamedRegex = new RegExp(`^${tempBranchRenamed}$`); - const remoteTempBranchRenamedRegex = new RegExp( - `^origin/${tempBranchRenamed}$`, - ); - cy.get(gitSyncLocators.branchListItem).contains(tempBranchRegex); - cy.get(gitSyncLocators.syncBranches).click(); - cy.get(gitSyncLocators.branchListItem) - .contains(tempBranchRegex) - .should("exist"); - cy.get(gitSyncLocators.branchListItem) - .contains(remoteTempBranchRenamedRegex) - .should("exist"); - cy.get(gitSyncLocators.closeBranchList).click(); - cy.switchGitBranch(`origin/${tempBranchRenamed}`); - cy.switchGitBranch(`origin/${tempBranchRenamed}`, true); - cy.wait(4000); // wait for switch branch - // assert error toast - cy.contains(`origin/${tempBranchRenamed} already exists`); - cy.get(gitSyncLocators.closeBranchList).click(); - }); - // Validate the error faced when user switches between the branches - it("6. no error faced when user switches branch with new page", function () { - deployMode.NavigateBacktoEditor(); //Adding since skipping 6th case - cy.generateUUID().then((uuid) => { - gitSync.CreateGitBranch(childBranchKey, true); - //cy.createGitBranch(childBranchKey); - PageList.AddNewPage(); - cy.get(gitSyncLocators.branchButton).click({ force: true }); - cy.get(gitSyncLocators.branchSearchInput).type("{selectall}master"); - cy.wait(400); - cy.get(gitSyncLocators.branchListItem).contains("master").click(); - cy.wait(4000); - PageLeftPane.switchSegment(PagePaneSegment.UI); - PageList.VerifyIsCurrentPage("Page1"); - cy.get(".t--canvas-artboard").should("be.visible"); + // Validate the error faced when user switches between the branches + it("6. no error faced when user switches branch with new page", function () { + deployMode.NavigateBacktoEditor(); //Adding since skipping 6th case + cy.generateUUID().then((uuid) => { + gitSync.CreateGitBranch(childBranchKey, true); + //cy.createGitBranch(childBranchKey); + PageList.AddNewPage(); + cy.get(gitSyncLocators.branchButton).click({ force: true }); + cy.get(gitSyncLocators.branchSearchInput).type("{selectall}master"); + cy.wait(400); + cy.get(gitSyncLocators.branchListItem).contains("master").click(); + cy.wait(4000); + PageLeftPane.switchSegment(PagePaneSegment.UI); + PageList.VerifyIsCurrentPage("Page1"); + cy.get(".t--canvas-artboard").should("be.visible"); + }); + agHelper.RefreshPage(); }); - agHelper.RefreshPage(); - }); - it("7. branch list search", function () { - cy.get(".ads-v2-spinner").should("not.exist"); - PageLeftPane.switchSegment(PagePaneSegment.UI); - cy.get(commonLocators.canvas).click({ force: true }); - let parentBKey, childBKey; - gitSync.CreateGitBranch("parentBranch", true); - cy.get("@gitbranchName").then((branName) => { - parentBKey = branName; - - gitSync.CreateGitBranch("childBranch", true); + it("7. branch list search", function () { + cy.get(".ads-v2-spinner").should("not.exist"); + PageLeftPane.switchSegment(PagePaneSegment.UI); + cy.get(commonLocators.canvas).click({ force: true }); + let parentBKey, childBKey; + gitSync.CreateGitBranch("parentBranch", true); cy.get("@gitbranchName").then((branName) => { - childBKey = branName; + parentBKey = branName; - cy.get(gitSyncLocators.branchButton).click(); - cy.get(gitSyncLocators.branchSearchInput).type( - `{selectall}${parentBKey.slice(0, 3)}`, - ); - cy.get(gitSyncLocators.branchListItem).contains(parentBKey); + gitSync.CreateGitBranch("childBranch", true); + cy.get("@gitbranchName").then((branName) => { + childBKey = branName; - cy.get(gitSyncLocators.branchSearchInput).type( - `{selectall}${childBKey.slice(0, 3)}`, - ); - cy.get(gitSyncLocators.branchListItem).contains(childBKey); + cy.get(gitSyncLocators.branchButton).click(); + cy.get(gitSyncLocators.branchSearchInput).type( + `{selectall}${parentBKey.slice(0, 3)}`, + ); + cy.get(gitSyncLocators.branchListItem).contains(parentBKey); - cy.get(gitSyncLocators.branchSearchInput).type( - `{selectall}${branchQueryKey}`, - ); - cy.get(gitSyncLocators.branchListItem).contains(childBKey); - cy.get(gitSyncLocators.branchListItem).contains(parentBKey); + cy.get(gitSyncLocators.branchSearchInput).type( + `{selectall}${childBKey.slice(0, 3)}`, + ); + cy.get(gitSyncLocators.branchListItem).contains(childBKey); - cy.get(gitSyncLocators.branchSearchInput).type(`{selectall}abcde`); - cy.get(gitSyncLocators.branchListItem).should("not.exist"); + cy.get(gitSyncLocators.branchSearchInput).type( + `{selectall}${branchQueryKey}`, + ); + cy.get(gitSyncLocators.branchListItem).contains(childBKey); + cy.get(gitSyncLocators.branchListItem).contains(parentBKey); - cy.get(gitSyncLocators.branchSearchInput).clear(); - cy.get(gitSyncLocators.branchListItem).contains(childBKey); - cy.get(gitSyncLocators.branchListItem).contains(parentBKey); + cy.get(gitSyncLocators.branchSearchInput).type(`{selectall}abcde`); + cy.get(gitSyncLocators.branchListItem).should("not.exist"); + + cy.get(gitSyncLocators.branchSearchInput).clear(); + cy.get(gitSyncLocators.branchListItem).contains(childBKey); + cy.get(gitSyncLocators.branchListItem).contains(parentBKey); + }); }); + cy.get(gitSyncLocators.closeBranchList).click(); }); - cy.get(gitSyncLocators.closeBranchList).click(); - }); - after(() => { - gitSync.DeleteTestGithubRepo(repoName); - }); -}); + after(() => { + gitSync.DeleteTestGithubRepo(repoName); + }); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Git/GitWithAutoLayout/conversion_of_git_connected_apps_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Git/GitWithAutoLayout/conversion_of_git_connected_apps_spec.js index fc25d6683968..622095c9c8d9 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Git/GitWithAutoLayout/conversion_of_git_connected_apps_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Git/GitWithAutoLayout/conversion_of_git_connected_apps_spec.js @@ -16,78 +16,101 @@ let parentBranchKey = "ParentBranch", childBranchKey = "ChildBranch"; let repoName; -describe("Git sync:", { tags: ["@tag.Git"] }, function () { - before(() => { - homePage.NavigateToHome(); - agHelper.GenerateUUID(); - cy.get("@guid").then((uid) => { - homePage.CreateNewWorkspace("AutoLayoutGit" + uid); - homePage.CreateAppInWorkspace("AutoLayoutGit" + uid); +describe( + "Git sync:", + { + tags: [ + "@tag.Git", + "@tag.AccessControl", + "@tag.Workflows", + "@tag.Module", + "@tag.Theme", + "@tag.JS", + "@tag.Container", + "@tag.ImportExport", + ], + }, + function () { + before(() => { + homePage.NavigateToHome(); + agHelper.GenerateUUID(); + cy.get("@guid").then((uid) => { + homePage.CreateNewWorkspace("AutoLayoutGit" + uid); + homePage.CreateAppInWorkspace("AutoLayoutGit" + uid); + }); + + gitSync.CreateNConnectToGit(); + cy.get("@gitRepoName").then((repName) => { + repoName = repName; + }); + cy.wait(3000); + + gitSync.CreateGitBranch(parentBranchKey, true); + cy.get("@gitbranchName").then((branName) => { + parentBranchKey = branName; + }); + + gitSync.CreateGitBranch(childBranchKey, true); + cy.get("@gitbranchName").then((branName) => { + childBranchKey = branName; + }); }); - gitSync.CreateNConnectToGit(); - cy.get("@gitRepoName").then((repName) => { - repoName = repName; - }); - cy.wait(3000); - - gitSync.CreateGitBranch(parentBranchKey, true); - cy.get("@gitbranchName").then((branName) => { - parentBranchKey = branName; - }); - - gitSync.CreateGitBranch(childBranchKey, true); - cy.get("@gitbranchName").then((branName) => { - childBranchKey = branName; - }); - }); + it("1. when snapshot is restored from a page created before Conversion, it should refresh in the same page", () => { + entityExplorer.DragDropWidgetNVerify( + draggableWidgets.CONTAINER, + 100, + 100, + ); - it("1. when snapshot is restored from a page created before Conversion, it should refresh in the same page", () => { - entityExplorer.DragDropWidgetNVerify(draggableWidgets.CONTAINER, 100, 100); + PageList.AddNewPage("New blank page"); - PageList.AddNewPage("New blank page"); + autoLayout.ConvertToAutoLayoutAndVerify(); - autoLayout.ConvertToAutoLayoutAndVerify(); + autoLayout.UseSnapshotFromBanner(); - autoLayout.UseSnapshotFromBanner(); + PageList.VerifyIsCurrentPage("Page2"); - PageList.VerifyIsCurrentPage("Page2"); + EditorNavigation.SelectEntityByName("Page1", EntityType.Page); - EditorNavigation.SelectEntityByName("Page1", EntityType.Page); + agHelper.Sleep(); - agHelper.Sleep(); - - entityExplorer.ActionContextMenuByEntityName({ - entityNameinLeftSidebar: "Page2", - entityType: EntityItems.Page, + entityExplorer.ActionContextMenuByEntityName({ + entityNameinLeftSidebar: "Page2", + entityType: EntityItems.Page, + }); }); - }); - it("2. when snapshot is restored from a page created after Conversion, it should redirected to home page", () => { - autoLayout.ConvertToAutoLayoutAndVerify(); + it("2. when snapshot is restored from a page created after Conversion, it should redirected to home page", () => { + autoLayout.ConvertToAutoLayoutAndVerify(); - PageList.AddNewPage("New blank page"); + PageList.AddNewPage("New blank page"); - autoLayout.UseSnapshotFromBanner(); + autoLayout.UseSnapshotFromBanner(); - PageList.VerifyIsCurrentPage("Page1"); - }); + PageList.VerifyIsCurrentPage("Page1"); + }); - it("3. Switch to parentBranch and when snapshot is restored from a page created after Conversion, it should redirected to home page", () => { - cy.switchGitBranch(parentBranchKey); + it("3. Switch to parentBranch and when snapshot is restored from a page created after Conversion, it should redirected to home page", () => { + cy.switchGitBranch(parentBranchKey); - entityExplorer.DragDropWidgetNVerify(draggableWidgets.CONTAINER, 100, 100); + entityExplorer.DragDropWidgetNVerify( + draggableWidgets.CONTAINER, + 100, + 100, + ); - autoLayout.ConvertToAutoLayoutAndVerify(); + autoLayout.ConvertToAutoLayoutAndVerify(); - PageList.AddNewPage("New blank page"); + PageList.AddNewPage("New blank page"); - autoLayout.UseSnapshotFromBanner(); + autoLayout.UseSnapshotFromBanner(); - PageList.VerifyIsCurrentPage("Page1"); - }); + PageList.VerifyIsCurrentPage("Page1"); + }); - after(() => { - gitSync.DeleteTestGithubRepo(repoName); - }); -}); + after(() => { + gitSync.DeleteTestGithubRepo(repoName); + }); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Git/GitWithJSLibrary/GitwithCustomJSLibrary_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Git/GitWithJSLibrary/GitwithCustomJSLibrary_spec.js index 269e4c515585..7f11b3858468 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Git/GitWithJSLibrary/GitwithCustomJSLibrary_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Git/GitWithJSLibrary/GitwithCustomJSLibrary_spec.js @@ -17,7 +17,20 @@ let repoName; describe( "Tests JS Library with Git", - { tags: ["@tag.Git", "@tag.excludeForAirgap", "@tag.Sanity"] }, + { + tags: [ + "@tag.Git", + "@tag.excludeForAirgap", + "@tag.Sanity", + "@tag.AccessControl", + "@tag.Workflows", + "@tag.Module", + "@tag.Theme", + "@tag.JS", + "@tag.Container", + "@tag.ImportExport", + ], + }, () => { before(() => { homePage.NavigateToHome(); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Git/GitWithTheming/GitWithTheming_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Git/GitWithTheming/GitWithTheming_spec.js index 874af31e9891..ef0f304ce4ca 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Git/GitWithTheming/GitWithTheming_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Git/GitWithTheming/GitWithTheming_spec.js @@ -4,7 +4,19 @@ const commonlocators = require("../../../../../locators/commonlocators.json"); describe( "Git with Theming:", - { tags: ["@tag.Git", "@tag.Sanity"] }, + { + tags: [ + "@tag.Git", + "@tag.Sanity", + "@tag.AccessControl", + "@tag.Workflows", + "@tag.Module", + "@tag.Theme", + "@tag.JS", + "@tag.Container", + "@tag.ImportExport", + ], + }, function () { const backgroudColorMaster = "rgb(22, 163, 74)"; const backgroudColorChildBranch = "rgb(100, 116, 139)"; diff --git a/app/client/cypress/e2e/Regression/ClientSide/Homepage/HomepageExperienceV2_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Homepage/HomepageExperienceV2_spec.ts index a48460f5b01e..d0ce249e8942 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Homepage/HomepageExperienceV2_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Homepage/HomepageExperienceV2_spec.ts @@ -8,7 +8,7 @@ import HomepageLocators from "../../../../locators/HomePage"; describe( "Validate Homepage Experience V2 changes", - { tags: ["@tag.Workspace"] }, + { tags: ["@tag.Workspace", "@tag.AccessControl"] }, function () { before(() => {}); diff --git a/app/client/cypress/e2e/Regression/ClientSide/IDE/Canvas_Context_Property_Pane_1_spec.js b/app/client/cypress/e2e/Regression/ClientSide/IDE/Canvas_Context_Property_Pane_1_spec.js index 0940b7775809..372500292450 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/IDE/Canvas_Context_Property_Pane_1_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/IDE/Canvas_Context_Property_Pane_1_spec.js @@ -14,62 +14,82 @@ const page1 = "Page1"; const page2 = "Page2"; const api1 = "API1"; -describe("Canvas context Property Pane", { tags: ["@tag.IDE"] }, function () { - before(() => { - _.agHelper.AddDsl("editorContextdsl"); - - PageList.AddNewPage("New blank page"); - cy.dragAndDropToCanvas("textwidget", { x: 300, y: 200 }); - EditorNavigation.SelectEntityByName(page1, EntityType.Page); - _.apiPage.CreateApi(api1); - PageLeftPane.switchSegment(PagePaneSegment.UI); - }); - - beforeEach(() => { - _.agHelper.RefreshPage(); - }); - - let propPaneBack = "[data-testid='t--property-pane-back-btn']"; - - it("1. Code Editor should have focus while switching between widgets, pages and Editor Panes - Label", function () { - propertyControlSelector = ".t--property-control-label"; - verifyPropertyPaneContext( - () => { - cy.focusCodeInput(propertyControlSelector); - }, - () => { - cy.assertSoftFocusOnCodeInput(propertyControlSelector); - }, - "Button1", - ); - }); +describe( + "Canvas context Property Pane", + { tags: ["@tag.IDE", "@tag.PropertyPane"] }, + function () { + before(() => { + _.agHelper.AddDsl("editorContextdsl"); + + PageList.AddNewPage("New blank page"); + cy.dragAndDropToCanvas("textwidget", { x: 300, y: 200 }); + EditorNavigation.SelectEntityByName(page1, EntityType.Page); + _.apiPage.CreateApi(api1); + PageLeftPane.switchSegment(PagePaneSegment.UI); + }); - it("2. Code Editor should have focus while switching between widgets, pages and Editor Panes", function () { - propertyControlSelector = `.t--property-control-animateloading input[type="checkbox"]`; - verifyPropertyPaneContext( - () => { - cy.get(propertyControlSelector).click({ force: true }); - }, - () => { - cy.get(propertyControlSelector).should("be.focused"); + beforeEach(() => { + _.agHelper.RefreshPage(); + }); + + let propPaneBack = "[data-testid='t--property-pane-back-btn']"; + + it("1. Code Editor should have focus while switching between widgets, pages and Editor Panes - Label", function () { + propertyControlSelector = ".t--property-control-label"; + verifyPropertyPaneContext( + () => { + cy.focusCodeInput(propertyControlSelector); + }, + () => { + cy.assertSoftFocusOnCodeInput(propertyControlSelector); + }, + "Button1", + ); + }); + + it("2. Code Editor should have focus while switching between widgets, pages and Editor Panes", function () { + propertyControlSelector = `.t--property-control-animateloading input[type="checkbox"]`; + verifyPropertyPaneContext( + () => { + cy.get(propertyControlSelector).click({ force: true }); + }, + () => { + cy.get(propertyControlSelector).should("be.focused"); + }, + "Button1", + ); + }); + + it( + "3. Code Editor should have focus while switching between widgets, pages and Editor Panes", + { tags: ["@tag.excludeForAirgap"] }, + function () { + // TODO: Since google recaptcha is not possible in airgap mode, skipping this test for now for airgapped version. + //Will modify the dsl to have maybe phone input widget to have a dropdown property control - Sangeeth + //if (!Cypress.env("AIRGAPPED")) { + //DropDown Property controls should have focus while switching between widgets, pages and Editor Panes + _.agHelper.RefreshPage(); + propertyControlClickSelector = `.t--property-control-googlerecaptchaversion .rc-select-selection-search-input`; + propertyControlVerifySelector = + ".t--property-control-googlerecaptchaversion .rc-select-selection-search-input"; + + verifyPropertyPaneContext( + () => { + cy.get(propertyControlClickSelector).eq(0).click({ force: true }); + }, + () => { + cy.get(propertyControlVerifySelector).should("be.focused"); + }, + "Button1", + ); + //} }, - "Button1", ); - }); - - it( - "3. Code Editor should have focus while switching between widgets, pages and Editor Panes", - { tags: ["@tag.excludeForAirgap"] }, - function () { - // TODO: Since google recaptcha is not possible in airgap mode, skipping this test for now for airgapped version. - //Will modify the dsl to have maybe phone input widget to have a dropdown property control - Sangeeth - //if (!Cypress.env("AIRGAPPED")) { - //DropDown Property controls should have focus while switching between widgets, pages and Editor Panes - _.agHelper.RefreshPage(); - propertyControlClickSelector = `.t--property-control-googlerecaptchaversion .rc-select-selection-search-input`; - propertyControlVerifySelector = - ".t--property-control-googlerecaptchaversion .rc-select-selection-search-input"; + it("4. Code Editor should have focus while switching between widgets, pages and Editor Panes", function () { + //Icon Button Property controls should have focus while switching between widgets, pages and Editor Panes + propertyControlClickSelector = `.t--property-control-borderradius .ads-v2-segmented-control__segments-container`; + propertyControlVerifySelector = `.t--property-control-borderradius .ads-v2-segmented-control__segments-container[data-selected="true"]`; verifyPropertyPaneContext( () => { cy.get(propertyControlClickSelector).eq(0).click({ force: true }); @@ -78,120 +98,104 @@ describe("Canvas context Property Pane", { tags: ["@tag.IDE"] }, function () { cy.get(propertyControlVerifySelector).should("be.focused"); }, "Button1", + true, ); - //} - }, - ); - - it("4. Code Editor should have focus while switching between widgets, pages and Editor Panes", function () { - //Icon Button Property controls should have focus while switching between widgets, pages and Editor Panes - propertyControlClickSelector = `.t--property-control-borderradius .ads-v2-segmented-control__segments-container`; - propertyControlVerifySelector = `.t--property-control-borderradius .ads-v2-segmented-control__segments-container[data-selected="true"]`; - verifyPropertyPaneContext( - () => { - cy.get(propertyControlClickSelector).eq(0).click({ force: true }); - }, - () => { - cy.get(propertyControlVerifySelector).should("be.focused"); - }, - "Button1", - true, - ); - }); + }); - it("5. ColorPicker Property controls should have focus while switching between widgets, pages and Editor Panes", function () { - let propertyControlSelector = `.t--property-control-buttoncolor input[type="text"]`; - verifyPropertyPaneContext( - () => { - cy.get(propertyControlSelector).click({ force: true }); - }, - () => { - cy.get(propertyControlSelector).should("be.focused"); - }, - "Button1", - true, - ); - }); + it("5. ColorPicker Property controls should have focus while switching between widgets, pages and Editor Panes", function () { + let propertyControlSelector = `.t--property-control-buttoncolor input[type="text"]`; + verifyPropertyPaneContext( + () => { + cy.get(propertyControlSelector).click({ force: true }); + }, + () => { + cy.get(propertyControlSelector).should("be.focused"); + }, + "Button1", + true, + ); + }); - it("6. ColorPicker Property controls should have focus while switching between widgets, pages and Editor Panes", function () { - propertySectionState = { - basic: false, - general: true, - }; + it("6. ColorPicker Property controls should have focus while switching between widgets, pages and Editor Panes", function () { + propertySectionState = { + basic: false, + general: true, + }; - if (!Cypress.env("AIRGAPPED")) { + if (!Cypress.env("AIRGAPPED")) { + propertySectionState = { + ...propertySectionState, + validation: false, + formsettings: true, + }; + } + + verifyPropertyPaneContext( + () => { + setPropertyPaneSectionState(propertySectionState); + }, + () => { + verifyPropertyPaneSectionState(propertySectionState); + }, + "Button1", + ); + }); + + it("7. ColorPicker Property controls should have focus while switching between widgets, pages and Editor Panes", function () { propertySectionState = { - ...propertySectionState, - validation: false, - formsettings: true, + general: true, + icon: false, + color: true, + borderandshadow: false, }; - } - verifyPropertyPaneContext( - () => { - setPropertyPaneSectionState(propertySectionState); - }, - () => { - verifyPropertyPaneSectionState(propertySectionState); - }, - "Button1", - ); - }); - - it("7. ColorPicker Property controls should have focus while switching between widgets, pages and Editor Panes", function () { - propertySectionState = { - general: true, - icon: false, - color: true, - borderandshadow: false, - }; - - verifyPropertyPaneContext( - () => { - cy.get(`.ads-v2-tabs__list-tab:contains("Style")`).eq(0).click(); - setPropertyPaneSectionState(propertySectionState); - }, - () => { - verifyPropertyPaneSectionState(propertySectionState); - }, - "Button1", - ); - }); - - it("8. Layered PropertyPane - Code Editor should have focus while switching between widgets, pages and Editor Panes", function () { - propertyControlSelector = ".t--property-control-computedvalue"; - verifyPropertyPaneContext( - () => { - cy.editColumn("step"); - cy.focusCodeInput(propertyControlSelector); - }, - () => { - cy.assertSoftFocusOnCodeInput(propertyControlSelector); - }, - "Table1", - ); + verifyPropertyPaneContext( + () => { + cy.get(`.ads-v2-tabs__list-tab:contains("Style")`).eq(0).click(); + setPropertyPaneSectionState(propertySectionState); + }, + () => { + verifyPropertyPaneSectionState(propertySectionState); + }, + "Button1", + ); + }); - cy.get(propPaneBack).click(); - cy.get(".t--property-pane-title").should("contain", "Table1"); - }); + it("8. Layered PropertyPane - Code Editor should have focus while switching between widgets, pages and Editor Panes", function () { + propertyControlSelector = ".t--property-control-computedvalue"; + verifyPropertyPaneContext( + () => { + cy.editColumn("step"); + cy.focusCodeInput(propertyControlSelector); + }, + () => { + cy.assertSoftFocusOnCodeInput(propertyControlSelector); + }, + "Table1", + ); - it("9. Layered PropertyPane - Toggle Property controls should have focus while switching between widgets, pages and Editor Panes", function () { - let propertyControlSelector = `.t--property-control-cellwrapping input[type="checkbox"]`; - verifyPropertyPaneContext( - () => { - cy.editColumn("step"); - cy.get(propertyControlSelector).click({ force: true }); - }, - () => { - cy.get(propertyControlSelector).should("be.focused"); - }, - "Table1", - ); + cy.get(propPaneBack).click(); + cy.get(".t--property-pane-title").should("contain", "Table1"); + }); - cy.get(propPaneBack).click(); - cy.get(".t--property-pane-title").should("contain", "Table1"); - }); -}); + it("9. Layered PropertyPane - Toggle Property controls should have focus while switching between widgets, pages and Editor Panes", function () { + let propertyControlSelector = `.t--property-control-cellwrapping input[type="checkbox"]`; + verifyPropertyPaneContext( + () => { + cy.editColumn("step"); + cy.get(propertyControlSelector).click({ force: true }); + }, + () => { + cy.get(propertyControlSelector).should("be.focused"); + }, + "Table1", + ); + + cy.get(propPaneBack).click(); + cy.get(".t--property-pane-title").should("contain", "Table1"); + }); + }, +); let propertySectionClass = (section) => `.t--property-pane-section-collapse-${section}`; diff --git a/app/client/cypress/e2e/Regression/ClientSide/IDE/Canvas_Context_Property_Pane_2_spec.js b/app/client/cypress/e2e/Regression/ClientSide/IDE/Canvas_Context_Property_Pane_2_spec.js index 1d317d75898c..22b1cd7cb162 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/IDE/Canvas_Context_Property_Pane_2_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/IDE/Canvas_Context_Property_Pane_2_spec.js @@ -11,165 +11,169 @@ const page1 = "Page1"; const page2 = "Page2"; const api1 = "API1"; -describe("Canvas context Property Pane", { tags: ["@tag.IDE"] }, function () { - before(() => { - _.agHelper.AddDsl("editorContextdsl"); - PageList.AddNewPage("New blank page"); - cy.dragAndDropToCanvas("textwidget", { x: 300, y: 200 }); - EditorNavigation.SelectEntityByName(page1, EntityType.Page); - _.apiPage.CreateApi(api1); - PageLeftPane.switchSegment(PagePaneSegment.UI); - }); - - beforeEach(() => { - _.agHelper.RefreshPage(); - }); - - let propPaneBack = "[data-testid='t--property-pane-back-btn']"; - - it("1. Layered PropertyPane - Property Sections should retain state while switching between widgets, pages and Editor Panes", () => { - let propertySectionState = { - data: false, - general: true, - }; - - verifyPropertyPaneContext( - () => { - cy.editColumn("step"); - setPropertyPaneSectionState(propertySectionState); - }, - () => { - cy.wait(500); - verifyPropertyPaneSectionState(propertySectionState); - }, - "Table1", - ); - cy.get(propPaneBack).click(); - cy.get(".t--property-pane-title").should("contain", "Table1"); - }); - - it("2. Layered PropertyPane - Property Tabs and Sections should retain state while switching between widgets, pages and Editor Panes", () => { - propertySectionState = { - textformatting: true, - color: false, - }; - - verifyPropertyPaneContext( - () => { - cy.editColumn("step"); - cy.get(`.ads-v2-tabs__list-tab:contains("Style")`).eq(0).click(); - setPropertyPaneSectionState(propertySectionState); - }, - () => { - verifyPropertyPaneSectionState(propertySectionState); - }, - "Table1", - ); - - cy.get(propPaneBack).click(); - cy.get(".t--property-pane-title").should("contain", "Table1"); - }); - - it("3. Multi Layered PropertyPane - Code Editor should have focus while switching between widgets, pages and Editor Panes", function () { - let propertyControlSelector = ".t--property-control-text"; - verifyPropertyPaneContext( - () => { - cy.editColumn("status"); - cy.editColumn("menuIteme63irwbvnd", false); - cy.focusCodeInput(propertyControlSelector); - }, - () => { - cy.assertSoftFocusOnCodeInput(propertyControlSelector); - }, - "Table1", - ); - - cy.get(propPaneBack).click(); - cy.get(".t--property-pane-title").should("contain", "status"); - - cy.wait(500); - cy.get(propPaneBack).click(); - cy.get(".t--property-pane-title").should("contain", "Table1"); - }); - - it("4. Multi Layered PropertyPane - Toggle Property controls should have focus while switching between widgets, pages and Editor Panes", () => { - propertyControlSelector = `.t--property-control-visible input[type="checkbox"]`; - verifyPropertyPaneContext( - () => { - cy.editColumn("status"); - cy.editColumn("menuIteme63irwbvnd", false); - cy.get(propertyControlSelector).click({ force: true }); - }, - () => { - cy.get(propertyControlSelector).should("be.focused"); - }, - "Table1", - ); - cy.wait(500); - cy.get(propPaneBack).click(); - cy.get(".t--property-pane-title").should("contain", "status"); - - cy.wait(500); - cy.get(propPaneBack).click(); - cy.get(".t--property-pane-title").should("contain", "Table1"); - }); - - it("5. Multi Layered PropertyPane - Property Sections should retain state while switching between widgets, pages and Editor Panes", () => { - let propertySectionState = { - basic: false, - general: true, - }; - - verifyPropertyPaneContext( - () => { - cy.editColumn("status"); - cy.editColumn("menuIteme63irwbvnd", false); - setPropertyPaneSectionState(propertySectionState); - }, - () => { - cy.wait(500); - verifyPropertyPaneSectionState(propertySectionState); - }, - "Table1", - ); - - cy.wait(500); - cy.get(propPaneBack).click(); - cy.get(".t--property-pane-title").should("contain", "status"); - - cy.wait(500); - cy.get(propPaneBack).click(); - cy.get(".t--property-pane-title").should("contain", "Table1"); - }); - - it("6. Multi Layered PropertyPane - Property Tabs and Sections should retain state while switching between widgets, pages and Editor Panes", () => { - propertySectionState = { - icon: true, - color: false, - }; - - verifyPropertyPaneContext( - () => { - cy.editColumn("status"); - cy.editColumn("menuIteme63irwbvnd", false); - cy.get(`.ads-v2-tabs__list-tab:contains("Style")`).eq(0).click(); - setPropertyPaneSectionState(propertySectionState); - }, - () => { - verifyPropertyPaneSectionState(propertySectionState); - }, - "Table1", - ); - - cy.wait(500); - cy.get(propPaneBack).click(); - cy.get(".t--property-pane-title").should("contain", "status"); - - cy.wait(500); - cy.get(propPaneBack).click(); - cy.get(".t--property-pane-title").should("contain", "Table1"); - }); -}); +describe( + "Canvas context Property Pane", + { tags: ["@tag.IDE", "@tag.PropertyPane"] }, + function () { + before(() => { + _.agHelper.AddDsl("editorContextdsl"); + PageList.AddNewPage("New blank page"); + cy.dragAndDropToCanvas("textwidget", { x: 300, y: 200 }); + EditorNavigation.SelectEntityByName(page1, EntityType.Page); + _.apiPage.CreateApi(api1); + PageLeftPane.switchSegment(PagePaneSegment.UI); + }); + + beforeEach(() => { + _.agHelper.RefreshPage(); + }); + + let propPaneBack = "[data-testid='t--property-pane-back-btn']"; + + it("1. Layered PropertyPane - Property Sections should retain state while switching between widgets, pages and Editor Panes", () => { + let propertySectionState = { + data: false, + general: true, + }; + + verifyPropertyPaneContext( + () => { + cy.editColumn("step"); + setPropertyPaneSectionState(propertySectionState); + }, + () => { + cy.wait(500); + verifyPropertyPaneSectionState(propertySectionState); + }, + "Table1", + ); + cy.get(propPaneBack).click(); + cy.get(".t--property-pane-title").should("contain", "Table1"); + }); + + it("2. Layered PropertyPane - Property Tabs and Sections should retain state while switching between widgets, pages and Editor Panes", () => { + propertySectionState = { + textformatting: true, + color: false, + }; + + verifyPropertyPaneContext( + () => { + cy.editColumn("step"); + cy.get(`.ads-v2-tabs__list-tab:contains("Style")`).eq(0).click(); + setPropertyPaneSectionState(propertySectionState); + }, + () => { + verifyPropertyPaneSectionState(propertySectionState); + }, + "Table1", + ); + + cy.get(propPaneBack).click(); + cy.get(".t--property-pane-title").should("contain", "Table1"); + }); + + it("3. Multi Layered PropertyPane - Code Editor should have focus while switching between widgets, pages and Editor Panes", function () { + let propertyControlSelector = ".t--property-control-text"; + verifyPropertyPaneContext( + () => { + cy.editColumn("status"); + cy.editColumn("menuIteme63irwbvnd", false); + cy.focusCodeInput(propertyControlSelector); + }, + () => { + cy.assertSoftFocusOnCodeInput(propertyControlSelector); + }, + "Table1", + ); + + cy.get(propPaneBack).click(); + cy.get(".t--property-pane-title").should("contain", "status"); + + cy.wait(500); + cy.get(propPaneBack).click(); + cy.get(".t--property-pane-title").should("contain", "Table1"); + }); + + it("4. Multi Layered PropertyPane - Toggle Property controls should have focus while switching between widgets, pages and Editor Panes", () => { + propertyControlSelector = `.t--property-control-visible input[type="checkbox"]`; + verifyPropertyPaneContext( + () => { + cy.editColumn("status"); + cy.editColumn("menuIteme63irwbvnd", false); + cy.get(propertyControlSelector).click({ force: true }); + }, + () => { + cy.get(propertyControlSelector).should("be.focused"); + }, + "Table1", + ); + cy.wait(500); + cy.get(propPaneBack).click(); + cy.get(".t--property-pane-title").should("contain", "status"); + + cy.wait(500); + cy.get(propPaneBack).click(); + cy.get(".t--property-pane-title").should("contain", "Table1"); + }); + + it("5. Multi Layered PropertyPane - Property Sections should retain state while switching between widgets, pages and Editor Panes", () => { + let propertySectionState = { + basic: false, + general: true, + }; + + verifyPropertyPaneContext( + () => { + cy.editColumn("status"); + cy.editColumn("menuIteme63irwbvnd", false); + setPropertyPaneSectionState(propertySectionState); + }, + () => { + cy.wait(500); + verifyPropertyPaneSectionState(propertySectionState); + }, + "Table1", + ); + + cy.wait(500); + cy.get(propPaneBack).click(); + cy.get(".t--property-pane-title").should("contain", "status"); + + cy.wait(500); + cy.get(propPaneBack).click(); + cy.get(".t--property-pane-title").should("contain", "Table1"); + }); + + it("6. Multi Layered PropertyPane - Property Tabs and Sections should retain state while switching between widgets, pages and Editor Panes", () => { + propertySectionState = { + icon: true, + color: false, + }; + + verifyPropertyPaneContext( + () => { + cy.editColumn("status"); + cy.editColumn("menuIteme63irwbvnd", false); + cy.get(`.ads-v2-tabs__list-tab:contains("Style")`).eq(0).click(); + setPropertyPaneSectionState(propertySectionState); + }, + () => { + verifyPropertyPaneSectionState(propertySectionState); + }, + "Table1", + ); + + cy.wait(500); + cy.get(propPaneBack).click(); + cy.get(".t--property-pane-title").should("contain", "status"); + + cy.wait(500); + cy.get(propPaneBack).click(); + cy.get(".t--property-pane-title").should("contain", "Table1"); + }); + }, +); let propertySectionClass = (section) => `.t--property-pane-section-collapse-${section}`; diff --git a/app/client/cypress/e2e/Regression/ClientSide/IDE/Canvas_Context_Selected_Widgets_spec.js b/app/client/cypress/e2e/Regression/ClientSide/IDE/Canvas_Context_Selected_Widgets_spec.js index d2f599c696dc..ae55672fb463 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/IDE/Canvas_Context_Selected_Widgets_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/IDE/Canvas_Context_Selected_Widgets_spec.js @@ -13,7 +13,7 @@ const api1 = "API1"; describe( "Canvas context widget selection", - { tags: ["@tag.IDE"] }, + { tags: ["@tag.IDE", "@tag.PropertyPane"] }, function () { before(() => { _.agHelper.AddDsl("editorContextdsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/IDE/Command_Click_Navigation_spec.js b/app/client/cypress/e2e/Regression/ClientSide/IDE/Command_Click_Navigation_spec.js index 1ae8d3082b1a..114e4230103b 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/IDE/Command_Click_Navigation_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/IDE/Command_Click_Navigation_spec.js @@ -29,180 +29,192 @@ const JSInput2TestCode = let repoName; -describe("1. CommandClickNavigation", { tags: ["@tag.IDE"] }, function () { - it("1. Import application & Assert few things", () => { - homePage.NavigateToHome(); - cy.reload(); - homePage.ImportApp("ContextSwitching.json"); - cy.wait("@importNewApplication").then((interception) => { - agHelper.Sleep(); - const { isPartialImport } = interception.response.body.data; - if (isPartialImport) { - // should reconnect modal - cy.get(reconnectDatasourceModal.SkipToAppBtn).click({ - force: true, - }); - agHelper.Sleep(2000); - } else { - homePage.AssertImportToast(); - } - }); - - //Assert link and and style - EditorNavigation.SelectEntityByName("Text1", EntityType.Widget, {}, [ - "Container1", - ]); - - cy.updateCodeInput(".t--property-control-text", "{{ Graphql_Query.data }}"); - - cy.get(`[${NAVIGATION_ATTRIBUTE}="Graphql_Query"]`) - .should("have.length", 1) - .should("have.text", "Graphql_Query") - .realHover() - .should("have.css", "cursor", "text"); - - // TODO how to hover with cmd or ctrl to assert pointer? +describe( + "1. CommandClickNavigation", + { tags: ["@tag.IDE", "@tag.PropertyPane"] }, + function () { + it("1. Import application & Assert few things", () => { + homePage.NavigateToHome(); + cy.reload(); + homePage.ImportApp("ContextSwitching.json"); + cy.wait("@importNewApplication").then((interception) => { + agHelper.Sleep(); + const { isPartialImport } = interception.response.body.data; + if (isPartialImport) { + // should reconnect modal + cy.get(reconnectDatasourceModal.SkipToAppBtn).click({ + force: true, + }); + agHelper.Sleep(2000); + } else { + homePage.AssertImportToast(); + } + }); + + //Assert link and and style + EditorNavigation.SelectEntityByName("Text1", EntityType.Widget, {}, [ + "Container1", + ]); + + cy.updateCodeInput( + ".t--property-control-text", + "{{ Graphql_Query.data }}", + ); + + cy.get(`[${NAVIGATION_ATTRIBUTE}="Graphql_Query"]`) + .should("have.length", 1) + .should("have.text", "Graphql_Query") + .realHover() + .should("have.css", "cursor", "text"); + + // TODO how to hover with cmd or ctrl to assert pointer? + + // Assert navigation only when cmd or ctrl is pressed - // Assert navigation only when cmd or ctrl is pressed + agHelper.Sleep(); + cy.get(`[${NAVIGATION_ATTRIBUTE}="Graphql_Query"]`).click({ + force: true, + }); + cy.url().should("not.contain", "/api/"); + + cy.get(`[${NAVIGATION_ATTRIBUTE}="Graphql_Query"]`).click({ + ctrlKey: true, + force: true, + }); + + cy.url().should("contain", "/api/"); + + //Assert working on url field + cy.updateCodeInput( + ".t--dataSourceField", + "http://host.docker.internal:5001/{{ SQL_Query.data }}", + ); + agHelper.Sleep(); - agHelper.Sleep(); - cy.get(`[${NAVIGATION_ATTRIBUTE}="Graphql_Query"]`).click({ force: true }); - cy.url().should("not.contain", "/api/"); + cy.get(`[${NAVIGATION_ATTRIBUTE}="SQL_Query"]`) + .should("have.length", 1) + .click({ cmdKey: true, force: true }); - cy.get(`[${NAVIGATION_ATTRIBUTE}="Graphql_Query"]`).click({ - ctrlKey: true, - force: true, + cy.url().should("contain", "/queries/"); }); - cy.url().should("contain", "/api/"); - - //Assert working on url field - cy.updateCodeInput( - ".t--dataSourceField", - "http://host.docker.internal:5001/{{ SQL_Query.data }}", - ); - agHelper.Sleep(); - - cy.get(`[${NAVIGATION_ATTRIBUTE}="SQL_Query"]`) - .should("have.length", 1) - .click({ cmdKey: true, force: true }); - - cy.url().should("contain", "/queries/"); - }); - - it("2. Will open & close modals ", () => { - cy.updateCodeInput( - ".t--actionConfiguration\\.body", - "SELECT * from {{ Button3.text }}", - ); - agHelper.Sleep(); - cy.get(`[${NAVIGATION_ATTRIBUTE}="Button3"]`) - .should("have.length", 1) - .click({ cmdKey: true }); - - cy.url().should("not.contain", "/queries/"); - - //CLose modal - cy.updateCodeInput( - `${locators._propertyControl}tooltip`, - "{{ Image1.image }}", - ); - - // TODO: Debug why image1 data-navigate-to wasn't found - // cy.get(`[${NAVIGATION_ATTRIBUTE}="Image1"]`) - // .should("have.length", 1) - // .click({ cmdKey: true }); - }); - - it("3. Will navigate to specific JS Functions", () => { - // It was found that when having git connected, - // cmd clicking to JS function reloaded the app. Will assert that does not happen - cy.generateUUID().then((uid) => { - const repoName = uid; - gitSync.CreateNConnectToGit(repoName); - gitSync.CreateGitBranch(repoName); - }); - - cy.get("@gitRepoName").then((repName) => { - repoName = repName; + it("2. Will open & close modals ", () => { + cy.updateCodeInput( + ".t--actionConfiguration\\.body", + "SELECT * from {{ Button3.text }}", + ); + agHelper.Sleep(); + cy.get(`[${NAVIGATION_ATTRIBUTE}="Button3"]`) + .should("have.length", 1) + .click({ cmdKey: true }); + + cy.url().should("not.contain", "/queries/"); + + //CLose modal + cy.updateCodeInput( + `${locators._propertyControl}tooltip`, + "{{ Image1.image }}", + ); + + // TODO: Debug why image1 data-navigate-to wasn't found + // cy.get(`[${NAVIGATION_ATTRIBUTE}="Image1"]`) + // .should("have.length", 1) + // .click({ cmdKey: true }); }); - EditorNavigation.SelectEntityByName("Text1", EntityType.Widget, {}, [ - "Container1", - ]); - cy.updateCodeInput(".t--property-control-text", "{{ JSObject1.myFun1() }}"); + it("3. Will navigate to specific JS Functions", () => { + // It was found that when having git connected, + // cmd clicking to JS function reloaded the app. Will assert that does not happen + cy.generateUUID().then((uid) => { + const repoName = uid; + gitSync.CreateNConnectToGit(repoName); + gitSync.CreateGitBranch(repoName); + }); + + cy.get("@gitRepoName").then((repName) => { + repoName = repName; + }); + + EditorNavigation.SelectEntityByName("Text1", EntityType.Widget, {}, [ + "Container1", + ]); + cy.updateCodeInput( + ".t--property-control-text", + "{{ JSObject1.myFun1() }}", + ); - agHelper.Sleep(); + agHelper.Sleep(); - cy.get(`[${NAVIGATION_ATTRIBUTE}="JSObject1.myFun1"]`).click({ - cmdKey: true, - force: true, - }); + cy.get(`[${NAVIGATION_ATTRIBUTE}="JSObject1.myFun1"]`).click({ + cmdKey: true, + force: true, + }); - cy.assertCursorOnCodeInput(".js-editor", { ch: 1, line: 3 }); - agHelper.Sleep(); + cy.assertCursorOnCodeInput(".js-editor", { ch: 1, line: 3 }); + agHelper.Sleep(); - // Assert context switching works when going back to canvas - EditorNavigation.SelectEntityByName("Page1", EntityType.Page); + // Assert context switching works when going back to canvas + EditorNavigation.SelectEntityByName("Page1", EntityType.Page); - cy.get(`div[data-testid='t--selected']`).should("have.length", 1); - cy.get(".t--property-pane-title").should("contain", "Text1"); + cy.get(`div[data-testid='t--selected']`).should("have.length", 1); + cy.get(".t--property-pane-title").should("contain", "Text1"); - // Go back to JS editor - cy.get(`[${NAVIGATION_ATTRIBUTE}="JSObject1.myFun1"]`).click({ - ctrlKey: true, + // Go back to JS editor + cy.get(`[${NAVIGATION_ATTRIBUTE}="JSObject1.myFun1"]`).click({ + ctrlKey: true, + }); }); - }); - it("4. Will navigate within Js Object properly", () => { - cy.updateCodeInput(".js-editor", JSInputTestCode); - agHelper.Sleep(2000); - cy.get(`[${NAVIGATION_ATTRIBUTE}="JSObject1.myVar1"]`).click({ - ctrlKey: true, - }); - cy.getCodeInput(".js-editor").then((input) => { - const codeMirrorInput = input[0].CodeMirror; - codeMirrorInput.focus(); - }); - cy.assertCursorOnCodeInput(".js-editor", { ch: 2, line: 1 }); - agHelper.Sleep(); - cy.get(`[${NAVIGATION_ATTRIBUTE}="JSObject1.myFun1"]`).click({ - ctrlKey: true, - }); - cy.getCodeInput(".js-editor").then((input) => { - const codeMirrorInput = input[0].CodeMirror; - codeMirrorInput.focus(); - }); - - cy.assertCursorOnCodeInput(".js-editor", { ch: 2, line: 2 }); - agHelper.Sleep(); - cy.get(`[${NAVIGATION_ATTRIBUTE}="JSObject2.myFun1"]`).click({ - ctrlKey: true, + it("4. Will navigate within Js Object properly", () => { + cy.updateCodeInput(".js-editor", JSInputTestCode); + agHelper.Sleep(2000); + cy.get(`[${NAVIGATION_ATTRIBUTE}="JSObject1.myVar1"]`).click({ + ctrlKey: true, + }); + cy.getCodeInput(".js-editor").then((input) => { + const codeMirrorInput = input[0].CodeMirror; + codeMirrorInput.focus(); + }); + cy.assertCursorOnCodeInput(".js-editor", { ch: 2, line: 1 }); + agHelper.Sleep(); + cy.get(`[${NAVIGATION_ATTRIBUTE}="JSObject1.myFun1"]`).click({ + ctrlKey: true, + }); + cy.getCodeInput(".js-editor").then((input) => { + const codeMirrorInput = input[0].CodeMirror; + codeMirrorInput.focus(); + }); + + cy.assertCursorOnCodeInput(".js-editor", { ch: 2, line: 2 }); + agHelper.Sleep(); + cy.get(`[${NAVIGATION_ATTRIBUTE}="JSObject2.myFun1"]`).click({ + ctrlKey: true, + }); + + cy.getCodeInput(".js-editor").then((input) => { + const codeMirrorInput = input[0].CodeMirror; + expect(codeMirrorInput.getValue()).to.equal(JSInput2TestCode); + }); }); - cy.getCodeInput(".js-editor").then((input) => { - const codeMirrorInput = input[0].CodeMirror; - expect(codeMirrorInput.getValue()).to.equal(JSInput2TestCode); + // Functionality isn't implemented yet + // it("5. Will work with string arguments in framework functions", () => { + // entityExplorer.ExpandCollapseEntity("Widgets"); + // EditorNavigation.SelectEntityByName("Button1", EntityType.Widget, {}, ["Container1"]); + // cy.get(PROPERTY_SELECTOR.onClick).find(".t--js-toggle").click(); + // cy.updateCodeInput( + // PROPERTY_SELECTOR.onClick, + // "{{ resetWidget('Input1') }}", + // ); + // agHelper.Sleep(); + // cy.get(`[${NAVIGATION_ATTRIBUTE}="Input1"]`) + // .should("have.length", 1) + // .click({ cmdKey: true }); + // }); + + after(() => { + //clean up + gitSync.DeleteTestGithubRepo(repoName); }); - }); - - // Functionality isn't implemented yet - // it("5. Will work with string arguments in framework functions", () => { - // entityExplorer.ExpandCollapseEntity("Widgets"); - // EditorNavigation.SelectEntityByName("Button1", EntityType.Widget, {}, ["Container1"]); - // cy.get(PROPERTY_SELECTOR.onClick).find(".t--js-toggle").click(); - // cy.updateCodeInput( - // PROPERTY_SELECTOR.onClick, - // "{{ resetWidget('Input1') }}", - // ); - // agHelper.Sleep(); - // cy.get(`[${NAVIGATION_ATTRIBUTE}="Input1"]`) - // .should("have.length", 1) - // .click({ cmdKey: true }); - // }); - - after(() => { - //clean up - gitSync.DeleteTestGithubRepo(repoName); - }); -}); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/IDE/Editor_Segment_Context_Switching_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/IDE/Editor_Segment_Context_Switching_spec.ts index 615ac3388915..1c08e1f480c2 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/IDE/Editor_Segment_Context_Switching_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/IDE/Editor_Segment_Context_Switching_spec.ts @@ -11,7 +11,7 @@ import reconnectDatasourceModal from "../../../../locators/ReconnectLocators"; describe( "Editor Segment Context Switch", - { tags: ["@tag.IDE", "@tag.ImportExport"] }, + { tags: ["@tag.IDE", "@tag.ImportExport", "@tag.PropertyPane", "@tag.Git"] }, function () { before("Import the test application", () => { homePage.CreateNewWorkspace("IDETest", true); diff --git a/app/client/cypress/e2e/Regression/ClientSide/IDE/MaintainContext&Focus_spec.js b/app/client/cypress/e2e/Regression/ClientSide/IDE/Focus_retentions_inputs_spec.js similarity index 63% rename from app/client/cypress/e2e/Regression/ClientSide/IDE/MaintainContext&Focus_spec.js rename to app/client/cypress/e2e/Regression/ClientSide/IDE/Focus_retentions_inputs_spec.js index a6d5681ba0cb..85b373a4cdd4 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/IDE/MaintainContext&Focus_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/IDE/Focus_retentions_inputs_spec.js @@ -1,22 +1,23 @@ import reconnectDatasourceModal from "../../../../locators/ReconnectLocators"; import { agHelper, - apiPage, dataSources, homePage, locators, } from "../../../../support/Objects/ObjectsCore"; import EditorNavigation, { + PageLeftPane, EntityType, + PagePaneSegment, } from "../../../../support/Pages/EditorNavigation"; const apiwidget = require("../../../../locators/apiWidgetslocator.json"); const queryLocators = require("../../../../locators/QueryEditor.json"); -describe("MaintainContext&Focus", { tags: ["@tag.IDE"] }, function () { +describe("Focus Retention of Inputs", { tags: ["@tag.IDE"] }, function () { before("Import the test application", () => { - homePage.CreateNewWorkspace("MaintainContext&Focus", true); - homePage.ImportApp("ContextSwitching.json", "MaintainContext"); + homePage.NavigateToHome(); + homePage.ImportApp("ContextSwitching.json"); cy.wait("@importNewApplication").then((interception) => { agHelper.Sleep(); const { isPartialImport } = interception.response.body.data; @@ -46,26 +47,26 @@ describe("MaintainContext&Focus", { tags: ["@tag.IDE"] }, function () { cy.focusCodeInput(".t--graphql-query-editor", { ch: 4, line: 1 }); - EditorNavigation.SelectEntityByName("Rest_Api_1", EntityType.Api); + PageLeftPane.selectItem("Rest_Api_1"); cy.wait(1000); cy.xpath("//span[contains(text(), 'Params')]").click(); cy.focusCodeInput(apiwidget.queryKey); cy.wait("@saveAction"); - EditorNavigation.SelectEntityByName("Rest_Api_2", EntityType.Api); + PageLeftPane.selectItem("Rest_Api_2"); cy.wait(1000); - cy.xpath("//span[contains(text(), 'Headers')]").click(); + agHelper.GetNClick("//span[contains(text(), 'Headers')]", 0); cy.updateCodeInput(apiwidget.headerValue, "test"); cy.wait("@saveAction"); - EditorNavigation.SelectEntityByName("SQL_Query", EntityType.Query); + PageLeftPane.selectItem("SQL_Query"); cy.wait(1000); cy.focusCodeInput(".t--actionConfiguration\\.body", { ch: 5, line: 0 }); cy.wait("@saveAction"); - EditorNavigation.SelectEntityByName("S3_Query", EntityType.Query); + PageLeftPane.selectItem("S3_Query"); cy.wait(1000); cy.focusCodeInput(".t--actionConfiguration\\.formData\\.bucket\\.data", { @@ -75,25 +76,18 @@ describe("MaintainContext&Focus", { tags: ["@tag.IDE"] }, function () { cy.wait(1000); cy.wait("@saveAction"); - EditorNavigation.SelectEntityByName("JSObject1", EntityType.JSObject); + PageLeftPane.switchSegment(PagePaneSegment.JS); + + PageLeftPane.selectItem("JSObject1"); cy.wait(1000); cy.focusCodeInput(".js-editor", { ch: 4, line: 4 }); cy.wait("@saveAction"); - EditorNavigation.SelectEntityByName("JSObject2", EntityType.JSObject); + PageLeftPane.selectItem("JSObject2"); cy.wait(1000); cy.focusCodeInput(".js-editor", { ch: 2, line: 2 }); - - EditorNavigation.SelectEntityByName("Mongo_Query", EntityType.Query); - - cy.wait(1000); - dataSources.EnterJSContext({ - fieldLabel: "Collection", - fieldValue: "TestCollection", - }); - cy.wait("@saveAction"); }); it("2. Maintains focus on property/Api/Query/Js Pane", () => { @@ -106,8 +100,14 @@ describe("MaintainContext&Focus", { tags: ["@tag.IDE"] }, function () { line: 0, }); + PageLeftPane.switchSegment(PagePaneSegment.Queries); + //Maintains focus on the API pane - EditorNavigation.SelectEntityByName("Graphql_Query", EntityType.Api); + PageLeftPane.selectItem("Graphql_Query"); + + agHelper + .GetElement(locators._queryName) + .should("have.text", "Graphql_Query"); cy.xpath("//span[contains(text(), 'Body')]/parent::button").should( "have.attr", @@ -116,10 +116,20 @@ describe("MaintainContext&Focus", { tags: ["@tag.IDE"] }, function () { ); cy.assertCursorOnCodeInput(".t--graphql-query-editor", { ch: 4, line: 1 }); - EditorNavigation.SelectEntityByName("Rest_Api_1", EntityType.Api); - // cy.assertCursorOnCodeInput(apiwidget.headerValue); + PageLeftPane.selectItem("Rest_Api_1"); + + agHelper.GetElement(locators._queryName).should("have.text", "Rest_Api_1"); - EditorNavigation.SelectEntityByName("Rest_Api_2", EntityType.Api); + cy.xpath("//span[contains(text(), 'Params')]/parent::button").should( + "have.attr", + "aria-selected", + "true", + ); + cy.assertCursorOnCodeInput(apiwidget.queryKey, { ch: 0, line: 0 }); + + PageLeftPane.selectItem("Rest_Api_2"); + + agHelper.GetElement(locators._queryName).should("have.text", "Rest_Api_2"); cy.xpath("//span[contains(text(), 'Headers')]/parent::button").should( "have.attr", @@ -129,61 +139,35 @@ describe("MaintainContext&Focus", { tags: ["@tag.IDE"] }, function () { cy.assertCursorOnCodeInput(apiwidget.headerValue); //Maintains focus on Query panes - EditorNavigation.SelectEntityByName("SQL_Query", EntityType.Query); + PageLeftPane.selectItem("SQL_Query"); + + agHelper.GetElement(locators._queryName).should("have.text", "SQL_Query"); cy.assertCursorOnCodeInput(".t--actionConfiguration\\.body", { ch: 5, line: 0, }); - EditorNavigation.SelectEntityByName("S3_Query", EntityType.Query); + PageLeftPane.selectItem("S3_Query"); cy.assertCursorOnCodeInput( ".t--actionConfiguration\\.formData\\.bucket\\.data", { ch: 2, line: 0 }, ); - // Removing as the Mongo collection is now converted to dropdown - // entityExplorer.SelectEntityByName("Mongo_Query"); - - // cy.assertCursorOnCodeInput( - // ".t--actionConfiguration\\.formData\\.collection\\.data", - // ); + PageLeftPane.switchSegment(PagePaneSegment.JS); //Maintains focus on JS Objects - EditorNavigation.SelectEntityByName("JSObject1", EntityType.JSObject); + PageLeftPane.selectItem("JSObject1"); cy.assertCursorOnCodeInput(".js-editor", { ch: 2, line: 4 }); - EditorNavigation.SelectEntityByName("JSObject2", EntityType.JSObject); + PageLeftPane.selectItem("JSObject2"); cy.assertCursorOnCodeInput(".js-editor", { ch: 2, line: 2 }); }); - it("3. Check if selected tab on right tab persists", () => { - EditorNavigation.SelectEntityByName("Rest_Api_1", EntityType.Api); - apiPage.SelectRightPaneTab("Connections"); - EditorNavigation.SelectEntityByName("SQL_Query", EntityType.Query); - EditorNavigation.SelectEntityByName("Rest_Api_1", EntityType.Api); - apiPage.AssertRightPaneSelectedTab("Connections"); - - //Check if the URL is persisted while switching pages - cy.Createpage("Page2"); - - EditorNavigation.SelectEntityByName("Page1", EntityType.Page); - EditorNavigation.SelectEntityByName("Rest_Api_1", EntityType.Api); - - EditorNavigation.SelectEntityByName("Page2", EntityType.Page); - cy.dragAndDropToCanvas("textwidget", { x: 300, y: 200 }); - - EditorNavigation.SelectEntityByName("Page1", EntityType.Page); - cy.get(".t--nameOfApi .bp3-editable-text-content").should( - "contain", - "Rest_Api_1", - ); - }); - - it("4. Datasource edit mode has to be maintained", () => { + it("3. Datasource edit mode has to be maintained", () => { EditorNavigation.SelectEntityByName("Appsmith", EntityType.Datasource); dataSources.EditDatasource(); EditorNavigation.SelectEntityByName("Github", EntityType.Datasource); @@ -192,7 +176,7 @@ describe("MaintainContext&Focus", { tags: ["@tag.IDE"] }, function () { dataSources.AssertDSEditViewMode("Edit"); }); - it("5. Maintain focus of form control inputs", () => { + it("4. Maintain focus of form control inputs", () => { EditorNavigation.SelectEntityByName("SQL_Query", EntityType.Query); dataSources.ToggleUsePreparedStatement(false); EditorNavigation.SelectEntityByName("S3_Query", EntityType.Query); @@ -202,14 +186,15 @@ describe("MaintainContext&Focus", { tags: ["@tag.IDE"] }, function () { EditorNavigation.SelectEntityByName("SQL_Query", EntityType.Query); cy.get(".bp3-editable-text-content").should("contain.text", "SQL_Query"); - cy.get(".t--form-control-SWITCH input").should("be.focused"); + cy.xpath(queryLocators.querySettingsTab).click(); + agHelper.GetElement(dataSources._usePreparedStatement).should("be.focused"); EditorNavigation.SelectEntityByName("S3_Query", EntityType.Query); agHelper.Sleep(); cy.xpath(queryLocators.querySettingsTab).click(); cy.xpath(queryLocators.queryTimeout).should("be.focused"); }); - it("6. Bug 21999 Maintain focus of code editor when Escape is pressed with autcomplete open + Bug 22960", () => { + it("5. Bug 21999 Maintain focus of code editor when Escape is pressed with autcomplete open + Bug 22960", () => { EditorNavigation.SelectEntityByName("JSObject1", EntityType.JSObject); cy.assertCursorOnCodeInput(".js-editor", { ch: 2, line: 4 }); diff --git a/app/client/cypress/e2e/Regression/ClientSide/IDE/IDE_Add_Pane_Interactions_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/IDE/IDE_Add_Pane_Interactions_spec.ts index e8bd59c4233b..afbfca8469b7 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/IDE/IDE_Add_Pane_Interactions_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/IDE/IDE_Add_Pane_Interactions_spec.ts @@ -10,81 +10,85 @@ import AddView from "../../../../support/Pages/IDE/AddView"; const agHelper = ObjectsRegistry.AggregateHelper; const commonLocators = ObjectsRegistry.CommonLocators; -describe("IDE add pane interactions", { tags: ["@tag.IDE"] }, () => { - it("1. UI tab add interactions", () => { - // check add pane is open - PageLeftPane.assertInAddView(); - // close add pane to show blank state - PageLeftPane.closeAddView(); - // click on add button and check add state - PageLeftPane.switchToAddNew(); - // check add pane - PageLeftPane.assertInAddView(); - // drag and drop a widget and list view should be opened - cy.dragAndDropToCanvas("textwidget", { x: 300, y: 200 }); - // check listing ui - PageLeftPane.selectedItem().contains("Text1"); - // click add button - PageLeftPane.switchToAddNew(); - // check add pane is open - PageLeftPane.assertInAddView(); - // close add pane - PageLeftPane.closeAddView(); - // click on canvas and check add pane visible or not - agHelper.GetNClick(commonLocators._canvas).click(); - // check add pane - PageLeftPane.assertInAddView(); - }); +describe( + "IDE add pane interactions", + { tags: ["@tag.IDE", "@tag.PropertyPane"] }, + () => { + it("1. UI tab add interactions", () => { + // check add pane is open + PageLeftPane.assertInAddView(); + // close add pane to show blank state + PageLeftPane.closeAddView(); + // click on add button and check add state + PageLeftPane.switchToAddNew(); + // check add pane + PageLeftPane.assertInAddView(); + // drag and drop a widget and list view should be opened + cy.dragAndDropToCanvas("textwidget", { x: 300, y: 200 }); + // check listing ui + PageLeftPane.selectedItem().contains("Text1"); + // click add button + PageLeftPane.switchToAddNew(); + // check add pane is open + PageLeftPane.assertInAddView(); + // close add pane + PageLeftPane.closeAddView(); + // click on canvas and check add pane visible or not + agHelper.GetNClick(commonLocators._canvas).click(); + // check add pane + PageLeftPane.assertInAddView(); + }); - it("2. JS tab add interactions", () => { - /** Fullscreen */ - // switch to JS tab from UI - PageLeftPane.switchSegment(PagePaneSegment.JS); - // check and click on blank state add button - PageLeftPane.switchToAddNew(); - // check listing UI - PageLeftPane.assertInListView(); - // click on add btn in the listing UI - PageLeftPane.switchToAddNew(); - // check item got added or not - PageLeftPane.assertInListView(); - PageLeftPane.assertItemCount(2); - /** Splitscreen */ - // switch to splitscreen - EditorNavigation.SwitchScreenMode(EditorViewMode.SplitScreen); - // click on add - FileTabs.switchToAddNew(); - // check tabs count to verify js added or not - FileTabs.assertTabCount(3); - }); + it("2. JS tab add interactions", () => { + /** Fullscreen */ + // switch to JS tab from UI + PageLeftPane.switchSegment(PagePaneSegment.JS); + // check and click on blank state add button + PageLeftPane.switchToAddNew(); + // check listing UI + PageLeftPane.assertInListView(); + // click on add btn in the listing UI + PageLeftPane.switchToAddNew(); + // check item got added or not + PageLeftPane.assertInListView(); + PageLeftPane.assertItemCount(2); + /** Splitscreen */ + // switch to splitscreen + EditorNavigation.SwitchScreenMode(EditorViewMode.SplitScreen); + // click on add + FileTabs.switchToAddNew(); + // check tabs count to verify js added or not + FileTabs.assertTabCount(3); + }); - it("3. Queries tab add interactions", () => { - /** Fullscreen */ - EditorNavigation.SwitchScreenMode(EditorViewMode.FullScreen); - // switch to Query tab from JS - PageLeftPane.switchSegment(PagePaneSegment.Queries); - // check and click on blank state add button - PageLeftPane.switchToAddNew(); - // check add pane - PageLeftPane.assertInAddView(); - // close add tab - FileTabs.closeTab("new_query"); - // open add pane to add item - PageLeftPane.switchToAddNew(); - // add item - cy.get(".t--new-blank-api").children("div").first().click(); - // check item added or not - PageLeftPane.assertPresence("Api1"); - /** Splitscreen */ - // switch to splitscreen - EditorNavigation.SwitchScreenMode(EditorViewMode.SplitScreen); - // click on add - FileTabs.switchToAddNew(); - // check add pane - PageLeftPane.assertInAddView(); - // add item - cy.get(".t--new-blank-api").children("div").first().click(); - // check tabs count to verify js added or not - FileTabs.assertTabCount(2); - }); -}); + it("3. Queries tab add interactions", () => { + /** Fullscreen */ + EditorNavigation.SwitchScreenMode(EditorViewMode.FullScreen); + // switch to Query tab from JS + PageLeftPane.switchSegment(PagePaneSegment.Queries); + // check and click on blank state add button + PageLeftPane.switchToAddNew(); + // check add pane + PageLeftPane.assertInAddView(); + // close add tab + FileTabs.closeTab("new_query"); + // open add pane to add item + PageLeftPane.switchToAddNew(); + // add item + cy.get(".t--new-blank-api").children("div").first().click(); + // check item added or not + PageLeftPane.assertPresence("Api1"); + /** Splitscreen */ + // switch to splitscreen + EditorNavigation.SwitchScreenMode(EditorViewMode.SplitScreen); + // click on add + FileTabs.switchToAddNew(); + // check add pane + PageLeftPane.assertInAddView(); + // add item + cy.get(".t--new-blank-api").children("div").first().click(); + // check tabs count to verify js added or not + FileTabs.assertTabCount(2); + }); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/JSLibrary/Library_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/JSLibrary/Library_spec.ts index 49f4bf743879..16d7edefd6a3 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/JSLibrary/Library_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/JSLibrary/Library_spec.ts @@ -18,7 +18,7 @@ import { describe( "Tests JS Libraries", - { tags: ["@tag.excludeForAirgap", "@tag.JS"] }, + { tags: ["@tag.excludeForAirgap", "@tag.JS", "@tag.Binding"] }, () => { it("1. Validates Library install/uninstall", () => { AppSidebar.navigate(AppSidebarButton.Libraries); diff --git a/app/client/cypress/e2e/Regression/ClientSide/JSObject/JSObjectMutation_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/JSObject/JSObjectMutation_spec.ts index a41a81b44da9..dbcd6c681a5a 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/JSObject/JSObjectMutation_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/JSObject/JSObjectMutation_spec.ts @@ -6,7 +6,7 @@ import EditorNavigation, { } from "../../../../support/Pages/EditorNavigation"; const commonlocators = require("../../../../locators/commonlocators.json"); -describe("JSObject testing", { tags: ["@tag.JS"] }, () => { +describe("JSObject testing", { tags: ["@tag.JS", "@tag.Binding"] }, () => { before(() => { _.homePage.NavigateToHome(); _.homePage.ImportApp("JSObjectMutationTestApp.json"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/JSObject/JS_Editor_Assert_NoFunctionAvailableText_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/JSObject/JS_Editor_Assert_NoFunctionAvailableText_spec.ts index 50d4c7342248..c7dff5820601 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/JSObject/JS_Editor_Assert_NoFunctionAvailableText_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/JSObject/JS_Editor_Assert_NoFunctionAvailableText_spec.ts @@ -1,9 +1,12 @@ import { jsEditor } from "../../../../support/Objects/ObjectsCore"; -describe("List no functions on empty collection", { tags: ["@tag.JS"] }, () => { - it("1. Bug 9585: should not show functions when whole code is deleted", () => { - jsEditor.CreateJSObject( - `export default { +describe( + "List no functions on empty collection", + { tags: ["@tag.JS", "@tag.Binding"] }, + () => { + it("1. Bug 9585: should not show functions when whole code is deleted", () => { + jsEditor.CreateJSObject( + `export default { myFun1: () => { function hi(a,b) { console.log(a,b); @@ -14,15 +17,16 @@ describe("List no functions on empty collection", { tags: ["@tag.JS"] }, () => { //use async-await or promises } }`, - { - completeReplace: true, - toRun: false, - prettify: false, - }, - ); + { + completeReplace: true, + toRun: false, + prettify: false, + }, + ); - jsEditor.AssertSelectedFunction("myFun1"); - jsEditor.ClearJSObj(); - jsEditor.AssertSelectedFunction("No function available"); - }); -}); + jsEditor.AssertSelectedFunction("myFun1"); + jsEditor.ClearJSObj(); + jsEditor.AssertSelectedFunction("No function available"); + }); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Linting/AsyncFunctionsBoundInSyncFields_Spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Linting/AsyncFunctionsBoundInSyncFields_Spec.ts index 18789f6bb53b..2bea53ce8a8b 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Linting/AsyncFunctionsBoundInSyncFields_Spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Linting/AsyncFunctionsBoundInSyncFields_Spec.ts @@ -15,7 +15,7 @@ import EditorNavigation, { describe( "Linting async JSFunctions bound to data fields", - { tags: ["@tag.JS"] }, + { tags: ["@tag.JS", "@tag.Binding"] }, () => { before(() => { entityExplorer.DragDropWidgetNVerify("buttonwidget", 300, 300); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Linting/BasicLint_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Linting/BasicLint_spec.ts index 4331996e14fa..46c873407562 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Linting/BasicLint_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Linting/BasicLint_spec.ts @@ -57,7 +57,7 @@ const createMySQLDatasourceQuery = () => { dataSources.CreateQueryForDS(dsName, `SELECT * FROM spacecrafts LIMIT 10;`); }; -describe("Linting", { tags: ["@tag.JS"] }, () => { +describe("Linting", { tags: ["@tag.JS", "@tag.Binding"] }, () => { before(() => { entityExplorer.DragDropWidgetNVerify("buttonwidget", 300, 300); dataSources.CreateDataSource("MySql"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Linting/EntityPropertiesLint_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Linting/EntityPropertiesLint_spec.ts index eb36be4f9522..f0dd10369320 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Linting/EntityPropertiesLint_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Linting/EntityPropertiesLint_spec.ts @@ -15,107 +15,113 @@ import EditorNavigation, { PagePaneSegment, } from "../../../../support/Pages/EditorNavigation"; -describe("Linting of entity properties", { tags: ["@tag.JS"] }, () => { - before(() => { - entityExplorer.DragDropWidgetNVerify(draggableWidgets.BUTTON, 300, 300); - }); +describe( + "Linting of entity properties", + { tags: ["@tag.JS", "@tag.Binding"] }, + () => { + before(() => { + entityExplorer.DragDropWidgetNVerify(draggableWidgets.BUTTON, 300, 300); + }); - it("1. Shows correct lint error when wrong Api property is binded", () => { - const invalidProperty = "unknownProperty"; - // create Api1 - apiPage.CreateAndFillApi( - dataManager.dsValues[dataManager.defaultEnviorment].mockApiUrl, - ); - // Edit Button onclick property - EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); - propPane.EnterJSContext( - "onClick", - `{{function(){ + it("1. Shows correct lint error when wrong Api property is binded", () => { + const invalidProperty = "unknownProperty"; + // create Api1 + apiPage.CreateAndFillApi( + dataManager.dsValues[dataManager.defaultEnviorment].mockApiUrl, + ); + // Edit Button onclick property + EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); + propPane.EnterJSContext( + "onClick", + `{{function(){ console.log(Api1.${invalidProperty}) }()}}`, - ); - cy.wait(200); - cy.focused().blur(); - propPane.UpdatePropertyFieldValue("Label", `{{Api1.${invalidProperty}}}`); - agHelper.AssertElementLength(locators._lintErrorElement, 2); - agHelper.HoverElement(locators._lintErrorElement); - agHelper.AssertContains(`"${invalidProperty}" doesn't exist in Api1`); - agHelper.GetNClick(locators._canvas); - }); + ); + cy.wait(200); + cy.focused().blur(); + propPane.UpdatePropertyFieldValue("Label", `{{Api1.${invalidProperty}}}`); + agHelper.AssertElementLength(locators._lintErrorElement, 2); + agHelper.HoverElement(locators._lintErrorElement); + agHelper.AssertContains(`"${invalidProperty}" doesn't exist in Api1`); + agHelper.GetNClick(locators._canvas); + }); - it("2. Shows correct lint error when wrong JSObject property is binded", () => { - // create JSObject - jsEditor.CreateJSObject( - `export default { + it("2. Shows correct lint error when wrong JSObject property is binded", () => { + // create JSObject + jsEditor.CreateJSObject( + `export default { myFun1: () => { console.log("JSOBJECT 1") } }`, - { - paste: true, - completeReplace: true, - toRun: false, - shouldCreateNewJSObj: true, - }, - ); - const invalidProperty = "unknownFunction"; - // Edit Button onclick and text property - EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); - propPane.EnterJSContext( - "onClick", - `{{function(){ + { + paste: true, + completeReplace: true, + toRun: false, + shouldCreateNewJSObj: true, + }, + ); + const invalidProperty = "unknownFunction"; + // Edit Button onclick and text property + EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); + propPane.EnterJSContext( + "onClick", + `{{function(){ console.log(JSObject1.${invalidProperty}) }()}}`, - ); - cy.wait(200); - propPane.UpdatePropertyFieldValue( - "Label", - `{{JSObject1.${invalidProperty}}}`, - ); - // Assert lint errors - agHelper.AssertElementLength(locators._lintErrorElement, 2); - agHelper.HoverElement(locators._lintErrorElement); - agHelper.AssertContains(`"${invalidProperty}" doesn't exist in JSObject1`); + ); + cy.wait(200); + propPane.UpdatePropertyFieldValue( + "Label", + `{{JSObject1.${invalidProperty}}}`, + ); + // Assert lint errors + agHelper.AssertElementLength(locators._lintErrorElement, 2); + agHelper.HoverElement(locators._lintErrorElement); + agHelper.AssertContains( + `"${invalidProperty}" doesn't exist in JSObject1`, + ); - // Edit JS Object and add "unknown" function - EditorNavigation.SelectEntityByName("JSObject1", EntityType.JSObject); - jsEditor.EditJSObj(`export default { + // Edit JS Object and add "unknown" function + EditorNavigation.SelectEntityByName("JSObject1", EntityType.JSObject); + jsEditor.EditJSObj(`export default { ${invalidProperty}: () => { console.log("JSOBJECT 1") } }`); - // select button, and assert that no lint is present - EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); - agHelper.AssertElementAbsence(locators._lintErrorElement); - // delete JSObject - PageLeftPane.switchSegment(PagePaneSegment.JS); - entityExplorer.ActionContextMenuByEntityName({ - entityNameinLeftSidebar: "JSObject1", - action: "Delete", - entityType: entityItems.JSObject, - }); - // select button, and assert that lint error is present - EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); - agHelper.AssertElementLength(locators._lintErrorElement, 2); - agHelper.HoverElement(locators._lintErrorElement); - agHelper.AssertContains(`'JSObject1' is not defined`); - // create js object - jsEditor.CreateJSObject( - `export default { + // select button, and assert that no lint is present + EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); + agHelper.AssertElementAbsence(locators._lintErrorElement); + // delete JSObject + PageLeftPane.switchSegment(PagePaneSegment.JS); + entityExplorer.ActionContextMenuByEntityName({ + entityNameinLeftSidebar: "JSObject1", + action: "Delete", + entityType: entityItems.JSObject, + }); + // select button, and assert that lint error is present + EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); + agHelper.AssertElementLength(locators._lintErrorElement, 2); + agHelper.HoverElement(locators._lintErrorElement); + agHelper.AssertContains(`'JSObject1' is not defined`); + // create js object + jsEditor.CreateJSObject( + `export default { ${invalidProperty}: () => { console.log("JSOBJECT 1") } }`, - { - paste: true, - completeReplace: true, - toRun: false, - shouldCreateNewJSObj: true, - }, - ); + { + paste: true, + completeReplace: true, + toRun: false, + shouldCreateNewJSObj: true, + }, + ); - // select button, and assert that no lint error is present - EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); - agHelper.AssertElementAbsence(locators._lintErrorElement); - }); -}); + // select button, and assert that no lint error is present + EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); + agHelper.AssertElementAbsence(locators._lintErrorElement); + }); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Linting/ErrorReporting_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Linting/ErrorReporting_spec.ts index 0ffeaa75873b..e25cd04e84cb 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Linting/ErrorReporting_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Linting/ErrorReporting_spec.ts @@ -15,7 +15,7 @@ import EditorNavigation, { PagePaneSegment, } from "../../../../support/Pages/EditorNavigation"; -describe("Lint error reporting", { tags: ["@tag.JS"] }, () => { +describe("Lint error reporting", { tags: ["@tag.JS", "@tag.Binding"] }, () => { before(() => { entityExplorer.DragDropWidgetNVerify("tablewidgetv2", 300, 500); table.AddSampleTableData(); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Onboarding/StartFromData_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Onboarding/StartFromData_spec.ts index da36efe2b28c..5f2158612d3d 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Onboarding/StartFromData_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Onboarding/StartFromData_spec.ts @@ -10,7 +10,14 @@ import { describe( "Start with data userflow : Create different datasources and save", - { tags: ["@tag.excludeForAirgap", "@tag.Datasource"] }, + { + tags: [ + "@tag.excludeForAirgap", + "@tag.Datasource", + "@tag.Git", + "@tag.AccessControl", + ], + }, function () { beforeEach(() => { homePage.Signout(); diff --git a/app/client/cypress/e2e/Regression/ClientSide/OneClickBinding/JSEnabledByDefaultExperiment_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/OneClickBinding/JSEnabledByDefaultExperiment_spec.ts index b1da841ffe3d..45a89965b271 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/OneClickBinding/JSEnabledByDefaultExperiment_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/OneClickBinding/JSEnabledByDefaultExperiment_spec.ts @@ -1,5 +1,4 @@ import OneClickBindingLocator from "../../../../locators/OneClickBindingLocator"; -import { featureFlagIntercept } from "../../../../support/Objects/FeatureFlags"; import { agHelper, apiPage, @@ -23,10 +22,6 @@ describe( () => { let datasourceName: string; before(() => { - featureFlagIntercept({ - rollout_js_enabled_one_click_binding_enabled: true, - }); - dataSources.CreateDataSource("Postgres"); cy.get("@dsName").then((dsName) => { diff --git a/app/client/cypress/e2e/Regression/ClientSide/OneClickBinding/TableWidget/OneClickBindingMysql_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/OneClickBinding/TableWidget/OneClickBindingMysql_spec.ts index 1ae360fd1052..19620479ef55 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/OneClickBinding/TableWidget/OneClickBindingMysql_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/OneClickBinding/TableWidget/OneClickBindingMysql_spec.ts @@ -16,7 +16,7 @@ const oneClickBinding = new OneClickBinding(); describe( "Table widget one click binding feature", - { tags: ["@tag.Widget"] }, + { tags: ["@tag.Widget", "@tag.Binding"] }, () => { it("1.should check that queries are created and bound to table widget properly", () => { entityExplorer.DragDropWidgetNVerify(draggableWidgets.TABLE, 400); diff --git a/app/client/cypress/e2e/Regression/ClientSide/OneClickBinding/spec_utility.ts b/app/client/cypress/e2e/Regression/ClientSide/OneClickBinding/spec_utility.ts index 91b52c0d116c..ba218d46f170 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/OneClickBinding/spec_utility.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/OneClickBinding/spec_utility.ts @@ -12,7 +12,22 @@ export class OneClickBinding { column: Record = {}, ) { agHelper.GetNClick(oneClickBindingLocator.datasourceDropdownSelector); - + agHelper.GetElement("[role='menu']").then(($menu) => { + if ( + $menu.find(oneClickBindingLocator.datasourceQuerySelector()).length > 0 + ) { + cy.wrap($menu) + .find(oneClickBindingLocator.datasourceQuerySelector()) + .should("have.length.greaterThan", 0) + .each(($item) => { + cy.wrap($item) + .find("img") + .should(($img) => { + expect($img).to.have.attr("src").and.not.be.empty; + }); + }); + } + }); expandLoadMoreOptions(); agHelper.AssertElementAbsence(oneClickBindingLocator.connectData); diff --git a/app/client/cypress/e2e/Regression/ClientSide/OtherUIFeatures/ApiError_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/OtherUIFeatures/ApiError_spec.ts index 993674bed8de..622e3eee2419 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/OtherUIFeatures/ApiError_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/OtherUIFeatures/ApiError_spec.ts @@ -4,27 +4,31 @@ import EditorNavigation, { EditorViewMode, } from "../../../../support/Pages/EditorNavigation"; -describe("Api Error Debugger", { tags: ["@tag.IDE"] }, () => { - before(() => { - // Create api that causes an error - _.apiPage.CreateAndFillApi("https://fakeapi/user"); - }); - it("it shows error message", () => { - _.apiPage.RunAPI(false); - _.debuggerHelper.AssertOpen(PageType.API); - _.apiPage.ResponseStatusCheck("PE-RST-5000"); - }); - it("it shows debug button and navigates", () => { - _.apiPage.DebugError(); - _.debuggerHelper.AssertSelectedTab( - Cypress.env("MESSAGES").DEBUGGER_ERRORS(), - ); - _.debuggerHelper.AssertErrorCount(1); - EditorNavigation.SwitchScreenMode(EditorViewMode.SplitScreen); - _.apiPage.DebugError(); - _.debuggerHelper.AssertSelectedTab( - Cypress.env("MESSAGES").DEBUGGER_ERRORS(), - ); - _.debuggerHelper.AssertErrorCount(1); - }); -}); +describe( + "Api Error Debugger", + { tags: ["@tag.IDE", "@tag.PropertyPane"] }, + () => { + before(() => { + // Create api that causes an error + _.apiPage.CreateAndFillApi("https://fakeapi/user"); + }); + it("it shows error message", () => { + _.apiPage.RunAPI(false); + _.debuggerHelper.AssertOpen(PageType.API); + _.apiPage.ResponseStatusCheck("PE-RST-5000"); + }); + it("it shows debug button and navigates", () => { + _.apiPage.DebugError(); + _.debuggerHelper.AssertSelectedTab( + Cypress.env("MESSAGES").DEBUGGER_ERRORS(), + ); + _.debuggerHelper.AssertErrorCount(1); + EditorNavigation.SwitchScreenMode(EditorViewMode.SplitScreen); + _.apiPage.DebugError(); + _.debuggerHelper.AssertSelectedTab( + Cypress.env("MESSAGES").DEBUGGER_ERRORS(), + ); + _.debuggerHelper.AssertErrorCount(1); + }); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/OtherUIFeatures/EntityBottomBar_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/OtherUIFeatures/EntityBottomBar_spec.ts index 23d9464dffc1..806170b30ff9 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/OtherUIFeatures/EntityBottomBar_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/OtherUIFeatures/EntityBottomBar_spec.ts @@ -2,152 +2,159 @@ import * as _ from "../../../../support/Objects/ObjectsCore"; import { PageType } from "../../../../support/Pages/DebuggerHelper"; import EditorNavigation from "../../../../support/Pages/EditorNavigation"; -describe("Entity bottom bar", { tags: ["@tag.IDE"] }, () => { - it("1. Debugger should be closable", () => { - //Verify if bottom bar is closed. - _.debuggerHelper.AssertClosed(); - //verify if bottom bar is open on clicking debugger icon in canvas. - _.debuggerHelper.OpenDebugger(); - _.debuggerHelper.AssertOpen(PageType.Canvas); - //Verify if selected tab is errors in tab title. - _.debuggerHelper.AssertSelectedTab( - Cypress.env("MESSAGES").DEBUGGER_ERRORS(), - ); - // verify if bottom bar is closed on clicking close icon in canvas. - _.debuggerHelper.CloseBottomBar(); - _.debuggerHelper.AssertClosed(); - }); - - it("2. Jseditor bottom bar should be collapsable", () => { - _.jsEditor.CreateJSObject(` return "hello world";`); - //Verify if bottom bar opens JSEditor. - _.debuggerHelper.AssertOpen(PageType.JsEditor); - // Verify if selected tab is response. - _.debuggerHelper.AssertSelectedTab( - Cypress.env("MESSAGES").DEBUGGER_RESPONSE(), - ); - //Verify if bottom bar is closed on clicking close icon in JSEditor. - _.debuggerHelper.CloseBottomBar(); - _.debuggerHelper.AssertClosed(); - //Verify if bottom bar is open on executing JSFunction. - _.jsEditor.RunJSObj(); - _.debuggerHelper.AssertOpen(PageType.JsEditor); - //verify if response tab is selected on execution JSFunction. - _.debuggerHelper.AssertSelectedTab( - Cypress.env("MESSAGES").DEBUGGER_RESPONSE(), - ); - //verify if bottom bar is closed on switching to canvas page. - EditorNavigation.ShowCanvas(); - _.debuggerHelper.AssertClosed(); - }); +describe( + "Entity bottom bar", + { tags: ["@tag.IDE", "@tag.PropertyPane"] }, + () => { + it("1. Debugger should be closable", () => { + //Verify if bottom bar is closed. + _.debuggerHelper.AssertClosed(); + //verify if bottom bar is open on clicking debugger icon in canvas. + _.debuggerHelper.OpenDebugger(); + _.debuggerHelper.AssertOpen(PageType.Canvas); + //Verify if selected tab is errors in tab title. + _.debuggerHelper.AssertSelectedTab( + Cypress.env("MESSAGES").DEBUGGER_ERRORS(), + ); + // verify if bottom bar is closed on clicking close icon in canvas. + _.debuggerHelper.CloseBottomBar(); + _.debuggerHelper.AssertClosed(); + }); - it("3. Api bottom pane should be collapsable", () => { - _.apiPage.CreateAndFillApi( - _.dataManager.dsValues[_.dataManager.defaultEnviorment].mockApiUrl, - ); - //Verify that the errors tab is still closed. - _.debuggerHelper.AssertClosed(); - //Verify if bottom bar opens on clicking debugger icon in api page. - _.debuggerHelper.OpenDebugger(); - _.debuggerHelper.AssertOpen(PageType.API); - //Verify if selected tab is errors in tab title. - _.debuggerHelper.AssertSelectedTab( - Cypress.env("MESSAGES").DEBUGGER_ERRORS(), - ); - //Verify if bottom bar is open on executing api. - _.apiPage.RunAPI(); - _.agHelper.Sleep(1000); - _.debuggerHelper.AssertOpen(PageType.API); - //verify if response tab is selected on execution api. - _.debuggerHelper.AssertSelectedTab( - Cypress.env("MESSAGES").DEBUGGER_RESPONSE(), - ); - }); + it("2. Jseditor bottom bar should be collapsable", () => { + _.jsEditor.CreateJSObject(` return "hello world";`); + //Verify if bottom bar opens JSEditor. + _.debuggerHelper.AssertOpen(PageType.JsEditor); + // Verify if selected tab is response. + _.debuggerHelper.AssertSelectedTab( + Cypress.env("MESSAGES").DEBUGGER_RESPONSE(), + ); + //Verify if bottom bar is closed on clicking close icon in JSEditor. + _.debuggerHelper.CloseBottomBar(); + _.debuggerHelper.AssertClosed(); + //Verify if bottom bar is open on executing JSFunction. + _.jsEditor.RunJSObj(); + _.debuggerHelper.AssertOpen(PageType.JsEditor); + //verify if response tab is selected on execution JSFunction. + _.debuggerHelper.AssertSelectedTab( + Cypress.env("MESSAGES").DEBUGGER_RESPONSE(), + ); + //verify if bottom bar is closed on switching to canvas page. + EditorNavigation.ShowCanvas(); + _.debuggerHelper.AssertClosed(); + }); - it("4. Bottom bar in Datasource", () => { - //Verify if bottom bar remain open on shifting to create new datasource page. - _.dataSources.NavigateToDSCreateNew(); - //Expecting errors tab to be closed as this is now a datasource - _.debuggerHelper.AssertClosed(); - //Verify if bottom bar opens on clicking debugger icon in datasource page. - _.debuggerHelper.OpenDebugger(); - _.debuggerHelper.AssertOpen(PageType.DataSources); - }); + it("3. Api bottom pane should be collapsable", () => { + _.apiPage.CreateAndFillApi( + _.dataManager.dsValues[_.dataManager.defaultEnviorment].mockApiUrl, + ); + //Verify that the errors tab is still closed. + _.debuggerHelper.AssertClosed(); + //Verify if bottom bar opens on clicking debugger icon in api page. + _.debuggerHelper.OpenDebugger(); + _.debuggerHelper.AssertOpen(PageType.API); + //Verify if selected tab is errors in tab title. + _.debuggerHelper.AssertSelectedTab( + Cypress.env("MESSAGES").DEBUGGER_ERRORS(), + ); + //Verify if bottom bar is open on executing api. + _.apiPage.RunAPI(); + _.agHelper.Sleep(1000); + _.debuggerHelper.AssertOpen(PageType.API); + //verify if response tab is selected on execution api. + _.debuggerHelper.AssertSelectedTab( + Cypress.env("MESSAGES").DEBUGGER_RESPONSE(), + ); + }); - it( - "5. Query bottom bar should be collapsable", - { tags: ["@tag.excludeForAirgap"] }, - () => { - _.dataSources.CreateMockDB("Users").then((dbName) => { - //Verify if bottom bar remain open on shifting to active datasource page. - _.debuggerHelper.AssertOpen(PageType.DataSources); - //Verify if selected tab is errors and error count is - //Verify if selected tab is errors in tab title. - _.debuggerHelper.AssertSelectedTab( - Cypress.env("MESSAGES").DEBUGGER_ERRORS(), - ); - //Verify if bottom bar is closed on clicking close icon in active datasource page. - _.debuggerHelper.CloseBottomBar(); - _.debuggerHelper.AssertClosed(); - //Verify if bottom bar opens on clicking debugger icon in query page. - _.dataSources.CreateQueryAfterDSSaved(); - _.debuggerHelper.OpenDebugger(); - _.debuggerHelper.AssertOpen(PageType.Query); - //Verify if bottom bar is closed on clicking close icon in query page. - _.debuggerHelper.CloseBottomBar(); - _.debuggerHelper.AssertClosed(); - //Create and run query. + it("4. Bottom bar in Datasource", () => { + //Verify if bottom bar remain open on shifting to create new datasource page. + _.dataSources.NavigateToDSCreateNew(); + //Expecting errors tab to be closed as this is now a datasource + _.debuggerHelper.AssertClosed(); + //Verify if bottom bar opens on clicking debugger icon in datasource page. + _.debuggerHelper.OpenDebugger(); + _.debuggerHelper.AssertOpen(PageType.DataSources); + }); - _.dataSources.EnterQuery( - "SELECT * FROM users ORDER BY id LIMIT 10;", - 1000, - ); - _.dataSources.RunQuery(); - //Verify if bottom bar is open on executing query. - _.debuggerHelper.AssertOpen(PageType.Query); - //Verify if response atb is selected on executing query. - _.debuggerHelper.AssertSelectedTab( - Cypress.env("MESSAGES").DEBUGGER_RESPONSE(), - ); - // clean up - _.dataSources.DeleteQuery("Query1"); - _.dataSources.DeleteDatasourceFromWithinDS(dbName); - }); - }, - ); + it( + "5. Query bottom bar should be collapsable", + { tags: ["@tag.excludeForAirgap"] }, + () => { + _.dataSources.CreateMockDB("Users").then((dbName) => { + //Verify if bottom bar remain open on shifting to active datasource page. + _.debuggerHelper.AssertOpen(PageType.DataSources); + //Verify if selected tab is errors and error count is + //Verify if selected tab is errors in tab title. + _.debuggerHelper.AssertSelectedTab( + Cypress.env("MESSAGES").DEBUGGER_ERRORS(), + ); + //Verify if bottom bar is closed on clicking close icon in active datasource page. + _.debuggerHelper.CloseBottomBar(); + _.debuggerHelper.AssertClosed(); + //Verify if bottom bar opens on clicking debugger icon in query page. + _.dataSources.CreateQueryAfterDSSaved(); + _.debuggerHelper.OpenDebugger(); + _.debuggerHelper.AssertOpen(PageType.Query); + //Verify if bottom bar is closed on clicking close icon in query page. + _.debuggerHelper.CloseBottomBar(); + _.debuggerHelper.AssertClosed(); + //Create and run query. - it("airgap", "5. Query bottom bar should be collapsable - airgap", () => { - _.dataSources.CreateDataSource("Postgres"); - //Verify if bottom bar remain open on shifting to active datasource page. - _.debuggerHelper.AssertOpen(PageType.DataSources); - //Verify if selected tab is errors and error count is - //Verify if selected tab is errors in tab title. - _.debuggerHelper.AssertSelectedTab( - Cypress.env("MESSAGES").DEBUGGER_ERRORS(), + _.dataSources.EnterQuery( + "SELECT * FROM users ORDER BY id LIMIT 10;", + 1000, + ); + _.dataSources.RunQuery(); + //Verify if bottom bar is open on executing query. + _.debuggerHelper.AssertOpen(PageType.Query); + //Verify if response atb is selected on executing query. + _.debuggerHelper.AssertSelectedTab( + Cypress.env("MESSAGES").DEBUGGER_RESPONSE(), + ); + // clean up + _.dataSources.DeleteQuery("Query1"); + _.dataSources.DeleteDatasourceFromWithinDS(dbName); + }); + }, ); - //Verify if bottom bar is closed on clicking close icon in active datasource page. - _.debuggerHelper.CloseBottomBar(); - _.debuggerHelper.AssertClosed(); - //Verify if bottom bar opens on clicking debugger icon in query page. - _.dataSources.CreateQueryAfterDSSaved(); - _.debuggerHelper.OpenDebugger(); - _.debuggerHelper.AssertOpen(PageType.Query); - //Verify if bottom bar is closed on clicking close icon in query page. - _.debuggerHelper.CloseBottomBar(); - _.debuggerHelper.AssertClosed(); - //Create and run query. - _.dataSources.EnterQuery("SELECT * FROM users ORDER BY id LIMIT 10;", 1000); - _.dataSources.RunQuery(); - //Verify if bottom bar is open on executing query. - _.debuggerHelper.AssertOpen(PageType.Query); - //Verify if response atb is selected on executing query. - _.debuggerHelper.AssertSelectedTab( - Cypress.env("MESSAGES").DEBUGGER_RESPONSE(), - ); - // clean up - _.dataSources.DeleteQuery("Query1"); - cy.get("@dsName").then(($dsName) => { - _.dataSources.DeleteDatasourceFromWithinDS($dsName as any); + + it("airgap", "5. Query bottom bar should be collapsable - airgap", () => { + _.dataSources.CreateDataSource("Postgres"); + //Verify if bottom bar remain open on shifting to active datasource page. + _.debuggerHelper.AssertOpen(PageType.DataSources); + //Verify if selected tab is errors and error count is + //Verify if selected tab is errors in tab title. + _.debuggerHelper.AssertSelectedTab( + Cypress.env("MESSAGES").DEBUGGER_ERRORS(), + ); + //Verify if bottom bar is closed on clicking close icon in active datasource page. + _.debuggerHelper.CloseBottomBar(); + _.debuggerHelper.AssertClosed(); + //Verify if bottom bar opens on clicking debugger icon in query page. + _.dataSources.CreateQueryAfterDSSaved(); + _.debuggerHelper.OpenDebugger(); + _.debuggerHelper.AssertOpen(PageType.Query); + //Verify if bottom bar is closed on clicking close icon in query page. + _.debuggerHelper.CloseBottomBar(); + _.debuggerHelper.AssertClosed(); + //Create and run query. + _.dataSources.EnterQuery( + "SELECT * FROM users ORDER BY id LIMIT 10;", + 1000, + ); + _.dataSources.RunQuery(); + //Verify if bottom bar is open on executing query. + _.debuggerHelper.AssertOpen(PageType.Query); + //Verify if response atb is selected on executing query. + _.debuggerHelper.AssertSelectedTab( + Cypress.env("MESSAGES").DEBUGGER_RESPONSE(), + ); + // clean up + _.dataSources.DeleteQuery("Query1"); + cy.get("@dsName").then(($dsName) => { + _.dataSources.DeleteDatasourceFromWithinDS($dsName as any); + }); }); - }); -}); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/OtherUIFeatures/ExportApplication_spec.js b/app/client/cypress/e2e/Regression/ClientSide/OtherUIFeatures/ExportApplication_spec.js index 277e1e97a638..09e935730799 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/OtherUIFeatures/ExportApplication_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/OtherUIFeatures/ExportApplication_spec.js @@ -8,7 +8,7 @@ import { describe( "Export application as a JSON file", - { tags: ["@tag.ImportExport"] }, + { tags: ["@tag.ImportExport", "@tag.Git"] }, function () { let workspaceId, appid; diff --git a/app/client/cypress/e2e/Regression/ClientSide/OtherUIFeatures/Inspect_Element_spec.js b/app/client/cypress/e2e/Regression/ClientSide/OtherUIFeatures/Inspect_Element_spec.js index 5e5adb4afa46..a6cca25ae4a7 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/OtherUIFeatures/Inspect_Element_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/OtherUIFeatures/Inspect_Element_spec.js @@ -2,7 +2,9 @@ import * as _ from "../../../../support/Objects/ObjectsCore"; describe( "Inspect Entity", - { tags: ["@tag.Widget", "@tag.PropertyPane"] }, + { + tags: ["@tag.Widget", "@tag.PropertyPane", "@tag.Binding"], + }, function () { before(() => { _.agHelper.AddDsl("debuggerDependencyDsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/OtherUIFeatures/Logs1_spec.js b/app/client/cypress/e2e/Regression/ClientSide/OtherUIFeatures/Logs1_spec.js index a6aa206e83a7..9e55cbb57f9e 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/OtherUIFeatures/Logs1_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/OtherUIFeatures/Logs1_spec.js @@ -19,135 +19,139 @@ const generateTestLogString = () => { return logString; }; -describe("Debugger logs", { tags: ["@tag.Widget", "@tag.IDE"] }, function () { - this.beforeEach(() => { - logString = generateTestLogString(); - }); +describe( + "Debugger logs", + { tags: ["@tag.Widget", "@tag.IDE", "@tag.PropertyPane", "@tag.Binding"] }, + function () { + this.beforeEach(() => { + logString = generateTestLogString(); + }); - it("1. Console log on button click with normal moustache binding", function () { - ee.DragDropWidgetNVerify("buttonwidget", 200, 200); - // Testing with normal log in moustache binding - propPane.EnterJSContext("onClick", `{{console.log("${logString}")}}`); - agHelper.Sleep(2000); - agHelper.ClickButton("Submit"); - debuggerHelper.OpenDebugger(); - agHelper.GetNClick(jsEditor._logsTab); - debuggerHelper.DoesConsoleLogExist(logString); - }); + it("1. Console log on button click with normal moustache binding", function () { + ee.DragDropWidgetNVerify("buttonwidget", 200, 200); + // Testing with normal log in moustache binding + propPane.EnterJSContext("onClick", `{{console.log("${logString}")}}`); + agHelper.Sleep(2000); + agHelper.ClickButton("Submit"); + debuggerHelper.OpenDebugger(); + agHelper.GetNClick(jsEditor._logsTab); + debuggerHelper.DoesConsoleLogExist(logString); + }); - it("2. Console log on button click with arrow function IIFE", function () { - debuggerHelper.ClearLogs(); - EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); - // Testing with normal log in iifee - propPane.EnterJSContext( - "onClick", - `{{(() => { + it("2. Console log on button click with arrow function IIFE", function () { + debuggerHelper.ClearLogs(); + EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); + // Testing with normal log in iifee + propPane.EnterJSContext( + "onClick", + `{{(() => { console.log('${logString}'); }) () }}`, - ); - agHelper.ClickButton("Submit"); - debuggerHelper.DoesConsoleLogExist(logString); - }); + ); + agHelper.ClickButton("Submit"); + debuggerHelper.DoesConsoleLogExist(logString); + }); - it("3. Console log on button click with function keyword IIFE", function () { - debuggerHelper.ClearLogs(); - EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); - // Testing with normal log in iifee - propPane.EnterJSContext( - "onClick", - `{{ function () { + it("3. Console log on button click with function keyword IIFE", function () { + debuggerHelper.ClearLogs(); + EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); + // Testing with normal log in iifee + propPane.EnterJSContext( + "onClick", + `{{ function () { console.log('${logString}'); } () }}`, - ); - agHelper.ClickButton("Submit"); - debuggerHelper.DoesConsoleLogExist(logString); - }); + ); + agHelper.ClickButton("Submit"); + debuggerHelper.DoesConsoleLogExist(logString); + }); - it("4. Console log on button click with async function IIFE", function () { - debuggerHelper.ClearLogs(); - // Testing with normal log in iifee - EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); - propPane.EnterJSContext( - "onClick", - `{{(async() => { + it("4. Console log on button click with async function IIFE", function () { + debuggerHelper.ClearLogs(); + // Testing with normal log in iifee + EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); + propPane.EnterJSContext( + "onClick", + `{{(async() => { console.log('${logString}'); }) () }}`, - ); - agHelper.ClickButton("Submit"); - debuggerHelper.DoesConsoleLogExist(logString); - }); + ); + agHelper.ClickButton("Submit"); + debuggerHelper.DoesConsoleLogExist(logString); + }); - it("5. Console log on button click with mixed function IIFE", function () { - debuggerHelper.ClearLogs(); - // Testing with normal log in iifee - EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); - const logStringChild = generateTestLogString(); - propPane.EnterJSContext( - "onClick", - `{{ function () { + it("5. Console log on button click with mixed function IIFE", function () { + debuggerHelper.ClearLogs(); + // Testing with normal log in iifee + EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); + const logStringChild = generateTestLogString(); + propPane.EnterJSContext( + "onClick", + `{{ function () { console.log('${logString}'); (async () => {console.log('${logStringChild}')})(); } () }}`, - ); - agHelper.ClickButton("Submit"); - debuggerHelper.DoesConsoleLogExist(logString); - debuggerHelper.DoesConsoleLogExist(logStringChild); - }); + ); + agHelper.ClickButton("Submit"); + debuggerHelper.DoesConsoleLogExist(logString); + debuggerHelper.DoesConsoleLogExist(logStringChild); + }); - it("6. Console log grouping on button click", function () { - debuggerHelper.ClearLogs(); - // Testing with normal log in iifee - EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); - propPane.EnterJSContext( - "onClick", - `{{ function () { + it("6. Console log grouping on button click", function () { + debuggerHelper.ClearLogs(); + // Testing with normal log in iifee + EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); + propPane.EnterJSContext( + "onClick", + `{{ function () { console.log('${logString}'); console.log('${logString}'); console.log('${logString}'); console.log('${logString}'); console.log('${logString}'); } () }}`, - ); - agHelper.Sleep(); //Wait for CI flakyness - agHelper.ClickButton("Submit"); - debuggerHelper.DoesConsoleLogExist(logString); - debuggerHelper.AssertConsecutiveConsoleLogCount(5); - }); + ); + agHelper.Sleep(); //Wait for CI flakyness + agHelper.ClickButton("Submit"); + debuggerHelper.DoesConsoleLogExist(logString); + debuggerHelper.AssertConsecutiveConsoleLogCount(5); + }); - it("7. Console log grouping on button click with different log in between", function () { - debuggerHelper.ClearLogs(); - // Testing with normal log in iifee - EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); - propPane.EnterJSContext( - "onClick", - `{{ function () { + it("7. Console log grouping on button click with different log in between", function () { + debuggerHelper.ClearLogs(); + // Testing with normal log in iifee + EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); + propPane.EnterJSContext( + "onClick", + `{{ function () { console.log('${logString}'); console.log('${logString}'); console.log('Different ${logString}'); console.log('${logString}'); } () }}`, - ); - agHelper.ClickButton("Submit"); - debuggerHelper.DoesConsoleLogExist(logString); - debuggerHelper.DoesConsoleLogExist(`Different ${logString}`); - debuggerHelper.AssertConsecutiveConsoleLogCount(2); - }); + ); + agHelper.ClickButton("Submit"); + debuggerHelper.DoesConsoleLogExist(logString); + debuggerHelper.DoesConsoleLogExist(`Different ${logString}`); + debuggerHelper.AssertConsecutiveConsoleLogCount(2); + }); - it("8. Console log grouping on button click from different source", function () { - debuggerHelper.ClearLogs(); - // Testing with normal log in iifee - EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); - propPane.EnterJSContext("onClick", `{{console.log("${logString}")}}`); - // Add another button - ee.DragDropWidgetNVerify("buttonwidget", 400, 400); - propPane.UpdatePropertyFieldValue("Label", "Submit2"); - propPane.EnterJSContext("onClick", `{{console.log("${logString}")}}`); - agHelper.Sleep(2000); - agHelper.ClickButton("Submit"); - agHelper.ClickButton("Submit2"); - debuggerHelper.DoesConsoleLogExist(logString); - debuggerHelper.AssertConsecutiveConsoleLogCount(0); - propPane.DeleteWidgetFromPropertyPane("Button1"); - propPane.DeleteWidgetFromPropertyPane("Button2"); - }); -}); + it("8. Console log grouping on button click from different source", function () { + debuggerHelper.ClearLogs(); + // Testing with normal log in iifee + EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); + propPane.EnterJSContext("onClick", `{{console.log("${logString}")}}`); + // Add another button + ee.DragDropWidgetNVerify("buttonwidget", 400, 400); + propPane.UpdatePropertyFieldValue("Label", "Submit2"); + propPane.EnterJSContext("onClick", `{{console.log("${logString}")}}`); + agHelper.Sleep(2000); + agHelper.ClickButton("Submit"); + agHelper.ClickButton("Submit2"); + debuggerHelper.DoesConsoleLogExist(logString); + debuggerHelper.AssertConsecutiveConsoleLogCount(0); + propPane.DeleteWidgetFromPropertyPane("Button1"); + propPane.DeleteWidgetFromPropertyPane("Button2"); + }); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/OtherUIFeatures/Logs2_spec.js b/app/client/cypress/e2e/Regression/ClientSide/OtherUIFeatures/Logs2_spec.js index fa3358209b5d..e3579989ff1d 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/OtherUIFeatures/Logs2_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/OtherUIFeatures/Logs2_spec.js @@ -14,34 +14,37 @@ const generateTestLogString = () => { return logString; }; -describe("Debugger logs", { tags: ["@tag.IDE"] }, function () { - this.beforeEach(() => { - logString = generateTestLogString(); - }); +describe( + "Debugger logs", + { tags: ["@tag.IDE", "@tag.PropertyPane"] }, + function () { + this.beforeEach(() => { + logString = generateTestLogString(); + }); - it("1. Console log on text widget with normal moustache binding", function () { - PageLeftPane.switchSegment(PagePaneSegment.UI); - _.entityExplorer.DragDropWidgetNVerify("textwidget", 400, 400); - _.propPane.UpdatePropertyFieldValue( - "Text", - `{{(function(){ + it("1. Console log on text widget with normal moustache binding", function () { + PageLeftPane.switchSegment(PagePaneSegment.UI); + _.entityExplorer.DragDropWidgetNVerify("textwidget", 400, 400); + _.propPane.UpdatePropertyFieldValue( + "Text", + `{{(function(){ const temp = "Hello!" console.log("${logString}"); return temp; })()}}`, - ); - _.agHelper.RefreshPage(); - // Wait for the debugger icon to be visible - _.agHelper.AssertElementVisibility(".t--debugger-count"); - _.debuggerHelper.OpenDebugger(); - _.agHelper.GetNClick(_.jsEditor._logsTab); - _.debuggerHelper.DoesConsoleLogExist(logString); - }); + ); + _.agHelper.RefreshPage(); + // Wait for the debugger icon to be visible + _.agHelper.AssertElementVisibility(".t--debugger-count"); + _.debuggerHelper.OpenDebugger(); + _.agHelper.GetNClick(_.jsEditor._logsTab); + _.debuggerHelper.DoesConsoleLogExist(logString); + }); - it("2. Console log in sync function", function () { - _.jsEditor.CreateJSObject( - `export default { + it("2. Console log in sync function", function () { + _.jsEditor.CreateJSObject( + `export default { myFun1: () => { console.log("${logString}"); return "sync"; @@ -50,21 +53,21 @@ describe("Debugger logs", { tags: ["@tag.IDE"] }, function () { return 1; } }`, - { - paste: true, - completeReplace: true, - toRun: true, - shouldCreateNewJSObj: true, - prettify: false, - }, - ); - _.agHelper.GetNClick(_.jsEditor._logsTab); - _.debuggerHelper.DoesConsoleLogExist(logString); - }); + { + paste: true, + completeReplace: true, + toRun: true, + shouldCreateNewJSObj: true, + prettify: false, + }, + ); + _.agHelper.GetNClick(_.jsEditor._logsTab); + _.debuggerHelper.DoesConsoleLogExist(logString); + }); - it("3. Console log in async function", function () { - _.jsEditor.CreateJSObject( - `export default { + it("3. Console log in async function", function () { + _.jsEditor.CreateJSObject( + `export default { myFun1: async () => { console.log("${logString}"); return "async"; @@ -73,17 +76,17 @@ describe("Debugger logs", { tags: ["@tag.IDE"] }, function () { return 1; } }`, - { - paste: true, - completeReplace: true, - toRun: false, - shouldCreateNewJSObj: false, - prettify: false, - }, - ); + { + paste: true, + completeReplace: true, + toRun: false, + shouldCreateNewJSObj: false, + prettify: false, + }, + ); - // Edit JSObject and verify no logs are visible - _.jsEditor.EditJSObj(`export default { + // Edit JSObject and verify no logs are visible + _.jsEditor.EditJSObj(`export default { myFun1: async () => { console.log("${logString}"); return "async"; @@ -92,21 +95,21 @@ describe("Debugger logs", { tags: ["@tag.IDE"] }, function () { return 2; } }`); - _.debuggerHelper.DoesConsoleLogExist(logString, false); + _.debuggerHelper.DoesConsoleLogExist(logString, false); - // Run function and verify logs are visible - _.agHelper.GetNClick(_.jsEditor._runButton); - _.agHelper.GetNClick(_.jsEditor._logsTab); - _.debuggerHelper.DoesConsoleLogExist(logString); - }); - - it("4. Console log after API succedes", function () { - cy.fixture("testdata").then(function (dataSet) { - _.apiPage.CreateAndFillApi(dataSet.baseUrl + dataSet.methods, "Api1"); + // Run function and verify logs are visible + _.agHelper.GetNClick(_.jsEditor._runButton); + _.agHelper.GetNClick(_.jsEditor._logsTab); + _.debuggerHelper.DoesConsoleLogExist(logString); }); - const returnText = "success"; - _.jsEditor.CreateJSObject( - `export default { + + it("4. Console log after API succedes", function () { + cy.fixture("testdata").then(function (dataSet) { + _.apiPage.CreateAndFillApi(dataSet.baseUrl + dataSet.methods, "Api1"); + }); + const returnText = "success"; + _.jsEditor.CreateJSObject( + `export default { myFun1: async () => { return storeValue("test", "test").then(() => { console.log("${logString} Started"); @@ -123,43 +126,43 @@ describe("Debugger logs", { tags: ["@tag.IDE"] }, function () { return 1; } }`, - { - paste: true, - completeReplace: true, - toRun: false, - shouldCreateNewJSObj: true, - }, - ); - - cy.get("@jsObjName").then((jsObjName) => { - _.agHelper.Sleep(2000); - _.jsEditor.RunJSObj(); - _.agHelper.GetNClick(_.jsEditor._logsTab); - _.debuggerHelper.DoesConsoleLogExist(`${logString} Started`); - _.debuggerHelper.DoesConsoleLogExist(`${logString} Success`); - _.entityExplorer.DragDropWidgetNVerify("textwidget", 200, 600); - _.propPane.UpdatePropertyFieldValue( - "Text", - `{{${jsObjName}.myFun1.data}}`, - ); - _.agHelper.GetNAssertElementText( - commonlocators.textWidgetContainer, - returnText, - "have.text", - 1, + { + paste: true, + completeReplace: true, + toRun: false, + shouldCreateNewJSObj: true, + }, ); - }); - }); - it("5. Console log after API execution fails", function () { - cy.fixture("testdata").then(function (dataSet) { - _.apiPage.CreateAndFillApi( - dataSet.baseUrl + dataSet.methods + "xyz", - "Api2", - ); + cy.get("@jsObjName").then((jsObjName) => { + _.agHelper.Sleep(2000); + _.jsEditor.RunJSObj(); + _.agHelper.GetNClick(_.jsEditor._logsTab); + _.debuggerHelper.DoesConsoleLogExist(`${logString} Started`); + _.debuggerHelper.DoesConsoleLogExist(`${logString} Success`); + _.entityExplorer.DragDropWidgetNVerify("textwidget", 200, 600); + _.propPane.UpdatePropertyFieldValue( + "Text", + `{{${jsObjName}.myFun1.data}}`, + ); + _.agHelper.GetNAssertElementText( + commonlocators.textWidgetContainer, + returnText, + "have.text", + 1, + ); + }); }); - _.jsEditor.CreateJSObject( - `export default { + + it("5. Console log after API execution fails", function () { + cy.fixture("testdata").then(function (dataSet) { + _.apiPage.CreateAndFillApi( + dataSet.baseUrl + dataSet.methods + "xyz", + "Api2", + ); + }); + _.jsEditor.CreateJSObject( + `export default { myFun1: async () => { console.log("${logString} Started"); return Api2.run().then(()=>{ @@ -174,22 +177,22 @@ describe("Debugger logs", { tags: ["@tag.IDE"] }, function () { return 1; } }`, - { - paste: true, - completeReplace: true, - toRun: false, - shouldCreateNewJSObj: true, - }, - ); - _.jsEditor.RunJSObj(); - _.agHelper.GetNClick(_.jsEditor._logsTab); - _.debuggerHelper.DoesConsoleLogExist(`${logString} Started`); - _.debuggerHelper.DoesConsoleLogExist(`${logString} Failed`); - }); + { + paste: true, + completeReplace: true, + toRun: false, + shouldCreateNewJSObj: true, + }, + ); + _.jsEditor.RunJSObj(); + _.agHelper.GetNClick(_.jsEditor._logsTab); + _.debuggerHelper.DoesConsoleLogExist(`${logString} Started`); + _.debuggerHelper.DoesConsoleLogExist(`${logString} Failed`); + }); - it("6. Console log source inside nested function", function () { - _.jsEditor.CreateJSObject( - `export default { + it("6. Console log source inside nested function", function () { + _.jsEditor.CreateJSObject( + `export default { myFun1: async () => { console.log("Parent ${logString}"); return Api1.run(()=>{console.log("Child ${logString}");}); @@ -198,22 +201,22 @@ describe("Debugger logs", { tags: ["@tag.IDE"] }, function () { return 1; } }`, - { - paste: true, - completeReplace: true, - toRun: false, - shouldCreateNewJSObj: false, - }, - ); - _.jsEditor.RunJSObj(); - _.agHelper.GetNClick(_.jsEditor._logsTab); - _.debuggerHelper.DoesConsoleLogExist(`Parent ${logString}`); - _.debuggerHelper.DoesConsoleLogExist(`Child ${logString}`); - }); + { + paste: true, + completeReplace: true, + toRun: false, + shouldCreateNewJSObj: false, + }, + ); + _.jsEditor.RunJSObj(); + _.agHelper.GetNClick(_.jsEditor._logsTab); + _.debuggerHelper.DoesConsoleLogExist(`Parent ${logString}`); + _.debuggerHelper.DoesConsoleLogExist(`Child ${logString}`); + }); - it("7. Console log grouping", function () { - _.jsEditor.CreateJSObject( - `export default { + it("7. Console log grouping", function () { + _.jsEditor.CreateJSObject( + `export default { myFun1: async () => { console.log("${logString}"); console.log("${logString}"); @@ -225,22 +228,22 @@ describe("Debugger logs", { tags: ["@tag.IDE"] }, function () { return 1; } }`, - { - paste: true, - completeReplace: true, - toRun: false, - shouldCreateNewJSObj: true, - }, - ); - _.jsEditor.RunJSObj(); - _.agHelper.GetNClick(_.jsEditor._logsTab); - _.debuggerHelper.DoesConsoleLogExist(`${logString}`); - _.debuggerHelper.AssertConsecutiveConsoleLogCount(5); - }); + { + paste: true, + completeReplace: true, + toRun: false, + shouldCreateNewJSObj: true, + }, + ); + _.jsEditor.RunJSObj(); + _.agHelper.GetNClick(_.jsEditor._logsTab); + _.debuggerHelper.DoesConsoleLogExist(`${logString}`); + _.debuggerHelper.AssertConsecutiveConsoleLogCount(5); + }); - it("8. Console log should not mutate the passed object", function () { - _.jsEditor.CreateJSObject( - `export default { + it("8. Console log should not mutate the passed object", function () { + _.jsEditor.CreateJSObject( + `export default { myFun1: () => { let data = []; console.log("start:", data); @@ -253,21 +256,21 @@ describe("Debugger logs", { tags: ["@tag.IDE"] }, function () { return 1; } }`, - { - paste: true, - completeReplace: true, - toRun: true, - shouldCreateNewJSObj: true, - prettify: false, - }, - ); - _.agHelper.GetNClick(_.jsEditor._logsTab); - _.debuggerHelper.DoesConsoleLogExist("start: []"); - _.debuggerHelper.DoesConsoleLogExist("end: [0,1,2,3,4]"); - }); + { + paste: true, + completeReplace: true, + toRun: true, + shouldCreateNewJSObj: true, + prettify: false, + }, + ); + _.agHelper.GetNClick(_.jsEditor._logsTab); + _.debuggerHelper.DoesConsoleLogExist("start: []"); + _.debuggerHelper.DoesConsoleLogExist("end: [0,1,2,3,4]"); + }); - it("9. Bug #19115 - Objects that start with an underscore `_JSObject1` fail to be navigated from the debugger", function () { - const JSOBJECT_WITH_UNNECCESARY_SEMICOLON = `export default { + it("9. Bug #19115 - Objects that start with an underscore `_JSObject1` fail to be navigated from the debugger", function () { + const JSOBJECT_WITH_UNNECCESARY_SEMICOLON = `export default { myFun1: () => { //write code here if (1) { @@ -277,29 +280,29 @@ describe("Debugger logs", { tags: ["@tag.IDE"] }, function () { } `; - _.jsEditor.CreateJSObject(JSOBJECT_WITH_UNNECCESARY_SEMICOLON, { - paste: true, - completeReplace: true, - toRun: false, - shouldCreateNewJSObj: true, - }); + _.jsEditor.CreateJSObject(JSOBJECT_WITH_UNNECCESARY_SEMICOLON, { + paste: true, + completeReplace: true, + toRun: false, + shouldCreateNewJSObj: true, + }); - EditorNavigation.SelectEntityByName("Page1", EntityType.Page); - _.agHelper.AssertElementVisibility(".t--debugger-count"); - _.debuggerHelper.OpenDebugger(); + EditorNavigation.SelectEntityByName("Page1", EntityType.Page); + _.agHelper.AssertElementVisibility(".t--debugger-count"); + _.debuggerHelper.OpenDebugger(); - _.debuggerHelper.ClicklogEntityLink(); + _.debuggerHelper.ClicklogEntityLink(); - cy.get(".t--js-action-name-edit-field").should("exist"); - }); + cy.get(".t--js-action-name-edit-field").should("exist"); + }); - it("10. Bug #24039 - Logs errors from setInterval callback into debugger", () => { - _.entityExplorer.DragDropWidgetNVerify("buttonwidget", 400, 600); - EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); - _.propPane.SelectPlatformFunction("onClick", "Set interval"); - _.agHelper.EnterActionValue( - "Callback function", - `{{() => { + it("10. Bug #24039 - Logs errors from setInterval callback into debugger", () => { + _.entityExplorer.DragDropWidgetNVerify("buttonwidget", 400, 600); + EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); + _.propPane.SelectPlatformFunction("onClick", "Set interval"); + _.agHelper.EnterActionValue( + "Callback function", + `{{() => { try { Test.run(); } catch (e) { @@ -308,14 +311,15 @@ describe("Debugger logs", { tags: ["@tag.IDE"] }, function () { } } }}`, - ); - _.agHelper.EnterActionValue("Id", "myInterval"); - _.agHelper.Sleep(); - _.agHelper.GetNClick(_.jsEditor._logsTab); - _.debuggerHelper.ClearLogs(); - _.agHelper.ClickButton("Submit"); - _.debuggerHelper.DoesConsoleLogExist( - "Uncaught ReferenceError: Test is not defined", - ); - }); -}); + ); + _.agHelper.EnterActionValue("Id", "myInterval"); + _.agHelper.Sleep(); + _.agHelper.GetNClick(_.jsEditor._logsTab); + _.debuggerHelper.ClearLogs(); + _.agHelper.ClickButton("Submit"); + _.debuggerHelper.DoesConsoleLogExist( + "Uncaught ReferenceError: Test is not defined", + ); + }); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/OtherUIFeatures/PageOnLoad_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/OtherUIFeatures/PageOnLoad_spec.ts index 7a0ddf08e3e1..e189897cc756 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/OtherUIFeatures/PageOnLoad_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/OtherUIFeatures/PageOnLoad_spec.ts @@ -10,7 +10,7 @@ const testdata = require("../../../../fixtures/testdata.json"); describe( "Check debugger logs state when there are onPageLoad actions", - { tags: ["@tag.IDE", "@tag.Datasource"] }, + { tags: ["@tag.IDE", "@tag.Datasource", "@tag.Git", "@tag.AccessControl"] }, function () { before(() => { agHelper.AddDsl("debuggerTableDsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/OtherUIFeatures/PreviewMode_spec.js b/app/client/cypress/e2e/Regression/ClientSide/OtherUIFeatures/PreviewMode_spec.js index 6370ecf28669..b6083515f654 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/OtherUIFeatures/PreviewMode_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/OtherUIFeatures/PreviewMode_spec.js @@ -6,7 +6,7 @@ import * as _ from "../../../../support/Objects/ObjectsCore"; describe( "Preview mode functionality", - { tags: ["@tag.IDE", "@tag.Sanity"] }, + { tags: ["@tag.IDE", "@tag.Sanity", "@tag.PropertyPane"] }, function () { before(() => { _.agHelper.AddDsl("previewMode"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/OtherUIFeatures/Replay_Editor_spec.js b/app/client/cypress/e2e/Regression/ClientSide/OtherUIFeatures/Replay_Editor_spec.js index dd5b11c69edf..51b7f35df772 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/OtherUIFeatures/Replay_Editor_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/OtherUIFeatures/Replay_Editor_spec.js @@ -11,7 +11,15 @@ import { describe( "Undo/Redo functionality", - { tags: ["@tag.JS", "@tag.Datasource"] }, + { + tags: [ + "@tag.JS", + "@tag.Datasource", + "@tag.Git", + "@tag.AccessControl", + "@tag.Binding", + ], + }, function () { const modifierKey = Cypress.platform === "darwin" ? "meta" : "ctrl"; let postgresDatasourceName; diff --git a/app/client/cypress/e2e/Regression/ClientSide/OtherUIFeatures/Replay_spec.js b/app/client/cypress/e2e/Regression/ClientSide/OtherUIFeatures/Replay_spec.js index f4c9e6fec7e1..98a7fdbf9ebb 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/OtherUIFeatures/Replay_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/OtherUIFeatures/Replay_spec.js @@ -14,7 +14,7 @@ import EditorNavigation, { describe( "Undo/Redo functionality", - { tags: ["@tag.Widget", "@tag.PropertyPane"] }, + { tags: ["@tag.Widget", "@tag.PropertyPane", "@tag.Binding"] }, function () { const modifierKey = Cypress.platform === "darwin" ? "meta" : "ctrl"; diff --git a/app/client/cypress/e2e/Regression/ClientSide/OtherUIFeatures/Resize_spec.js b/app/client/cypress/e2e/Regression/ClientSide/OtherUIFeatures/Resize_spec.js index 0f56a228f4f3..ce93dfe06123 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/OtherUIFeatures/Resize_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/OtherUIFeatures/Resize_spec.js @@ -3,7 +3,7 @@ import { agHelper, propPane } from "../../../../support/Objects/ObjectsCore"; describe( "Canvas Resize", - { tags: ["@tag.Widget", "@tag.AutoHeight"] }, + { tags: ["@tag.Widget", "@tag.AutoHeight", "@tag.Binding"] }, function () { before(() => { agHelper.AddDsl("CanvasResizeDsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/OtherUIFeatures/Unique_key_spec.js b/app/client/cypress/e2e/Regression/ClientSide/OtherUIFeatures/Unique_key_spec.js index 581acca07d88..52bfa47dda35 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/OtherUIFeatures/Unique_key_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/OtherUIFeatures/Unique_key_spec.js @@ -4,49 +4,53 @@ import * as _ from "../../../../support/Objects/ObjectsCore"; // Since we cannot test the root cause as it does not show up on the DOM, we are testing the sideEffects // the root cause is when widget has same keys, which are not visible in DOM but confuses React when the list is modified. // please refer to issue, https://github.com/appsmithorg/appsmith/issues/7415 for more details. -describe("Unique react keys", { tags: ["@tag.Widget"] }, function () { - afterEach(() => { - _.agHelper.SaveLocalStorageCache(); - }); - - beforeEach(() => { - _.agHelper.RestoreLocalStorageCache(); - _.agHelper.AddDsl("basicDsl"); - }); - - it("1. Should not create duplicate versions of widget on drop from explorer", function () { - cy.dragAndDropToCanvas("chartwidget", { x: 200, y: 200 }); - cy.dragAndDropToCanvas("selectwidget", { x: 200, y: 600 }); - cy.dragAndDropToCanvas("selectwidget", { x: 200, y: 700 }); - - cy.openPropertyPane("chartwidget"); - cy.deleteWidget(widgetsPage.chartWidget); - - cy.get(widgetsPage.selectwidget).should("have.length", 2); - }); - - it("2. Should not create duplicate versions of widget on widget copy", function () { - const modifierKey = Cypress.platform === "darwin" ? "meta" : "ctrl"; - cy.dragAndDropToCanvas("chartwidget", { x: 200, y: 200 }); - cy.dragAndDropToCanvas("selectwidget", { x: 200, y: 600 }); - //copy and paste - cy.openPropertyPane("selectwidget"); - cy.get("body").type(`{${modifierKey}}c`); - // eslint-disable-next-line cypress/no-unnecessary-waiting - cy.wait(500); - cy.get("body").click(); - cy.get("body").type(`{${modifierKey}}v`, { force: true }); - cy.wait("@updateLayout").should( - "have.nested.property", - "response.body.responseMeta.status", - 200, - ); - - cy.get(widgetsPage.selectwidget).should("have.length", 2); - - cy.openPropertyPane("chartwidget"); - cy.deleteWidget(widgetsPage.chartWidget); - - cy.get(widgetsPage.selectwidget).should("have.length", 2); - }); -}); +describe( + "Unique react keys", + { tags: ["@tag.Widget", "@tag.Binding"] }, + function () { + afterEach(() => { + _.agHelper.SaveLocalStorageCache(); + }); + + beforeEach(() => { + _.agHelper.RestoreLocalStorageCache(); + _.agHelper.AddDsl("basicDsl"); + }); + + it("1. Should not create duplicate versions of widget on drop from explorer", function () { + cy.dragAndDropToCanvas("chartwidget", { x: 200, y: 200 }); + cy.dragAndDropToCanvas("selectwidget", { x: 200, y: 600 }); + cy.dragAndDropToCanvas("selectwidget", { x: 200, y: 700 }); + + cy.openPropertyPane("chartwidget"); + cy.deleteWidget(widgetsPage.chartWidget); + + cy.get(widgetsPage.selectwidget).should("have.length", 2); + }); + + it("2. Should not create duplicate versions of widget on widget copy", function () { + const modifierKey = Cypress.platform === "darwin" ? "meta" : "ctrl"; + cy.dragAndDropToCanvas("chartwidget", { x: 200, y: 200 }); + cy.dragAndDropToCanvas("selectwidget", { x: 200, y: 600 }); + //copy and paste + cy.openPropertyPane("selectwidget"); + cy.get("body").type(`{${modifierKey}}c`); + // eslint-disable-next-line cypress/no-unnecessary-waiting + cy.wait(500); + cy.get("body").click(); + cy.get("body").type(`{${modifierKey}}v`, { force: true }); + cy.wait("@updateLayout").should( + "have.nested.property", + "response.body.responseMeta.status", + 200, + ); + + cy.get(widgetsPage.selectwidget).should("have.length", 2); + + cy.openPropertyPane("chartwidget"); + cy.deleteWidget(widgetsPage.chartWidget); + + cy.get(widgetsPage.selectwidget).should("have.length", 2); + }); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/OtherUIFeatures/ViewMode_spec.js b/app/client/cypress/e2e/Regression/ClientSide/OtherUIFeatures/ViewMode_spec.js index 1b3c7b6c0d15..6b1c90b4ebef 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/OtherUIFeatures/ViewMode_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/OtherUIFeatures/ViewMode_spec.js @@ -14,55 +14,59 @@ Cypress.Commands.add("getSharedUrl", () => { return Cypress.sharedStore.url; }); -describe("Preview mode functionality", { tags: ["@tag.IDE"] }, () => { - before(() => { - agHelper.AddDsl("previewMode"); - deployMode.DeployApp(); - cy.url().then((url) => cy.setSharedUrl(url)); - }); +describe( + "Preview mode functionality", + { tags: ["@tag.IDE", "@tag.PropertyPane"] }, + () => { + before(() => { + agHelper.AddDsl("previewMode"); + deployMode.DeployApp(); + cy.url().then((url) => cy.setSharedUrl(url)); + }); - beforeEach(() => { - cy.getSharedUrl().then((url) => { - agHelper.VisitNAssert(url, "getConsolidatedData"), - agHelper.AssertElementVisibility( - locators._widgetInDeployed(draggableWidgets.BUTTON), - ); + beforeEach(() => { + cy.getSharedUrl().then((url) => { + agHelper.VisitNAssert(url, "getConsolidatedData"), + agHelper.AssertElementVisibility( + locators._widgetInDeployed(draggableWidgets.BUTTON), + ); + }); }); - }); - it("1. on click of apps on header, it should take to application home page", function () { - cy.get(appNavigationLocators.userProfileDropdownButton).should("exist"); - cy.get( - `${appNavigationLocators.header} ${appNavigationLocators.backToAppsButton}`, - ).click(); - agHelper.AssertURL(Cypress.config().baseUrl + "applications"); - }); + it("1. on click of apps on header, it should take to application home page", function () { + cy.get(appNavigationLocators.userProfileDropdownButton).should("exist"); + cy.get( + `${appNavigationLocators.header} ${appNavigationLocators.backToAppsButton}`, + ).click(); + agHelper.AssertURL(Cypress.config().baseUrl + "applications"); + }); - it("2. In the published app with embed=true, there should be no header", function () { - cy.url().then((url) => { - url = new URL(url); - url.searchParams.append("embed", "true"); - agHelper.VisitNAssert(url.toString(), "getConsolidatedData"); - agHelper.AssertElementVisibility( - locators._widgetInDeployed(draggableWidgets.BUTTON), - ); + it("2. In the published app with embed=true, there should be no header", function () { + cy.url().then((url) => { + url = new URL(url); + url.searchParams.append("embed", "true"); + agHelper.VisitNAssert(url.toString(), "getConsolidatedData"); + agHelper.AssertElementVisibility( + locators._widgetInDeployed(draggableWidgets.BUTTON), + ); + }); + agHelper.AssertElementAbsence(appNavigationLocators.header); }); - agHelper.AssertElementAbsence(appNavigationLocators.header); - }); - it("3. In the published app with embed=true&navbar=true, navigator should be visible without user settings", function () { - cy.url().then((url) => { - url = new URL(url); - url.searchParams.append("embed", "true"); - url.searchParams.append("navbar", "true"); - agHelper.VisitNAssert(url.toString(), "getConsolidatedData"); - agHelper.AssertElementVisibility( - locators._widgetInDeployed(draggableWidgets.BUTTON), + it("3. In the published app with embed=true&navbar=true, navigator should be visible without user settings", function () { + cy.url().then((url) => { + url = new URL(url); + url.searchParams.append("embed", "true"); + url.searchParams.append("navbar", "true"); + agHelper.VisitNAssert(url.toString(), "getConsolidatedData"); + agHelper.AssertElementVisibility( + locators._widgetInDeployed(draggableWidgets.BUTTON), + ); + }); + agHelper.AssertElementVisibility(appNavigationLocators.header); + agHelper.AssertElementAbsence( + appNavigationLocators.userProfileDropdownButton, ); }); - agHelper.AssertElementVisibility(appNavigationLocators.header); - agHelper.AssertElementAbsence( - appNavigationLocators.userProfileDropdownButton, - ); - }); -}); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/OtherUIFeatures/Widget_Error_spec.js b/app/client/cypress/e2e/Regression/ClientSide/OtherUIFeatures/Widget_Error_spec.js index 2f35d8795cba..bfe9d67b984b 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/OtherUIFeatures/Widget_Error_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/OtherUIFeatures/Widget_Error_spec.js @@ -6,80 +6,89 @@ const widgetLocators = require("../../../../locators/Widgets.json"); import * as _ from "../../../../support/Objects/ObjectsCore"; import { WIDGET } from "../../../../locators/WidgetLocators"; -describe("Widget error state", { tags: ["@tag.Widget"] }, function () { - const modifierKey = Cypress.platform === "darwin" ? "meta" : "ctrl"; +describe( + "Widget error state", + { tags: ["@tag.Widget", "@tag.Binding"] }, + function () { + const modifierKey = Cypress.platform === "darwin" ? "meta" : "ctrl"; + + before(() => { + _.agHelper.AddDsl("buttondsl"); + }); + + it("1. Check widget error state", function () { + cy.openPropertyPane("buttonwidget"); + + cy.get(".t--property-control-visible").find(".t--js-toggle").click(); + cy.EnableAllCodeEditors(); + + cy.testJsontext("visible", "Test"); + + //Check if the current value is shown in the debugger + + _.debuggerHelper.OpenDebugger(); + cy.get("[data-testid=t--tab-ERROR_TAB]").click(); + //This feature is disabled in updated error log - epic 17720 + // _.debuggerHelper.LogStateContains("Test"); + }); + + it("2. Switch to error tab when clicked on the debug button", function () { + cy.get("[data-testid=t--tab-LOGS_TAB]").click(); + cy.get(".t--property-control-onclick").find(".t--js-toggle").click(); + cy.EnableAllCodeEditors(); + cy.testJsontext("onclick", "{{testApi.run()}}"); + cy.get(widgetLocators.buttonWidget).click(); + + cy.get(".t--toast-debug-button").click(); + cy.get("[data-testid='t--tab-ERROR_TAB']").should( + "have.attr", + "aria-selected", + "true", + ); + + // All errors should be expanded by default + //Updated count to 2 as the decision to show the widget trigger lint errors to show in the debugger + _.debuggerHelper.AssertVisibleErrorMessagesCount(2); + + // Recent errors are shown at the top of the list + cy.testJsontext("label", "{{[]}}"); + //This feature is disabled in updated error log - epic 17720 + // _.debuggerHelper.LogStateContains("text", 0); + }); - before(() => { - _.agHelper.AddDsl("buttondsl"); - }); - - it("1. Check widget error state", function () { - cy.openPropertyPane("buttonwidget"); - - cy.get(".t--property-control-visible").find(".t--js-toggle").click(); - cy.EnableAllCodeEditors(); - - cy.testJsontext("visible", "Test"); - - //Check if the current value is shown in the debugger - - _.debuggerHelper.OpenDebugger(); - cy.get("[data-testid=t--tab-ERROR]").click(); - //This feature is disabled in updated error log - epic 17720 - // _.debuggerHelper.LogStateContains("Test"); - }); - - it("2. Switch to error tab when clicked on the debug button", function () { - cy.get("[data-testid=t--tab-LOGS_TAB]").click(); - cy.get(".t--property-control-onclick").find(".t--js-toggle").click(); - cy.EnableAllCodeEditors(); - cy.testJsontext("onclick", "{{testApi.run()}}"); - cy.get(widgetLocators.buttonWidget).click(); - - cy.get(".t--toast-debug-button").click(); - cy.get("[data-testid='t--tab-ERROR']").should( - "have.attr", - "aria-selected", - "true", - ); - - // All errors should be expanded by default - //Updated count to 2 as the decision to show the widget trigger lint errors to show in the debugger - _.debuggerHelper.AssertVisibleErrorMessagesCount(2); - - // Recent errors are shown at the top of the list - cy.testJsontext("label", "{{[]}}"); //This feature is disabled in updated error log - epic 17720 - // _.debuggerHelper.LogStateContains("text", 0); - }); - - //This feature is disabled in updated error log - epic 17720 - // it("6. Clicking on a message should open the search menu", function() { - // _.debuggerHelper.ClickErrorMessage(0); - // _.debuggerHelper.AssertContextMenuItemVisible(); - // }); + // it("6. Clicking on a message should open the search menu", function() { + // _.debuggerHelper.ClickErrorMessage(0); + // _.debuggerHelper.AssertContextMenuItemVisible(); + // }); - it("3. Undoing widget deletion should show errors if present + Bug 2760", function () { - cy.deleteWidget(); - _.debuggerHelper.AssertVisibleErrorMessagesCount(0); - cy.get("body").type(`{${modifierKey}}z`); - _.debuggerHelper.AssertVisibleErrorMessagesCount(3); + it("3. Undoing widget deletion should show errors if present + Bug 2760", function () { + cy.deleteWidget(); + _.debuggerHelper.AssertVisibleErrorMessagesCount(0); + cy.get("body").type(`{${modifierKey}}z`); + _.debuggerHelper.AssertVisibleErrorMessagesCount(3); - //Bug-2760: Error log on a widget property not clearing out when the widget property is deleted - _.entityExplorer.DragDropWidgetNVerify(WIDGET.TABLE, 150, 300); + //Bug-2760: Error log on a widget property not clearing out when the widget property is deleted + _.entityExplorer.DragDropWidgetNVerify(WIDGET.TABLE, 150, 300); - EditorNavigation.SelectEntityByName("Table1", EntityType.Widget); + EditorNavigation.SelectEntityByName("Table1", EntityType.Widget); - _.table.AddSampleTableData(); + _.table.AddSampleTableData(); - _.table.AddColumn("customColumn1"); - _.propPane.OpenTableColumnSettings("customColumn1"); - _.propPane.UpdatePropertyFieldValue("Computed value", "{{test}}"); + _.table.AddColumn("customColumn1"); + _.propPane.OpenTableColumnSettings("customColumn1"); + _.propPane.UpdatePropertyFieldValue("Computed value", "{{test}}"); - _.debuggerHelper.AssertDebugError("test is not defined", "", false, false); + _.debuggerHelper.AssertDebugError( + "test is not defined", + "", + false, + false, + ); - _.table.DeleteColumn("customColumn1"); + _.table.DeleteColumn("customColumn1"); - _.debuggerHelper.DebuggerListDoesnotContain("test is not defined"); - }); -}); + _.debuggerHelper.DebuggerListDoesnotContain("test is not defined"); + }); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/PartialImportExport/PartialExport_Widgets_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/PartialImportExport/PartialExport_Widgets_spec.ts index e2926e346de2..fac384da89ec 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/PartialImportExport/PartialExport_Widgets_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/PartialImportExport/PartialExport_Widgets_spec.ts @@ -10,7 +10,7 @@ const fixtureName = "PartialImportExportSampleApp.json"; describe( "Partial export functionality", - { tags: ["@tag.ImportExport"] }, + { tags: ["@tag.ImportExport", "@tag.Git"] }, () => { before(() => { homePage.ImportApp(`PartialImportExport/${fixtureName}`); diff --git a/app/client/cypress/e2e/Regression/ClientSide/PartialImportExport/PartialExport_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/PartialImportExport/PartialExport_spec.ts index 0abc10bb2950..1a44872d2491 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/PartialImportExport/PartialExport_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/PartialImportExport/PartialExport_spec.ts @@ -9,7 +9,7 @@ const fixtureName = "PartialImportExportSampleApp.json"; describe( "Partial export functionality", - { tags: ["@tag.ImportExport"] }, + { tags: ["@tag.ImportExport", "@tag.Git"] }, () => { before(() => { agHelper.GenerateUUID(); diff --git a/app/client/cypress/e2e/Regression/ClientSide/PartialImportExport/PartialImport_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/PartialImportExport/PartialImport_spec.ts index df763dc68b4a..8bab0d96a520 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/PartialImportExport/PartialImport_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/PartialImportExport/PartialImport_spec.ts @@ -2,7 +2,7 @@ import { partialImportExport } from "../../../../support/Objects/ObjectsCore"; describe( "Partial import functionality", - { tags: ["@tag.ImportExport"] }, + { tags: ["@tag.ImportExport", "@tag.Git"] }, () => { beforeEach(() => { partialImportExport.OpenImportModal(); diff --git a/app/client/cypress/e2e/Regression/ClientSide/PeekOverlay/PeekOverlay_Spec.ts b/app/client/cypress/e2e/Regression/ClientSide/PeekOverlay/PeekOverlay_Spec.ts index 32b7f224dcd3..8208f09385a4 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/PeekOverlay/PeekOverlay_Spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/PeekOverlay/PeekOverlay_Spec.ts @@ -9,7 +9,7 @@ import { dataManager, } from "../../../../support/Objects/ObjectsCore"; -describe("Peek overlay", { tags: ["@tag.JS"] }, () => { +describe("Peek overlay", { tags: ["@tag.JS", "@tag.Binding"] }, () => { it("1. Main test", () => { entityExplorer.DragDropWidgetNVerify("tablewidgetv2", 500, 100); table.AddSampleTableData(); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Performance/LinkRelPreload_Spec.js b/app/client/cypress/e2e/Regression/ClientSide/Performance/LinkRelPreload_Spec.js index fef8d63271a3..27bcc72e937a 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Performance/LinkRelPreload_Spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Performance/LinkRelPreload_Spec.js @@ -30,7 +30,7 @@ import { AppSidebar } from "../../../../support/Pages/EditorNavigation"; describe( "html should include preload metadata for all code-split javascript", - { tags: ["@tag.IDE"] }, + { tags: ["@tag.IDE", "@tag.PropertyPane"] }, function () { before(() => { cy.addDsl(emptyDSL); @@ -112,7 +112,7 @@ function testPreloadMetadata(viewOrEditMode) { (link) => (window.CDN_URL ?? "/") + link, ); - const requestsToCompare = unique( + const allRequestsDuringPageLoad = unique( jsRequests.filter( (link) => // Exclude link bundle requests. We don’t really care about being precise @@ -120,7 +120,7 @@ function testPreloadMetadata(viewOrEditMode) { !link.includes("-icons."), ), ); - const linksToCompare = unique( + const preloadLinks = unique( links.filter( (link) => // Exclude link bundle preloads. We don’t really care about being precise @@ -132,16 +132,11 @@ function testPreloadMetadata(viewOrEditMode) { ), ); - const actuallyLoadedFiles = `[${ - requestsToCompare.length - } items] ${requestsToCompare.sort().join(", ")}`; - const preloadedFiles = `[${linksToCompare.length} items] ${linksToCompare - .sort() - .join(", ")}`; - - // Comparing strings instead of deep-equalling arrays because this is the only way - // to see which chunks are actually missing: https://github.com/cypress-io/cypress/issues/4084 - cy.wrap(actuallyLoadedFiles).should("equal", preloadedFiles); + // check if req + const isSubset = preloadLinks.every((item) => + allRequestsDuringPageLoad.includes(item), + ); + expect(isSubset).to.be.true; }); } diff --git a/app/client/cypress/e2e/Regression/ClientSide/PublishedApps/PublishedModeToastToggle_Spec.ts b/app/client/cypress/e2e/Regression/ClientSide/PublishedApps/PublishedModeToastToggle_Spec.ts index 512cb0bb3292..67c1ff0d9d78 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/PublishedApps/PublishedModeToastToggle_Spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/PublishedApps/PublishedModeToastToggle_Spec.ts @@ -11,7 +11,7 @@ const PAGE_LOAD_MSG = `The action "Incorrect_users" has failed.`; describe( "Published mode toggle toast with debug flag in the url", - { tags: ["@tag.JS"] }, + { tags: ["@tag.JS", "@tag.Binding"] }, function () { before(() => { _.agHelper.AddDsl("publishedModeToastToggleDsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Refactoring/Refactoring_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Refactoring/Refactoring_spec.ts index 29381ced5848..993d7649a4f1 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Refactoring/Refactoring_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Refactoring/Refactoring_spec.ts @@ -19,7 +19,7 @@ import EditorNavigation, { describe( "Validate JS Object Refactoring does not affect the comments & variables", - { tags: ["@tag.PropertyPane"] }, + { tags: ["@tag.PropertyPane", "@tag.Binding"] }, () => { let dsName: any; diff --git a/app/client/cypress/e2e/Regression/ClientSide/SetProperty/SetOptions_Spec.ts b/app/client/cypress/e2e/Regression/ClientSide/SetProperty/SetOptions_Spec.ts index ea42c3971091..e2760744b5e1 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/SetProperty/SetOptions_Spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/SetProperty/SetOptions_Spec.ts @@ -17,7 +17,7 @@ import EditorNavigation, { describe( "Widget Property Setters - Part III - Tc #2409 - Validates SetOptions", - { tags: ["@tag.Widget", "@tag.JS"] }, + { tags: ["@tag.Widget", "@tag.JS", "@tag.Binding"] }, () => { before(() => { entityExplorer.DragDropWidgetNVerify(draggableWidgets.INPUT_V2, 300); diff --git a/app/client/cypress/e2e/Regression/ClientSide/SetProperty/WidgetPropertySetters1_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/SetProperty/WidgetPropertySetters1_spec.ts index cacf76c350a7..a8c40048624f 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/SetProperty/WidgetPropertySetters1_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/SetProperty/WidgetPropertySetters1_spec.ts @@ -156,7 +156,7 @@ Object.values(setterMethodsToTest).forEach( describe( "Linting warning for setter methods", - { tags: ["@tag.Widget"] }, + { tags: ["@tag.Widget", "@tag.Binding"] }, function () { it("Lint error when setter is used in a data field", function () { entityExplorer.DragDropWidgetNVerify(WIDGET.BUTTON, 200, 200); diff --git a/app/client/cypress/e2e/Regression/ClientSide/SetProperty/WidgetPropertySetters2_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/SetProperty/WidgetPropertySetters2_spec.ts index 69fb9d670ce2..a89504d1794d 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/SetProperty/WidgetPropertySetters2_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/SetProperty/WidgetPropertySetters2_spec.ts @@ -17,7 +17,7 @@ import EditorNavigation, { describe( "Widget Property Setters - Part II - Tc #2409", - { tags: ["@tag.Widget", "@tag.JS"] }, + { tags: ["@tag.Widget", "@tag.JS", "@tag.Binding"] }, () => { it("1. Bug 25287 - CurrencyInput does not update value when set using CurrencyInput.text", () => { entityExplorer.DragDropWidgetNVerify(draggableWidgets.CURRENCY_INPUT); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Templates/CreateNewAppFromTemplates_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Templates/CreateNewAppFromTemplates_spec.ts index 291512d7c45c..77ddb00725b3 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Templates/CreateNewAppFromTemplates_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Templates/CreateNewAppFromTemplates_spec.ts @@ -14,6 +14,10 @@ describe( "@tag.Workspace", "@tag.Templates", "@tag.Sanity", + "@tag.Git", + "@tag.ImportExport", + "@tag.Fork", + "@tag.AccessControl", ], }, function () { diff --git a/app/client/cypress/e2e/Regression/ClientSide/Templates/Filtering/TemplatesModal_filtering_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Templates/Filtering/TemplatesModal_filtering_spec.ts index 1276999a927e..af8634765018 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Templates/Filtering/TemplatesModal_filtering_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Templates/Filtering/TemplatesModal_filtering_spec.ts @@ -8,7 +8,15 @@ import reconnectDatasourceLocators from "../../../../../locators/ReconnectLocato describe( "Bug 17276 - Templates modal filtering", - { tags: ["@tag.excludeForAirgap", "@tag.Templates"] }, + { + tags: [ + "@tag.excludeForAirgap", + "@tag.Templates", + "@tag.Git", + "@tag.ImportExport", + "@tag.Fork", + ], + }, () => { const NAME_FILTER = "order"; diff --git a/app/client/cypress/e2e/Regression/ClientSide/Templates/Fork_Template_Existing_app_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Templates/Fork_Template_Existing_app_spec.js index 7cc1d638ed58..1bc69d6f919b 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Templates/Fork_Template_Existing_app_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Templates/Fork_Template_Existing_app_spec.js @@ -23,7 +23,16 @@ beforeEach(() => { describe( "Fork a template to the current app from new page popover", - { tags: ["@tag.Templates", "@tag.excludeForAirgap", "@tag.Sanity"] }, + { + tags: [ + "@tag.Templates", + "@tag.excludeForAirgap", + "@tag.Sanity", + "@tag.Git", + "@tag.ImportExport", + "@tag.Fork", + ], + }, () => { it("1. Fork template from page section", () => { //Fork template button to be visible always diff --git a/app/client/cypress/e2e/Regression/ClientSide/Templates/Fork_Template_To_App_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Templates/Fork_Template_To_App_spec.ts index 46bd1a99a335..d023f346c1ad 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Templates/Fork_Template_To_App_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Templates/Fork_Template_To_App_spec.ts @@ -10,7 +10,15 @@ import PageList from "../../../../support/Pages/PageList"; describe( "Fork a template to the current app", - { tags: ["@tag.Templates", "@tag.excludeForAirgap"] }, + { + tags: [ + "@tag.Templates", + "@tag.excludeForAirgap", + "@tag.Git", + "@tag.ImportExport", + "@tag.Fork", + ], + }, () => { it("1. Fork a template to the current app + Bug 17477", () => { PageList.AddNewPage("Add page from template"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Templates/TemplatesPage_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Templates/TemplatesPage_spec.ts index 63fff9dfdc8f..1bd8e9054d2f 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Templates/TemplatesPage_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Templates/TemplatesPage_spec.ts @@ -3,7 +3,16 @@ import PageList from "../../../../support/Pages/PageList"; describe( "Templates page", - { tags: ["@tag.Templates", "@tag.excludeForAirgap", "@tag.Sanity"] }, + { + tags: [ + "@tag.Templates", + "@tag.excludeForAirgap", + "@tag.Sanity", + "@tag.Git", + "@tag.ImportExport", + "@tag.Fork", + ], + }, () => { it("1. Templates Modal should have show only 'allowPageImport:true' templates", () => { cy.fixture("Templates/AllowPageImportTemplates.json").then((data) => { diff --git a/app/client/cypress/e2e/Regression/ClientSide/ThemingTests/ThemeReset_spec.js b/app/client/cypress/e2e/Regression/ClientSide/ThemingTests/ThemeReset_spec.js index a72457484ac4..4182b5ca123a 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/ThemingTests/ThemeReset_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/ThemingTests/ThemeReset_spec.js @@ -4,42 +4,49 @@ import { ObjectsRegistry } from "../../../../support/Objects/Registry"; const appSettings = ObjectsRegistry.AppSettings; -describe("Theme validation usecases", { tags: ["@tag.Theme"] }, function () { - it("1. Drag and drop button widget, change value and check reset flow", function () { - // drop button widget - cy.dragAndDropToCanvas("buttonwidget", { x: 300, y: 300 }); - cy.get(".t--widget-buttonwidget").should("exist"); +describe( + "Theme validation usecases", + { tags: ["@tag.Theme", "@tag.Git"] }, + function () { + it("1. Drag and drop button widget, change value and check reset flow", function () { + // drop button widget + cy.dragAndDropToCanvas("buttonwidget", { x: 300, y: 300 }); + cy.get(".t--widget-buttonwidget").should("exist"); - // open property pane - cy.openPropertyPane("buttonwidget"); - cy.moveToStyleTab(); - // change color to red - cy.get(widgetsPage.buttonColor).click({ force: true }).clear().type("red"); + // open property pane + cy.openPropertyPane("buttonwidget"); + cy.moveToStyleTab(); + // change color to red + cy.get(widgetsPage.buttonColor) + .click({ force: true }) + .clear() + .type("red"); - // click on canvas to see the theming pane - cy.get("#canvas-selection-0").click({ force: true }); + // click on canvas to see the theming pane + cy.get("#canvas-selection-0").click({ force: true }); - appSettings.OpenAppSettings(); - appSettings.GoToThemeSettings(); - // reset theme - cy.contains("Theme properties") - .closest("div") - .siblings() - .first() - .find("button") - .click({ force: true }); - cy.contains("Reset widget styles").click({ force: true }); + appSettings.OpenAppSettings(); + appSettings.GoToThemeSettings(); + // reset theme + cy.contains("Theme properties") + .closest("div") + .siblings() + .first() + .find("button") + .click({ force: true }); + cy.contains("Reset widget styles").click({ force: true }); - cy.get(`${commonlocators.themeCard} > main > main`) - .first() - .invoke("css", "background-color") - .then((backgroudColor) => { - cy.get(widgetsPage.widgetBtn).should( - "have.css", - "background-color", - backgroudColor, - ); - }); - appSettings.ClosePane(); - }); -}); + cy.get(`${commonlocators.themeCard} > main > main`) + .first() + .invoke("css", "background-color") + .then((backgroudColor) => { + cy.get(widgetsPage.widgetBtn).should( + "have.css", + "background-color", + backgroudColor, + ); + }); + appSettings.ClosePane(); + }); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/ThemingTests/Theme_Basic_spec.js b/app/client/cypress/e2e/Regression/ClientSide/ThemingTests/Theme_Basic_spec.js index 0b23706fdc26..06b3bdf11d4f 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/ThemingTests/Theme_Basic_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/ThemingTests/Theme_Basic_spec.js @@ -15,766 +15,776 @@ import { const containerShadowElement = `${widgetsPage.containerWidget}`; -describe("App Theming funtionality", { tags: ["@tag.Theme"] }, function () { - let themesSection = (sectionName, themeName) => - "//*[text()='" + - sectionName + - "']/following-sibling::div//*[text()='" + - themeName + - "']"; - let applyTheme = (sectionName, themeName) => - themesSection(sectionName, themeName) + - "/parent::div/following-sibling::div[contains(@class, 't--theme-card')]//div[text()='Apply theme']"; - let themesDeletebtn = (sectionName, themeName) => - themesSection(sectionName, themeName) + "/following-sibling::button"; - - it("1. Checks if theme can be changed to one of the existing themes", function () { - appSettings.OpenAppSettings(); - appSettings.GoToThemeSettings(); - cy.get(commonlocators.changeThemeBtn).click({ force: true }); - agHelper.AssertAutoSave(); - // select a theme - cy.get(commonlocators.themeCard).last().click({ force: true }); - agHelper.AssertAutoSave(); - // check for alert - cy.get(`${commonlocators.themeCard}`) - .last() - .siblings("div") - .first() - .invoke("text") - .then((text) => { - cy.get(commonlocators.toastmsg).contains(`Theme ${text} applied`); - }); - - // check if color of canvas is same as theme bg color - cy.get(`${commonlocators.themeCard} > main`) - .last() - .invoke("css", "background-color") - .then((backgroudColor) => { - cy.get(commonlocators.canvas).should( - "have.css", - "background-color", - backgroudColor, - ); - }); - }); - - it("2. Checks if theme can be edited", function () { - cy.get(commonlocators.selectThemeBackBtn).click({ force: true }); - appSettings.ClosePane(); - - // drop a button & container widget and click on body - cy.dragAndDropToCanvas("buttonwidget", { x: 100, y: 100 }); - cy.dragAndDropToCanvas("containerwidget", { x: 200, y: 200 }); - cy.get("canvas").first(0).trigger("click", { force: true }); - - appSettings.OpenAppSettings(); - appSettings.GoToThemeSettings(); - - //Click the back button //Commenting below since expanded by default - //cy.get(commonlocators.selectThemeBackBtn).click({ force: true }); - - //Click the border radius toggle - // cy.contains("Border") - // .click({ force: true }) - // .wait(500); - - // change app border radius - cy.get(commonlocators.themeAppBorderRadiusBtn).eq(1).click({ force: true }); - agHelper.AssertAutoSave(); - // check if border radius is changed on button - cy.get(commonlocators.themeAppBorderRadiusBtn) - .eq(1) - .invoke("css", "border-top-left-radius") - .then((borderRadius) => { - cy.get(widgetsPage.widgetBtn).should( - "have.css", - "border-radius", - borderRadius, - ); - - // publish the app - // deployMode.DeployApp(); - cy.get(widgetsPage.widgetBtn).should( - "have.css", - "border-radius", - borderRadius, - ); - }); +describe( + "App Theming funtionality", + { tags: ["@tag.Theme", "@tag.Git"] }, + function () { + let themesSection = (sectionName, themeName) => + "//*[text()='" + + sectionName + + "']/following-sibling::div//*[text()='" + + themeName + + "']"; + let applyTheme = (sectionName, themeName) => + themesSection(sectionName, themeName) + + "/parent::div/following-sibling::div[contains(@class, 't--theme-card')]//div[text()='Apply theme']"; + let themesDeletebtn = (sectionName, themeName) => + themesSection(sectionName, themeName) + "/following-sibling::button"; + + it("1. Checks if theme can be changed to one of the existing themes", function () { + appSettings.OpenAppSettings(); + appSettings.GoToThemeSettings(); + cy.get(commonlocators.changeThemeBtn).click({ force: true }); + agHelper.AssertAutoSave(); + // select a theme + cy.get(commonlocators.themeCard).last().click({ force: true }); + agHelper.AssertAutoSave(); + // check for alert + cy.get(`${commonlocators.themeCard}`) + .last() + .siblings("div") + .first() + .invoke("text") + .then((text) => { + cy.get(commonlocators.toastmsg).contains(`Theme ${text} applied`); + }); - //Change the color://Commenting below since expanded by default - //cy.contains("Color").click({ force: true }); - - //Change the primary color: - cy.get(widgetsPage.colorPickerV2Popover).click({ force: true }).click(); - cy.get(widgetsPage.colorPickerV2Color) - .eq(-3) - .then(($elem) => { - cy.get($elem).click({ force: true }); - cy.get(widgetsPage.widgetBtn).should( - "have.css", - "background-color", - $elem.css("background-color"), - ); - }); + // check if color of canvas is same as theme bg color + cy.get(`${commonlocators.themeCard} > main`) + .last() + .invoke("css", "background-color") + .then((backgroudColor) => { + cy.get(commonlocators.canvas).should( + "have.css", + "background-color", + backgroudColor, + ); + }); + }); - //Change the background color: - //cy.get("[data-testid='theme-backgroundColor']").click({ force: true }); - agHelper.GetNClick("[data-testid='theme-backgroundColor']"); - agHelper.AssertAutoSave(); - - cy.get(widgetsPage.colorPickerV2Popover).click({ force: true }).click(); - cy.get(widgetsPage.colorPickerV2Color) - .first() - .then(($elem) => { - cy.get($elem).click({ force: true }); - cy.get(commonlocators.canvas).should( - "have.css", - "background-color", - $elem.css("background-color"), - ); - }); + it("2. Checks if theme can be edited", function () { + cy.get(commonlocators.selectThemeBackBtn).click({ force: true }); + appSettings.ClosePane(); + + // drop a button & container widget and click on body + cy.dragAndDropToCanvas("buttonwidget", { x: 100, y: 100 }); + cy.dragAndDropToCanvas("containerwidget", { x: 200, y: 200 }); + cy.get("canvas").first(0).trigger("click", { force: true }); + + appSettings.OpenAppSettings(); + appSettings.GoToThemeSettings(); + + //Click the back button //Commenting below since expanded by default + //cy.get(commonlocators.selectThemeBackBtn).click({ force: true }); + + //Click the border radius toggle + // cy.contains("Border") + // .click({ force: true }) + // .wait(500); + + // change app border radius + cy.get(commonlocators.themeAppBorderRadiusBtn) + .eq(1) + .click({ force: true }); + agHelper.AssertAutoSave(); + // check if border radius is changed on button + cy.get(commonlocators.themeAppBorderRadiusBtn) + .eq(1) + .invoke("css", "border-top-left-radius") + .then((borderRadius) => { + cy.get(widgetsPage.widgetBtn).should( + "have.css", + "border-radius", + borderRadius, + ); - // Change the shadow - cy.get("[data-value='M']").eq(1).click({ force: true }); - cy.get("[data-value='M']") - .eq(1) - .invoke("css", "box-shadow") - .then((boxShadow) => { - cy.get(containerShadowElement).should( - "have.css", - "box-shadow", - boxShadow, - ); - }); + // publish the app + // deployMode.DeployApp(); + cy.get(widgetsPage.widgetBtn).should( + "have.css", + "border-radius", + borderRadius, + ); + }); - //Change the font //Commenting below since expanded by default - //cy.contains("Font").click({ force: true }); + //Change the color://Commenting below since expanded by default + //cy.contains("Color").click({ force: true }); - agHelper.GetNClick(".rc-select-selection-search-input").then(($elem) => { - agHelper.GetNClick($elem); - cy.get(".rc-virtual-list-holder div") - .children() - .eq(2) - .then(($childElem) => { - cy.get($childElem).click({ force: true }); + //Change the primary color: + cy.get(widgetsPage.colorPickerV2Popover).click({ force: true }).click(); + cy.get(widgetsPage.colorPickerV2Color) + .eq(-3) + .then(($elem) => { + cy.get($elem).click({ force: true }); cy.get(widgetsPage.widgetBtn).should( "have.css", - "font-family", - `${$childElem.children().last().text()}"Nunito Sans", sans-serif`, + "background-color", + $elem.css("background-color"), ); }); - }); - }); - - it("4. Verify user able to change between saved theme & already existing Featured themes", () => { - cy.get(commonlocators.changeThemeBtn).click({ force: true }); - - //#region Pampas - cy.xpath(applyTheme("Featured themes", "Pampas")) - .click({ force: true }) - .wait(1000); //Changing to one of Featured themes - cy.contains("Applied theme") - .click() - .parent() - .siblings() - .find(".t--theme-card > main > section > div > main") - .eq(0) - .invoke("css", "background-color") - .then((backgroudColor) => { - expect(backgroudColor).to.eq("rgb(5, 150, 105)"); - }); - cy.contains("Applied theme") - // .click() - .parent() - .siblings() - .find(".t--theme-card > main > section > div > main") - .eq(1) - .invoke("css", "background-color") - .then((backgroudColor) => { - expect(backgroudColor).to.eq("rgb(236, 253, 245)"); - }); + //Change the background color: + //cy.get("[data-testid='theme-backgroundColor']").click({ force: true }); + agHelper.GetNClick("[data-testid='theme-backgroundColor']"); + agHelper.AssertAutoSave(); + + cy.get(widgetsPage.colorPickerV2Popover).click({ force: true }).click(); + cy.get(widgetsPage.colorPickerV2Color) + .first() + .then(($elem) => { + cy.get($elem).click({ force: true }); + cy.get(commonlocators.canvas).should( + "have.css", + "background-color", + $elem.css("background-color"), + ); + }); - //#endregion - - //#region Classic - cy.xpath(applyTheme("Featured themes", "Classic")) - .click({ force: true }) - .wait(1000); //Changing to one of Featured themes - cy.contains("Applied theme") - // .click() - .parent() - .siblings() - .find(".t--theme-card > main > section > div > main") - .eq(0) - .invoke("css", "background-color") - .then((backgroudColor) => { - expect(backgroudColor).to.eq("rgb(22, 163, 74)"); - }); + // Change the shadow + cy.get("[data-value='M']").eq(1).click({ force: true }); + cy.get("[data-value='M']") + .eq(1) + .invoke("css", "box-shadow") + .then((boxShadow) => { + cy.get(containerShadowElement).should( + "have.css", + "box-shadow", + boxShadow, + ); + }); - cy.contains("Applied theme") - // .click() - .parent() - .siblings() - .find(".t--theme-card > main > section > div > main") - .eq(1) - .invoke("css", "background-color") - .then((backgroudColor) => { - expect(backgroudColor).to.eq("rgb(246, 246, 246)"); + //Change the font //Commenting below since expanded by default + //cy.contains("Font").click({ force: true }); + + agHelper.GetNClick(".rc-select-selection-search-input").then(($elem) => { + agHelper.GetNClick($elem); + cy.get(".rc-virtual-list-holder div") + .children() + .eq(2) + .then(($childElem) => { + cy.get($childElem).click({ force: true }); + cy.get(widgetsPage.widgetBtn).should( + "have.css", + "font-family", + `${$childElem.children().last().text()}"Nunito Sans", sans-serif`, + ); + }); }); + }); - //#endregion - - //#region Modern - cy.xpath(applyTheme("Featured themes", "Modern")) - .click({ force: true }) - .wait(1000); //Changing to one of Featured themes - cy.contains("Applied theme") - // .click() - .parent() - .siblings() - .find(".t--theme-card > main > section > div > main") - .eq(0) - .invoke("css", "background-color") - .then((backgroudColor) => { - expect(backgroudColor).to.eq("rgb(85, 61, 233)"); - }); + it("4. Verify user able to change between saved theme & already existing Featured themes", () => { + cy.get(commonlocators.changeThemeBtn).click({ force: true }); + + //#region Pampas + cy.xpath(applyTheme("Featured themes", "Pampas")) + .click({ force: true }) + .wait(1000); //Changing to one of Featured themes + cy.contains("Applied theme") + .click() + .parent() + .siblings() + .find(".t--theme-card > main > section > div > main") + .eq(0) + .invoke("css", "background-color") + .then((backgroudColor) => { + expect(backgroudColor).to.eq("rgb(5, 150, 105)"); + }); - cy.contains("Applied theme") - // .click() - .parent() - .siblings() - .find(".t--theme-card > main > section > div > main") - .eq(1) - .invoke("css", "background-color") - .then((backgroudColor) => { - expect(backgroudColor).to.eq("rgb(248, 250, 252)"); - }); + cy.contains("Applied theme") + // .click() + .parent() + .siblings() + .find(".t--theme-card > main > section > div > main") + .eq(1) + .invoke("css", "background-color") + .then((backgroudColor) => { + expect(backgroudColor).to.eq("rgb(236, 253, 245)"); + }); - //#endregion - - //#region Sunrise - cy.xpath(applyTheme("Featured themes", "Sunrise")) - .click({ force: true }) - .wait(1000); //Changing to one of Featured themes - cy.contains("Applied theme") - // .click() - .parent() - .siblings() - .find(".t--theme-card > main > section > div > main") - .eq(0) - .invoke("css", "background-color") - .then((backgroudColor) => { - expect(backgroudColor).to.eq("rgb(239, 68, 68)"); - }); + //#endregion + + //#region Classic + cy.xpath(applyTheme("Featured themes", "Classic")) + .click({ force: true }) + .wait(1000); //Changing to one of Featured themes + cy.contains("Applied theme") + // .click() + .parent() + .siblings() + .find(".t--theme-card > main > section > div > main") + .eq(0) + .invoke("css", "background-color") + .then((backgroudColor) => { + expect(backgroudColor).to.eq("rgb(22, 163, 74)"); + }); - cy.contains("Applied theme") - // .click() - .parent() - .siblings() - .find(".t--theme-card > main > section > div > main") - .eq(1) - .invoke("css", "background-color") - .then((backgroudColor) => { - expect(backgroudColor).to.eq("rgb(255, 241, 242)"); - }); - //#endregion - - //#region Water Lily - cy.xpath(applyTheme("Featured themes", "Water Lily")) - .click({ force: true }) - .wait(1000); //Changing to one of Featured themes - cy.contains("Applied theme") - // .click() - .parent() - .siblings() - .find(".t--theme-card > main > section > div > main") - .eq(0) - .invoke("css", "background-color") - .then((backgroudColor) => { - expect(backgroudColor).to.eq("rgb(219, 39, 119)"); - }); + cy.contains("Applied theme") + // .click() + .parent() + .siblings() + .find(".t--theme-card > main > section > div > main") + .eq(1) + .invoke("css", "background-color") + .then((backgroudColor) => { + expect(backgroudColor).to.eq("rgb(246, 246, 246)"); + }); - cy.contains("Applied theme") - // .click() - .parent() - .siblings() - .find(".t--theme-card > main > section > div > main") - .eq(1) - .invoke("css", "background-color") - .then((backgroudColor) => { - expect(backgroudColor).to.eq("rgb(253, 242, 248)"); - }); - //#endregion - - //#region Pacific - cy.xpath(applyTheme("Featured themes", "Pacific")) - .click({ force: true }) - .wait(1000); //Changing to one of Featured themes - cy.contains("Applied theme") - // .click() - .parent() - .siblings() - .find(".t--theme-card > main > section > div > main") - .eq(0) - .invoke("css", "background-color") - .then((backgroudColor) => { - expect(backgroudColor).to.eq("rgb(8, 145, 178)"); - }); + //#endregion + + //#region Modern + cy.xpath(applyTheme("Featured themes", "Modern")) + .click({ force: true }) + .wait(1000); //Changing to one of Featured themes + cy.contains("Applied theme") + // .click() + .parent() + .siblings() + .find(".t--theme-card > main > section > div > main") + .eq(0) + .invoke("css", "background-color") + .then((backgroudColor) => { + expect(backgroudColor).to.eq("rgb(85, 61, 233)"); + }); - cy.contains("Applied theme") - // .click() - .parent() - .siblings() - .find(".t--theme-card > main > section > div > main") - .eq(1) - .invoke("css", "background-color") - .then((backgroudColor) => { - expect(backgroudColor).to.eq("rgb(236, 254, 255)"); - }); - //#endregion - - //#region Earth - cy.xpath(applyTheme("Featured themes", "Earth")) - .click({ force: true }) - .wait(1000); //Changing to one of Featured themes - cy.contains("Applied theme") - // .click() - .parent() - .siblings() - .find(".t--theme-card > main > section > div > main") - .eq(0) - .invoke("css", "background-color") - .then((backgroudColor) => { - expect(backgroudColor).to.eq("rgb(59, 130, 246)"); - }); + cy.contains("Applied theme") + // .click() + .parent() + .siblings() + .find(".t--theme-card > main > section > div > main") + .eq(1) + .invoke("css", "background-color") + .then((backgroudColor) => { + expect(backgroudColor).to.eq("rgb(248, 250, 252)"); + }); - cy.contains("Applied theme") - // .click() - .parent() - .siblings() - .find(".t--theme-card > main > section > div > main") - .eq(1) - .invoke("css", "background-color") - .then((backgroudColor) => { - expect(backgroudColor).to.eq("rgb(239, 246, 255)"); - }); - //#endregion - - //#region Moon - cy.xpath(applyTheme("Featured themes", "Moon")) - .click({ force: true }) - .wait(1000); //Changing to one of Featured themes - cy.contains("Applied theme") - // .click() - .parent() - .siblings() - .find(".t--theme-card > main > section > div > main") - .eq(0) - .invoke("css", "background-color") - .then((backgroudColor) => { - expect(backgroudColor).to.eq("rgb(100, 116, 139)"); - }); + //#endregion + + //#region Sunrise + cy.xpath(applyTheme("Featured themes", "Sunrise")) + .click({ force: true }) + .wait(1000); //Changing to one of Featured themes + cy.contains("Applied theme") + // .click() + .parent() + .siblings() + .find(".t--theme-card > main > section > div > main") + .eq(0) + .invoke("css", "background-color") + .then((backgroudColor) => { + expect(backgroudColor).to.eq("rgb(239, 68, 68)"); + }); - cy.contains("Applied theme") - // .click() - .parent() - .siblings() - .find(".t--theme-card > main > section > div > main") - .eq(1) - .invoke("css", "background-color") - .then((backgroudColor) => { - expect(backgroudColor).to.eq("rgb(248, 250, 252)"); - }); - //#endregion - }); - - it("5. Verify widgets conform to the selected theme in Publish mode", () => { - deployMode.DeployApp(); - - //cy.wait(4000); //for theme to settle - - cy.get("body").should( - "have.css", - "font-family", - `"Nunito Sans", sans-serif`, - ); //Font - - cy.xpath("//div[@id='root']//section/parent::div").should( - "have.css", - "background-color", - "rgb(248, 250, 252)", - ); //Background Color - cy.get(widgetsPage.widgetBtn).should( - "have.css", - "background-color", - "rgb(100, 116, 139)", - ); //Widget Color - - cy.get(widgetsPage.widgetBtn).should("have.css", "border-radius", "0px"); //Border Radius - - cy.get(widgetsPage.widgetBtn).should("have.css", "box-shadow", "none"); //Shadow - - deployMode.NavigateBacktoEditor(); - }); - - it("6. Verify Adding new Individual widgets & it can change Color, Border radius, Shadow & can revert [Color/Border Radius] to already selected theme", () => { - cy.dragAndDropToCanvas("buttonwidget", { x: 200, y: 400 }); //another button widget - cy.moveToStyleTab(); - //Change Color & verify - cy.get(widgetsPage.colorPickerV2Popover).click({ force: true }).click(); - cy.get(widgetsPage.colorPickerV2TailwindColor) - .eq(33) - .then(($elem) => { - cy.get($elem).click({ force: true }); - cy.get(".t--widget-button2 button").should( - "have.css", - "background-color", - $elem.css("background-color"), //rgb(134, 239, 172) - ); //new widget with its own color - - cy.get(".t--widget-button1 button").should( - "have.css", - "background-color", - "rgb(100, 116, 139)", - ); //old widgets still conforming to theme color - }); + cy.contains("Applied theme") + // .click() + .parent() + .siblings() + .find(".t--theme-card > main > section > div > main") + .eq(1) + .invoke("css", "background-color") + .then((backgroudColor) => { + expect(backgroudColor).to.eq("rgb(255, 241, 242)"); + }); + //#endregion + + //#region Water Lily + cy.xpath(applyTheme("Featured themes", "Water Lily")) + .click({ force: true }) + .wait(1000); //Changing to one of Featured themes + cy.contains("Applied theme") + // .click() + .parent() + .siblings() + .find(".t--theme-card > main > section > div > main") + .eq(0) + .invoke("css", "background-color") + .then((backgroudColor) => { + expect(backgroudColor).to.eq("rgb(219, 39, 119)"); + }); - //Change Border & verify - - cy.get(".border-t-2").eq(0).click(); - cy.get(".border-t-2") - .eq(0) - .invoke("css", "border-top-left-radius") - .then((borderRadius) => { - cy.get(".t--widget-button2 button").should( - "have.css", - "border-radius", - borderRadius, //0px - ); - cy.get(".t--widget-button1 button").should( - "have.css", - "border-radius", - "0px", - ); - }); + cy.contains("Applied theme") + // .click() + .parent() + .siblings() + .find(".t--theme-card > main > section > div > main") + .eq(1) + .invoke("css", "background-color") + .then((backgroudColor) => { + expect(backgroudColor).to.eq("rgb(253, 242, 248)"); + }); + //#endregion + + //#region Pacific + cy.xpath(applyTheme("Featured themes", "Pacific")) + .click({ force: true }) + .wait(1000); //Changing to one of Featured themes + cy.contains("Applied theme") + // .click() + .parent() + .siblings() + .find(".t--theme-card > main > section > div > main") + .eq(0) + .invoke("css", "background-color") + .then((backgroudColor) => { + expect(backgroudColor).to.eq("rgb(8, 145, 178)"); + }); - //Change Shadow & verify - cy.contains(".ads-v2-segmented-control-value-0", "Large").click(); - - cy.get(".t--widget-button1 button").should( - "have.css", - "box-shadow", - "none", - ); - - agHelper.AssertAutoSave(); - deployMode.DeployApp(); - - //Verify Background color - cy.get(".t--widget-button2 button").should( - "have.css", - "background-color", - "rgb(190, 24, 93)", - ); //new widget with its own color - - ////old widgets still conforming to theme color - cy.get(".t--widget-button1 button").should( - "have.css", - "background-color", - "rgb(100, 116, 139)", - ); - - //Verify Border radius - cy.get(".t--widget-button2 button").should( - "have.css", - "border-radius", - "0px", - ); - cy.get(".t--widget-button1 button").should( - "have.css", - "border-radius", - "0px", - ); - - //Verify Box shadow - cy.get(".t--widget-button2 button").should( - "have.css", - "box-shadow", - "rgba(0, 0, 0, 0.1) 0px 10px 15px -3px, rgba(0, 0, 0, 0.05) 0px 4px 6px -2px", - ); - cy.get(".t--widget-button1 button").should( - "have.css", - "box-shadow", - "none", - ); - - deployMode.NavigateBacktoEditor(); - //Resetting back to theme - EditorNavigation.SelectEntityByName("Button2", EntityType.Widget); - cy.moveToStyleTab(); - cy.get(".t--property-control-buttoncolor .reset-button").then(($elem) => { - $elem[0].removeAttribute("display: none"); - $elem[0].click(); - }); + cy.contains("Applied theme") + // .click() + .parent() + .siblings() + .find(".t--theme-card > main > section > div > main") + .eq(1) + .invoke("css", "background-color") + .then((backgroudColor) => { + expect(backgroudColor).to.eq("rgb(236, 254, 255)"); + }); + //#endregion + + //#region Earth + cy.xpath(applyTheme("Featured themes", "Earth")) + .click({ force: true }) + .wait(1000); //Changing to one of Featured themes + cy.contains("Applied theme") + // .click() + .parent() + .siblings() + .find(".t--theme-card > main > section > div > main") + .eq(0) + .invoke("css", "background-color") + .then((backgroudColor) => { + expect(backgroudColor).to.eq("rgb(59, 130, 246)"); + }); - cy.get(".t--widget-button2 button").should( - "have.css", - "background-color", - "rgb(100, 116, 139)", - ); //verify widget reverted to theme color - cy.get(".t--property-control-borderradius .reset-button").then(($elem) => { - $elem[0].removeAttribute("display: none"); - $elem[0].click(); + cy.contains("Applied theme") + // .click() + .parent() + .siblings() + .find(".t--theme-card > main > section > div > main") + .eq(1) + .invoke("css", "background-color") + .then((backgroudColor) => { + expect(backgroudColor).to.eq("rgb(239, 246, 255)"); + }); + //#endregion + + //#region Moon + cy.xpath(applyTheme("Featured themes", "Moon")) + .click({ force: true }) + .wait(1000); //Changing to one of Featured themes + cy.contains("Applied theme") + // .click() + .parent() + .siblings() + .find(".t--theme-card > main > section > div > main") + .eq(0) + .invoke("css", "background-color") + .then((backgroudColor) => { + expect(backgroudColor).to.eq("rgb(100, 116, 139)"); + }); + + cy.contains("Applied theme") + // .click() + .parent() + .siblings() + .find(".t--theme-card > main > section > div > main") + .eq(1) + .invoke("css", "background-color") + .then((backgroudColor) => { + expect(backgroudColor).to.eq("rgb(248, 250, 252)"); + }); + //#endregion }); - cy.get(".t--widget-button2 button").should( - "have.css", - "border-radius", - "0px", - ); - - //the new widget with reverted styles also conforming to theme - deployMode.DeployApp(); - - cy.wait(4000); //for theme to settle - cy.get("body").should( - "have.css", - "font-family", - `"Nunito Sans", sans-serif`, - ); //Font - - cy.xpath("//div[@id='root']//section/parent::div").should( - "have.css", - "background-color", - "rgb(248, 250, 252)", - ); //Background Color - cy.get(".t--widget-button1 button").should( - "have.css", - "background-color", - "rgb(100, 116, 139)", - ); //Widget Color - cy.get("body").then(($ele) => { - if ($ele.find(widgetsPage.widgetBtn).length <= 1) { - cy.reload(); - cy.wait(4000); - } + + it("5. Verify widgets conform to the selected theme in Publish mode", () => { + deployMode.DeployApp(); + + //cy.wait(4000); //for theme to settle + + cy.get("body").should( + "have.css", + "font-family", + `"Nunito Sans", sans-serif`, + ); //Font + + cy.xpath("//div[@id='root']//section/parent::div").should( + "have.css", + "background-color", + "rgb(248, 250, 252)", + ); //Background Color + cy.get(widgetsPage.widgetBtn).should( + "have.css", + "background-color", + "rgb(100, 116, 139)", + ); //Widget Color + + cy.get(widgetsPage.widgetBtn).should("have.css", "border-radius", "0px"); //Border Radius + + cy.get(widgetsPage.widgetBtn).should("have.css", "box-shadow", "none"); //Shadow + + deployMode.NavigateBacktoEditor(); }); - cy.get(".t--widget-button2 button").should( - "have.css", - "background-color", - "rgb(100, 116, 139)", - ); //Widget Color - - cy.get(".t--widget-button1 button").should( - "have.css", - "border-radius", - "0px", - ); //Border Radius - cy.get(".t--widget-button2 button").should( - "have.css", - "border-radius", - "0px", - ); //Border Radius - - cy.get(".t--widget-button1 button").should( - "have.css", - "box-shadow", - "none", - ); //Shadow - cy.get(".t--widget-button2 button").should( - "have.css", - "box-shadow", - "rgba(0, 0, 0, 0.1) 0px 10px 15px -3px, rgba(0, 0, 0, 0.05) 0px 4px 6px -2px", - ); //Since Shadow revert option does not exixts - deployMode.NavigateBacktoEditor(); - }); - - it("7. Verify Chainging theme should not affect Individual widgets with changed Color, Border radius, Shadow & can revert to newly selected theme", () => { - cy.get("canvas").first(0).trigger("click", { force: true }); - - appSettings.OpenAppSettings(); - appSettings.GoToThemeSettings(); - - cy.get(commonlocators.changeThemeBtn).click({ force: true }); - - //Changing to one of Featured themes & then changing individual widget properties - cy.xpath(applyTheme("Featured themes", "Sunrise")) - .click({ force: true }) - .wait(2000); - - //Change individual widget properties for Button1 - EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); - cy.moveToStyleTab(); - - //Change Color & verify - cy.get(widgetsPage.colorPickerV2Popover).click({ force: true }).click(); - cy.get(widgetsPage.colorPickerV2TailwindColor) - .eq(13) - .then(($elem) => { - cy.get($elem).click({ force: true }); - cy.get(".t--widget-button1 button").should( - "have.css", - "background-color", - $elem.css("background-color"), - ); //new widget with its own color - - cy.get(".t--widget-button2 button").should( - "have.css", - "background-color", - "rgb(239, 68, 68)", - ); //old widgets still conforming to theme color - }); - //Change Border & verify - - cy.get(".border-t-2").eq(1).click().wait(500); - cy.get(".border-t-2") - .eq(1) - .invoke("css", "border-top-left-radius") - .then((borderRadius) => { - cy.get(".t--widget-button1 button").should( - "have.css", - "border-radius", - borderRadius, //6px - ); - - cy.get(".t--widget-button2 button").should( - "have.css", - "border-radius", - "24px", - ); + it("6. Verify Adding new Individual widgets & it can change Color, Border radius, Shadow & can revert [Color/Border Radius] to already selected theme", () => { + cy.dragAndDropToCanvas("buttonwidget", { x: 200, y: 400 }); //another button widget + cy.moveToStyleTab(); + //Change Color & verify + cy.get(widgetsPage.colorPickerV2Popover).click({ force: true }).click(); + cy.get(widgetsPage.colorPickerV2TailwindColor) + .eq(33) + .then(($elem) => { + cy.get($elem).click({ force: true }); + cy.get(".t--widget-button2 button").should( + "have.css", + "background-color", + $elem.css("background-color"), //rgb(134, 239, 172) + ); //new widget with its own color + + cy.get(".t--widget-button1 button").should( + "have.css", + "background-color", + "rgb(100, 116, 139)", + ); //old widgets still conforming to theme color + }); + + //Change Border & verify + + cy.get(".border-t-2").eq(0).click(); + cy.get(".border-t-2") + .eq(0) + .invoke("css", "border-top-left-radius") + .then((borderRadius) => { + cy.get(".t--widget-button2 button").should( + "have.css", + "border-radius", + borderRadius, //0px + ); + cy.get(".t--widget-button1 button").should( + "have.css", + "border-radius", + "0px", + ); + }); + + //Change Shadow & verify + cy.contains(".ads-v2-segmented-control-value-0", "Large").click(); + + cy.get(".t--widget-button1 button").should( + "have.css", + "box-shadow", + "none", + ); + + agHelper.AssertAutoSave(); + deployMode.DeployApp(); + + //Verify Background color + cy.get(".t--widget-button2 button").should( + "have.css", + "background-color", + "rgb(190, 24, 93)", + ); //new widget with its own color + + ////old widgets still conforming to theme color + cy.get(".t--widget-button1 button").should( + "have.css", + "background-color", + "rgb(100, 116, 139)", + ); + + //Verify Border radius + cy.get(".t--widget-button2 button").should( + "have.css", + "border-radius", + "0px", + ); + cy.get(".t--widget-button1 button").should( + "have.css", + "border-radius", + "0px", + ); + + //Verify Box shadow + cy.get(".t--widget-button2 button").should( + "have.css", + "box-shadow", + "rgba(0, 0, 0, 0.1) 0px 10px 15px -3px, rgba(0, 0, 0, 0.05) 0px 4px 6px -2px", + ); + cy.get(".t--widget-button1 button").should( + "have.css", + "box-shadow", + "none", + ); + + deployMode.NavigateBacktoEditor(); + //Resetting back to theme + EditorNavigation.SelectEntityByName("Button2", EntityType.Widget); + cy.moveToStyleTab(); + cy.get(".t--property-control-buttoncolor .reset-button").then(($elem) => { + $elem[0].removeAttribute("display: none"); + $elem[0].click(); }); - //Change Shadow & verify - cy.contains(".ads-v2-segmented-control-value-0", "Small").click(); - cy.get(".t--widget-button2 button").should( - "have.css", - "box-shadow", - //same value as previous box shadow selection - //since revertion is not possible for box shadow - hence this widget maintains the same value - "rgba(0, 0, 0, 0.1) 0px 10px 15px -3px, rgba(0, 0, 0, 0.05) 0px 4px 6px -2px", - ); - - agHelper.AssertAutoSave(); - - //Add deploy mode verification here also! - deployMode.DeployApp(); - - //Verify Background color - cy.get(".t--widget-button1 button").should( - "have.css", - "background-color", - "rgb(161, 98, 7)", - ); //new widget with its own color - - ////old widgets still conforming to theme color - cy.get(".t--widget-button2 button").should( - "have.css", - "background-color", - "rgb(239, 68, 68)", - ); - - //Verify Border radius - cy.get(".t--widget-button1 button").should( - "have.css", - "border-radius", - "6px", - ); - cy.get(".t--widget-button2 button").should( - "have.css", - "border-radius", - "24px", - ); - - //Verify Box shadow - cy.get(".t--widget-button1 button").should( - "have.css", - "box-shadow", - "rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.06) 0px 1px 2px 0px", - ); - cy.get(".t--widget-button2 button").should( - "have.css", - "box-shadow", - "rgba(0, 0, 0, 0.1) 0px 10px 15px -3px, rgba(0, 0, 0, 0.05) 0px 4px 6px -2px", - ); - - deployMode.NavigateBacktoEditor(); - //Resetting back to theme - EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); - cy.moveToStyleTab(); - cy.get(".t--property-control-buttoncolor .reset-button").then(($elem) => { - $elem[0].removeAttribute("display: none"); - $elem[0].click(); + cy.get(".t--widget-button2 button").should( + "have.css", + "background-color", + "rgb(100, 116, 139)", + ); //verify widget reverted to theme color + cy.get(".t--property-control-borderradius .reset-button").then( + ($elem) => { + $elem[0].removeAttribute("display: none"); + $elem[0].click(); + }, + ); + cy.get(".t--widget-button2 button").should( + "have.css", + "border-radius", + "0px", + ); + + //the new widget with reverted styles also conforming to theme + deployMode.DeployApp(); + + cy.wait(4000); //for theme to settle + cy.get("body").should( + "have.css", + "font-family", + `"Nunito Sans", sans-serif`, + ); //Font + + cy.xpath("//div[@id='root']//section/parent::div").should( + "have.css", + "background-color", + "rgb(248, 250, 252)", + ); //Background Color + cy.get(".t--widget-button1 button").should( + "have.css", + "background-color", + "rgb(100, 116, 139)", + ); //Widget Color + cy.get("body").then(($ele) => { + if ($ele.find(widgetsPage.widgetBtn).length <= 1) { + cy.reload(); + cy.wait(4000); + } + }); + cy.get(".t--widget-button2 button").should( + "have.css", + "background-color", + "rgb(100, 116, 139)", + ); //Widget Color + + cy.get(".t--widget-button1 button").should( + "have.css", + "border-radius", + "0px", + ); //Border Radius + cy.get(".t--widget-button2 button").should( + "have.css", + "border-radius", + "0px", + ); //Border Radius + + cy.get(".t--widget-button1 button").should( + "have.css", + "box-shadow", + "none", + ); //Shadow + cy.get(".t--widget-button2 button").should( + "have.css", + "box-shadow", + "rgba(0, 0, 0, 0.1) 0px 10px 15px -3px, rgba(0, 0, 0, 0.05) 0px 4px 6px -2px", + ); //Since Shadow revert option does not exixts + deployMode.NavigateBacktoEditor(); }); - cy.get(".t--widget-button1 button").should( - "have.css", - "background-color", - "rgb(239, 68, 68)", - ); //verify widget reverted to theme color + it("7. Verify Chainging theme should not affect Individual widgets with changed Color, Border radius, Shadow & can revert to newly selected theme", () => { + cy.get("canvas").first(0).trigger("click", { force: true }); - cy.get(".t--property-control-borderradius .reset-button").then(($elem) => { - $elem[0].removeAttribute("display: none"); - $elem[0].click(); - }); - cy.get(".t--widget-button1 button").should( - "have.css", - "border-radius", - "24px", - ); - - //the new widget with reverted styles also conforming to theme - deployMode.DeployApp(); - - cy.wait(4000); //for theme to settle - cy.get("body").should("have.css", "font-family", "Rubik, sans-serif"); //Font for Rounded theme - - cy.xpath("//div[@id='root']//section/parent::div").should( - "have.css", - "background-color", - "rgb(255, 241, 242)", - ); //Background Color of canvas - - cy.get(".t--widget-button1 button").should( - "have.css", - "background-color", - "rgb(239, 68, 68)", - ); //Widget Color - cy.get("body").then(($ele) => { - if ($ele.find(widgetsPage.widgetBtn).length <= 1) { - cy.reload(); - cy.wait(4000); - } + appSettings.OpenAppSettings(); + appSettings.GoToThemeSettings(); + + cy.get(commonlocators.changeThemeBtn).click({ force: true }); + + //Changing to one of Featured themes & then changing individual widget properties + cy.xpath(applyTheme("Featured themes", "Sunrise")) + .click({ force: true }) + .wait(2000); + + //Change individual widget properties for Button1 + EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); + cy.moveToStyleTab(); + + //Change Color & verify + cy.get(widgetsPage.colorPickerV2Popover).click({ force: true }).click(); + cy.get(widgetsPage.colorPickerV2TailwindColor) + .eq(13) + .then(($elem) => { + cy.get($elem).click({ force: true }); + cy.get(".t--widget-button1 button").should( + "have.css", + "background-color", + $elem.css("background-color"), + ); //new widget with its own color + + cy.get(".t--widget-button2 button").should( + "have.css", + "background-color", + "rgb(239, 68, 68)", + ); //old widgets still conforming to theme color + }); + + //Change Border & verify + + cy.get(".border-t-2").eq(1).click().wait(500); + cy.get(".border-t-2") + .eq(1) + .invoke("css", "border-top-left-radius") + .then((borderRadius) => { + cy.get(".t--widget-button1 button").should( + "have.css", + "border-radius", + borderRadius, //6px + ); + + cy.get(".t--widget-button2 button").should( + "have.css", + "border-radius", + "24px", + ); + }); + + //Change Shadow & verify + cy.contains(".ads-v2-segmented-control-value-0", "Small").click(); + cy.get(".t--widget-button2 button").should( + "have.css", + "box-shadow", + //same value as previous box shadow selection + //since revertion is not possible for box shadow - hence this widget maintains the same value + "rgba(0, 0, 0, 0.1) 0px 10px 15px -3px, rgba(0, 0, 0, 0.05) 0px 4px 6px -2px", + ); + + agHelper.AssertAutoSave(); + + //Add deploy mode verification here also! + deployMode.DeployApp(); + + //Verify Background color + cy.get(".t--widget-button1 button").should( + "have.css", + "background-color", + "rgb(161, 98, 7)", + ); //new widget with its own color + + ////old widgets still conforming to theme color + cy.get(".t--widget-button2 button").should( + "have.css", + "background-color", + "rgb(239, 68, 68)", + ); + + //Verify Border radius + cy.get(".t--widget-button1 button").should( + "have.css", + "border-radius", + "6px", + ); + cy.get(".t--widget-button2 button").should( + "have.css", + "border-radius", + "24px", + ); + + //Verify Box shadow + cy.get(".t--widget-button1 button").should( + "have.css", + "box-shadow", + "rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.06) 0px 1px 2px 0px", + ); + cy.get(".t--widget-button2 button").should( + "have.css", + "box-shadow", + "rgba(0, 0, 0, 0.1) 0px 10px 15px -3px, rgba(0, 0, 0, 0.05) 0px 4px 6px -2px", + ); + + deployMode.NavigateBacktoEditor(); + //Resetting back to theme + EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); + cy.moveToStyleTab(); + cy.get(".t--property-control-buttoncolor .reset-button").then(($elem) => { + $elem[0].removeAttribute("display: none"); + $elem[0].click(); + }); + + cy.get(".t--widget-button1 button").should( + "have.css", + "background-color", + "rgb(239, 68, 68)", + ); //verify widget reverted to theme color + + cy.get(".t--property-control-borderradius .reset-button").then( + ($elem) => { + $elem[0].removeAttribute("display: none"); + $elem[0].click(); + }, + ); + cy.get(".t--widget-button1 button").should( + "have.css", + "border-radius", + "24px", + ); + + //the new widget with reverted styles also conforming to theme + deployMode.DeployApp(); + + cy.wait(4000); //for theme to settle + cy.get("body").should("have.css", "font-family", "Rubik, sans-serif"); //Font for Rounded theme + + cy.xpath("//div[@id='root']//section/parent::div").should( + "have.css", + "background-color", + "rgb(255, 241, 242)", + ); //Background Color of canvas + + cy.get(".t--widget-button1 button").should( + "have.css", + "background-color", + "rgb(239, 68, 68)", + ); //Widget Color + cy.get("body").then(($ele) => { + if ($ele.find(widgetsPage.widgetBtn).length <= 1) { + cy.reload(); + cy.wait(4000); + } + }); + cy.get(".t--widget-button2 button").should( + "have.css", + "background-color", + "rgb(239, 68, 68)", + ); //Widget Color + + cy.get(".t--widget-button1 button").should( + "have.css", + "border-radius", + "24px", + ); //Border Radius + cy.get(".t--widget-button2 button").should( + "have.css", + "border-radius", + "24px", + ); //Border Radius + + cy.get(".t--widget-button1 button").should( + "have.css", + "box-shadow", + "rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.06) 0px 1px 2px 0px", + ); //Shadow + cy.get(".t--widget-button2 button").should( + "have.css", + "box-shadow", + "rgba(0, 0, 0, 0.1) 0px 10px 15px -3px, rgba(0, 0, 0, 0.05) 0px 4px 6px -2px", + ); //Since Shadow revert option does not exixts + + deployMode.NavigateBacktoEditor(); }); - cy.get(".t--widget-button2 button").should( - "have.css", - "background-color", - "rgb(239, 68, 68)", - ); //Widget Color - - cy.get(".t--widget-button1 button").should( - "have.css", - "border-radius", - "24px", - ); //Border Radius - cy.get(".t--widget-button2 button").should( - "have.css", - "border-radius", - "24px", - ); //Border Radius - - cy.get(".t--widget-button1 button").should( - "have.css", - "box-shadow", - "rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.06) 0px 1px 2px 0px", - ); //Shadow - cy.get(".t--widget-button2 button").should( - "have.css", - "box-shadow", - "rgba(0, 0, 0, 0.1) 0px 10px 15px -3px, rgba(0, 0, 0, 0.05) 0px 4px 6px -2px", - ); //Since Shadow revert option does not exixts - - deployMode.NavigateBacktoEditor(); - }); -}); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/ThemingTests/Theme_FormWidget_spec.js b/app/client/cypress/e2e/Regression/ClientSide/ThemingTests/Theme_FormWidget_spec.js index 8761ba5c3c5e..1ca6afa882f6 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/ThemingTests/Theme_FormWidget_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/ThemingTests/Theme_FormWidget_spec.js @@ -20,225 +20,237 @@ const themelocator = require("../../../../locators/ThemeLocators.json"); let themeBackgroudColor; let themeFont; -describe("Theme validation usecases", { tags: ["@tag.Theme"] }, function () { - it("1. Drag and drop form widget and validate Default font and list of font validation", function () { - entityExplorer.DragDropWidgetNVerify(draggableWidgets.FORM); - agHelper.GetNClick(locators._canvas); - appSettings.OpenAppSettings(); - appSettings.GoToThemeSettings(); - //Border validation - //cy.contains("Border").click({ force: true }); - cy.get(themelocator.border).should("have.length", "3"); - cy.borderMouseover(0, "none"); - cy.borderMouseover(1, "M"); - cy.borderMouseover(2, "L"); - cy.get(themelocator.border).eq(2).click({ force: true }); - cy.wait("@updateTheme").should( - "have.nested.property", - "response.body.responseMeta.status", - 200, - ); - cy.wait(2000); - cy.contains("Border").click({ force: true }); - - //Shadow validation - //cy.contains("Shadow").click({ force: true }); - cy.xpath(theme.locators._boxShadow("L")).click({ force: true }); - cy.wait("@updateTheme").should( - "have.nested.property", - "response.body.responseMeta.status", - 200, - ); - cy.wait(2000); - cy.contains("Shadow").click({ force: true }); - - //Font - cy.xpath( - "//p[text()='App font']/following-sibling::section//div//input", - ).then(($elem) => { - cy.get($elem).click({ force: true }); - cy.wait(250); - cy.fixture("fontData").then(function (testdata) { - this.testdata = testdata; +describe( + "Theme validation usecases", + { tags: ["@tag.Theme", "@tag.Git"] }, + function () { + it("1. Drag and drop form widget and validate Default font and list of font validation", function () { + entityExplorer.DragDropWidgetNVerify(draggableWidgets.FORM); + agHelper.GetNClick(locators._canvas); + appSettings.OpenAppSettings(); + appSettings.GoToThemeSettings(); + //Border validation + //cy.contains("Border").click({ force: true }); + cy.get(themelocator.border).should("have.length", "3"); + cy.borderMouseover(0, "none"); + cy.borderMouseover(1, "M"); + cy.borderMouseover(2, "L"); + cy.get(themelocator.border).eq(2).click({ force: true }); + cy.wait("@updateTheme").should( + "have.nested.property", + "response.body.responseMeta.status", + 200, + ); + cy.wait(2000); + cy.contains("Border").click({ force: true }); + + //Shadow validation + //cy.contains("Shadow").click({ force: true }); + cy.xpath(theme.locators._boxShadow("L")).click({ force: true }); + cy.wait("@updateTheme").should( + "have.nested.property", + "response.body.responseMeta.status", + 200, + ); + cy.wait(2000); + cy.contains("Shadow").click({ force: true }); + + //Font + cy.xpath( + "//p[text()='App font']/following-sibling::section//div//input", + ).then(($elem) => { + cy.get($elem).click({ force: true }); + cy.wait(250); + cy.fixture("fontData").then(function (testdata) { + this.testdata = testdata; + }); + + cy.get(themelocator.fontsSelected) + //.eq(10) + .should("contain.text", "Nunito Sans"); + + cy.get(".rc-virtual-list .rc-select-item-option") + .find(".leading-normal") + .eq(2) + .then(($childElem) => { + cy.get($childElem).click({ force: true }); + cy.get(".t--draggable-buttonwidget button :contains('Sub')").should( + "have.css", + "font-family", + `Poppins, sans-serif`, + ); + //themeFont = `${$childElem.children().last().text()}, sans-serif`; + themeFont = `Poppins, sans-serif`; + + cy.contains("Font").click({ force: true }); + + //Color + //cy.contains("Color").click({ force: true }); + cy.wait(2000); + cy.colorMouseover(0, "Primary color"); + cy.validateColor("Primary", "#553DE9"); + cy.colorMouseover(1, "Background color"); + cy.validateColor("Background", "#F8FAFC"); + + cy.get(themelocator.inputColor).click({ force: true }); + cy.chooseColor(0, themelocator.greenColor); + + cy.get(themelocator.inputColor).should("have.value", "#15803d"); + cy.get(themelocator.inputColor).clear({ force: true }); + cy.wait(2000); + theme.ChangeThemeColor(16, "Background"); + cy.get(themelocator.inputColor).should("have.value", "#86efac"); //Red + cy.wait(2000); + + cy.get(themelocator.inputColor).eq(0).click({ force: true }); + cy.get(themelocator.inputColor).click({ force: true }); + cy.get('[data-testid="color-picker"]') + .first() + .click({ force: true }); + cy.get("[style='background-color: rgb(21, 128, 61);']") + .last() + .click(); + cy.wait(2000); + cy.get(themelocator.inputColor).should("have.value", "#15803d"); + cy.get(themelocator.inputColor).clear({ force: true }); + cy.wait(2000); + theme.ChangeThemeColor(9, "Primary"); + cy.get(themelocator.inputColor).should("have.value", "#7f1d1d"); //Black + cy.wait(2000); + cy.contains("Color").click({ force: true }); + appSettings.ClosePane(); + + //Publish the App and validate Font across the app + deployMode.DeployApp(); + cy.get(".bp3-button:contains('Sub')").should( + "have.css", + "font-family", + themeFont, + ); + cy.get(".bp3-button:contains('Reset')").should( + "have.css", + "font-family", + themeFont, + ); + }); }); + deployMode.NavigateBacktoEditor(); + }); - cy.get(themelocator.fontsSelected) - //.eq(10) - .should("contain.text", "Nunito Sans"); + it("2. Validate Default Theme change across application", function () { + propPane.RenameWidget("Form1", "FormTest"); + propPane.MoveToTab("Style"); + cy.get(widgetsPage.backgroundcolorPickerNew) + .first() + .click({ force: true }); + cy.get("[style='background-color: rgb(21, 128, 61);']").last().click(); + cy.wait(2000); + cy.get(formWidgetsPage.formD) + .should("have.css", "background-color") + .and("eq", "rgb(21, 128, 61)"); + cy.get("#canvas-selection-0").click({ force: true }); - cy.get(".rc-virtual-list .rc-select-item-option") - .find(".leading-normal") - .eq(2) - .then(($childElem) => { - cy.get($childElem).click({ force: true }); - cy.get(".t--draggable-buttonwidget button :contains('Sub')").should( - "have.css", - "font-family", - `Poppins, sans-serif`, - ); - //themeFont = `${$childElem.children().last().text()}, sans-serif`; - themeFont = `Poppins, sans-serif`; - - cy.contains("Font").click({ force: true }); - - //Color - //cy.contains("Color").click({ force: true }); - cy.wait(2000); - cy.colorMouseover(0, "Primary color"); - cy.validateColor("Primary", "#553DE9"); - cy.colorMouseover(1, "Background color"); - cy.validateColor("Background", "#F8FAFC"); - - cy.get(themelocator.inputColor).click({ force: true }); - cy.chooseColor(0, themelocator.greenColor); - - cy.get(themelocator.inputColor).should("have.value", "#15803d"); - cy.get(themelocator.inputColor).clear({ force: true }); - cy.wait(2000); - theme.ChangeThemeColor(16, "Background"); - cy.get(themelocator.inputColor).should("have.value", "#86efac"); //Red - cy.wait(2000); - - cy.get(themelocator.inputColor).eq(0).click({ force: true }); - cy.get(themelocator.inputColor).click({ force: true }); - cy.get('[data-testid="color-picker"]').first().click({ force: true }); - cy.get("[style='background-color: rgb(21, 128, 61);']") + appSettings.OpenAppSettings(); + appSettings.GoToThemeSettings(); + //Change the Theme + cy.get(commonlocators.changeThemeBtn).click({ force: true }); + cy.get(themelocator.currentTheme).click({ force: true }); + cy.get(".t--theme-card main > main") + .first() + .invoke("css", "background-color") + .then((CurrentBackgroudColor) => { + cy.get(".bp3-button:contains('Sub')") .last() - .click(); - cy.wait(2000); - cy.get(themelocator.inputColor).should("have.value", "#15803d"); - cy.get(themelocator.inputColor).clear({ force: true }); - cy.wait(2000); - theme.ChangeThemeColor(9, "Primary"); - cy.get(themelocator.inputColor).should("have.value", "#7f1d1d"); //Black - cy.wait(2000); - cy.contains("Color").click({ force: true }); - appSettings.ClosePane(); - - //Publish the App and validate Font across the app - deployMode.DeployApp(); - cy.get(".bp3-button:contains('Sub')").should( + .invoke("css", "background-color") + .then((selectedBackgroudColor) => { + expect(CurrentBackgroudColor).to.equal(selectedBackgroudColor); + themeBackgroudColor = CurrentBackgroudColor; + appSettings.ClosePane(); + }); + }); + }); + + it("3. Validate Theme change across application", function () { + EditorNavigation.SelectEntityByName("FormTest", EntityType.Widget); + propPane.MoveToTab("Style"); + cy.get(widgetsPage.backgroundcolorPickerNew) + .first() + .click({ force: true }); + cy.get("[style='background-color: rgb(21, 128, 61);']").last().click(); + cy.wait(2000); + cy.get(formWidgetsPage.formD) + .should("have.css", "background-color") + .and("eq", "rgb(21, 128, 61)"); + + cy.get("#canvas-selection-0").click({ force: true }); + + appSettings.OpenAppSettings(); + appSettings.GoToThemeSettings(); + //Change the Theme + cy.get(commonlocators.changeThemeBtn).click({ force: true }); + // select a theme + cy.get(commonlocators.themeCard).last().click({ force: true }); + + // check for alert + cy.get(`${commonlocators.themeCard}`) + .last() + .siblings("div") + .first() + .invoke("text") + .then((text) => { + cy.get(commonlocators.toastmsg).contains(`Theme ${text} applied`); + }); + cy.get(`${commonlocators.themeCard} > main`) + .last() + .invoke("css", "background-color") + .then((backgroudColor) => { + cy.get(commonlocators.canvas).should( "have.css", - "font-family", - themeFont, + "background-color", + backgroudColor, ); - cy.get(".bp3-button:contains('Reset')").should( + }); + cy.get(themelocator.currentTheme).click({ force: true }); + cy.get(".t--theme-card > main") + .first() + .invoke("css", "background-color") + .then((backgroudColor) => { + cy.get(commonlocators.canvas).should( "have.css", - "font-family", - themeFont, + "background-color", + backgroudColor, ); }); + cy.get(".t--theme-card main > main") + .first() + .invoke("css", "background-color") + .then((CurrentBackgroudColor) => { + cy.get(".t--theme-card main > main") + .last() + .invoke("css", "background-color") + .then((selectedBackgroudColor) => { + expect(CurrentBackgroudColor).to.equal(selectedBackgroudColor); + themeBackgroudColor = CurrentBackgroudColor; + appSettings.ClosePane(); + }); + }); + EditorNavigation.SelectEntityByName("FormTest", EntityType.Widget); + propPane.MoveToTab("Style"); + cy.get(widgetsPage.backgroundcolorPickerNew) + .first() + .click({ force: true }); + cy.get("[style='background-color: rgb(126, 34, 206);']").first().click(); + cy.wait(2000); + cy.get(formWidgetsPage.formD) + .should("have.css", "background-color") + .and("eq", "rgb(126, 34, 206)"); + + //Publish the App and validate Theme across the app + deployMode.DeployApp(); + //Bug Form backgroud colour reset in Publish mode + cy.get(formWidgetsPage.formD) + .should("have.css", "background-color") + .and("eq", "rgb(126, 34, 206)"); }); - deployMode.NavigateBacktoEditor(); - }); - - it("2. Validate Default Theme change across application", function () { - propPane.RenameWidget("Form1", "FormTest"); - propPane.MoveToTab("Style"); - cy.get(widgetsPage.backgroundcolorPickerNew).first().click({ force: true }); - cy.get("[style='background-color: rgb(21, 128, 61);']").last().click(); - cy.wait(2000); - cy.get(formWidgetsPage.formD) - .should("have.css", "background-color") - .and("eq", "rgb(21, 128, 61)"); - cy.get("#canvas-selection-0").click({ force: true }); - - appSettings.OpenAppSettings(); - appSettings.GoToThemeSettings(); - //Change the Theme - cy.get(commonlocators.changeThemeBtn).click({ force: true }); - cy.get(themelocator.currentTheme).click({ force: true }); - cy.get(".t--theme-card main > main") - .first() - .invoke("css", "background-color") - .then((CurrentBackgroudColor) => { - cy.get(".bp3-button:contains('Sub')") - .last() - .invoke("css", "background-color") - .then((selectedBackgroudColor) => { - expect(CurrentBackgroudColor).to.equal(selectedBackgroudColor); - themeBackgroudColor = CurrentBackgroudColor; - appSettings.ClosePane(); - }); - }); - }); - - it("3. Validate Theme change across application", function () { - EditorNavigation.SelectEntityByName("FormTest", EntityType.Widget); - propPane.MoveToTab("Style"); - cy.get(widgetsPage.backgroundcolorPickerNew).first().click({ force: true }); - cy.get("[style='background-color: rgb(21, 128, 61);']").last().click(); - cy.wait(2000); - cy.get(formWidgetsPage.formD) - .should("have.css", "background-color") - .and("eq", "rgb(21, 128, 61)"); - - cy.get("#canvas-selection-0").click({ force: true }); - - appSettings.OpenAppSettings(); - appSettings.GoToThemeSettings(); - //Change the Theme - cy.get(commonlocators.changeThemeBtn).click({ force: true }); - // select a theme - cy.get(commonlocators.themeCard).last().click({ force: true }); - - // check for alert - cy.get(`${commonlocators.themeCard}`) - .last() - .siblings("div") - .first() - .invoke("text") - .then((text) => { - cy.get(commonlocators.toastmsg).contains(`Theme ${text} applied`); - }); - cy.get(`${commonlocators.themeCard} > main`) - .last() - .invoke("css", "background-color") - .then((backgroudColor) => { - cy.get(commonlocators.canvas).should( - "have.css", - "background-color", - backgroudColor, - ); - }); - cy.get(themelocator.currentTheme).click({ force: true }); - cy.get(".t--theme-card > main") - .first() - .invoke("css", "background-color") - .then((backgroudColor) => { - cy.get(commonlocators.canvas).should( - "have.css", - "background-color", - backgroudColor, - ); - }); - cy.get(".t--theme-card main > main") - .first() - .invoke("css", "background-color") - .then((CurrentBackgroudColor) => { - cy.get(".t--theme-card main > main") - .last() - .invoke("css", "background-color") - .then((selectedBackgroudColor) => { - expect(CurrentBackgroudColor).to.equal(selectedBackgroudColor); - themeBackgroudColor = CurrentBackgroudColor; - appSettings.ClosePane(); - }); - }); - EditorNavigation.SelectEntityByName("FormTest", EntityType.Widget); - propPane.MoveToTab("Style"); - cy.get(widgetsPage.backgroundcolorPickerNew).first().click({ force: true }); - cy.get("[style='background-color: rgb(126, 34, 206);']").first().click(); - cy.wait(2000); - cy.get(formWidgetsPage.formD) - .should("have.css", "background-color") - .and("eq", "rgb(126, 34, 206)"); - - //Publish the App and validate Theme across the app - deployMode.DeployApp(); - //Bug Form backgroud colour reset in Publish mode - cy.get(formWidgetsPage.formD) - .should("have.css", "background-color") - .and("eq", "rgb(126, 34, 206)"); - }); -}); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/ThemingTests/Theme_MultiSelectWidget_spec.js b/app/client/cypress/e2e/Regression/ClientSide/ThemingTests/Theme_MultiSelectWidget_spec.js index 0f149cf2179a..4e6f553f23ff 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/ThemingTests/Theme_MultiSelectWidget_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/ThemingTests/Theme_MultiSelectWidget_spec.js @@ -16,7 +16,7 @@ let themeFont; describe( "Theme validation usecase for multi-select widget", - { tags: ["@tag.Theme"] }, + { tags: ["@tag.Theme", "@tag.Git"] }, function () { it("1. Drag and drop multi-select widget and validate Default font and list of font validation + Bug 15007", function () { entityExplorer.DragDropWidgetNVerify( diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Audio/AudioRecorder1_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Audio/AudioRecorder1_spec.ts index a883cdd8c5a0..1906771330e9 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Audio/AudioRecorder1_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Audio/AudioRecorder1_spec.ts @@ -13,7 +13,7 @@ import EditorNavigation, { describe( "Audio Recorder functionality tests", - { tags: ["@tag.Widget", "@tag.Audio"] }, + { tags: ["@tag.Widget", "@tag.Audio", "@tag.Binding"] }, () => { before(() => { entityExplorer.DragDropWidgetNVerify( diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Audio/AudioRecorder_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Audio/AudioRecorder_spec.js index df109cf90c4a..9f0ec20ec711 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Audio/AudioRecorder_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Audio/AudioRecorder_spec.js @@ -2,7 +2,7 @@ const widgetName = "audiorecorderwidget"; describe( "AudioRecorder Widget", - { tags: ["@tag.Widget", "@tag.Audio"] }, + { tags: ["@tag.Widget", "@tag.Audio", "@tag.Binding"] }, () => { it("Drag & drop AudioRecorder and Text widgets", () => { cy.dragAndDropToCanvas(widgetName, { x: 300, y: 300 }); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Audio/audio_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Audio/audio_spec.js index 216b9ae6902e..92b0cb1fa316 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Audio/audio_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Audio/audio_spec.js @@ -4,7 +4,7 @@ import * as _ from "../../../../../support/Objects/ObjectsCore"; describe( "Audio Widget Functionality", - { tags: ["@tag.Widget", "@tag.Audio"] }, + { tags: ["@tag.Widget", "@tag.Audio", "@tag.Binding"] }, function () { before(() => { _.agHelper.AddDsl("audioWidgetDsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Button/Button2_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Button/Button2_spec.ts index 4cfc7b8c890d..f3dc601cbcf1 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Button/Button2_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Button/Button2_spec.ts @@ -19,7 +19,7 @@ import EditorNavigation, { describe( "Button widget testcases", - { tags: ["@tag.Widget", "@tag.Button"] }, + { tags: ["@tag.Widget", "@tag.Button", "@tag.Binding"] }, () => { before(() => { apiPage.CreateAndFillApi( diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Button/ButtonGroup2_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Button/ButtonGroup2_spec.ts index 11ad27541986..df1c74b3436e 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Button/ButtonGroup2_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Button/ButtonGroup2_spec.ts @@ -15,7 +15,7 @@ import EditorNavigation, { describe( "Button Group Widget Test", - { tags: ["@tag.Widget", "@tag.Button"] }, + { tags: ["@tag.Widget", "@tag.Button", "@tag.Binding"] }, function () { before("Login to the app and navigate to the workspace", function () { entityExplorer.DragDropWidgetNVerify(draggableWidgets.BUTTON_GROUP); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Button/ButtonGroup_MenuButton_Width_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Button/ButtonGroup_MenuButton_Width_spec.js index a6ad1506f52d..d73126ed9902 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Button/ButtonGroup_MenuButton_Width_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Button/ButtonGroup_MenuButton_Width_spec.js @@ -3,7 +3,7 @@ import { agHelper } from "../../../../../support/Objects/ObjectsCore"; describe( "In a button group widget, menu button width", - { tags: ["@tag.Widget", "@tag.Button"] }, + { tags: ["@tag.Widget", "@tag.Button", "@tag.Binding"] }, function () { before(() => { agHelper.AddDsl("ButtonGroup_MenuButton_Width_dsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Button/ButtonGroup_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Button/ButtonGroup_spec.js index 6d1b1fb35f1f..1e64e83a5c58 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Button/ButtonGroup_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Button/ButtonGroup_spec.js @@ -18,7 +18,7 @@ const menuButton = describe( "Button Group Widget Functionality", - { tags: ["@tag.Widget", "@tag.Button"] }, + { tags: ["@tag.Widget", "@tag.Button", "@tag.Binding"] }, function () { before(() => { entityExplorer.DragDropWidgetNVerify(draggableWidgets.BUTTON_GROUP); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Button/ButtonLintErrorValidation_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Button/ButtonLintErrorValidation_spec.js index 93bcb3dbd81d..435651a97ba7 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Button/ButtonLintErrorValidation_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Button/ButtonLintErrorValidation_spec.js @@ -3,7 +3,7 @@ import * as _ from "../../../../../support/Objects/ObjectsCore"; describe( "Linting warning validation with button widget", - { tags: ["@tag.Widget", "@tag.Button"] }, + { tags: ["@tag.Widget", "@tag.Button", "@tag.Binding"] }, function () { before(() => { _.agHelper.AddDsl("buttonLintErrorDsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Button/Button_onClickAction_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Button/Button_onClickAction_spec.js index 703cfc151a18..a387f885c206 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Button/Button_onClickAction_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Button/Button_onClickAction_spec.js @@ -16,7 +16,7 @@ import { describe( "Button Widget Functionality", - { tags: ["@tag.Widget", "@tag.Button", "@tag.Sanity"] }, + { tags: ["@tag.Widget", "@tag.Button", "@tag.Sanity", "@tag.Binding"] }, function () { before(() => { agHelper.AddDsl("newFormDsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Button/Button_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Button/Button_spec.js index 0c0824d67989..542929627921 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Button/Button_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Button/Button_spec.js @@ -12,7 +12,7 @@ const iconAlignmentProperty = ".t--property-control-position"; describe( "Button Widget Functionality", - { tags: ["@tag.Widget", "@tag.Button"] }, + { tags: ["@tag.Widget", "@tag.Button", "@tag.Binding"] }, function () { before(() => { _.agHelper.AddDsl("newFormDsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Button/Button_tooltip_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Button/Button_tooltip_spec.js index ea098127276b..2bfd4ced8ae9 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Button/Button_tooltip_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Button/Button_tooltip_spec.js @@ -5,7 +5,7 @@ import * as _ from "../../../../../support/Objects/ObjectsCore"; describe( "Button Widget Functionality - Validate tooltip visibility", - { tags: ["@tag.Widget", "@tag.Button"] }, + { tags: ["@tag.Widget", "@tag.Button", "@tag.Binding"] }, function () { before(() => { _.entityExplorer.DragDropWidgetNVerify( diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Camera/CameraImage_Spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Camera/CameraImage_Spec.ts index e0438a393e29..8572db562db6 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Camera/CameraImage_Spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Camera/CameraImage_Spec.ts @@ -15,7 +15,7 @@ import PageList from "../../../../../support/Pages/PageList"; describe( "Camera widget - Image test", - { tags: ["@tag.Widget", "@tag.Camera", "@tag.Visual"] }, + { tags: ["@tag.Widget", "@tag.Camera", "@tag.Visual", "@tag.Binding"] }, () => { before(() => { //Reset video source to default incase it got changed in other specs diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Camera/CameraVideo_Spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Camera/CameraVideo_Spec.ts index 9c010aa16c69..b949463c9abf 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Camera/CameraVideo_Spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Camera/CameraVideo_Spec.ts @@ -14,7 +14,7 @@ import EditorNavigation, { describe( "Camera widget - Video test", - { tags: ["@tag.Widget", "@tag.Camera", "@tag.Visual"] }, + { tags: ["@tag.Widget", "@tag.Camera", "@tag.Visual", "@tag.Binding"] }, () => { before(() => { //Reset video source to default incase it got changed in other specs diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Chart/ChartDataPoint_Spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Chart/ChartDataPoint_Spec.ts index 3f12e9eb6f7d..05ae81bb802f 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Chart/ChartDataPoint_Spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Chart/ChartDataPoint_Spec.ts @@ -16,7 +16,7 @@ let dataSet: any, dsl: any; describe( "Input widget test with default value from chart datapoint", - { tags: ["@tag.Widget", "@tag.Chart", "@tag.Sanity"] }, + { tags: ["@tag.Widget", "@tag.Chart", "@tag.Sanity", "@tag.Binding"] }, () => { //beforeEach - to enable re-attempt passing! beforeEach(() => { diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Chart/ChartWidgetErrors_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Chart/ChartWidgetErrors_spec.ts index fdded5f5f7f4..ea59fb84bc85 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Chart/ChartWidgetErrors_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Chart/ChartWidgetErrors_spec.ts @@ -7,7 +7,7 @@ import { describe( "Chart renders widget errors", - { tags: ["@tag.Widget", "@tag.Chart"] }, + { tags: ["@tag.Widget", "@tag.Chart", "@tag.Binding"] }, () => { it("1. If there are syntax errors, the errors are displayed inside the chart widget", function () { entityExplorer.DragDropWidgetNVerify(draggableWidgets.CHART); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Chart/Chart_Widget_Loading_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Chart/Chart_Widget_Loading_spec.js index d4a956c29f0c..57747db1c832 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Chart/Chart_Widget_Loading_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Chart/Chart_Widget_Loading_spec.js @@ -9,7 +9,7 @@ import EditorNavigation, { let dsname; describe( "Chart Widget Skeleton Loading Functionality", - { tags: ["@tag.Widget", "@tag.Chart"] }, + { tags: ["@tag.Widget", "@tag.Chart", "@tag.Binding"] }, function () { before(() => { agHelper.AddDsl("ChartLoadingDsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Chart/Custom3DChartSpec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Chart/Custom3DChartSpec.ts index 696303aad3cc..3e2f532a06e2 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Chart/Custom3DChartSpec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Chart/Custom3DChartSpec.ts @@ -7,7 +7,7 @@ const publicWidgetsPage = require("../../../../../locators/publishWidgetspage.js describe.skip( "3D Custom EChart feature", - { tags: ["@tag.Widget", "@tag.Chart", "@tag.Visual"] }, + { tags: ["@tag.Widget", "@tag.Chart", "@tag.Visual", "@tag.Binding"] }, function () { it("1. 3D EChart Custom Chart Widget Functionality", function () { _.agHelper.RefreshPage(); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Chart/Custom_Chart_Data_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Chart/Custom_Chart_Data_spec.js index d416f39a8998..dd84c19b891c 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Chart/Custom_Chart_Data_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Chart/Custom_Chart_Data_spec.js @@ -2,7 +2,7 @@ import * as _ from "../../../../../support/Objects/ObjectsCore"; describe( "Chart Widget Functionality around custom chart data", - { tags: ["@tag.Widget", "@tag.Chart"] }, + { tags: ["@tag.Widget", "@tag.Chart", "@tag.Binding"] }, function () { before(() => { _.agHelper.AddDsl("chartCustomDataDsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Chart/Custom_Chart_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Chart/Custom_Chart_spec.js index 6e204e3cacc9..1e0a8370e278 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Chart/Custom_Chart_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Chart/Custom_Chart_spec.js @@ -8,7 +8,7 @@ import * as _ from "../../../../../support/Objects/ObjectsCore"; describe( "Chart Widget Functionality around custom chart feature", - { tags: ["@tag.Widget", "@tag.Chart"] }, + { tags: ["@tag.Widget", "@tag.Chart", "@tag.Binding"] }, function () { before(() => { _.agHelper.AddDsl("chartUpdatedDsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Checkbox/CheckBoxLintErrorMultipleRowValidation_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Checkbox/CheckBoxLintErrorMultipleRowValidation_spec.js index e2a827abac06..358fe39e3e54 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Checkbox/CheckBoxLintErrorMultipleRowValidation_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Checkbox/CheckBoxLintErrorMultipleRowValidation_spec.js @@ -3,7 +3,7 @@ import * as _ from "../../../../../support/Objects/ObjectsCore"; describe( "Linting warning validation with Checkbox widget", - { tags: ["@tag.Widget", "@tag.Checkbox"] }, + { tags: ["@tag.Widget", "@tag.Checkbox", "@tag.Binding"] }, function () { before(() => { _.agHelper.AddDsl("snippetDsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Checkbox/CheckBoxMultipleLintError_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Checkbox/CheckBoxMultipleLintError_spec.js index 704cccbc8298..6f54c58e01d6 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Checkbox/CheckBoxMultipleLintError_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Checkbox/CheckBoxMultipleLintError_spec.js @@ -3,7 +3,7 @@ import * as _ from "../../../../../support/Objects/ObjectsCore"; describe( "Linting warning validation with Checkbox widget", - { tags: ["@tag.Widget", "@tag.Checkbox"] }, + { tags: ["@tag.Widget", "@tag.Checkbox", "@tag.Binding"] }, function () { before(() => { _.agHelper.AddDsl("snippetErrordsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Checkbox/CheckBox_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Checkbox/CheckBox_spec.js index e6d56424297e..7ac312e30571 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Checkbox/CheckBox_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Checkbox/CheckBox_spec.js @@ -6,7 +6,7 @@ import * as _ from "../../../../../support/Objects/ObjectsCore"; describe( "Checkbox Widget Functionality", - { tags: ["@tag.Widget", "@tag.Checkbox"] }, + { tags: ["@tag.Widget", "@tag.Checkbox", "@tag.Binding"] }, function () { before(() => { _.agHelper.AddDsl("newFormDsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Checkbox/CheckboxGroup1_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Checkbox/CheckboxGroup1_spec.js index af4469692416..ec713566d2ed 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Checkbox/CheckboxGroup1_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Checkbox/CheckboxGroup1_spec.js @@ -2,7 +2,7 @@ import * as _ from "../../../../../support/Objects/ObjectsCore"; describe( "checkboxgroupwidget Widget Functionality", - { tags: ["@tag.Widget", "@tag.Checkbox"] }, + { tags: ["@tag.Widget", "@tag.Checkbox", "@tag.Binding"] }, function () { before(() => { _.agHelper.AddDsl("emptyDSL"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Checkbox/CheckboxGroup2_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Checkbox/CheckboxGroup2_spec.js index 10c00970efb8..81ba7c6278a6 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Checkbox/CheckboxGroup2_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Checkbox/CheckboxGroup2_spec.js @@ -8,7 +8,7 @@ import { describe( "Checkbox Group Widget Functionality", - { tags: ["@tag.Widget", "@tag.Checkbox"] }, + { tags: ["@tag.Widget", "@tag.Checkbox", "@tag.Binding"] }, function () { before(() => { agHelper.AddDsl("checkboxgroupDsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Checkbox/CheckboxGroup_withQuery_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Checkbox/CheckboxGroup_withQuery_spec.js index f1117e54f003..958b4f596e3e 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Checkbox/CheckboxGroup_withQuery_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Checkbox/CheckboxGroup_withQuery_spec.js @@ -8,7 +8,7 @@ import * as _ from "../../../../../support/Objects/ObjectsCore"; describe( "Checkbox Group Widget Functionality", - { tags: ["@tag.Widget", "@tag.Checkbox"] }, + { tags: ["@tag.Widget", "@tag.Checkbox", "@tag.Binding"] }, function () { let dsName; before(() => { diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/CodeScanner/CodeScanner1_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/CodeScanner/CodeScanner1_spec.ts index 25d66aff6821..e0bc3666badc 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/CodeScanner/CodeScanner1_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/CodeScanner/CodeScanner1_spec.ts @@ -8,7 +8,7 @@ const codeScannerDisabledSVGIconOnPublishPage = `${publish.codescannerwidget} ${ describe( "Code Scanner widget's functionality", - { tags: ["@tag.Widget", "@tag.Scanner"] }, + { tags: ["@tag.Widget", "@tag.Scanner", "@tag.Binding"] }, () => { it("1 => Check if code scanner widget can be dropped on the canvas", () => { // Drop the widget diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/CodeScanner/CodeScanner2_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/CodeScanner/CodeScanner2_spec.ts index 32604807f288..27be8c47b5ad 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/CodeScanner/CodeScanner2_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/CodeScanner/CodeScanner2_spec.ts @@ -14,7 +14,7 @@ import EditorNavigation, { describe( "Code scanner widget tests", - { tags: ["@tag.Widget", "@tag.Scanner"] }, + { tags: ["@tag.Widget", "@tag.Scanner", "@tag.Binding"] }, () => { before(() => { //Reset video source to default diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/ContainerTest2_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/ContainerTest2_spec.ts index 9045781906b6..6c3a3a61a605 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/ContainerTest2_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/ContainerTest2_spec.ts @@ -12,7 +12,9 @@ import EditorNavigation, { describe( "Rich Text Editor widget Tests", - { tags: ["@tag.Widget", "@tag.Container"] }, + { + tags: ["@tag.Widget", "@tag.Container", "@tag.AutoHeight", "@tag.Binding"], + }, function () { before(() => { agHelper.AddDsl("ContainerWithOtherWidgetsDsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Container_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Container_spec.js index 4f9ba8fe2103..cfff72ba14c2 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Container_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Container_spec.js @@ -11,7 +11,9 @@ const boxShadowOptions = { describe( "Container Widget Functionality", - { tags: ["@tag.Widget", "@tag.Container"] }, + { + tags: ["@tag.Widget", "@tag.Container", "@tag.AutoHeight", "@tag.Binding"], + }, function () { before(() => { _.agHelper.AddDsl("containerdsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/CurrencyInput/CurrencyInputDynamicCurrencyCode_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/CurrencyInput/CurrencyInputDynamicCurrencyCode_spec.js index 5186338e7759..89be8b321e77 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/CurrencyInput/CurrencyInputDynamicCurrencyCode_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/CurrencyInput/CurrencyInputDynamicCurrencyCode_spec.js @@ -4,7 +4,7 @@ const widgetName = "currencyinputwidget"; describe( "Currency input widget - ", - { tags: ["@tag.Widget", "@tag.CurrencyInput"] }, + { tags: ["@tag.Widget", "@tag.CurrencyInput", "@tag.Binding"] }, () => { before(() => { _.agHelper.AddDsl("CurrencyInputDynamic"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/CurrencyInput/CurrencyInput_ShowStepArrows_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/CurrencyInput/CurrencyInput_ShowStepArrows_spec.js index ffb298164e73..a4febaa8886b 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/CurrencyInput/CurrencyInput_ShowStepArrows_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/CurrencyInput/CurrencyInput_ShowStepArrows_spec.js @@ -5,7 +5,7 @@ const widgetName = "currencyinputwidget"; describe( "Currency Widget showStepArrows Functionality - ", - { tags: ["@tag.Widget", "@tag.CurrencyInput"] }, + { tags: ["@tag.Widget", "@tag.CurrencyInput", "@tag.Binding"] }, function () { it("1. Validate that For new currency input widgets being dragged, the value for showStepArrows should be set to false", () => { cy.dragAndDropToCanvas(widgetName, { x: 300, y: 400 }); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/CurrencyInput/CurrencyInput_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/CurrencyInput/CurrencyInput_spec.js index 3292ad922fdf..b4fdfe4d25cf 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/CurrencyInput/CurrencyInput_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/CurrencyInput/CurrencyInput_spec.js @@ -6,7 +6,7 @@ const widgetInput = `.t--widget-${widgetName} input`; describe( "Currency widget - ", - { tags: ["@tag.Widget", "@tag.CurrencyInput"] }, + { tags: ["@tag.Widget", "@tag.CurrencyInput", "@tag.Binding"] }, () => { before(() => { _.agHelper.AddDsl("emptyDSL"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Custom/CustomWidgetDefaultComponent_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Custom/CustomWidgetDefaultComponent_spec.ts index 94b740264599..7716e7dbfa06 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Custom/CustomWidgetDefaultComponent_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Custom/CustomWidgetDefaultComponent_spec.ts @@ -12,7 +12,7 @@ import EditorNavigation, { describe( "Custom widget Tests", - { tags: ["@tag.Widget", "@tag.excludeForAirgap"] }, + { tags: ["@tag.Widget", "@tag.excludeForAirgap", "@tag.Binding"] }, function () { before(() => { entityExplorer.DragDropWidgetNVerify("customwidget", 550, 100); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Custom/CustomWidgetEditorPropertyPane_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Custom/CustomWidgetEditorPropertyPane_spec.ts index 6805ad328817..166dd8006e76 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Custom/CustomWidgetEditorPropertyPane_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Custom/CustomWidgetEditorPropertyPane_spec.ts @@ -7,7 +7,7 @@ import { describe( "Custom widget Tests", - { tags: ["@tag.Widget", "@tag.excludeForAirgap"] }, + { tags: ["@tag.Widget", "@tag.excludeForAirgap", "@tag.Binding"] }, function () { before(() => { agHelper.AddDsl("customWidget"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Datepicker/DatePicker1_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Datepicker/DatePicker1_spec.js index 4759b6b77fdb..67573cfc47e7 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Datepicker/DatePicker1_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Datepicker/DatePicker1_spec.js @@ -7,7 +7,7 @@ import * as _ from "../../../../../support/Objects/ObjectsCore"; describe( "DatePicker Widget Property pane tests with js bindings", - { tags: ["@tag.Widget", "@tag.Datepicker"] }, + { tags: ["@tag.Widget", "@tag.Datepicker", "@tag.Binding"] }, function () { before(() => { _.agHelper.AddDsl("datePicker2dsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Datepicker/DatePicker2_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Datepicker/DatePicker2_spec.js index e9eaf610b9c0..065f0c7a9e4f 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Datepicker/DatePicker2_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Datepicker/DatePicker2_spec.js @@ -7,7 +7,7 @@ import * as _ from "../../../../../support/Objects/ObjectsCore"; describe( "DatePicker Widget Functionality", - { tags: ["@tag.Widget", "@tag.Datepicker"] }, + { tags: ["@tag.Widget", "@tag.Datepicker", "@tag.Binding"] }, function () { before(() => { _.agHelper.AddDsl("newFormDsl"); @@ -19,10 +19,10 @@ describe( // ADS changes to date input property causes this test to fail // skipping it temporarily. - it.skip("DatePicker-Date Name validation", function () { + it("DatePicker-Date Name validation", function () { // changing the date to today cy.get(formWidgetsPage.defaultDate).click(); - cy.SetDateToToday(); + cy.get(formWidgetsPage.dayPickerToday).click(); //changing the Button Name cy.widgetText( @@ -30,16 +30,14 @@ describe( formWidgetsPage.datepickerWidget, widgetsPage.widgetNameSpan, ); - // change the date to next day cy.get(formWidgetsPage.defaultDate).click(); /** * setDate--> is a Command to select the date in the date picker - * @param1 --> its takes currentday+ eg: 1 - * @param2 --> user date formate */ - cy.setDate(1, "ddd MMM DD YYYY"); + + cy.setDate(1); const nextDay = dayjs().add(1, "days").format("DD/MM/YYYY"); cy.log(nextDay); cy.get(formWidgetsPage.datepickerWidget + " .bp3-input").should( diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Datepicker/DatePicker3_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Datepicker/DatePicker3_spec.ts index 71e8bf1e95c4..b2aee9b4ea00 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Datepicker/DatePicker3_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Datepicker/DatePicker3_spec.ts @@ -8,7 +8,7 @@ import { propPane, } from "../../../../../support/Objects/ObjectsCore"; -import { format } from "date-fns"; +import { format } from "date-fns/format.cjs"; import { datePickerlocators } from "../../../../../locators/WidgetLocators"; import EditorNavigation, { EntityType, @@ -16,7 +16,7 @@ import EditorNavigation, { describe( "Date picker widget testcases", - { tags: ["@tag.Widget", "@tag.Datepicker"] }, + { tags: ["@tag.Widget", "@tag.Datepicker", "@tag.Binding"] }, () => { before(() => { entityExplorer.DragDropWidgetNVerify(draggableWidgets.DATEPICKER); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Datepicker/DatePickerV2Updated_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Datepicker/DatePickerV2Updated_spec.js index 10f3ff529b1b..1b634205dfe3 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Datepicker/DatePickerV2Updated_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Datepicker/DatePickerV2Updated_spec.js @@ -3,7 +3,7 @@ import * as _ from "../../../../../support/Objects/ObjectsCore"; describe( "DatePicker Widget Property pane tests with js bindings", - { tags: ["@tag.Widget", "@tag.Datepicker"] }, + { tags: ["@tag.Widget", "@tag.Datepicker", "@tag.Binding"] }, function () { beforeEach(() => { _.agHelper.RestoreLocalStorageCache(); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Datepicker/DatePickerV2_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Datepicker/DatePickerV2_spec.js index 953307c20c63..7bc4efc0936d 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Datepicker/DatePickerV2_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Datepicker/DatePickerV2_spec.js @@ -9,7 +9,7 @@ import * as _ from "../../../../../support/Objects/ObjectsCore"; describe( "DatePicker Widget Property pane tests with js bindings", - { tags: ["@tag.Widget", "@tag.Datepicker"] }, + { tags: ["@tag.Widget", "@tag.Datepicker", "@tag.Binding"] }, function () { beforeEach(() => { _.agHelper.RestoreLocalStorageCache(); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Datepicker/DatePicker_Toggle_js_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Datepicker/DatePicker_Toggle_js_spec.js index 3ff25dc51f59..6b706e4798c7 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Datepicker/DatePicker_Toggle_js_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Datepicker/DatePicker_Toggle_js_spec.js @@ -4,7 +4,7 @@ import * as _ from "../../../../../support/Objects/ObjectsCore"; describe( "DatePicker", - { tags: ["@tag.Widget", "@tag.Datepicker"] }, + { tags: ["@tag.Widget", "@tag.Datepicker", "@tag.Binding"] }, function () { before(() => { _.agHelper.AddDsl("newFormDsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Datepicker/DatePicker_With_Switch_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Datepicker/DatePicker_With_Switch_spec.js index a120e800f977..f5257949830a 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Datepicker/DatePicker_With_Switch_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Datepicker/DatePicker_With_Switch_spec.js @@ -9,7 +9,7 @@ import * as _ from "../../../../../support/Objects/ObjectsCore"; describe( "Switch Widget within Form widget Functionality", - { tags: ["@tag.Widget", "@tag.Datepicker"] }, + { tags: ["@tag.Widget", "@tag.Datepicker", "@tag.Binding"] }, function () { before(() => { _.agHelper.AddDsl("datepicker_switchDsl"); @@ -28,11 +28,14 @@ describe( cy.closePropertyPane(); }); // Skipping tests due to issue - https://www.notion.so/appsmith/f353d8c6bd664f79ad858a42010cdfc8?v=f04cde23f6424aeb9d5a6e389cd172bd&p=0717892d43684c40bae4e2c87b8308cb&pm=s - it.skip("Date Widget with Reset widget being switch widget", function () { + it("Date Widget with Reset widget being switch widget", function () { EditorNavigation.SelectEntityByName("DatePicker1", EntityType.Widget); + cy.get(formWidgetsPage.datePickerInput).click(); + _.agHelper.GetNClick(widgetsPage.todayText); + cy.get(formWidgetsPage.defaultDate).click(); + _.agHelper.GetNClick(".ads-v2-datepicker__calender-today"); cy.get(formWidgetsPage.defaultDate).click(); - cy.SetDateToToday(); cy.setDate(1, "ddd MMM DD YYYY"); const nextDay = dayjs().format("DD/MM/YYYY"); cy.log(nextDay); @@ -51,18 +54,10 @@ describe( cy.get(widgetsPage.switchWidgetInactive).should("be.visible"); }); - it.skip("DatePicker-Date change and validate switch widget status", function () { + it("DatePicker-Date change and validate switch widget status", function () { cy.get(widgetsPage.datepickerInput).click({ force: true }); - cy.SetDateToToday(); - cy.get(widgetsPage.switchWidgetActive).should("be.visible"); - cy.get(".t--toast-action span") - .last() - .invoke("text") - .then((text) => { - const toasttext = text; - cy.log(toasttext); - expect(text.trim()).to.equal(toasttext.trim()); - }); + _.agHelper.GetNClick(widgetsPage.todayText); + _.agHelper.AssertClassExists(".bp3-switch", "t--switch-widget-active"); }); }, ); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Disabled_Widgets_drag_validation_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Disabled_Widgets_drag_validation_spec.js index 525223a5711b..3e28c329db56 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Disabled_Widgets_drag_validation_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Disabled_Widgets_drag_validation_spec.js @@ -3,7 +3,7 @@ import * as _ from "../../../../support/Objects/ObjectsCore"; describe( "Disabled Widgets drag Functionality", - { tags: ["@tag.Widget"] }, + { tags: ["@tag.Widget", "@tag.Binding"] }, function () { before(() => { _.agHelper.AddDsl("disabledWidgetsDsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Divider/Widget_Divider_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Divider/Widget_Divider_spec.ts index 7975e17717c4..51c3fd4afcfe 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Divider/Widget_Divider_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Divider/Widget_Divider_spec.ts @@ -13,7 +13,7 @@ import EditorNavigation, { describe( "Divider Widget functionality tests", - { tags: ["@tag.Widget", "@tag.Divider"] }, + { tags: ["@tag.Widget", "@tag.Divider", "@tag.Binding"] }, () => { before(() => { entityExplorer.DragDropWidgetNVerify(draggableWidgets.DIVIDER, 200, 200); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/DocumentViewer/DocumentViewer_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/DocumentViewer/DocumentViewer_spec.ts index 490bc3c766c4..38d9da17a918 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/DocumentViewer/DocumentViewer_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/DocumentViewer/DocumentViewer_spec.ts @@ -15,17 +15,15 @@ import EditorNavigation, { } from "../../../../../support/Pages/EditorNavigation"; const ppt = - "https://ssz.sgp1.digitaloceanspaces.com/3ZEO2582C29EA0KKK2/ppt-on-population-pptxafa26c44-208f-46a3-89cc-8a5c020b6863.pptx"; -const pngImage = - "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRb8umIiCU_K6ac-xS-ni4y6SP7XAd8C7Ms3Q&usqp=CAU"; + "http://host.docker.internal:4200/ppt-on-population-pptxafa26c44-208f-46a3-89cc-8a5c020b6863.pptx"; +const pngImage = "https://www.appsmith.com/favicon.png"; const jpgImage = "https://community.appsmith.com/sites/default/files/styles/small_thumbnail/public/2024-03/aws-logo.jpg?itok=yG4bpfFs"; -const pdf = - "https://www.learningcontainer.com/wp-content/uploads/2019/09/sample-pdf-file.pdf"; +const pdf = "http://host.docker.internal:4200/sample-pdf-file.pdf"; describe( "DocumentViewer Widget Functionality", - { tags: ["@tag.Widget", "@tag.DocumentViewer"] }, + { tags: ["@tag.Widget", "@tag.DocumentViewer", "@tag.Binding"] }, () => { before(() => { entityExplorer.DragDropWidgetNVerify("filepickerwidgetv2", 400, 900); @@ -212,10 +210,7 @@ describe( agHelper.AssertElementExist( locators._widgetInDeployed("documentviewerwidget"), ); - agHelper.AssertContains( - "Current file type is not supported", - "not.exist", - ); + agHelper.AssertContains("Current file type is not supported"); deployMode.NavigateBacktoEditor(); //Should not show an jpg image file" EditorNavigation.SelectEntityByName("DocumentViewer1", EntityType.Widget); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Dropdown/DropDownWidget_value_reset_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Dropdown/DropDownWidget_value_reset_spec.js index fa229a8df155..19961a302d3a 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Dropdown/DropDownWidget_value_reset_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Dropdown/DropDownWidget_value_reset_spec.js @@ -9,7 +9,7 @@ import * as _ from "../../../../../support/Objects/ObjectsCore"; describe( "Dropdown Widget Check value does not reset on navigation", - { tags: ["@tag.Widget", "@tag.Dropdown"] }, + { tags: ["@tag.Widget", "@tag.Dropdown", "@tag.Binding"] }, function () { before(() => { _.agHelper.AddDsl("dropDownWidget_reset_check_dsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Dropdown/Dropdown_onOptionChange_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Dropdown/Dropdown_onOptionChange_spec.js index e78f872fca7f..f6c2128c334a 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Dropdown/Dropdown_onOptionChange_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Dropdown/Dropdown_onOptionChange_spec.js @@ -17,7 +17,7 @@ import { describe( "Dropdown Widget", - { tags: ["@tag.Widget", "@tag.Dropdown"] }, + { tags: ["@tag.Widget", "@tag.Dropdown", "@tag.Binding"] }, function () { before(() => { agHelper.AddDsl("newFormDsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Dropdown/Dropdown_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Dropdown/Dropdown_spec.js index 29003b4017cd..aea162b8819f 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Dropdown/Dropdown_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Dropdown/Dropdown_spec.js @@ -5,7 +5,7 @@ import * as _ from "../../../../../support/Objects/ObjectsCore"; describe( "Dropdown Widget Functionality", - { tags: ["@tag.Widget", "@tag.Dropdown"] }, + { tags: ["@tag.Widget", "@tag.Dropdown", "@tag.Binding"] }, function () { before(() => { _.agHelper.AddDsl("emptyDSL"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Filepicker/FilePicker2_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Filepicker/FilePicker2_spec.js index c70ecb7c4f19..fa2f96fe9a84 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Filepicker/FilePicker2_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Filepicker/FilePicker2_spec.js @@ -7,7 +7,7 @@ import * as _ from "../../../../../support/Objects/ObjectsCore"; describe( "FilePicker Widget Functionality", - { tags: ["@tag.Widget", "@tag.Filepicker"] }, + { tags: ["@tag.Widget", "@tag.Filepicker", "@tag.Binding"] }, function () { afterEach(() => { _.agHelper.SaveLocalStorageCache(); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Filepicker/FilePicker3_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Filepicker/FilePicker3_spec.ts index d2e1fc25f393..aa02ef5e2841 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Filepicker/FilePicker3_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Filepicker/FilePicker3_spec.ts @@ -12,7 +12,7 @@ import EditorNavigation, { describe( "Verify file picker widget", - { tags: ["@tag.Widget", "@tag.Filepicker"] }, + { tags: ["@tag.Widget", "@tag.Filepicker", "@tag.Binding"] }, () => { before(() => { agHelper.AddDsl("filepickerDsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Filepicker/FilePickerV2_CSV_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Filepicker/FilePickerV2_CSV_spec.js index f27a969cf0c9..975f23e23fb7 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Filepicker/FilePickerV2_CSV_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Filepicker/FilePickerV2_CSV_spec.js @@ -12,7 +12,7 @@ const ARRAY_CSV_HELPER_TEXT = `All non CSV, XLS(X), JSON or TSV filetypes will h describe( "File picker widget v2", - { tags: ["@tag.Widget", "@tag.Filepicker"] }, + { tags: ["@tag.Widget", "@tag.Filepicker", "@tag.Binding"] }, () => { before(() => { agHelper.AddDsl("filePickerTableDSL"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Filepicker/FilePickerV2_Widget_Reskinning_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Filepicker/FilePickerV2_Widget_Reskinning_spec.js index d44345f8cee7..bd22bae61244 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Filepicker/FilePickerV2_Widget_Reskinning_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Filepicker/FilePickerV2_Widget_Reskinning_spec.js @@ -4,7 +4,7 @@ import * as _ from "../../../../../support/Objects/ObjectsCore"; describe( "Checkbox Widget Functionality", - { tags: ["@tag.Widget", "@tag.Filepicker"] }, + { tags: ["@tag.Widget", "@tag.Filepicker", "@tag.Binding"] }, function () { before(() => { _.agHelper.AddDsl("filePickerV2WidgetReskinDsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Filepicker/FilePickerV2_Widget_reset_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Filepicker/FilePickerV2_Widget_reset_spec.js index 53e652424106..abb8c22096fc 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Filepicker/FilePickerV2_Widget_reset_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Filepicker/FilePickerV2_Widget_reset_spec.js @@ -5,7 +5,7 @@ import * as _ from "../../../../../support/Objects/ObjectsCore"; describe( "File Picker Widget V2 Functionality", - { tags: ["@tag.Widget", "@tag.Filepicker"] }, + { tags: ["@tag.Widget", "@tag.Filepicker", "@tag.Binding"] }, function () { before(() => { _.agHelper.AddDsl("filePickerV2_reset_check_dsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Filepicker/FilePickerV2_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Filepicker/FilePickerV2_spec.js index 47253f3d615a..b6d361738491 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Filepicker/FilePickerV2_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Filepicker/FilePickerV2_spec.js @@ -12,7 +12,7 @@ const widgetName = "filepickerwidgetv2"; describe( "File picker widget v2", - { tags: ["@tag.Widget", "@tag.Filepicker"] }, + { tags: ["@tag.Widget", "@tag.Filepicker", "@tag.Binding"] }, () => { it("1. Drag & drop FilePicker/Text widgets", () => { cy.dragAndDropToCanvas(widgetName, { x: 300, y: 300 }); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Filepicker/FilePicker_with_fileTypes_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Filepicker/FilePicker_with_fileTypes_spec.js index e8343a336b45..bbb10da14572 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Filepicker/FilePicker_with_fileTypes_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Filepicker/FilePicker_with_fileTypes_spec.js @@ -7,7 +7,7 @@ import * as _ from "../../../../../support/Objects/ObjectsCore"; describe( "FilePicker Widget Functionality with different file types", - { tags: ["@tag.Widget", "@tag.Filepicker"] }, + { tags: ["@tag.Widget", "@tag.Filepicker", "@tag.Binding"] }, function () { before(() => { _.agHelper.AddDsl("filepickerDsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Filepicker/Filepicker1_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Filepicker/Filepicker1_spec.js index 50226155ed4b..b951a50a447e 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Filepicker/Filepicker1_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Filepicker/Filepicker1_spec.js @@ -10,7 +10,7 @@ import EditorNavigation, { describe( "FilePicker Widget Functionality", - { tags: ["@tag.Widget", "@tag.Filepicker"] }, + { tags: ["@tag.Widget", "@tag.Filepicker", "@tag.Binding"] }, function () { before(() => { entityExplorer.DragDropWidgetNVerify(draggableWidgets.FILEPICKER); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Form/FormData_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Form/FormData_spec.js index 51f1939d259b..cce668c46f50 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Form/FormData_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Form/FormData_spec.js @@ -1,24 +1,28 @@ import * as _ from "../../../../../support/Objects/ObjectsCore"; -describe("Form data", { tags: ["@tag.Widget", "@tag.Form"] }, function () { - before(() => { - _.agHelper.AddDsl("formDataDsl"); - }); +describe( + "Form data", + { tags: ["@tag.Widget", "@tag.Form", "@tag.Binding"] }, + function () { + before(() => { + _.agHelper.AddDsl("formDataDsl"); + }); - it("CheckboxGroupWidget, MultiSelectTreeWidget, MultiSelectWidgetV2, SelectWidget, SingleSelectTreeWidget, SwitchGroupWidget, PhoneInputWidget, InputWidgetV2 and CurrencyInputWidget should have value props of which values are not null or undefined to be included as a form data", function () { - // Check form data - cy.get("[data-testid='container-wrapper-vannrar7rd'] span") - .should("exist") - .and(($formData) => { - expect($formData).to.contain("FormCheckboxGroupWidget"); - expect($formData).to.contain("FormMultiSelectTreeWidget"); - expect($formData).to.contain("FormMultiSelectWidgetV2"); - expect($formData).to.contain("FormSingleSelectTreeWidget"); - expect($formData).to.contain("FormSwitchGroupWidget"); - expect($formData).to.contain("FormSelectWidget"); - expect($formData).to.contain("FormPhoneInputWidget"); - expect($formData).to.contain("FormInputWidgetV2"); - expect($formData).to.contain("FormCurrencyInputWidget"); - }); - }); -}); + it("CheckboxGroupWidget, MultiSelectTreeWidget, MultiSelectWidgetV2, SelectWidget, SingleSelectTreeWidget, SwitchGroupWidget, PhoneInputWidget, InputWidgetV2 and CurrencyInputWidget should have value props of which values are not null or undefined to be included as a form data", function () { + // Check form data + cy.get("[data-testid='container-wrapper-vannrar7rd'] span") + .should("exist") + .and(($formData) => { + expect($formData).to.contain("FormCheckboxGroupWidget"); + expect($formData).to.contain("FormMultiSelectTreeWidget"); + expect($formData).to.contain("FormMultiSelectWidgetV2"); + expect($formData).to.contain("FormSingleSelectTreeWidget"); + expect($formData).to.contain("FormSwitchGroupWidget"); + expect($formData).to.contain("FormSelectWidget"); + expect($formData).to.contain("FormPhoneInputWidget"); + expect($formData).to.contain("FormInputWidgetV2"); + expect($formData).to.contain("FormCurrencyInputWidget"); + }); + }); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Form/FormReset_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Form/FormReset_spec.js index 06bf2a8ca9e3..a01f0728e1a5 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Form/FormReset_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Form/FormReset_spec.js @@ -3,7 +3,7 @@ import widgets from "../../../../../locators/Widgets.json"; describe( "Form reset functionality", - { tags: ["@tag.Widget", "@tag.Form"] }, + { tags: ["@tag.Widget", "@tag.Form", "@tag.Binding"] }, function () { before(() => { _.agHelper.AddDsl("formResetDsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Form/FormWidget_Nested_HasChanges_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Form/FormWidget_Nested_HasChanges_spec.js index afd94896bde7..146d23800805 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Form/FormWidget_Nested_HasChanges_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Form/FormWidget_Nested_HasChanges_spec.js @@ -1,17 +1,21 @@ import * as _ from "../../../../../support/Objects/ObjectsCore"; -describe("Form Widget", { tags: ["@tag.Widget", "@tag.Form"] }, () => { - before(() => { - _.agHelper.AddDsl("formHasChangesDsl"); - }); +describe( + "Form Widget", + { tags: ["@tag.Widget", "@tag.Form", "@tag.Binding"] }, + () => { + before(() => { + _.agHelper.AddDsl("formHasChangesDsl"); + }); - it("Check hasChanges meta property", () => { - // Check if isDirty is false for the first time - cy.contains(".t--widget-textwidget", "false").should("exist"); - // Interact with UI - cy.get(`.t--widget-checkboxwidget label`).first().click(); - // Check if isDirty is set to true - cy.contains(".t--widget-textwidget", "false").should("not.exist"); - cy.contains(".t--widget-textwidget", "true").should("exist"); - }); -}); + it("Check hasChanges meta property", () => { + // Check if isDirty is false for the first time + cy.contains(".t--widget-textwidget", "false").should("exist"); + // Interact with UI + cy.get(`.t--widget-checkboxwidget label`).first().click(); + // Check if isDirty is set to true + cy.contains(".t--widget-textwidget", "false").should("not.exist"); + cy.contains(".t--widget-textwidget", "true").should("exist"); + }); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Form/FormWidget_Select_TreeSelect_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Form/FormWidget_Select_TreeSelect_spec.js index a5914c3f5d45..48540b1e7f85 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Form/FormWidget_Select_TreeSelect_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Form/FormWidget_Select_TreeSelect_spec.js @@ -4,7 +4,7 @@ import { agHelper } from "../../../../../support/Objects/ObjectsCore"; describe( "Form Widget Functionality", - { tags: ["@tag.Widget", "@tag.Form"] }, + { tags: ["@tag.Widget", "@tag.Form", "@tag.Binding"] }, function () { before(() => { agHelper.AddDsl("formSelectTreeselectDsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Form/FormWidget_With_RichTextEditor_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Form/FormWidget_With_RichTextEditor_spec.js index ae07e8828be1..08dadf6b8ed3 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Form/FormWidget_With_RichTextEditor_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Form/FormWidget_With_RichTextEditor_spec.js @@ -4,7 +4,7 @@ const widgetsPage = require("../../../../../locators/Widgets.json"); describe( "RichTextEditor Widget Functionality in Form", - { tags: ["@tag.Widget", "@tag.Form", "@tag.TextEditor"] }, + { tags: ["@tag.Widget", "@tag.Form", "@tag.TextEditor", "@tag.Binding"] }, function () { before(() => { _.agHelper.AddDsl("formWithRTEDsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Form/FormWidget_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Form/FormWidget_spec.js index bacf2927b2e5..1e0e8b65336f 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Form/FormWidget_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Form/FormWidget_spec.js @@ -11,7 +11,7 @@ import * as _ from "../../../../../support/Objects/ObjectsCore"; describe( "Form Widget Functionality", - { tags: ["@tag.Widget", "@tag.Form"] }, + { tags: ["@tag.Widget", "@tag.Form", "@tag.Binding"] }, function () { before(() => { _.agHelper.AddDsl("formdsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Form/FormWithSwitch_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Form/FormWithSwitch_spec.js index 17d8f6b74a01..99052f9d079f 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Form/FormWithSwitch_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Form/FormWithSwitch_spec.js @@ -8,7 +8,7 @@ import * as _ from "../../../../../support/Objects/ObjectsCore"; describe( "Switch Widget within Form widget Functionality", - { tags: ["@tag.Widget", "@tag.Form"] }, + { tags: ["@tag.Widget", "@tag.Form", "@tag.Binding"] }, function () { before(() => { _.agHelper.AddDsl("formSwitchDsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Form/Form_With_CheckBox_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Form/Form_With_CheckBox_spec.js index d5ffd22fa129..855123bb9978 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Form/Form_With_CheckBox_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Form/Form_With_CheckBox_spec.js @@ -5,7 +5,7 @@ import * as _ from "../../../../../support/Objects/ObjectsCore"; describe( "Checkbox Widget Functionality", - { tags: ["@tag.Widget", "@tag.Form"] }, + { tags: ["@tag.Widget", "@tag.Form", "@tag.Binding"] }, function () { before(() => { _.agHelper.AddDsl("formWidgetdsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Iframe/IframeTest_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Iframe/IframeTest_spec.ts index 51b452e6c3ca..3d67faf40033 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Iframe/IframeTest_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Iframe/IframeTest_spec.ts @@ -10,7 +10,7 @@ import testdata from "../../../../../fixtures/testdata.json"; describe( "Iframe widget Tests", - { tags: ["@tag.Widget", "@tag.Iframe"] }, + { tags: ["@tag.Widget", "@tag.Iframe", "@tag.Binding"] }, function () { before(() => { entityExplorer.DragDropWidgetNVerify("iframewidget", 550, 100); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Iframe/Iframe_onSrcDocChange_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Iframe/Iframe_onSrcDocChange_spec.js index 79a84b9f6afc..4f08e92318ff 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Iframe/Iframe_onSrcDocChange_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Iframe/Iframe_onSrcDocChange_spec.js @@ -10,7 +10,7 @@ const page1 = "Page1"; describe( "Iframe Widget functionality", - { tags: ["@tag.Widget", "@tag.Iframe"] }, + { tags: ["@tag.Widget", "@tag.Iframe", "@tag.Binding"] }, function () { it("1.Import application json", function () { cy.visit("/applications", { timeout: 60000 }); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Iframe/Iframe_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Iframe/Iframe_spec.js index 49d29ff6dccd..62890ddc7413 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Iframe/Iframe_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Iframe/Iframe_spec.js @@ -2,7 +2,7 @@ import * as _ from "../../../../../support/Objects/ObjectsCore"; describe( "Iframe Widget functionality", - { tags: ["@tag.Widget", "@tag.Iframe"] }, + { tags: ["@tag.Widget", "@tag.Iframe", "@tag.Binding"] }, function () { before(() => { _.agHelper.AddDsl("IframeDsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Image/Image2_Spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Image/Image2_Spec.ts index bf7d32d38521..e991a66c2742 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Image/Image2_Spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Image/Image2_Spec.ts @@ -13,7 +13,7 @@ import EditorNavigation, { describe( "Image widget tests", - { tags: ["@tag.Widget", "@tag.Image"] }, + { tags: ["@tag.Widget", "@tag.Image", "@tag.Binding"] }, function () { const image = (src: string) => 'img[src="' + src + '"]'; const jpgImg = diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Image/Image3_Spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Image/Image3_Spec.ts index 1b0fb86b0fc9..e0cbcad39cc5 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Image/Image3_Spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Image/Image3_Spec.ts @@ -13,7 +13,7 @@ import EditorNavigation, { describe( "Image widget - Rotation & Download", - { tags: ["@tag.Widget", "@tag.Image"] }, + { tags: ["@tag.Widget", "@tag.Image", "@tag.Binding"] }, function () { const jpgImg = "https://community.appsmith.com/sites/default/files/styles/small_thumbnail/public/2024-03/aws-logo.jpg?itok=yG4bpfFs"; diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Image/Image_base64_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Image/Image_base64_spec.js index 804e8531ef9c..b10747276f83 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Image/Image_base64_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Image/Image_base64_spec.js @@ -3,7 +3,7 @@ import * as _ from "../../../../../support/Objects/ObjectsCore"; describe( "Image Widget Functionality with base64", - { tags: ["@tag.Widget", "@tag.Image"] }, + { tags: ["@tag.Widget", "@tag.Image", "@tag.Binding"] }, function () { before(() => { _.agHelper.AddDsl("base64imagedsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Image/Image_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Image/Image_spec.js index 7059d211196b..01e0a4a32783 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Image/Image_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Image/Image_spec.js @@ -10,7 +10,7 @@ import { describe( "Image Widget Functionality", - { tags: ["@tag.Widget", "@tag.Image"] }, + { tags: ["@tag.Widget", "@tag.Image", "@tag.Binding"] }, function () { before(() => { agHelper.AddDsl("displayWidgetDsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Image/Image_validation_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Image/Image_validation_spec.js index 682c2031eb03..fac0f3e7dd80 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Image/Image_validation_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Image/Image_validation_spec.js @@ -3,7 +3,7 @@ import * as _ from "../../../../../support/Objects/ObjectsCore"; describe( "Image Widget Validation Image Urls", - { tags: ["@tag.Widget", "@tag.Image"] }, + { tags: ["@tag.Widget", "@tag.Image", "@tag.Binding"] }, function () { before(() => { _.agHelper.AddDsl("displayWidgetDsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Input/Input2_Spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Input/Input2_Spec.ts index cc81c42a399a..9000508eafc0 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Input/Input2_Spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Input/Input2_Spec.ts @@ -13,7 +13,7 @@ import EditorNavigation, { describe( "InputV2 widget tests", - { tags: ["@tag.Widget", "@tag.Input"] }, + { tags: ["@tag.Widget", "@tag.Input", "@tag.Binding"] }, function () { let testcases, multilineData = `[ diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Input/Input3_Spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Input/Input3_Spec.ts index fb0886bd52a2..18d754517aa4 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Input/Input3_Spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Input/Input3_Spec.ts @@ -13,7 +13,7 @@ import EditorNavigation, { describe( "InputV2 widget tests - continuation", - { tags: ["@tag.Widget", "@tag.Input"] }, + { tags: ["@tag.Widget", "@tag.Input", "@tag.Binding"] }, function () { before(() => { entityExplorer.DragDropWidgetNVerify(draggableWidgets.INPUT_V2); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Input/Input_MaxChar_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Input/Input_MaxChar_spec.js index 444b07a3905f..140adc42e50f 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Input/Input_MaxChar_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Input/Input_MaxChar_spec.js @@ -4,7 +4,7 @@ const widgetsPage = require("../../../../../locators/Widgets.json"); describe( "Input Widget Max Char Functionality", - { tags: ["@tag.Widget", "@tag.Input"] }, + { tags: ["@tag.Widget", "@tag.Input", "@tag.Binding"] }, function () { afterEach(() => { _.agHelper.SaveLocalStorageCache(); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Input/Input_Multiline_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Input/Input_Multiline_spec.js index 48e4c3fd1ffb..1b5f1d4cc77c 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Input/Input_Multiline_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Input/Input_Multiline_spec.js @@ -8,7 +8,7 @@ import homePage from "../../../../../locators/HomePage"; describe( "Input Widget Multiline feature", - { tags: ["@tag.Widget", "@tag.Input"] }, + { tags: ["@tag.Widget", "@tag.Input", "@tag.Binding"] }, function () { const modifierKey = Cypress.platform === "darwin" ? "meta" : "ctrl"; it("1. Single-line text with different heights i.e. Auto height and Fixed", () => { diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Input/Input_OnFocus_OnBlur_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Input/Input_OnFocus_OnBlur_spec.js index 4d3c2f4b3fc5..0eb799fdeefa 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Input/Input_OnFocus_OnBlur_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Input/Input_OnFocus_OnBlur_spec.js @@ -14,7 +14,7 @@ const agHelper = ObjectsRegistry.AggregateHelper; describe( "Input Widget Property tests onFocus and onBlur", - { tags: ["@tag.Widget", "@tag.Input"] }, + { tags: ["@tag.Widget", "@tag.Input", "@tag.Binding"] }, function () { it("1. onBlur and onFocus should be triggered from the input widget", () => { cy.dragAndDropToCanvas(inputWidgetName, { x: 300, y: 200 }); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Input/Input_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Input/Input_spec.js index 2491002404c2..b94fa422bd60 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Input/Input_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Input/Input_spec.js @@ -5,7 +5,7 @@ import * as _ from "../../../../../support/Objects/ObjectsCore"; describe( "Input Widget Functionality", - { tags: ["@tag.Widget", "@tag.Input"] }, + { tags: ["@tag.Widget", "@tag.Input", "@tag.Binding"] }, function () { before(() => { _.agHelper.AddDsl("newFormDsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Input/Inputv2_ShowStepArrows_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Input/Inputv2_ShowStepArrows_spec.js index b29bd02cf410..ebc4162c2d1b 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Input/Inputv2_ShowStepArrows_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Input/Inputv2_ShowStepArrows_spec.js @@ -5,7 +5,7 @@ const widgetName = "inputwidgetv2"; describe( "Input Widget V2 showStepArrows Functionality - ", - { tags: ["@tag.Widget", "@tag.Input"] }, + { tags: ["@tag.Widget", "@tag.Input", "@tag.Binding"] }, function () { it("1. Validate that dataType - NUMBER, For new widgets being dragged, the value for showStepArrows should be set to false", () => { cy.dragAndDropToCanvas(widgetName, { x: 300, y: 400 }); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Input/Inputv2_inside_List_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Input/Inputv2_inside_List_spec.js index 63c7a790bd05..291ece7961e1 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Input/Inputv2_inside_List_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Input/Inputv2_inside_List_spec.js @@ -3,176 +3,184 @@ import * as _ from "../../../../../support/Objects/ObjectsCore"; const widgetName = "inputwidgetv2"; const widgetInput = `.t--widget-${widgetName} input`; -describe("Input widget V2 - ", { tags: ["@tag.Widget", "@tag.Input"] }, () => { - before(() => { - _.agHelper.AddDsl("InputWidgetV2InsideListDSL"); - }); +describe( + "Input widget V2 - ", + { tags: ["@tag.Widget", "@tag.Input", "@tag.Binding"] }, + () => { + before(() => { + _.agHelper.AddDsl("InputWidgetV2InsideListDSL"); + }); - it("1. Validate input widget resets OnSubmit", () => { - cy.openPropertyPane(widgetName); - cy.getAlert("onSubmit", "Submitted!!"); - cy.get(widgetInput).clear({ force: true }); - cy.wait(300); - cy.get(widgetInput).type("test{enter}"); //Clicking enter submits the form here - cy.wait(300); - cy.get(widgetInput).should("contain.value", ""); - }); + it("1. Validate input widget resets OnSubmit", () => { + cy.openPropertyPane(widgetName); + cy.getAlert("onSubmit", "Submitted!!"); + cy.get(widgetInput).clear({ force: true }); + cy.wait(300); + cy.get(widgetInput).type("test{enter}"); //Clicking enter submits the form here + cy.wait(300); + cy.get(widgetInput).should("contain.value", ""); + }); - it("2. Validate DataType - TEXT can be entered into Input widget", () => { - [ - { - input: "test", - expected: "test:true:false", - }, - { - input: "test123", - expected: "test123:true:false", - }, - { - input: "123", - expected: "123:true:false", - }, - { - input: "", - expected: ":true:false", - }, - { - input: "$100.22", - expected: "$100.22:true:false", - }, - { - input: "test@appsmith.com", - expected: "test@appsmith.com:true:false", - }, - ].forEach(({ expected, input }) => enterAndTest(input, expected)); - }); + it("2. Validate DataType - TEXT can be entered into Input widget", () => { + [ + { + input: "test", + expected: "test:true:false", + }, + { + input: "test123", + expected: "test123:true:false", + }, + { + input: "123", + expected: "123:true:false", + }, + { + input: "", + expected: ":true:false", + }, + { + input: "$100.22", + expected: "$100.22:true:false", + }, + { + input: "test@appsmith.com", + expected: "test@appsmith.com:true:false", + }, + ].forEach(({ expected, input }) => enterAndTest(input, expected)); + }); - it("3. Validate DataType - NUMBER can be entered into Input widget", () => { - cy.openPropertyPane(widgetName); - cy.selectDropdownValue(".t--property-control-datatype input", "Number"); + it("3. Validate DataType - NUMBER can be entered into Input widget", () => { + cy.openPropertyPane(widgetName); + cy.selectDropdownValue(".t--property-control-datatype input", "Number"); - cy.get(".t--property-control-required label").last().click({ force: true }); + cy.get(".t--property-control-required label") + .last() + .click({ force: true }); - cy.selectDropdownValue(".t--property-control-datatype input", "Number"); - [ - { - input: "invalid", - expected: "null:true:false", - }, - { - input: "invalid123", - expected: "123:true:false", - }, - { - input: "123", - expected: "123:true:false", - }, - { - input: "-", - expected: "null:true:false", - }, - { - input: "", - expected: "null:true:false", - }, - { - input: "$100.22", - expected: "100.22:true:false", - }, - { - input: "invalid@appsmith.com", - expected: "null:true:false", - }, - { - input: "1.001", - expected: "1.001:true:false", - }, - { - input: "1.1.", - expected: "null:true:false", - }, - ].forEach(({ expected, input }) => enterAndTest(input, expected)); - }); + cy.selectDropdownValue(".t--property-control-datatype input", "Number"); + [ + { + input: "invalid", + expected: "null:true:false", + }, + { + input: "invalid123", + expected: "123:true:false", + }, + { + input: "123", + expected: "123:true:false", + }, + { + input: "-", + expected: "null:true:false", + }, + { + input: "", + expected: "null:true:false", + }, + { + input: "$100.22", + expected: "100.22:true:false", + }, + { + input: "invalid@appsmith.com", + expected: "null:true:false", + }, + { + input: "1.001", + expected: "1.001:true:false", + }, + { + input: "1.1.", + expected: "null:true:false", + }, + ].forEach(({ expected, input }) => enterAndTest(input, expected)); + }); - it("4. Validate DataType - PASSWORD can be entered into Input widget", () => { - cy.openPropertyPane(widgetName); - cy.selectDropdownValue(".t--property-control-datatype input", "Password"); - [ - { - input: "test", - expected: "test:true:false", - }, - { - input: "test123", - expected: "test123:true:false", - }, - { - input: "123", - expected: "123:true:false", - }, - { - input: "-", - expected: "-:true:false", - }, - { - input: "", - expected: ":true:false", - }, - { - input: "$100.22", - expected: "$100.22:true:false", - }, - { - input: "test@appsmith.com", - expected: "test@appsmith.com:true:false", - }, - ].forEach(({ expected, input }) => enterAndTest(input, expected)); - }); + it("4. Validate DataType - PASSWORD can be entered into Input widget", () => { + cy.openPropertyPane(widgetName); + cy.selectDropdownValue(".t--property-control-datatype input", "Password"); + [ + { + input: "test", + expected: "test:true:false", + }, + { + input: "test123", + expected: "test123:true:false", + }, + { + input: "123", + expected: "123:true:false", + }, + { + input: "-", + expected: "-:true:false", + }, + { + input: "", + expected: ":true:false", + }, + { + input: "$100.22", + expected: "$100.22:true:false", + }, + { + input: "test@appsmith.com", + expected: "test@appsmith.com:true:false", + }, + ].forEach(({ expected, input }) => enterAndTest(input, expected)); + }); - it("5. Validate DataType - EMAIL can be entered into Input widget", () => { - cy.openPropertyPane(widgetName); - cy.selectDropdownValue(".t--property-control-datatype input", "Email"); + it("5. Validate DataType - EMAIL can be entered into Input widget", () => { + cy.openPropertyPane(widgetName); + cy.selectDropdownValue(".t--property-control-datatype input", "Email"); - cy.get(".t--property-control-required label").last().click({ force: true }); + cy.get(".t--property-control-required label") + .last() + .click({ force: true }); - [ - { - input: "test", - expected: "test:true:false", - }, - { - input: "test123", - expected: "test123:true:false", - }, - { - input: "123", - expected: "123:true:false", - }, - { - input: "-", - expected: "-:true:false", - }, - { - input: "", - expected: ":true:false", - }, - { - input: "$100.22", - expected: "$100.22:true:false", - }, - { - input: "test@appsmith.com", - expected: "test@appsmith.com:true:false", - }, - ].forEach(({ expected, input }) => enterAndTest(input, expected)); - }); + [ + { + input: "test", + expected: "test:true:false", + }, + { + input: "test123", + expected: "test123:true:false", + }, + { + input: "123", + expected: "123:true:false", + }, + { + input: "-", + expected: "-:true:false", + }, + { + input: "", + expected: ":true:false", + }, + { + input: "$100.22", + expected: "$100.22:true:false", + }, + { + input: "test@appsmith.com", + expected: "test@appsmith.com:true:false", + }, + ].forEach(({ expected, input }) => enterAndTest(input, expected)); + }); - function enterAndTest(text, expected) { - cy.get(`.t--widget-${widgetName} input`).clear({ force: true }); - cy.wait(300); - if (text) { - cy.get(`.t--widget-${widgetName} input`).click().type(text); + function enterAndTest(text, expected) { + cy.get(`.t--widget-${widgetName} input`).clear({ force: true }); + cy.wait(300); + if (text) { + cy.get(`.t--widget-${widgetName} input`).click().type(text); + } + cy.get(".t--widget-textwidget").should("contain", expected); } - cy.get(".t--widget-textwidget").should("contain", expected); - } -}); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Input/Inputv2_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Input/Inputv2_spec.js index b3fce85a21c5..3c9f53e826d6 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Input/Inputv2_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Input/Inputv2_spec.js @@ -3,479 +3,498 @@ import { agHelper } from "../../../../../support/Objects/ObjectsCore"; const widgetName = "inputwidgetv2"; const widgetInput = `.t--widget-${widgetName} input`; -describe("Input widget V2 - ", { tags: ["@tag.Widget", "@tag.Input"] }, () => { - it("1. DragDrop Input & Label/Text widgets", () => { - cy.dragAndDropToCanvas(widgetName, { x: 300, y: 300 }); - cy.get(`.t--widget-${widgetName}`).should("exist"); - cy.dragAndDropToCanvas("textwidget", { x: 300, y: 500 }); - cy.openPropertyPane("textwidget"); - cy.updateCodeInput( - ".t--property-control-text", - `{{Input1.text}}:{{Input1.value}}:{{Input1.isValid}}`, - ); - }); - - it("2. Validate input widget resets OnSubmit", () => { - cy.openPropertyPane(widgetName); - cy.getAlert("onSubmit", "Submitted!!"); - cy.get(widgetInput).clear(); - cy.wait(300); - cy.get(widgetInput).type("test{enter}"); //Clicking enter submits the form here - cy.wait(300); - cy.get(widgetInput).should("contain.value", ""); - - cy.selectDropdownValue(".t--property-control-datatype input", "Number"); - - cy.get(widgetInput).clear(); - cy.get(widgetInput).type("1.0010{enter}"); //Clicking enter submits the form here - cy.wait(300); - cy.get(widgetInput).should("contain.value", ""); - }); - - it("3. Validate DataType - TEXT can be entered into Input widget", () => { - cy.selectDropdownValue( - ".t--property-control-datatype input", - "Single-line text", - ); - [ - { - input: "test", - expected: "test:test:true", - }, - { - input: "test123", - expected: "test123:test123:true", - }, - { - input: "123", - expected: "123:123:true", - }, - { - input: "", - expected: "::true", - }, - { - input: "$100.22", - expected: "$100.22:$100.22:true", - }, - { - input: "test@appsmith.com", - expected: "test@appsmith.com:test@appsmith.com:true", - }, - ].forEach(({ expected, input }) => enterAndTest(input, expected)); - - cy.openPropertyPane(widgetName); - - //required: on - cy.get(".t--property-control-required label").last().click({ force: true }); - - [ - { - input: "test", - expected: "test:test:true", - }, - { - input: "test123", - expected: "test123:test123:true", - }, - { - input: "123", - expected: "123:123:true", - }, - { - input: "-", - expected: "-:-:true", - }, - { - input: "", - expected: "::false", - }, - { - input: "$100.22", - expected: "$100.22:$100.22:true", - }, - { - input: "test@appsmith.com", - expected: "test@appsmith.com:test@appsmith.com:true", - }, - { - input: "", - expected: "::false", - }, - ].forEach(({ expected, input }) => enterAndTest(input, expected)); - }); - - it("4. Validate DataType - NUMBER can be entered into Input widget", () => { - cy.openPropertyPane(widgetName); - cy.selectDropdownValue(".t--property-control-datatype input", "Number"); - [ - { - input: "invalid", - expected: "null:null:false", - }, - { - input: "invalid123", - expected: "123:123:true", - }, - { - input: "123", - expected: "123:123:true", - }, - { - input: "-", - expected: "null:null:false", - }, - { - input: "", - expected: "null:null:false", - }, - { - input: "$100.22", - expected: "100.22:100.22:true", - }, - { - input: "invalid@appsmith.com", - expected: "null:null:false", - }, - { - input: "1.001", - expected: "1.001:1.001:true", - }, - { - input: "1.1.", - expected: "null:null:false", - }, - ].forEach(({ expected, input }) => enterAndTest(input, expected)); - - //required: off - cy.get(".t--property-control-required label").last().click({ force: true }); - - cy.selectDropdownValue(".t--property-control-datatype input", "Number"); - [ - { - input: "invalid", - expected: "null:null:true", - }, - { - input: "invalid123", - expected: "123:123:true", - }, - { - input: "123", - expected: "123:123:true", - }, - { - input: "-", - expected: "null:null:false", - }, - { - input: "", - expected: "null:null:true", - }, - { - input: "$100.22", - expected: "100.22:100.22:true", - }, - { - input: "invalid@appsmith.com", - expected: "null:null:false", - }, - { - input: "1.001", - expected: "1.001:1.001:true", - }, - { - input: "1.1.", - expected: "null:null:false", - }, - ].forEach(({ expected, input }) => enterAndTest(input, expected)); - }); - - it("5. Validate DataType - PASSWORD can be entered into Input widget", () => { - cy.openPropertyPane(widgetName); - cy.selectDropdownValue(".t--property-control-datatype input", "Password"); - [ - { - input: "test", - expected: "test:test:true", - }, - { - input: "test123", - expected: "test123:test123:true", - }, - { - input: "123", - expected: "123:123:true", - }, - { - input: "-", - expected: "-:-:true", - }, - { - input: "", - expected: "::true", - }, - { - input: "$100.22", - expected: "$100.22:$100.22:true", - }, - { - input: "test@appsmith.com", - expected: "test@appsmith.com:test@appsmith.com:true", - }, - ].forEach(({ expected, input }) => enterAndTest(input, expected)); - - //required: on - cy.get(".t--property-control-required label").last().click({ force: true }); - - [ - { - input: "test", - expected: "test:test:true", - }, - { - input: "test123", - expected: "test123:test123:true", - }, - { - input: "123", - expected: "123:123:true", - }, - { - input: "-", - expected: "-:-:true", - }, - { - input: "", - expected: "::false", - }, - { - input: "$100.22", - expected: "$100.22:$100.22:true", - }, - { - input: "test@appsmith.com", - expected: "test@appsmith.com:test@appsmith.com:true", - }, - ].forEach(({ expected, input }) => enterAndTest(input, expected)); - - validateAutocompleteAttribute(); - }); - - it("6. Validate DataType - EMAIL can be entered into Input widget", () => { - cy.openPropertyPane(widgetName); - cy.selectDropdownValue(".t--property-control-datatype input", "Email"); - [ - { - input: "test", - expected: "test:test:false", - }, - { - input: "test123", - expected: "test123:test123:false", - }, - { - input: "123", - expected: "123:123:false", - }, - { - input: "-", - expected: "-:-:false", - }, - { - input: "", - expected: "::false", - }, - { - input: "$100.22", - expected: "$100.22:$100.22:false", - }, - { - input: "test@appsmith.com", - expected: "test@appsmith.com:test@appsmith.com:true", - }, - ].forEach(({ expected, input }) => enterAndTest(input, expected)); - - //required: off - cy.get(".t--property-control-required label").last().click({ force: true }); - - [ - { - input: "test", - expected: "test:test:false", - }, - { - input: "test123", - expected: "test123:test123:false", - }, - { - input: "123", - expected: "123:123:false", - }, - { - input: "-", - expected: "-:-:false", - }, - { - input: "", - expected: "::true", - }, - { - input: "$100.22", - expected: "$100.22:$100.22:false", - }, - { - input: "test@appsmith.com", - expected: "test@appsmith.com:test@appsmith.com:true", - }, - ].forEach(({ expected, input }) => enterAndTest(input, expected)); - - validateAutocompleteAttribute(); - }); - - it("7. Validating other properties - Input validity with #valid", () => { - cy.openPropertyPane(widgetName); - [ - ["{{1 === 2}}", "false", true], - ["", "true", false], - ["{{1 === 1}}", "true", true], - ["", "true", false], - ].forEach(([input, expected, isValueDynamic]) => { - cy.updateCodeInput(".t--property-control-valid", input); - cy.wait(500); - isValueDynamic && cy.validateEvaluatedValue(expected); +describe( + "Input widget V2 - ", + { tags: ["@tag.Widget", "@tag.Input", "@tag.Binding"] }, + () => { + it("1. DragDrop Input & Label/Text widgets", () => { + cy.dragAndDropToCanvas(widgetName, { x: 300, y: 300 }); + cy.get(`.t--widget-${widgetName}`).should("exist"); + cy.dragAndDropToCanvas("textwidget", { x: 300, y: 500 }); + cy.openPropertyPane("textwidget"); + cy.updateCodeInput( + ".t--property-control-text", + `{{Input1.text}}:{{Input1.value}}:{{Input1.isValid}}`, + ); }); - }); - - it("8. onSubmit should be triggered with the whole input value", () => { - cy.openPropertyPane(widgetName); - cy.selectDropdownValue( - ".t--property-control-datatype input", - "Single-line text", - ); - cy.get(".t--property-control-required label").last().click({ force: true }); - // Set onSubmit action, storing value - cy.get(".t--property-control-onsubmit").find(".t--js-toggle").click(); - cy.updateCodeInput( - ".t--property-control-onsubmit", - "{{storeValue('textPayloadOnSubmit',Input1.text)}}", - ); - // Bind to stored value above - cy.openPropertyPane("textwidget"); - cy.updateCodeInput( - ".t--property-control-text", - "{{appsmith.store.textPayloadOnSubmit}}", - ); - agHelper.AssertAutoSave(); - - cy.closePropertyPane(); - cy.get(widgetInput).clear(); - cy.wait(300); - // Input text and hit enter key - cy.get(widgetInput).type("test{enter}"); - // Assert if the Text widget contains the whole value, test - cy.get(".t--widget-textwidget").should("have.text", "test"); - }); - - it("9. changing default text should change text", () => { - cy.openPropertyPane("textwidget"); - cy.updateCodeInput( - ".t--property-control-text", - `{{Input1.text}}:{{Input1.value}}:{{Input1.isValid}}`, - ); - cy.openPropertyPane(widgetName); - cy.updateCodeInput(".t--property-control-defaultvalue", `test`); - // wait for evaluations - cy.wait(300); - cy.get(`.t--widget-${widgetName} input`).should("contain.value", "test"); - cy.get(".t--widget-textwidget").should("contain", "test:test:true"); - - cy.updateCodeInput(".t--property-control-defaultvalue", `anotherText`); - // wait for evaluations - cy.wait(300); - cy.get(`.t--widget-${widgetName} input`).should( - "contain.value", - "anotherText", - ); - cy.get(".t--widget-textwidget").should( - "contain", - "anotherText:anotherText:true", - ); - - cy.selectDropdownValue(".t--property-control-datatype input", "Number"); - - cy.updateCodeInput(".t--property-control-defaultvalue", `{{1}}`); - // wait for evaluations - cy.wait(300); - cy.get(`.t--widget-${widgetName} input`).should("contain.value", "1"); - cy.get(".t--widget-textwidget").should("contain", "1:1:true"); - - cy.updateCodeInput(".t--property-control-defaultvalue", `{{1.00010000}}`); - // wait for evaluations - cy.wait(300); - cy.get(`.t--widget-${widgetName} input`).should("contain.value", "1.0001"); - cy.get(".t--widget-textwidget").should("contain", "1.0001:1.0001:true"); - }); - - it("10. Check isDirty meta property", function () { - cy.openPropertyPane("textwidget"); - cy.updateCodeInput(".t--property-control-text", `{{Input1.isDirty}}`); - // Init isDirty - cy.openPropertyPane(widgetName); - cy.selectDropdownValue( - ".t--property-control-datatype input", - "Single-line text", - ); - cy.updateCodeInput(".t--property-control-defaultvalue", "a"); - // Check if initial value of isDirty is false - cy.get(".t--widget-textwidget").should("contain", "false"); - // Interact with UI - cy.get(widgetInput).clear(); - cy.wait(300); - cy.get(widgetInput).type("b"); - cy.wait(300); - // Check if isDirty is set to true - cy.get(".t--widget-textwidget").should("contain", "true"); - // Change defaultText - cy.openPropertyPane(widgetName); - cy.updateCodeInput(".t--property-control-defaultvalue", "c"); - // Check if isDirty is reset to false - cy.get(".t--widget-textwidget").should("contain", "false"); - }); - - function enterAndTest(text, expected) { - cy.get(`.t--widget-${widgetName} input`).clear(); - cy.wait(300); - if (text) { - cy.get(`.t--widget-${widgetName} input`) - .click({ force: true }) - .type(text); + + it("2. Validate input widget resets OnSubmit", () => { + cy.openPropertyPane(widgetName); + cy.getAlert("onSubmit", "Submitted!!"); + cy.get(widgetInput).clear(); + cy.wait(300); + cy.get(widgetInput).type("test{enter}"); //Clicking enter submits the form here + cy.wait(300); + cy.get(widgetInput).should("contain.value", ""); + + cy.selectDropdownValue(".t--property-control-datatype input", "Number"); + + cy.get(widgetInput).clear(); + cy.get(widgetInput).type("1.0010{enter}"); //Clicking enter submits the form here + cy.wait(300); + cy.get(widgetInput).should("contain.value", ""); + }); + + it("3. Validate DataType - TEXT can be entered into Input widget", () => { + cy.selectDropdownValue( + ".t--property-control-datatype input", + "Single-line text", + ); + [ + { + input: "test", + expected: "test:test:true", + }, + { + input: "test123", + expected: "test123:test123:true", + }, + { + input: "123", + expected: "123:123:true", + }, + { + input: "", + expected: "::true", + }, + { + input: "$100.22", + expected: "$100.22:$100.22:true", + }, + { + input: "test@appsmith.com", + expected: "test@appsmith.com:test@appsmith.com:true", + }, + ].forEach(({ expected, input }) => enterAndTest(input, expected)); + + cy.openPropertyPane(widgetName); + + //required: on + cy.get(".t--property-control-required label") + .last() + .click({ force: true }); + + [ + { + input: "test", + expected: "test:test:true", + }, + { + input: "test123", + expected: "test123:test123:true", + }, + { + input: "123", + expected: "123:123:true", + }, + { + input: "-", + expected: "-:-:true", + }, + { + input: "", + expected: "::false", + }, + { + input: "$100.22", + expected: "$100.22:$100.22:true", + }, + { + input: "test@appsmith.com", + expected: "test@appsmith.com:test@appsmith.com:true", + }, + { + input: "", + expected: "::false", + }, + ].forEach(({ expected, input }) => enterAndTest(input, expected)); + }); + + it("4. Validate DataType - NUMBER can be entered into Input widget", () => { + cy.openPropertyPane(widgetName); + cy.selectDropdownValue(".t--property-control-datatype input", "Number"); + [ + { + input: "invalid", + expected: "null:null:false", + }, + { + input: "invalid123", + expected: "123:123:true", + }, + { + input: "123", + expected: "123:123:true", + }, + { + input: "-", + expected: "null:null:false", + }, + { + input: "", + expected: "null:null:false", + }, + { + input: "$100.22", + expected: "100.22:100.22:true", + }, + { + input: "invalid@appsmith.com", + expected: "null:null:false", + }, + { + input: "1.001", + expected: "1.001:1.001:true", + }, + { + input: "1.1.", + expected: "null:null:false", + }, + ].forEach(({ expected, input }) => enterAndTest(input, expected)); + + //required: off + cy.get(".t--property-control-required label") + .last() + .click({ force: true }); + + cy.selectDropdownValue(".t--property-control-datatype input", "Number"); + [ + { + input: "invalid", + expected: "null:null:true", + }, + { + input: "invalid123", + expected: "123:123:true", + }, + { + input: "123", + expected: "123:123:true", + }, + { + input: "-", + expected: "null:null:false", + }, + { + input: "", + expected: "null:null:true", + }, + { + input: "$100.22", + expected: "100.22:100.22:true", + }, + { + input: "invalid@appsmith.com", + expected: "null:null:false", + }, + { + input: "1.001", + expected: "1.001:1.001:true", + }, + { + input: "1.1.", + expected: "null:null:false", + }, + ].forEach(({ expected, input }) => enterAndTest(input, expected)); + }); + + it("5. Validate DataType - PASSWORD can be entered into Input widget", () => { + cy.openPropertyPane(widgetName); + cy.selectDropdownValue(".t--property-control-datatype input", "Password"); + [ + { + input: "test", + expected: "test:test:true", + }, + { + input: "test123", + expected: "test123:test123:true", + }, + { + input: "123", + expected: "123:123:true", + }, + { + input: "-", + expected: "-:-:true", + }, + { + input: "", + expected: "::true", + }, + { + input: "$100.22", + expected: "$100.22:$100.22:true", + }, + { + input: "test@appsmith.com", + expected: "test@appsmith.com:test@appsmith.com:true", + }, + ].forEach(({ expected, input }) => enterAndTest(input, expected)); + + //required: on + cy.get(".t--property-control-required label") + .last() + .click({ force: true }); + + [ + { + input: "test", + expected: "test:test:true", + }, + { + input: "test123", + expected: "test123:test123:true", + }, + { + input: "123", + expected: "123:123:true", + }, + { + input: "-", + expected: "-:-:true", + }, + { + input: "", + expected: "::false", + }, + { + input: "$100.22", + expected: "$100.22:$100.22:true", + }, + { + input: "test@appsmith.com", + expected: "test@appsmith.com:test@appsmith.com:true", + }, + ].forEach(({ expected, input }) => enterAndTest(input, expected)); + + validateAutocompleteAttribute(); + }); + + it("6. Validate DataType - EMAIL can be entered into Input widget", () => { + cy.openPropertyPane(widgetName); + cy.selectDropdownValue(".t--property-control-datatype input", "Email"); + [ + { + input: "test", + expected: "test:test:false", + }, + { + input: "test123", + expected: "test123:test123:false", + }, + { + input: "123", + expected: "123:123:false", + }, + { + input: "-", + expected: "-:-:false", + }, + { + input: "", + expected: "::false", + }, + { + input: "$100.22", + expected: "$100.22:$100.22:false", + }, + { + input: "test@appsmith.com", + expected: "test@appsmith.com:test@appsmith.com:true", + }, + ].forEach(({ expected, input }) => enterAndTest(input, expected)); + + //required: off + cy.get(".t--property-control-required label") + .last() + .click({ force: true }); + + [ + { + input: "test", + expected: "test:test:false", + }, + { + input: "test123", + expected: "test123:test123:false", + }, + { + input: "123", + expected: "123:123:false", + }, + { + input: "-", + expected: "-:-:false", + }, + { + input: "", + expected: "::true", + }, + { + input: "$100.22", + expected: "$100.22:$100.22:false", + }, + { + input: "test@appsmith.com", + expected: "test@appsmith.com:test@appsmith.com:true", + }, + ].forEach(({ expected, input }) => enterAndTest(input, expected)); + + validateAutocompleteAttribute(); + }); + + it("7. Validating other properties - Input validity with #valid", () => { + cy.openPropertyPane(widgetName); + [ + ["{{1 === 2}}", "false", true], + ["", "true", false], + ["{{1 === 1}}", "true", true], + ["", "true", false], + ].forEach(([input, expected, isValueDynamic]) => { + cy.updateCodeInput(".t--property-control-valid", input); + cy.wait(500); + isValueDynamic && cy.validateEvaluatedValue(expected); + }); + }); + + it("8. onSubmit should be triggered with the whole input value", () => { + cy.openPropertyPane(widgetName); + cy.selectDropdownValue( + ".t--property-control-datatype input", + "Single-line text", + ); + cy.get(".t--property-control-required label") + .last() + .click({ force: true }); + // Set onSubmit action, storing value + cy.get(".t--property-control-onsubmit").find(".t--js-toggle").click(); + cy.updateCodeInput( + ".t--property-control-onsubmit", + "{{storeValue('textPayloadOnSubmit',Input1.text)}}", + ); + // Bind to stored value above + cy.openPropertyPane("textwidget"); + cy.updateCodeInput( + ".t--property-control-text", + "{{appsmith.store.textPayloadOnSubmit}}", + ); + agHelper.AssertAutoSave(); + + cy.closePropertyPane(); + cy.get(widgetInput).clear(); + cy.wait(300); + // Input text and hit enter key + cy.get(widgetInput).type("test{enter}"); + // Assert if the Text widget contains the whole value, test + cy.get(".t--widget-textwidget").should("have.text", "test"); + }); + + it("9. changing default text should change text", () => { + cy.openPropertyPane("textwidget"); + cy.updateCodeInput( + ".t--property-control-text", + `{{Input1.text}}:{{Input1.value}}:{{Input1.isValid}}`, + ); + cy.openPropertyPane(widgetName); + cy.updateCodeInput(".t--property-control-defaultvalue", `test`); + // wait for evaluations + cy.wait(300); + cy.get(`.t--widget-${widgetName} input`).should("contain.value", "test"); + cy.get(".t--widget-textwidget").should("contain", "test:test:true"); + + cy.updateCodeInput(".t--property-control-defaultvalue", `anotherText`); + // wait for evaluations + cy.wait(300); + cy.get(`.t--widget-${widgetName} input`).should( + "contain.value", + "anotherText", + ); + cy.get(".t--widget-textwidget").should( + "contain", + "anotherText:anotherText:true", + ); + + cy.selectDropdownValue(".t--property-control-datatype input", "Number"); + + cy.updateCodeInput(".t--property-control-defaultvalue", `{{1}}`); + // wait for evaluations + cy.wait(300); + cy.get(`.t--widget-${widgetName} input`).should("contain.value", "1"); + cy.get(".t--widget-textwidget").should("contain", "1:1:true"); + + cy.updateCodeInput(".t--property-control-defaultvalue", `{{1.00010000}}`); + // wait for evaluations + cy.wait(300); + cy.get(`.t--widget-${widgetName} input`).should( + "contain.value", + "1.0001", + ); + cy.get(".t--widget-textwidget").should("contain", "1.0001:1.0001:true"); + }); + + it("10. Check isDirty meta property", function () { + cy.openPropertyPane("textwidget"); + cy.updateCodeInput(".t--property-control-text", `{{Input1.isDirty}}`); + // Init isDirty + cy.openPropertyPane(widgetName); + cy.selectDropdownValue( + ".t--property-control-datatype input", + "Single-line text", + ); + cy.updateCodeInput(".t--property-control-defaultvalue", "a"); + // Check if initial value of isDirty is false + cy.get(".t--widget-textwidget").should("contain", "false"); + // Interact with UI + cy.get(widgetInput).clear(); + cy.wait(300); + cy.get(widgetInput).type("b"); + cy.wait(300); + // Check if isDirty is set to true + cy.get(".t--widget-textwidget").should("contain", "true"); + // Change defaultText + cy.openPropertyPane(widgetName); + cy.updateCodeInput(".t--property-control-defaultvalue", "c"); + // Check if isDirty is reset to false + cy.get(".t--widget-textwidget").should("contain", "false"); + }); + + function enterAndTest(text, expected) { + cy.get(`.t--widget-${widgetName} input`).clear(); + cy.wait(300); + if (text) { + cy.get(`.t--widget-${widgetName} input`) + .click({ force: true }) + .type(text); + } + cy.get(".t--widget-textwidget").should("contain", expected); + } + + function validateAutocompleteAttribute() { + //validate autocomplete behaviour for email and password + + cy.openPropertyPane("textwidget"); + cy.openPropertyPane(widgetName); + //check if autofill toggle option is present and is checked by default + cy.get(".t--property-control-allowautofill input").should("be.checked"); + //check if autocomplete attribute is not present in the text widget when autofill is enabled + cy.get(widgetInput).should("not.have.attr", "autocomplete"); + + //toggle off autofill + cy.get(".t--property-control-allowautofill input").click({ force: true }); + cy.get(".t--property-control-allowautofill input").should( + "not.be.checked", + ); + + //autocomplete should now be present in the text widget + cy.get(widgetInput).should("have.attr", "autocomplete", "off"); + + //select a non email or password option + cy.selectDropdownValue(".t--property-control-datatype input", "text"); + //autofill toggle should not be present as this restores autofill to be enabled + cy.get(".t--property-control-allowautofill input").should("not.exist"); + //autocomplete attribute should not be present in the text widget + cy.get(widgetInput).should("not.have.attr", "autocomplete"); } - cy.get(".t--widget-textwidget").should("contain", expected); - } - - function validateAutocompleteAttribute() { - //validate autocomplete behaviour for email and password - - cy.openPropertyPane("textwidget"); - cy.openPropertyPane(widgetName); - //check if autofill toggle option is present and is checked by default - cy.get(".t--property-control-allowautofill input").should("be.checked"); - //check if autocomplete attribute is not present in the text widget when autofill is enabled - cy.get(widgetInput).should("not.have.attr", "autocomplete"); - - //toggle off autofill - cy.get(".t--property-control-allowautofill input").click({ force: true }); - cy.get(".t--property-control-allowautofill input").should("not.be.checked"); - - //autocomplete should now be present in the text widget - cy.get(widgetInput).should("have.attr", "autocomplete", "off"); - - //select a non email or password option - cy.selectDropdownValue(".t--property-control-datatype input", "text"); - //autofill toggle should not be present as this restores autofill to be enabled - cy.get(".t--property-control-allowautofill input").should("not.exist"); - //autocomplete attribute should not be present in the text widget - cy.get(widgetInput).should("not.have.attr", "autocomplete"); - } -}); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_ArrayField_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_ArrayField_spec.js index 249fb2cf6118..fa62fb571058 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_ArrayField_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_ArrayField_spec.js @@ -18,7 +18,7 @@ import { describe( "JSON Form Widget Array Field", - { tags: ["@tag.Widget", "@tag.JSONForm"] }, + { tags: ["@tag.Widget", "@tag.JSONForm", "@tag.Binding"] }, () => { beforeEach(() => { agHelper.RestoreLocalStorageCache(); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_AutoGenerateFormDisabled_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_AutoGenerateFormDisabled_spec.js index 23894738bcb6..d1c22d3395f0 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_AutoGenerateFormDisabled_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_AutoGenerateFormDisabled_spec.js @@ -13,7 +13,7 @@ import { describe( "JSON Form Widget AutoGenerate Disabled", - { tags: ["@tag.Widget", "@tag.JSONForm", "@tag.Sanity"] }, + { tags: ["@tag.Widget", "@tag.JSONForm", "@tag.Sanity", "@tag.Binding"] }, () => { before(() => { agHelper.AddDsl("jsonFormDslWithSchemaAndWithoutSourceData"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_AutoGenerateFormEnabled_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_AutoGenerateFormEnabled_spec.js index 11a286f7a227..cb9567470239 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_AutoGenerateFormEnabled_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_AutoGenerateFormEnabled_spec.js @@ -16,7 +16,7 @@ let locators = ObjectsRegistry.CommonLocators; describe( "JSON Form Widget AutoGenerate Enabled", - { tags: ["@tag.Widget", "@tag.JSONForm", "@tag.Sanity"] }, + { tags: ["@tag.Widget", "@tag.JSONForm", "@tag.Sanity", "@tag.Binding"] }, () => { beforeEach(() => { agHelper.RestoreLocalStorageCache(); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_Basic_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_Basic_spec.js index c2f299b7b882..43e96747d500 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_Basic_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_Basic_spec.js @@ -11,7 +11,7 @@ const { describe( "JsonForm widget basis c usecases", - { tags: ["@tag.Widget", "@tag.JSONForm", "@tag.Sanity"] }, + { tags: ["@tag.Widget", "@tag.JSONForm", "@tag.Sanity", "@tag.Binding"] }, function () { before(() => { cy.dragAndDropToCanvas("jsonformwidget", { x: 200, y: 200 }); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_CurrencyField_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_CurrencyField_spec.ts index 3ffce22e58e7..2284c8b7e86b 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_CurrencyField_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_CurrencyField_spec.ts @@ -10,7 +10,7 @@ import { describe( "Modal Widget background color spec", - { tags: ["@tag.Widget", "@tag.JSONForm"] }, + { tags: ["@tag.Widget", "@tag.JSONForm", "@tag.Binding"] }, () => { const schema = { name: "John", diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_CustomField_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_CustomField_spec.js index 594790b9c9aa..282c6019f97e 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_CustomField_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_CustomField_spec.js @@ -16,7 +16,7 @@ const fieldPrefix = ".t--jsonformfield"; describe( "JSON Form Widget Custom Field", - { tags: ["@tag.Widget", "@tag.JSONForm"] }, + { tags: ["@tag.Widget", "@tag.JSONForm", "@tag.Binding"] }, () => { it("uses the custom field when the accessor matches", () => { const formDsl = JSON.parse( diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_FieldChange_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_FieldChange_spec.js index 1db07042fae4..2b0b27cffebc 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_FieldChange_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_FieldChange_spec.js @@ -17,7 +17,7 @@ const fieldPrefix = ".t--jsonformfield"; describe( "JSON Form Widget Field Change", - { tags: ["@tag.Widget", "@tag.JSONForm"] }, + { tags: ["@tag.Widget", "@tag.JSONForm", "@tag.Binding"] }, () => { before(() => { cy.addDsl(dslWithSchema); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_FieldEvents_1_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_FieldEvents_1_spec.js index 42b42ebb6628..9cc6aec506a2 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_FieldEvents_1_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_FieldEvents_1_spec.js @@ -20,7 +20,7 @@ const toggleJSButton = (name) => `.t--property-control-${name} .t--js-toggle`; describe( "Radio Group Field", - { tags: ["@tag.Widget", "@tag.JSONForm"] }, + { tags: ["@tag.Widget", "@tag.JSONForm", "@tag.Binding"] }, () => { beforeEach(() => { agHelper.RestoreLocalStorageCache(); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_FieldEvents_2_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_FieldEvents_2_spec.js index 37545555a21d..7635d6eea567 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_FieldEvents_2_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_FieldEvents_2_spec.js @@ -19,7 +19,7 @@ const toggleJSButton = (name) => `.t--property-control-${name} .t--js-toggle`; describe( "Radio Group Field", - { tags: ["@tag.Widget", "@tag.JSONForm"] }, + { tags: ["@tag.Widget", "@tag.JSONForm", "@tag.Binding"] }, () => { beforeEach(() => { agHelper.RestoreLocalStorageCache(); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_FieldProperties_1_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_FieldProperties_1_spec.js index 42db1f388a0a..ca9d0fcae3da 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_FieldProperties_1_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_FieldProperties_1_spec.js @@ -17,7 +17,7 @@ const fieldPrefix = ".t--jsonformfield"; describe( "Text Field Property Control", - { tags: ["@tag.Widget", "@tag.JSONForm"] }, + { tags: ["@tag.Widget", "@tag.JSONForm", "@tag.Binding"] }, () => { beforeEach(() => { agHelper.RestoreLocalStorageCache(); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_FieldProperties_2_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_FieldProperties_2_spec.js index 6fc4a81e50d7..f9ebebd9647e 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_FieldProperties_2_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_FieldProperties_2_spec.js @@ -17,7 +17,7 @@ const fieldPrefix = ".t--jsonformfield"; describe( "Text Field Property Control", - { tags: ["@tag.Widget", "@tag.JSONForm"] }, + { tags: ["@tag.Widget", "@tag.JSONForm", "@tag.Binding"] }, () => { beforeEach(() => { agHelper.RestoreLocalStorageCache(); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_FilterText_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_FilterText_spec.js index bd4e1e806623..155c4dd218a8 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_FilterText_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_FilterText_spec.js @@ -17,7 +17,7 @@ let locators = ObjectsRegistry.CommonLocators; describe( "JSONForm Select field - filterText update action trigger ", - { tags: ["@tag.Widget", "@tag.JSONForm"] }, + { tags: ["@tag.Widget", "@tag.JSONForm", "@tag.Binding"] }, () => { beforeEach(() => { agHelper.RestoreLocalStorageCache(); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_Footer_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_Footer_spec.js index 42dcad420de6..d4bb83690837 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_Footer_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_Footer_spec.js @@ -2,7 +2,7 @@ import * as _ from "../../../../../support/Objects/ObjectsCore"; const commonlocators = require("../../../../../locators/commonlocators.json"); describe( "JSONForm Footer spec", - { tags: ["@tag.Widget", "@tag.JSONForm"] }, + { tags: ["@tag.Widget", "@tag.JSONForm", "@tag.Binding"] }, () => { beforeEach(() => { _.agHelper.RestoreLocalStorageCache(); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_FormBindings_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_FormBindings_spec.js index 20aa79224afa..9f7a36d61c45 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_FormBindings_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_FormBindings_spec.js @@ -11,7 +11,7 @@ const locators = ObjectsRegistry.CommonLocators; describe( "JSON Form Widget Form Bindings", - { tags: ["@tag.Widget", "@tag.JSONForm"] }, + { tags: ["@tag.Widget", "@tag.JSONForm", "@tag.Binding"] }, () => { afterEach(() => { agHelper.SaveLocalStorageCache(); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_FormProperties_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_FormProperties_spec.js index a01cff55777f..9787c93addc4 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_FormProperties_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_FormProperties_spec.js @@ -22,7 +22,7 @@ import { describe( "JSON Form Widget Form Bindings", - { tags: ["@tag.Widget", "@tag.JSONForm"] }, + { tags: ["@tag.Widget", "@tag.JSONForm", "@tag.Binding"] }, () => { beforeEach(() => { agHelper.RestoreLocalStorageCache(); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_HiddenFields_1_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_HiddenFields_1_spec.js index 1bf397baeb0c..d75b0f4fc4b0 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_HiddenFields_1_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_HiddenFields_1_spec.js @@ -89,7 +89,7 @@ function removeCustomField() { describe( "JSON Form Hidden fields", - { tags: ["@tag.Widget", "@tag.JSONForm"] }, + { tags: ["@tag.Widget", "@tag.JSONForm", "@tag.Binding"] }, () => { before(() => { agHelper.AddDsl("jsonFormDslWithSchema"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_HiddenFields_2_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_HiddenFields_2_spec.js index 2121d0d38b92..dba231477df1 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_HiddenFields_2_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_HiddenFields_2_spec.js @@ -92,7 +92,7 @@ function removeCustomField() { describe( "JSON Form Hidden fields", - { tags: ["@tag.Widget", "@tag.JSONForm"] }, + { tags: ["@tag.Widget", "@tag.JSONForm", "@tag.Binding"] }, () => { before(() => { agHelper.AddDsl("jsonFormDslWithSchema"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_MultipleSourceData_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_MultipleSourceData_spec.js index 8914b8920b94..d2be55c59316 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_MultipleSourceData_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_MultipleSourceData_spec.js @@ -5,7 +5,7 @@ import * as _ from "../../../../../support/Objects/ObjectsCore"; describe( "Verify syntax to create Datpicker field type", - { tags: ["@tag.Widget", "@tag.JSONForm"] }, + { tags: ["@tag.Widget", "@tag.JSONForm", "@tag.Binding"] }, () => { beforeEach(() => { _.agHelper.RestoreLocalStorageCache(); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_RadioGroupField_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_RadioGroupField_spec.js index f1f67a739480..aa641517d91b 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_RadioGroupField_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_RadioGroupField_spec.js @@ -35,7 +35,7 @@ function clearOptionsProperty() { describe( "JSONForm RadioGroup Field", - { tags: ["@tag.Widget", "@tag.JSONForm"] }, + { tags: ["@tag.Widget", "@tag.JSONForm", "@tag.Binding"] }, () => { afterEach(() => { agHelper.SaveLocalStorageCache(); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_Reset_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_Reset_spec.js index e6a86ecbebc8..1b2572c51211 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_Reset_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_Reset_spec.js @@ -3,144 +3,151 @@ import { ObjectsRegistry } from "../../../../../support/Objects/Registry"; const locators = ObjectsRegistry.CommonLocators; const fieldPrefix = ".t--jsonformfield"; -describe("JSON Form reset", { tags: ["@tag.Widget", "@tag.JSONForm"] }, () => { - before(() => { - cy.addDsl(dslWithSchema); - cy.openPropertyPane("jsonformwidget"); - cy.get(locators._jsToggle("sourcedata")).click({ force: true }); - }); +describe( + "JSON Form reset", + { tags: ["@tag.Widget", "@tag.JSONForm", "@tag.Binding"] }, + () => { + before(() => { + cy.addDsl(dslWithSchema); + cy.openPropertyPane("jsonformwidget"); + cy.get(locators._jsToggle("sourcedata")).click({ force: true }); + }); - it("updates formData when field value changes", () => { - const initialFormData = { - age: 30, - dob: "10/12/1992", - migrant: false, - address: { street: "Koramangala", city: "Bangalore" }, - hobbies: ["travelling", "swimming"], - education: [{ college: "MIT", year: "20/10/2014" }], - name: "John", - }; - const updatedFormData = { - age: 40, - dob: "10/12/1992", - migrant: false, - address: { street: "Indranagar", city: "Bangalore" }, - hobbies: ["travelling"], - education: [{ college: "IIT", year: "20/10/2014" }], - name: "Test", - }; + it("updates formData when field value changes", () => { + const initialFormData = { + age: 30, + dob: "10/12/1992", + migrant: false, + address: { street: "Koramangala", city: "Bangalore" }, + hobbies: ["travelling", "swimming"], + education: [{ college: "MIT", year: "20/10/2014" }], + name: "John", + }; + const updatedFormData = { + age: 40, + dob: "10/12/1992", + migrant: false, + address: { street: "Indranagar", city: "Bangalore" }, + hobbies: ["travelling"], + education: [{ college: "IIT", year: "20/10/2014" }], + name: "Test", + }; - // Verify current field values - cy.get(`${fieldPrefix}-name input`).should( - "have.value", - initialFormData.name, - ); - cy.get(`${fieldPrefix}-age input`).should( - "have.value", - initialFormData.age, - ); - cy.get(`${fieldPrefix}-dob input`).should( - "have.value", - initialFormData.dob, - ); - cy.get(`${fieldPrefix}-address-street input`).should( - "have.value", - initialFormData.address.street, - ); - cy.get(`${fieldPrefix}-address-city input`).should( - "have.value", - initialFormData.address.city, - ); - cy.get(`${fieldPrefix}-education-0--college input`).should( - "have.value", - initialFormData.education[0].college, - ); - cy.get(`${fieldPrefix}-education-0--year input`).should( - "have.value", - initialFormData.education[0].year, - ); + // Verify current field values + cy.get(`${fieldPrefix}-name input`).should( + "have.value", + initialFormData.name, + ); + cy.get(`${fieldPrefix}-age input`).should( + "have.value", + initialFormData.age, + ); + cy.get(`${fieldPrefix}-dob input`).should( + "have.value", + initialFormData.dob, + ); + cy.get(`${fieldPrefix}-address-street input`).should( + "have.value", + initialFormData.address.street, + ); + cy.get(`${fieldPrefix}-address-city input`).should( + "have.value", + initialFormData.address.city, + ); + cy.get(`${fieldPrefix}-education-0--college input`).should( + "have.value", + initialFormData.education[0].college, + ); + cy.get(`${fieldPrefix}-education-0--year input`).should( + "have.value", + initialFormData.education[0].year, + ); - // Modify field values - cy.get(`${fieldPrefix}-name input`) - .clear({ force: true }) - .type(updatedFormData.name); - cy.get(`${fieldPrefix}-age input`) - .clear({ force: true }) - .clear({ force: true }) - .type(updatedFormData.age); - cy.get(`${fieldPrefix}-address-street input`) - .clear({ force: true }) - .type(updatedFormData.address.street); - cy.get(`${fieldPrefix}-hobbies .rc-select-selection-item`) - .contains("swimming") - .siblings(".rc-select-selection-item-remove") - .click({ force: true }); - cy.get(`${fieldPrefix}-education-0--college input`) - .clear({ force: true }) - .type(updatedFormData.education[0].college) - .wait(200); + // Modify field values + cy.get(`${fieldPrefix}-name input`) + .clear({ force: true }) + .type(updatedFormData.name); + cy.get(`${fieldPrefix}-age input`) + .clear({ force: true }) + .clear({ force: true }) + .type(updatedFormData.age); + cy.get(`${fieldPrefix}-address-street input`) + .clear({ force: true }) + .type(updatedFormData.address.street); + cy.get(`${fieldPrefix}-hobbies .rc-select-selection-item`) + .contains("swimming") + .siblings(".rc-select-selection-item-remove") + .click({ force: true }); + cy.get(`${fieldPrefix}-education-0--college input`) + .clear({ force: true }) + .type(updatedFormData.education[0].college) + .wait(200); - // Verify new field values - cy.get(`${fieldPrefix}-name input`).should( - "have.value", - updatedFormData.name, - ); - cy.get(`${fieldPrefix}-age input`).should( - "have.value", - updatedFormData.age, - ); - cy.get(`${fieldPrefix}-dob input`).should( - "have.value", - updatedFormData.dob, - ); - cy.get(`${fieldPrefix}-address-street input`).should( - "have.value", - updatedFormData.address.street, - ); - cy.get(`${fieldPrefix}-address-city input`).should( - "have.value", - updatedFormData.address.city, - ); - cy.get(`${fieldPrefix}-education-0--college input`).should( - "have.value", - updatedFormData.education[0].college, - ); - cy.get(`${fieldPrefix}-education-0--year input`).should( - "have.value", - updatedFormData.education[0].year, - ); + // Verify new field values + cy.get(`${fieldPrefix}-name input`).should( + "have.value", + updatedFormData.name, + ); + cy.get(`${fieldPrefix}-age input`).should( + "have.value", + updatedFormData.age, + ); + cy.get(`${fieldPrefix}-dob input`).should( + "have.value", + updatedFormData.dob, + ); + cy.get(`${fieldPrefix}-address-street input`).should( + "have.value", + updatedFormData.address.street, + ); + cy.get(`${fieldPrefix}-address-city input`).should( + "have.value", + updatedFormData.address.city, + ); + cy.get(`${fieldPrefix}-education-0--college input`).should( + "have.value", + updatedFormData.education[0].college, + ); + cy.get(`${fieldPrefix}-education-0--year input`).should( + "have.value", + updatedFormData.education[0].year, + ); - // Reset form - cy.get("button").contains("Reset").parent("button").click({ force: true }); + // Reset form + cy.get("button") + .contains("Reset") + .parent("button") + .click({ force: true }); - // Verify initial field values - cy.get(`${fieldPrefix}-name input`).should( - "have.value", - initialFormData.name, - ); - cy.get(`${fieldPrefix}-age input`).should( - "have.value", - initialFormData.age, - ); - cy.get(`${fieldPrefix}-dob input`).should( - "have.value", - initialFormData.dob, - ); - cy.get(`${fieldPrefix}-address-street input`).should( - "have.value", - initialFormData.address.street, - ); - cy.get(`${fieldPrefix}-address-city input`).should( - "have.value", - initialFormData.address.city, - ); - cy.get(`${fieldPrefix}-education-0--college input`).should( - "have.value", - initialFormData.education[0].college, - ); - cy.get(`${fieldPrefix}-education-0--year input`).should( - "have.value", - initialFormData.education[0].year, - ); - }); -}); + // Verify initial field values + cy.get(`${fieldPrefix}-name input`).should( + "have.value", + initialFormData.name, + ); + cy.get(`${fieldPrefix}-age input`).should( + "have.value", + initialFormData.age, + ); + cy.get(`${fieldPrefix}-dob input`).should( + "have.value", + initialFormData.dob, + ); + cy.get(`${fieldPrefix}-address-street input`).should( + "have.value", + initialFormData.address.street, + ); + cy.get(`${fieldPrefix}-address-city input`).should( + "have.value", + initialFormData.address.city, + ); + cy.get(`${fieldPrefix}-education-0--college input`).should( + "have.value", + initialFormData.education[0].college, + ); + cy.get(`${fieldPrefix}-education-0--year input`).should( + "have.value", + initialFormData.education[0].year, + ); + }); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_UnicodeKeys_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_UnicodeKeys_spec.js index e78e607008ae..b7c4bbb021d0 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_UnicodeKeys_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_UnicodeKeys_spec.js @@ -11,7 +11,7 @@ const backBtn = "[data-testid='t--property-pane-back-btn']"; describe( "JSON Form Widget Unicode keys", - { tags: ["@tag.Widget", "@tag.JSONForm"] }, + { tags: ["@tag.Widget", "@tag.JSONForm", "@tag.Binding"] }, () => { afterEach(() => { agHelper.SaveLocalStorageCache(); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONFrom_Modal_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONFrom_Modal_spec.js index 4580188bf7d5..3bc9292ec2d0 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONFrom_Modal_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONFrom_Modal_spec.js @@ -34,7 +34,7 @@ const checkFormModalValues = (value) => { describe( "JSONForm in Modal", - { tags: ["@tag.Widget", "@tag.JSONForm"] }, + { tags: ["@tag.Widget", "@tag.JSONForm", "@tag.Binding"] }, () => { it("should show the JSONForm with default values from Table widget", () => { const tableData = [ diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/List/List1_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/List/List1_spec.js index 273c4052387d..29e4660a37dc 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/List/List1_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/List/List1_spec.js @@ -3,7 +3,7 @@ const commonlocators = require("../../../../../locators/commonlocators.json"); describe( "Binding the list widget with text widget", - { tags: ["@tag.Widget", "@tag.List"] }, + { tags: ["@tag.Widget", "@tag.List", "@tag.Binding"] }, function () { //const modifierKey = Cypress.platform === "darwin" ? "meta" : "ctrl"; it("1. Validate delete widget action from side bar", function () { diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/List/List3_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/List/List3_spec.js index 7dbb9c756367..59098d66d593 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/List/List3_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/List/List3_spec.js @@ -2,7 +2,7 @@ import * as _ from "../../../../../support/Objects/ObjectsCore"; describe( "Binding the list widget with text widget", - { tags: ["@tag.Widget", "@tag.List"] }, + { tags: ["@tag.Widget", "@tag.List", "@tag.Binding"] }, function () { before(() => { _.agHelper.AddDsl("listRegression3Dsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/List/List4_1_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/List/List4_1_spec.ts index c57873a5791e..93acb177e8c7 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/List/List4_1_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/List/List4_1_spec.ts @@ -16,7 +16,7 @@ const dsl = require("../../../../../fixtures/listdsl.json"); describe( "List Widget Functionality", - { tags: ["@tag.Widget", "@tag.List"] }, + { tags: ["@tag.Widget", "@tag.List", "@tag.Binding"] }, function () { const items = JSON.parse(dsl.dsl.children[0].listData); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/List/List4_2_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/List/List4_2_spec.js index 145ca961b12b..0f2a29e663af 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/List/List4_2_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/List/List4_2_spec.js @@ -11,7 +11,7 @@ import * as _ from "../../../../../support/Objects/ObjectsCore"; describe( "Container Widget Functionality", - { tags: ["@tag.Widget", "@tag.List"] }, + { tags: ["@tag.Widget", "@tag.List", "@tag.Binding"] }, function () { const items = JSON.parse(dsl.dsl.children[0].listData); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/List/List5_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/List/List5_spec.js index 3de11873fe20..555bda23fe83 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/List/List5_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/List/List5_spec.js @@ -2,7 +2,7 @@ import * as _ from "../../../../../support/Objects/ObjectsCore"; describe( "Binding - List widget to text widget", - { tags: ["@tag.Widget", "@tag.List"] }, + { tags: ["@tag.Widget", "@tag.List", "@tag.Binding"] }, function () { before(() => { _.agHelper.AddDsl("listRegression2Dsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/List/List6_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/List/List6_spec.js index 72a468e14dc5..3f866e831aef 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/List/List6_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/List/List6_spec.js @@ -6,7 +6,7 @@ import EditorNavigation, { describe( "Binding the list widget with text widget", - { tags: ["@tag.Widget", "@tag.List"] }, + { tags: ["@tag.Widget", "@tag.List", "@tag.Binding"] }, function () { //const modifierKey = Cypress.platform === "darwin" ? "meta" : "ctrl"; diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/List/List7_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/List/List7_spec.js index 88b9c7b6eff8..ecb6e79f8ae0 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/List/List7_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/List/List7_spec.js @@ -3,7 +3,7 @@ const commonlocators = require("../../../../../locators/commonlocators.json"); describe( "Binding the list widget with text widget", - { tags: ["@tag.Widget", "@tag.List"] }, + { tags: ["@tag.Widget", "@tag.List", "@tag.Binding"] }, function () { before(() => { _.agHelper.AddDsl("ListVulnerabilityDSL"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Childwigets/List_FilePicker_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Childwigets/List_FilePicker_spec.js index 61ccaff0f728..ca4ba7300783 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Childwigets/List_FilePicker_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Childwigets/List_FilePicker_spec.js @@ -14,7 +14,7 @@ const widgetSelector = (name) => `[data-widgetname-cy="${name}"]`; describe( " File Picker Widget", - { tags: ["@tag.Widget", "@tag.List"] }, + { tags: ["@tag.Widget", "@tag.List", "@tag.Binding"] }, function () { before(() => { agHelper.AddDsl("Listv2/simpleLargeListv2"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Childwigets/List_Inputs_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Childwigets/List_Inputs_spec.js index f8eef27adcc1..f19c2ba93b78 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Childwigets/List_Inputs_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Childwigets/List_Inputs_spec.js @@ -14,198 +14,208 @@ import EditorNavigation, { // TODO: Test for Reset functionality const items = JSON.parse(dsl.dsl.children[0].listData); -describe("Input Widgets", { tags: ["@tag.Widget", "@tag.List"] }, function () { - before(() => { - agHelper.AddDsl("Listv2/simpleLargeListv2"); - }); - - beforeEach(() => { - agHelper.RestoreLocalStorageCache(); - }); - - afterEach(() => { - agHelper.SaveLocalStorageCache(); - }); - - it("1. Input Widgets default value", function () { - entityExplorer.DragDropWidgetNVerify(draggableWidgets.TEXT, 500, 100); //for test #2 - entityExplorer.DragDropWidgetNVerify( - draggableWidgets.CURRENCY_INPUT, - 200, - 100, - ); - propPane.UpdatePropertyFieldValue("Default value", "{{currentItem.id}}"); - propPane.TogglePropertyState("Required", "On"); - - entityExplorer.DragDropWidgetNVerify(draggableWidgets.TEXT, 500, 200); //for test #2 - entityExplorer.DragDropWidgetNVerify( - draggableWidgets.PHONE_INPUT, - 200, - 200, - ); - propPane.UpdatePropertyFieldValue( - "Default value", - "{{currentItem.phoneNumber}}", - ); - propPane.TogglePropertyState("Required", "On"); - propPane.TogglePropertyState("Enable formatting", "Off"); - - entityExplorer.DragDropWidgetNVerify(draggableWidgets.TEXT, 500, 300); //for test #2 - entityExplorer.DragDropWidgetNVerify(draggableWidgets.INPUT_V2, 200, 300); - propPane.UpdatePropertyFieldValue("Default value", "{{currentItem.email}}"); - propPane.TogglePropertyState("Required", "On"); - - agHelper.AssertText( - locators._widgetInCanvas(draggableWidgets.INPUT_V2) + - " " + - locators._inputField, - "val", - items[0].email, - ); - - agHelper.AssertText( - locators._widgetInCanvas(draggableWidgets.CURRENCY_INPUT) + - " " + - locators._inputField, - "val", - items[0].id.toString(), - ); - agHelper.AssertText( - locators._widgetInCanvas(draggableWidgets.PHONE_INPUT) + - " " + - locators._inputField, - "val", - items[0].phoneNumber.toString(), - ); - }); - - it("2. Input Widgets isValid", function () { - // Test for isValid === True - EditorNavigation.SelectEntityByName("Text1", EntityType.Widget); - propPane.RenameWidget("Text1", "Currency_Widget"); - agHelper.Sleep(); - propPane.UpdatePropertyFieldValue( - "Text", - "{{currentView.CurrencyInput1.isValid}}", - ); - agHelper.AssertText( - propPane._widgetToVerifyText("Currency_Widget"), - "text", - "true", - ); - - EditorNavigation.SelectEntityByName("Text2", EntityType.Widget); - propPane.RenameWidget("Text2", "PhoneInput_Widget"); - agHelper.Sleep(); - propPane.UpdatePropertyFieldValue( - "Text", - "{{currentView.PhoneInput1.isValid}}", - ); - agHelper.AssertText( - propPane._widgetToVerifyText("PhoneInput_Widget"), - "text", - "true", - ); - - EditorNavigation.SelectEntityByName("Text3", EntityType.Widget); - propPane.RenameWidget("Text3", "Input_Widget"); - agHelper.Sleep(); - propPane.UpdatePropertyFieldValue("Text", "{{currentView.Input1.isValid}}"); - agHelper.AssertText( - propPane._widgetToVerifyText("Input_Widget"), - "text", - "true", - ); - - // Test for isValid === false - deployMode.DeployApp(); - // cy.get(`${widgetSelectorByType("inputwidgetv2")} input`).clear({ - // force: true, - // }); - agHelper.ClearTextField( - locators._widgetInDeployed(draggableWidgets.INPUT_V2) + - " " + - locators._inputField, - true, - ); - agHelper.AssertText( - locators._widgetInDeployed(draggableWidgets.TEXT), - "text", - "false", - 2, - ); - - agHelper.ClearTextField( - locators._widgetInDeployed(draggableWidgets.PHONE_INPUT) + - " " + - locators._inputField, - true, - ); - agHelper.AssertText( - locators._widgetInDeployed(draggableWidgets.TEXT), - "text", - "false", - 1, - ); - - agHelper.ClearTextField( - locators._widgetInDeployed(draggableWidgets.CURRENCY_INPUT) + - " " + - locators._inputField, - true, - ); - agHelper.AssertText( - locators._widgetInDeployed(draggableWidgets.TEXT), - "text", - "false", - ); - deployMode.NavigateBacktoEditor(); - }); - - it("3. Currency widget default value is retained over page change", () => { - const value = "123456789"; - const formattedText = "123,456,789"; - - cy.addDsl(dslWithCurrencyWidget); - cy.openPropertyPane("currencyinputwidget"); - cy.updateCodeInput(".t--property-control-defaultvalue", value); - - // Observe the value of 2nd item currency widget - formatted text - cy.get(".t--widget-currencyinputwidget") - .eq(1) - .find("input") - .should("have.value", formattedText); - - // Find the 2nd item currency and click to focus - cy.get(".t--widget-currencyinputwidget") - .eq(1) - .find("input") - .click({ force: true }); - - // Observe the value of 2nd item currency widget - un-formatted text - cy.get(".t--widget-currencyinputwidget") - .eq(1) - .find("input") - .should("have.value", value); - - // Change to page 2 - cy.get(".rc-pagination-item") - .find("a") - .contains("2") - .click({ force: true }) - .wait(500); - - // Back to page 1 - cy.get(".rc-pagination-item") - .find("a") - .contains("1") - .click({ force: true }) - .wait(500); - - // Observe the value of 2nd item currency widget - formatted text - cy.get(".t--widget-currencyinputwidget") - .eq(1) - .find("input") - .should("have.value", formattedText); - }); -}); +describe( + "Input Widgets", + { tags: ["@tag.Widget", "@tag.List", "@tag.Binding"] }, + function () { + before(() => { + agHelper.AddDsl("Listv2/simpleLargeListv2"); + }); + + beforeEach(() => { + agHelper.RestoreLocalStorageCache(); + }); + + afterEach(() => { + agHelper.SaveLocalStorageCache(); + }); + + it("1. Input Widgets default value", function () { + entityExplorer.DragDropWidgetNVerify(draggableWidgets.TEXT, 500, 100); //for test #2 + entityExplorer.DragDropWidgetNVerify( + draggableWidgets.CURRENCY_INPUT, + 200, + 100, + ); + propPane.UpdatePropertyFieldValue("Default value", "{{currentItem.id}}"); + propPane.TogglePropertyState("Required", "On"); + + entityExplorer.DragDropWidgetNVerify(draggableWidgets.TEXT, 500, 200); //for test #2 + entityExplorer.DragDropWidgetNVerify( + draggableWidgets.PHONE_INPUT, + 200, + 200, + ); + propPane.UpdatePropertyFieldValue( + "Default value", + "{{currentItem.phoneNumber}}", + ); + propPane.TogglePropertyState("Required", "On"); + propPane.TogglePropertyState("Enable formatting", "Off"); + + entityExplorer.DragDropWidgetNVerify(draggableWidgets.TEXT, 500, 300); //for test #2 + entityExplorer.DragDropWidgetNVerify(draggableWidgets.INPUT_V2, 200, 300); + propPane.UpdatePropertyFieldValue( + "Default value", + "{{currentItem.email}}", + ); + propPane.TogglePropertyState("Required", "On"); + + agHelper.AssertText( + locators._widgetInCanvas(draggableWidgets.INPUT_V2) + + " " + + locators._inputField, + "val", + items[0].email, + ); + + agHelper.AssertText( + locators._widgetInCanvas(draggableWidgets.CURRENCY_INPUT) + + " " + + locators._inputField, + "val", + items[0].id.toString(), + ); + agHelper.AssertText( + locators._widgetInCanvas(draggableWidgets.PHONE_INPUT) + + " " + + locators._inputField, + "val", + items[0].phoneNumber.toString(), + ); + }); + + it("2. Input Widgets isValid", function () { + // Test for isValid === True + EditorNavigation.SelectEntityByName("Text1", EntityType.Widget); + propPane.RenameWidget("Text1", "Currency_Widget"); + agHelper.Sleep(); + propPane.UpdatePropertyFieldValue( + "Text", + "{{currentView.CurrencyInput1.isValid}}", + ); + agHelper.AssertText( + propPane._widgetToVerifyText("Currency_Widget"), + "text", + "true", + ); + + EditorNavigation.SelectEntityByName("Text2", EntityType.Widget); + propPane.RenameWidget("Text2", "PhoneInput_Widget"); + agHelper.Sleep(); + propPane.UpdatePropertyFieldValue( + "Text", + "{{currentView.PhoneInput1.isValid}}", + ); + agHelper.AssertText( + propPane._widgetToVerifyText("PhoneInput_Widget"), + "text", + "true", + ); + + EditorNavigation.SelectEntityByName("Text3", EntityType.Widget); + propPane.RenameWidget("Text3", "Input_Widget"); + agHelper.Sleep(); + propPane.UpdatePropertyFieldValue( + "Text", + "{{currentView.Input1.isValid}}", + ); + agHelper.AssertText( + propPane._widgetToVerifyText("Input_Widget"), + "text", + "true", + ); + + // Test for isValid === false + deployMode.DeployApp(); + // cy.get(`${widgetSelectorByType("inputwidgetv2")} input`).clear({ + // force: true, + // }); + agHelper.ClearTextField( + locators._widgetInDeployed(draggableWidgets.INPUT_V2) + + " " + + locators._inputField, + true, + ); + agHelper.AssertText( + locators._widgetInDeployed(draggableWidgets.TEXT), + "text", + "false", + 2, + ); + + agHelper.ClearTextField( + locators._widgetInDeployed(draggableWidgets.PHONE_INPUT) + + " " + + locators._inputField, + true, + ); + agHelper.AssertText( + locators._widgetInDeployed(draggableWidgets.TEXT), + "text", + "false", + 1, + ); + + agHelper.ClearTextField( + locators._widgetInDeployed(draggableWidgets.CURRENCY_INPUT) + + " " + + locators._inputField, + true, + ); + agHelper.AssertText( + locators._widgetInDeployed(draggableWidgets.TEXT), + "text", + "false", + ); + deployMode.NavigateBacktoEditor(); + }); + + it("3. Currency widget default value is retained over page change", () => { + const value = "123456789"; + const formattedText = "123,456,789"; + + cy.addDsl(dslWithCurrencyWidget); + cy.openPropertyPane("currencyinputwidget"); + cy.updateCodeInput(".t--property-control-defaultvalue", value); + + // Observe the value of 2nd item currency widget - formatted text + cy.get(".t--widget-currencyinputwidget") + .eq(1) + .find("input") + .should("have.value", formattedText); + + // Find the 2nd item currency and click to focus + cy.get(".t--widget-currencyinputwidget") + .eq(1) + .find("input") + .click({ force: true }); + + // Observe the value of 2nd item currency widget - un-formatted text + cy.get(".t--widget-currencyinputwidget") + .eq(1) + .find("input") + .should("have.value", value); + + // Change to page 2 + cy.get(".rc-pagination-item") + .find("a") + .contains("2") + .click({ force: true }) + .wait(500); + + // Back to page 1 + cy.get(".rc-pagination-item") + .find("a") + .contains("1") + .click({ force: true }) + .wait(500); + + // Observe the value of 2nd item currency widget - formatted text + cy.get(".t--widget-currencyinputwidget") + .eq(1) + .find("input") + .should("have.value", formattedText); + }); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Childwigets/List_Modal_Stats_Check_Radio_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Childwigets/List_Modal_Stats_Check_Radio_spec.js index 2e769772f506..5f5d27332c4f 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Childwigets/List_Modal_Stats_Check_Radio_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Childwigets/List_Modal_Stats_Check_Radio_spec.js @@ -5,7 +5,7 @@ const widgetSelector = (name) => `[data-widgetname-cy="${name}"]`; describe( "Modal, Radio, Checkbox widget", - { tags: ["@tag.Widget", "@tag.List"] }, + { tags: ["@tag.Widget", "@tag.List", "@tag.Binding"] }, function () { before(() => { _.agHelper.AddDsl("Listv2/ListWithModalStatCheckboxAndRadio"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Childwigets/List_Select_Widgets_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Childwigets/List_Select_Widgets_spec.js index d734b16281c0..9591f03a3979 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Childwigets/List_Select_Widgets_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Childwigets/List_Select_Widgets_spec.js @@ -13,170 +13,180 @@ const items = JSON.parse(dsl.dsl.children[0].listData); const widgetSelector = (name) => `[data-widgetname-cy="${name}"]`; const widgetSelectorByType = (name) => `.t--widget-${name}`; -describe("Select Widgets", { tags: ["@tag.Widget", "@tag.List"] }, function () { - before(() => { - _.agHelper.AddDsl("Listv2/simpleLargeListv2"); - }); - - it("1. Select Widgets default value", function () { - _.entityExplorer.DragDropWidgetNVerify(_.draggableWidgets.TEXT, 500, 100); //for test #2 - _.entityExplorer.DragDropWidgetNVerify( - _.draggableWidgets.MULTISELECT, - 200, - 150, - ); - - _.propPane.ToggleJSMode("sourcedata"); - - _.propPane.UpdatePropertyFieldValue( - "Source Data", - `{{[{ +describe( + "Select Widgets", + { tags: ["@tag.Widget", "@tag.List", "@tag.Binding"] }, + function () { + before(() => { + _.agHelper.AddDsl("Listv2/simpleLargeListv2"); + }); + + it("1. Select Widgets default value", function () { + _.entityExplorer.DragDropWidgetNVerify(_.draggableWidgets.TEXT, 500, 100); //for test #2 + _.entityExplorer.DragDropWidgetNVerify( + _.draggableWidgets.MULTISELECT, + 200, + 150, + ); + + _.propPane.ToggleJSMode("sourcedata"); + + _.propPane.UpdatePropertyFieldValue( + "Source Data", + `{{[{ label: currentItem.name, value: currentItem.id }]}}`, - ); - - _.propPane.ToggleJSMode("label key"); - cy.updateCodeInput( - ".t--property-control-wrapper.t--property-control-labelkey", - `label`, - ); - - _.propPane.ToggleJSMode("value key"); - cy.updateCodeInput(".t--property-control-valuekey", `value`); - - _.propPane.UpdatePropertyFieldValue( - "Default selected values", - "{{currentItem.id}}", - ); - _.propPane.TogglePropertyState("Required", "On"); - _.propPane.EnterJSContext( - "onOptionChange", - "{{showAlert('Row ' + currentIndex + ' Option Changed')}}", - ); - - _.entityExplorer.DragDropWidgetNVerify(_.draggableWidgets.TEXT, 500, 300); //for test #2 - _.entityExplorer.DragDropWidgetNVerify(_.draggableWidgets.SELECT, 200, 350); - - _.propPane.ToggleJSMode("sourcedata"); - - _.propPane.UpdatePropertyFieldValue( - "Source Data", - `{{[{ + ); + + _.propPane.ToggleJSMode("label key"); + cy.updateCodeInput( + ".t--property-control-wrapper.t--property-control-labelkey", + `label`, + ); + + _.propPane.ToggleJSMode("value key"); + cy.updateCodeInput(".t--property-control-valuekey", `value`); + + _.propPane.UpdatePropertyFieldValue( + "Default selected values", + "{{currentItem.id}}", + ); + _.propPane.TogglePropertyState("Required", "On"); + _.propPane.EnterJSContext( + "onOptionChange", + "{{showAlert('Row ' + currentIndex + ' Option Changed')}}", + ); + + _.entityExplorer.DragDropWidgetNVerify(_.draggableWidgets.TEXT, 500, 300); //for test #2 + _.entityExplorer.DragDropWidgetNVerify( + _.draggableWidgets.SELECT, + 200, + 350, + ); + + _.propPane.ToggleJSMode("sourcedata"); + + _.propPane.UpdatePropertyFieldValue( + "Source Data", + `{{[{ label: currentItem.name, value: currentItem.id }]}}`, - ); - - _.propPane.ToggleJSMode("label key"); - cy.updateCodeInput( - ".t--property-control-wrapper.t--property-control-labelkey", - `label`, - ); - - _.propPane.ToggleJSMode("value key"); - cy.updateCodeInput(".t--property-control-valuekey", `value`); - - _.propPane.UpdatePropertyFieldValue( - "Default selected value", - "{{currentItem.id}}", - ); - _.propPane.TogglePropertyState("Required", "On"); - _.propPane.EnterJSContext( - "onOptionChange", - "{{showAlert('Row ' + currentIndex + ' Option Changed')}}", - ); - - // Page 1 - _.agHelper.ReadSelectedDropDownValue().then(($selectedValue) => { - expect($selectedValue).to.eq(items[0].name); + ); + + _.propPane.ToggleJSMode("label key"); + cy.updateCodeInput( + ".t--property-control-wrapper.t--property-control-labelkey", + `label`, + ); + + _.propPane.ToggleJSMode("value key"); + cy.updateCodeInput(".t--property-control-valuekey", `value`); + + _.propPane.UpdatePropertyFieldValue( + "Default selected value", + "{{currentItem.id}}", + ); + _.propPane.TogglePropertyState("Required", "On"); + _.propPane.EnterJSContext( + "onOptionChange", + "{{showAlert('Row ' + currentIndex + ' Option Changed')}}", + ); + + // Page 1 + _.agHelper.ReadSelectedDropDownValue().then(($selectedValue) => { + expect($selectedValue).to.eq(items[0].name); + }); + cy.get(formWidgetsPage.multiselectwidgetv2) + .find(".rc-select-selection-item-content") + .first() + .should("have.text", items[0].name); + + cy.get(commonlocators.listPaginateNextButton).click({ + force: true, + }); + _.agHelper.Sleep(); + + // Page 2 + _.agHelper.ReadSelectedDropDownValue().then(($selectedValue) => { + expect($selectedValue).to.eq(items[1].name); + }); + + cy.get(`.rc-select-selection-item[title="${items[1].name}"]`).should( + "have.text", + items[1].name, + ); + + cy.get(commonlocators.listPaginatePrevButton).click({ + force: true, + }); }); - cy.get(formWidgetsPage.multiselectwidgetv2) - .find(".rc-select-selection-item-content") - .first() - .should("have.text", items[0].name); - cy.get(commonlocators.listPaginateNextButton).click({ - force: true, + it("2. Select Widgets isValid", function () { + // Test for isValid === True + EditorNavigation.SelectEntityByName("Text1", EntityType.Widget); + _.propPane.RenameWidget("Text1", "MultiSelect_Widget"); + _.propPane.UpdatePropertyFieldValue( + "Text", + "{{`${currentView.MultiSelect1.selectedOptionLabels[0]}_${currentView.MultiSelect1.selectedOptionValues[0]}_${currentView.MultiSelect1.isDirty}_${currentView.MultiSelect1.isValid}`}}", + ); + cy.get( + `${widgetSelector("MultiSelect_Widget")} ${commonlocators.bodyTextStyle}`, + ) + .first() + .should("have.text", `${items[0].name}_${items[0].id}_false_true`); + + EditorNavigation.SelectEntityByName("Text2", EntityType.Widget); + _.propPane.RenameWidget("Text2", "Select_Widget"); + _.propPane.UpdatePropertyFieldValue( + "Text", + "{{`${currentView.Select1.selectedOptionLabel}_${currentView.Select1.selectedOptionValue}_${currentView.Select1.isDirty}_${currentView.Select1.isValid}`}}", + ); + cy.get( + `${widgetSelector("Select_Widget")} ${commonlocators.bodyTextStyle}`, + ) + .first() + .should("have.text", `${items[0].name}_${items[0].id}_false_true`); + + // Test for isValid === false + EditorNavigation.SelectEntityByName("MultiSelect1", EntityType.Widget); + _.agHelper.SelectFromMultiSelect([`${items[0].name}`], 0, false); + cy.get( + `${widgetSelector("MultiSelect_Widget")} ${commonlocators.bodyTextStyle}`, + ) + .first() + .should("have.text", `undefined_undefined_true_false`); + + cy.get(_.locators._selectClearButton_dataTestId).should("not.exist"); }); - _.agHelper.Sleep(); - - // Page 2 - _.agHelper.ReadSelectedDropDownValue().then(($selectedValue) => { - expect($selectedValue).to.eq(items[1].name); - }); - - cy.get(`.rc-select-selection-item[title="${items[1].name}"]`).should( - "have.text", - items[1].name, - ); - cy.get(commonlocators.listPaginatePrevButton).click({ - force: true, + it("3. Select Widgets onOptionChange", function () { + cy.get(formWidgetsPage.selectWidget) + .find(widgetLocators.dropdownSingleSelect) + .click({ force: true }); + cy.get(commonlocators.singleSelectWidgetMenuItem) + .contains(items[0].name) + .click({ force: true }); + cy.wait(200); + + cy.get(formWidgetsPage.selectWidget).contains(items[0].name); + cy.validateToastMessage("Row 0 Option Changed"); + + cy.get(formWidgetsPage.multiselectwidgetv2) + .find(".rc-select-selection-search-input") + .first() + .focus({ force: true }) + .type("{uparrow}", { force: true }); + + cy.get(".multi-select-dropdown") + .contains(items[0].name) + .click({ force: true }); + cy.get(`.rc-select-selection-item[title="${items[0].name}"]`).should( + "have.text", + items[0].name, + ); + cy.validateToastMessage("Row 0 Option Changed"); }); - }); - - it("2. Select Widgets isValid", function () { - // Test for isValid === True - EditorNavigation.SelectEntityByName("Text1", EntityType.Widget); - _.propPane.RenameWidget("Text1", "MultiSelect_Widget"); - _.propPane.UpdatePropertyFieldValue( - "Text", - "{{`${currentView.MultiSelect1.selectedOptionLabels[0]}_${currentView.MultiSelect1.selectedOptionValues[0]}_${currentView.MultiSelect1.isDirty}_${currentView.MultiSelect1.isValid}`}}", - ); - cy.get( - `${widgetSelector("MultiSelect_Widget")} ${commonlocators.bodyTextStyle}`, - ) - .first() - .should("have.text", `${items[0].name}_${items[0].id}_false_true`); - - EditorNavigation.SelectEntityByName("Text2", EntityType.Widget); - _.propPane.RenameWidget("Text2", "Select_Widget"); - _.propPane.UpdatePropertyFieldValue( - "Text", - "{{`${currentView.Select1.selectedOptionLabel}_${currentView.Select1.selectedOptionValue}_${currentView.Select1.isDirty}_${currentView.Select1.isValid}`}}", - ); - cy.get(`${widgetSelector("Select_Widget")} ${commonlocators.bodyTextStyle}`) - .first() - .should("have.text", `${items[0].name}_${items[0].id}_false_true`); - - // Test for isValid === false - EditorNavigation.SelectEntityByName("MultiSelect1", EntityType.Widget); - _.agHelper.SelectFromMultiSelect([`${items[0].name}`], 0, false); - cy.get( - `${widgetSelector("MultiSelect_Widget")} ${commonlocators.bodyTextStyle}`, - ) - .first() - .should("have.text", `undefined_undefined_true_false`); - - cy.get(_.locators._selectClearButton_dataTestId).should("not.exist"); - }); - - it("3. Select Widgets onOptionChange", function () { - cy.get(formWidgetsPage.selectWidget) - .find(widgetLocators.dropdownSingleSelect) - .click({ force: true }); - cy.get(commonlocators.singleSelectWidgetMenuItem) - .contains(items[0].name) - .click({ force: true }); - cy.wait(200); - - cy.get(formWidgetsPage.selectWidget).contains(items[0].name); - cy.validateToastMessage("Row 0 Option Changed"); - - cy.get(formWidgetsPage.multiselectwidgetv2) - .find(".rc-select-selection-search-input") - .first() - .focus({ force: true }) - .type("{uparrow}", { force: true }); - - cy.get(".multi-select-dropdown") - .contains(items[0].name) - .click({ force: true }); - cy.get(`.rc-select-selection-item[title="${items[0].name}"]`).should( - "have.text", - items[0].name, - ); - cy.validateToastMessage("Row 0 Option Changed"); - }); -}); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Childwigets/List_Table_Widgets_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Childwigets/List_Table_Widgets_spec.js index 82a46638727b..365b3e2d0485 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Childwigets/List_Table_Widgets_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Childwigets/List_Table_Widgets_spec.js @@ -3,67 +3,71 @@ const containerWidgetSelector = `[type="CONTAINER_WIDGET"]`; const widgetSelector = (name) => `[data-widgetname-cy="${name}"]`; -describe("Select Widgets", { tags: ["@tag.Widget", "@tag.List"] }, function () { - before(() => { - _.agHelper.AddDsl("Listv2/Listv2WithTablewidget"); - }); - it("a. Validate the Values in Table widget", function () { - cy.get(`${widgetSelector("List1")} ${containerWidgetSelector}`) - .eq(0) - .within(() => { - cy.readTableV2dataPublish("0", "1").then((tabData) => { - const tabValue = tabData; - expect(tabValue).to.be.equal("Blue"); - cy.log("the value is" + tabValue); - }); +describe( + "Select Widgets", + { tags: ["@tag.Widget", "@tag.List", "@tag.Binding"] }, + function () { + before(() => { + _.agHelper.AddDsl("Listv2/Listv2WithTablewidget"); + }); + it("a. Validate the Values in Table widget", function () { + cy.get(`${widgetSelector("List1")} ${containerWidgetSelector}`) + .eq(0) + .within(() => { + cy.readTableV2dataPublish("0", "1").then((tabData) => { + const tabValue = tabData; + expect(tabValue).to.be.equal("Blue"); + cy.log("the value is" + tabValue); + }); - cy.readTableV2dataPublish("3", "1").then((tabData) => { - const tabValue = tabData; - expect(tabValue).to.be.equal("White"); - cy.log("the value is" + tabValue); + cy.readTableV2dataPublish("3", "1").then((tabData) => { + const tabValue = tabData; + expect(tabValue).to.be.equal("White"); + cy.log("the value is" + tabValue); + }); }); - }); - cy.get(`${widgetSelector("List1")} ${containerWidgetSelector}`) - .eq(1) - .within(() => { - cy.readTableV2dataPublish("0", "1").then((tabData) => { - const tabValue = tabData; - expect(tabValue).to.be.equal("Orange"); - }); + cy.get(`${widgetSelector("List1")} ${containerWidgetSelector}`) + .eq(1) + .within(() => { + cy.readTableV2dataPublish("0", "1").then((tabData) => { + const tabValue = tabData; + expect(tabValue).to.be.equal("Orange"); + }); - cy.readTableV2dataPublish("3", "1").then((tabData) => { - const tabValue = tabData; - expect(tabValue).to.be.equal("Mustard"); + cy.readTableV2dataPublish("3", "1").then((tabData) => { + const tabValue = tabData; + expect(tabValue).to.be.equal("Mustard"); + }); }); - }); - cy.get(`${widgetSelector("List1")} ${containerWidgetSelector}`) - .eq(2) - .within(() => { - cy.readTableV2dataPublish("0", "1").then((tabData) => { - const tabValue = tabData; - expect(tabValue).to.be.equal("Teal"); - }); + cy.get(`${widgetSelector("List1")} ${containerWidgetSelector}`) + .eq(2) + .within(() => { + cy.readTableV2dataPublish("0", "1").then((tabData) => { + const tabValue = tabData; + expect(tabValue).to.be.equal("Teal"); + }); - cy.readTableV2dataPublish("3", "1").then((tabData) => { - const tabValue = tabData; - expect(tabValue).to.be.equal("Marine"); + cy.readTableV2dataPublish("3", "1").then((tabData) => { + const tabValue = tabData; + expect(tabValue).to.be.equal("Marine"); + }); }); - }); - cy.get(`${widgetSelector("List1")} ${containerWidgetSelector}`) - .eq(3) - .within(() => { - cy.readTableV2dataPublish("0", "1").then((tabData) => { - const tabValue = tabData; - expect(tabValue).to.be.equal("Blue"); - }); + cy.get(`${widgetSelector("List1")} ${containerWidgetSelector}`) + .eq(3) + .within(() => { + cy.readTableV2dataPublish("0", "1").then((tabData) => { + const tabValue = tabData; + expect(tabValue).to.be.equal("Blue"); + }); - cy.readTableV2dataPublish("3", "1").then((tabData) => { - const tabValue = tabData; - expect(tabValue).to.be.equal("Lavender"); + cy.readTableV2dataPublish("3", "1").then((tabData) => { + const tabValue = tabData; + expect(tabValue).to.be.equal("Lavender"); + }); }); - }); - }); -}); + }); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Childwigets/Listv2_Button_Widget_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Childwigets/Listv2_Button_Widget_spec.ts index 0455f933c894..0857ed1bf1a6 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Childwigets/Listv2_Button_Widget_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Childwigets/Listv2_Button_Widget_spec.ts @@ -3,29 +3,33 @@ import EditorNavigation, { EntityType, } from "../../../../../../support/Pages/EditorNavigation"; -describe("List v2- Tabs Widget", { tags: ["@tag.Widget", "@tag.List"] }, () => { - before(() => { - _.agHelper.AddDsl("Listv2/simpleListWithInputAndButton"); - }); +describe( + "List v2- Tabs Widget", + { tags: ["@tag.Widget", "@tag.List", "@tag.Binding"] }, + () => { + before(() => { + _.agHelper.AddDsl("Listv2/simpleListWithInputAndButton"); + }); - it("1. should not throw error when on click event is changed No Action", () => { - EditorNavigation.SelectEntityByName("Button1", EntityType.Widget, {}, [ - "List1", - "Container1", - ]); - _.propPane.EnterJSContext("onClick", "{{showAlert('Hello')}}"); - _.agHelper.Sleep(); - _.agHelper.ClickButton("Submit"); - _.agHelper.ValidateToastMessage("Hello"); + it("1. should not throw error when on click event is changed No Action", () => { + EditorNavigation.SelectEntityByName("Button1", EntityType.Widget, {}, [ + "List1", + "Container1", + ]); + _.propPane.EnterJSContext("onClick", "{{showAlert('Hello')}}"); + _.agHelper.Sleep(); + _.agHelper.ClickButton("Submit"); + _.agHelper.ValidateToastMessage("Hello"); - // Wait for toastmsg to close - _.agHelper.WaitUntilAllToastsDisappear(); + // Wait for toastmsg to close + _.agHelper.WaitUntilAllToastsDisappear(); - // Clear the event - _.propPane.UpdatePropertyFieldValue("onClick", ""); - _.agHelper.Sleep(); - _.agHelper.ClickButton("Submit"); + // Clear the event + _.propPane.UpdatePropertyFieldValue("onClick", ""); + _.agHelper.Sleep(); + _.agHelper.ClickButton("Submit"); - _.agHelper.AssertElementAbsence(_.locators._specificToast("Hello")); - }); -}); + _.agHelper.AssertElementAbsence(_.locators._specificToast("Hello")); + }); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Childwigets/Listv2_Tabs_Widget_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Childwigets/Listv2_Tabs_Widget_spec.js index 353528e41be4..48c06295e083 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Childwigets/Listv2_Tabs_Widget_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Childwigets/Listv2_Tabs_Widget_spec.js @@ -1,29 +1,33 @@ import * as _ from "../../../../../../support/Objects/ObjectsCore"; const commonlocators = require("../../../../../../locators/commonlocators.json"); -describe("List v2- Tabs Widget", { tags: ["@tag.Widget", "@tag.List"] }, () => { - before(() => { - _.agHelper.AddDsl("Listv2/simpleListWithTabsWidget"); - }); +describe( + "List v2- Tabs Widget", + { tags: ["@tag.Widget", "@tag.List", "@tag.Binding"] }, + () => { + before(() => { + _.agHelper.AddDsl("Listv2/simpleListWithTabsWidget"); + }); - it("1. change in the properties of the tabs widget should retain the default selected tab", () => { - cy.openPropertyPaneByWidgetName("Tabs1", "tabswidget"); + it("1. change in the properties of the tabs widget should retain the default selected tab", () => { + cy.openPropertyPaneByWidgetName("Tabs1", "tabswidget"); - // Check if Tab1 selected - cy.get(".t--page-switch-tab.is-active").contains("Tab 1"); + // Check if Tab1 selected + cy.get(".t--page-switch-tab.is-active").contains("Tab 1"); - // Disable Scroll Content - _.agHelper.CheckUncheck(commonlocators.scrollView, false); - // Check if disabled - cy.get(commonlocators.scrollView).parent().should("not.be.checked"); - // Check if Tab 1 still selected - cy.get(".t--page-switch-tab.is-active").contains("Tab 1"); + // Disable Scroll Content + _.agHelper.CheckUncheck(commonlocators.scrollView, false); + // Check if disabled + cy.get(commonlocators.scrollView).parent().should("not.be.checked"); + // Check if Tab 1 still selected + cy.get(".t--page-switch-tab.is-active").contains("Tab 1"); - // Enable Scroll Content - _.agHelper.CheckUncheck(commonlocators.scrollView); - // Check if enabled - cy.get(commonlocators.scrollView).should("be.checked"); - // Check if Tab 1 still selected - cy.get(".t--page-switch-tab.is-active").contains("Tab 1"); - }); -}); + // Enable Scroll Content + _.agHelper.CheckUncheck(commonlocators.scrollView); + // Check if enabled + cy.get(commonlocators.scrollView).should("be.checked"); + // Check if Tab 1 still selected + cy.get(".t--page-switch-tab.is-active").contains("Tab 1"); + }); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/DataIdentifierProperty_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/DataIdentifierProperty_spec.ts index 661a206c0afc..05b0bf8d9a18 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/DataIdentifierProperty_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/DataIdentifierProperty_spec.ts @@ -12,7 +12,7 @@ import EditorNavigation, { describe( "List v2 - Data Identifier property", - { tags: ["@tag.Widget", "@tag.List"] }, + { tags: ["@tag.Widget", "@tag.List", "@tag.Binding"] }, () => { beforeEach(() => { agHelper.RestoreLocalStorageCache(); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/DataIdentifier_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/DataIdentifier_spec.ts index 0b1f970d36cf..8faae3ee37d6 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/DataIdentifier_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/DataIdentifier_spec.ts @@ -34,7 +34,7 @@ const data = [ describe( "List v2 - Data Identifier property", - { tags: ["@tag.Widget", "@tag.List"] }, + { tags: ["@tag.Widget", "@tag.List", "@tag.Binding"] }, () => { before(() => { agHelper.AddDsl("Listv2/ListV2WithNullPrimaryKey"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/DefaultSelectItem_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/DefaultSelectItem_spec.ts index 6ab02041d745..33f947692405 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/DefaultSelectItem_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/DefaultSelectItem_spec.ts @@ -54,7 +54,7 @@ function setUpDataSource() { describe( "List widget v2 defaultSelectedItem", - { tags: ["@tag.Widget", "@tag.List"] }, + { tags: ["@tag.Widget", "@tag.List", "@tag.Binding"] }, () => { before(() => { agHelper.AddDsl("Listv2/ListV2_Reset_dsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Event_Bindings_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Event_Bindings_spec.ts index 0d7b56550a29..f463e306a830 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Event_Bindings_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Event_Bindings_spec.ts @@ -10,7 +10,7 @@ import EditorNavigation, { describe( "Listv2 - Event bindings spec", - { tags: ["@tag.Widget", "@tag.List"] }, + { tags: ["@tag.Widget", "@tag.List", "@tag.Binding"] }, () => { it("1. nested list - inner widget should have access to currentItem, currentIndex, currentView and level_1", () => { agHelper.AddDsl("Listv2/nestedList"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/ListV2_NestedList_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/ListV2_NestedList_spec.ts index 594f05b44743..9516f37bc733 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/ListV2_NestedList_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/ListV2_NestedList_spec.ts @@ -13,7 +13,7 @@ import * as _ from "../../../../../support/Objects/ObjectsCore"; describe( "Nested List widget V2 ", - { tags: ["@tag.Widget", "@tag.List"] }, + { tags: ["@tag.Widget", "@tag.List", "@tag.Binding"] }, () => { before(() => { agHelper.AddDsl("listV2NestedDsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/ListV2_PageNo_PageSize_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/ListV2_PageNo_PageSize_spec.js index 00e3059cd5ab..2d5cc6eb0d93 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/ListV2_PageNo_PageSize_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/ListV2_PageNo_PageSize_spec.js @@ -88,7 +88,7 @@ const listData = [ describe( "List widget V2 page number and page size", - { tags: ["@tag.Widget", "@tag.List", "@tag.Sanity"] }, + { tags: ["@tag.Widget", "@tag.List", "@tag.Sanity", "@tag.Binding"] }, () => { before(() => { _.agHelper.AddDsl("listv2PaginationDsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/ListV2_SerververSide_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/ListV2_SerververSide_spec.js index 061e83a4c9e0..dbb9727591cd 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/ListV2_SerververSide_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/ListV2_SerververSide_spec.js @@ -15,7 +15,7 @@ const widgetSelector = (name) => `[data-widgetname-cy="${name}"]`; describe( "List widget V2 Serverside Pagination", - { tags: ["@tag.Widget", "@tag.List", "@tag.Sanity"] }, + { tags: ["@tag.Widget", "@tag.List", "@tag.Sanity", "@tag.Binding"] }, () => { before(() => { agHelper.AddDsl("Listv2/Listv2JSObjects"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/ListV2_WithOtherWidget_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/ListV2_WithOtherWidget_spec.ts index 9670243a0143..ca90e9d4afe2 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/ListV2_WithOtherWidget_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/ListV2_WithOtherWidget_spec.ts @@ -10,7 +10,7 @@ import EditorNavigation, { describe( "List widget V2 functionality with audio and video widgets", - { tags: ["@tag.Widget", "@tag.List"] }, + { tags: ["@tag.Widget", "@tag.List", "@tag.Binding"] }, () => { before(() => { agHelper.AddDsl("listV2AudioVideoDsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/ListV2_nested_List_widget_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/ListV2_nested_List_widget_spec.js index 0aafd27f8e58..2ca9fe4720f8 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/ListV2_nested_List_widget_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/ListV2_nested_List_widget_spec.js @@ -27,7 +27,7 @@ function checkAutosuggestion(label, type) { } describe( " Nested List Widgets ", - { tags: ["@tag.Widget", "@tag.List", "@tag.Sanity"] }, + { tags: ["@tag.Widget", "@tag.List", "@tag.Sanity", "@tag.Binding"] }, function () { const modifierKey = Cypress.platform === "darwin" ? "meta" : "ctrl"; beforeEach(() => { diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Listv2_BasicChildWidgetInteraction_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Listv2_BasicChildWidgetInteraction_spec.js index 1bdbef59b944..97814dc5b463 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Listv2_BasicChildWidgetInteraction_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Listv2_BasicChildWidgetInteraction_spec.js @@ -51,7 +51,7 @@ function checkSelectedRadioValue(selector, value) { describe( "List widget v2 - Basic Child Widget Interaction", - { tags: ["@tag.Widget", "@tag.List", "@tag.Sanity"] }, + { tags: ["@tag.Widget", "@tag.List", "@tag.Sanity", "@tag.Binding"] }, () => { before(() => { _.agHelper.AddDsl("Listv2/emptyList"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Listv2_BasicClientSideData_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Listv2_BasicClientSideData_spec.js index c762a36fc84a..0728fa37cc7f 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Listv2_BasicClientSideData_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Listv2_BasicClientSideData_spec.js @@ -26,7 +26,7 @@ const simpleListData1 = [ describe( "List widget v2 - Basic client side data tests", - { tags: ["@tag.Widget", "@tag.List", "@tag.Sanity"] }, + { tags: ["@tag.Widget", "@tag.List", "@tag.Sanity", "@tag.Binding"] }, () => { beforeEach(() => { _.agHelper.RestoreLocalStorageCache(); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Listv2_BasicServerSideData_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Listv2_BasicServerSideData_spec.js index 03475cbff385..fde5879d85cd 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Listv2_BasicServerSideData_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Listv2_BasicServerSideData_spec.js @@ -10,7 +10,7 @@ const toggleJSButton = (name) => `.t--property-control-${name} .t--js-toggle`; describe( "List widget v2 - Basic server side data tests", - { tags: ["@tag.Widget", "@tag.List"] }, + { tags: ["@tag.Widget", "@tag.List", "@tag.Binding"] }, () => { before(() => { _.agHelper.AddDsl("Listv2/listWithServerSideData"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Listv2_Copy_Paste_Delete_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Listv2_Copy_Paste_Delete_spec.js index 1a242fc7de27..6923bbcd0e3a 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Listv2_Copy_Paste_Delete_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Listv2_Copy_Paste_Delete_spec.js @@ -4,7 +4,7 @@ const modifierKey = Cypress.platform === "darwin" ? "meta" : "ctrl"; describe( "List widget v2 Copy and Paste", - { tags: ["@tag.Widget", "@tag.List"] }, + { tags: ["@tag.Widget", "@tag.List", "@tag.Binding"] }, () => { it("1. Validate Copy paste action", () => { cy.dragAndDropToCanvas("listwidgetv2", { diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Listv2_EvaluatedPopup_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Listv2_EvaluatedPopup_spec.js index 25f27987ab7a..3f5b3d5d9939 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Listv2_EvaluatedPopup_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Listv2_EvaluatedPopup_spec.js @@ -1,6 +1,6 @@ describe( "List widget v2 Evaluated Popup", - { tags: ["@tag.Widget", "@tag.List"] }, + { tags: ["@tag.Widget", "@tag.List", "@tag.Binding"] }, () => { it("1. List widget V2 with currentItem", () => { cy.dragAndDropToCanvas("listwidgetv2", { diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Listv2_Meta_Hydration_ClientSide_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Listv2_Meta_Hydration_ClientSide_spec.js index 51f901f0d9dd..589d2ef0e358 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Listv2_Meta_Hydration_ClientSide_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Listv2_Meta_Hydration_ClientSide_spec.js @@ -60,7 +60,7 @@ function verifyValueOfWidget(widgetType, value, index) { describe( "List widget v2 - meta hydration tests", - { tags: ["@tag.Widget", "@tag.List"] }, + { tags: ["@tag.Widget", "@tag.List", "@tag.Binding"] }, () => { before(() => { _.agHelper.AddDsl("Listv2/MetaHydrationDSL"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Listv2_Meta_Hydration_ServerSide_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Listv2_Meta_Hydration_ServerSide_spec.js index 7ed4c5744468..4d6d51783557 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Listv2_Meta_Hydration_ServerSide_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Listv2_Meta_Hydration_ServerSide_spec.js @@ -75,7 +75,7 @@ function testJsontextClear(endp) { describe( "List widget v2 - meta hydration tests", - { tags: ["@tag.Widget", "@tag.List"] }, + { tags: ["@tag.Widget", "@tag.List", "@tag.Binding"] }, () => { before(() => { _.agHelper.AddDsl("Listv2/MetaHydrationDSL"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Listv2_Nested_EventBindings_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Listv2_Nested_EventBindings_spec.js index 344b4116035f..1518bd7c3ff8 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Listv2_Nested_EventBindings_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Listv2_Nested_EventBindings_spec.js @@ -6,7 +6,7 @@ const widgetSelector = (name) => `[data-widgetname-cy="${name}"]`; describe( "Listv2 - Event bindings spec", - { tags: ["@tag.Widget", "@tag.List", "@tag.Sanity"] }, + { tags: ["@tag.Widget", "@tag.List", "@tag.Sanity", "@tag.Binding"] }, () => { it("1. nested list - inner widget should have access to currentItem, currentIndex, currentView and level_1", () => { cy.addDsl(nestedListDSL); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Listv2_WithButtonGroupIconWidget_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Listv2_WithButtonGroupIconWidget_spec.ts index fbe7a15d34b0..b545b0f4a687 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Listv2_WithButtonGroupIconWidget_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Listv2_WithButtonGroupIconWidget_spec.ts @@ -12,7 +12,7 @@ import EditorNavigation, { describe( "List widget V2 functionality with button, button group and icon button widgets", - { tags: ["@tag.Widget", "@tag.List"] }, + { tags: ["@tag.Widget", "@tag.List", "@tag.Binding"] }, () => { before(() => { agHelper.AddDsl("listV2ButtonsDsl", locators._buttonByText("Submit")); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Listv2_autocomplete_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Listv2_autocomplete_spec.js index 60ed01e6f9f7..c7d9d1997ce6 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Listv2_autocomplete_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Listv2_autocomplete_spec.js @@ -12,7 +12,7 @@ function checkAutosuggestion(label, type) { describe( "List v2 - Property autocomplete", - { tags: ["@tag.Widget", "@tag.List"] }, + { tags: ["@tag.Widget", "@tag.List", "@tag.Binding"] }, () => { before(() => { cy.addDsl(level3NestedList); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Listv2_container_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Listv2_container_spec.js index a1739330308c..704d88d8ef4d 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Listv2_container_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Listv2_container_spec.js @@ -3,7 +3,7 @@ const commonlocators = require("../../../../../locators/commonlocators.json"); describe( "Listv2 - Container widget", - { tags: ["@tag.Widget", "@tag.List"] }, + { tags: ["@tag.Widget", "@tag.List", "@tag.Binding"] }, () => { before(() => { cy.addDsl(simpleListDSL); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Listv2_onItemClick_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Listv2_onItemClick_spec.js index 7d3e5f1d4e92..62c4d75957a6 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Listv2_onItemClick_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Listv2_onItemClick_spec.js @@ -30,7 +30,7 @@ function deleteAllWidgetsInContainer() { describe( "List widget v2 onItemClick", - { tags: ["@tag.Widget", "@tag.List", "@tag.Sanity"] }, + { tags: ["@tag.Widget", "@tag.List", "@tag.Sanity", "@tag.Binding"] }, () => { it("1. List widget V2 with onItemClick", () => { cy.dragAndDropToCanvas("listwidgetv2", { diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Listv2_regression_fix_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Listv2_regression_fix_spec.js index f9173928d479..91a35c8be8fe 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Listv2_regression_fix_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Listv2_regression_fix_spec.js @@ -4,7 +4,7 @@ const widgetSelector = (name) => `[data-widgetname-cy="${name}"]`; describe( "List widget v2 Regression", - { tags: ["@tag.Widget", "@tag.List"] }, + { tags: ["@tag.Widget", "@tag.List", "@tag.Binding"] }, () => { it("1. List widget V2 with invisible widgets", () => { cy.dragAndDropToCanvas("listwidgetv2", { diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Listv2_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Listv2_spec.js index 81c6e5ad3c8d..4fd89cd231cb 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Listv2_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Listv2_spec.js @@ -12,7 +12,7 @@ import { describe( "List Widget V2 Functionality", - { tags: ["@tag.Widget", "@tag.List"] }, + { tags: ["@tag.Widget", "@tag.List", "@tag.Binding"] }, function () { before(() => { agHelper.AddDsl("Listv2/simpleLargeListv2"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Listv2_vulnerability_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Listv2_vulnerability_spec.js index 77af980174e4..6e4325de8bbb 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Listv2_vulnerability_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Listv2_vulnerability_spec.js @@ -3,7 +3,7 @@ import * as _ from "../../../../../support/Objects/ObjectsCore"; describe( "Binding the list widget with text widget", - { tags: ["@tag.Widget", "@tag.List"] }, + { tags: ["@tag.Widget", "@tag.List", "@tag.Binding"] }, function () { before(() => { _.agHelper.AddDsl("Listv2/simpleListVulnerability"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/PropertyPane_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/PropertyPane_spec.ts index 504f60b99216..6433daf8351c 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/PropertyPane_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/PropertyPane_spec.ts @@ -12,7 +12,7 @@ import EditorNavigation, { describe( "List widget V2 PropertyPane", - { tags: ["@tag.Widget", "@tag.List"] }, + { tags: ["@tag.Widget", "@tag.List", "@tag.Binding"] }, () => { it("1. Validate isVisible", () => { entityExplorer.DragDropWidgetNVerify("listwidgetv2", 300, 300); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Migration_Spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Migration_Spec.js index f9958c77a292..ff32b90e833b 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Migration_Spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Migration_Spec.js @@ -12,304 +12,308 @@ import { table, } from "../../../../support/Objects/ObjectsCore"; -describe("Migration Validate", { tags: ["@tag.ImportExport"] }, function () { - it("1. Import application and Validate Migration on pageload", function () { - // import application - homePageHelpers.NavigateToHome(); - agHelper.GetNClick(homePage.createNew, 0); - cy.get(homePage.workspaceImportAppOption).click({ force: true }); - cy.get(homePage.workspaceImportAppModal).should("be.visible"); - cy.xpath(homePage.uploadLogo) - .selectFile("cypress/fixtures/TableMigrationAppExported.json", { - force: true, - }) - .wait(500); - cy.get(homePage.workspaceImportAppModal).should("not.exist"); - - cy.wait("@importNewApplication").then(() => { - cy.get(homePage.toastMessage).should( - "contain", - Cypress.env("MESSAGES").IMPORT_APP_SUCCESSFUL(), - ); - - //Renaming imported app! - const uuid = () => Cypress._.random(0, 1e4); - const name = uuid(); - homePageHelpers.RenameApplication(`app${name}`); - cy.wrap(`app${name}`).as("appname"); - - // Validating data binding for the imported application - Page1 - - //Validating order of header row! - cy.xpath( - "//div[@class='tableWrap']//div[@class='thead']//div[@class='tr'][1]", - ) - .invoke("text") - .then((x) => { - expect(x).to.eq( - "Card NumberidNameاسمaddress住所PhoneemailCompanyjobimagessnPin CodeCreditLimitOutstandingStateAvailable LimitCard TypeChange Credit limitimageURLlatitudelongitude", - ); - cy.log("header set is:" + x); - }); - - //Validating Latitude & Longitude are hidden columns: - cy.xpath( - "//div[@class='tableWrap']//div[@class='thead']//div[@class='tr'][1]//div[@role='columnheader']//span[text()='latitude']/parent::div/parent::div/parent::div", - ) - .invoke("attr", "class") - .then((classes) => { - cy.log("classes are:" + classes); - expect(classes).includes("hidden-header"); - }); - - cy.xpath( - "//div[@class='tableWrap']//div[@class='thead']//div[@class='tr'][1]//div[@role='columnheader']//span[text()='longitude']/parent::div/parent::div/parent::div", - ) - .invoke("attr", "class") - .then((classes) => { - cy.log("classes are:" + classes); - expect(classes).includes("hidden-header"); - }); - - //Validating Id column sorting happens as Datatype is Number in app! - cy.xpath( - "//div[@class='tableWrap']//div[@class='thead']//div[@class='tr'][1]//div[@role='columnheader']//span[text()='id']", - ) - .click() - .wait(2000); - - cy.readTabledataPublish("0", "1").then((cellData) => { - expect(cellData).to.be.equal("100"); - }); - - cy.readTabledataPublish("1", "1").then((cellData) => { - expect(cellData).to.be.equal("99"); - }); - - cy.readTabledataPublish("2", "1").then((cellData) => { - expect(cellData).to.be.equal("98"); - }); +describe( + "Migration Validate", + { tags: ["@tag.ImportExport", "@tag.Git"] }, + function () { + it("1. Import application and Validate Migration on pageload", function () { + // import application + homePageHelpers.NavigateToHome(); + agHelper.GetNClick(homePage.createNew, 0); + cy.get(homePage.workspaceImportAppOption).click({ force: true }); + cy.get(homePage.workspaceImportAppModal).should("be.visible"); + cy.xpath(homePage.uploadLogo) + .selectFile("cypress/fixtures/TableMigrationAppExported.json", { + force: true, + }) + .wait(500); + cy.get(homePage.workspaceImportAppModal).should("not.exist"); - //Revert the Id column sorting! - cy.xpath( - "//div[@class='tableWrap']//div[@class='thead']//div[@class='tr'][1]//div[@role='columnheader']//span[text()='id']", - ) - .click() - .wait(2000); + cy.wait("@importNewApplication").then(() => { + cy.get(homePage.toastMessage).should( + "contain", + Cypress.env("MESSAGES").IMPORT_APP_SUCCESSFUL(), + ); - cy.readTabledataPublish("0", "1").then((cellData) => { - expect(cellData).to.be.equal("1"); - }); + //Renaming imported app! + const uuid = () => Cypress._.random(0, 1e4); + const name = uuid(); + homePageHelpers.RenameApplication(`app${name}`); + cy.wrap(`app${name}`).as("appname"); - cy.readTabledataPublish("1", "1").then((cellData) => { - expect(cellData).to.be.equal("2"); - }); + // Validating data binding for the imported application - Page1 - cy.readTabledataPublish("2", "1").then((cellData) => { - expect(cellData).to.be.equal("3"); - }); + //Validating order of header row! + cy.xpath( + "//div[@class='tableWrap']//div[@class='thead']//div[@class='tr'][1]", + ) + .invoke("text") + .then((x) => { + expect(x).to.eq( + "Card NumberidNameاسمaddress住所PhoneemailCompanyjobimagessnPin CodeCreditLimitOutstandingStateAvailable LimitCard TypeChange Credit limitimageURLlatitudelongitude", + ); + cy.log("header set is:" + x); + }); - //Validating image column is present: - cy.getTableDataSelector("0", "10").then((selector) => { - cy.get(selector + " div") + //Validating Latitude & Longitude are hidden columns: + cy.xpath( + "//div[@class='tableWrap']//div[@class='thead']//div[@class='tr'][1]//div[@role='columnheader']//span[text()='latitude']/parent::div/parent::div/parent::div", + ) .invoke("attr", "class") .then((classes) => { cy.log("classes are:" + classes); - expect(classes).to.eq("image-cell"); - }); - }); - - //Card Number mapping to text widget! - table.SelectTableRow(2); - cy.wait(2500); //time for table row select to reflect! - cy.readTabledataPublish("2", "0").then((cardNumber) => { - cy.xpath("//div[contains(@class, ' t--widget-textwidget')][1]") - .eq(1) - .invoke("text") - .then((cardNo) => { - var format = /^\d{4}-\d{4}-\d{4}(-\d{4})?$/; - expect(cardNumber).match(format); - expect(cardNumber).to.be.equal(cardNo); + expect(classes).includes("hidden-header"); }); - }); - - //Address mapping to text widget! - cy.readTabledataPublish("2", "4").then((address) => { - cy.xpath("//div[contains(@class, ' t--widget-textwidget')][2]") - .eq(1) - .invoke("text") - .then((addr) => { - expect(address.replace(/\r?\n|\r/, "")).to.eq(addr); - }); - }); - //Validating Available limit column computation maintained! - cy.readTabledataPublish("2", "16").then((availLimit) => { - cy.readTabledataPublish("2", "13").then((creditLimit) => { - cy.readTabledataPublish("2", "14").then((outstanding) => { - expect(Number(availLimit)).to.eq(creditLimit - outstanding); + cy.xpath( + "//div[@class='tableWrap']//div[@class='thead']//div[@class='tr'][1]//div[@role='columnheader']//span[text()='longitude']/parent::div/parent::div/parent::div", + ) + .invoke("attr", "class") + .then((classes) => { + cy.log("classes are:" + classes); + expect(classes).includes("hidden-header"); }); - }); - }); - //Validating State button click & binding & text widget mapping! - cy.getTableDataSelector("2", "15").then((selector) => { - cy.get(selector + " button.bp3-button") + //Validating Id column sorting happens as Datatype is Number in app! + cy.xpath( + "//div[@class='tableWrap']//div[@class='thead']//div[@class='tr'][1]//div[@role='columnheader']//span[text()='id']", + ) .click() - .wait(3000); - - cy.waitUntil( - () => - cy - .xpath("//div[contains(@class, ' t--widget-textwidget')][1]") - .eq(0) - .contains("State:", { timeout: 30000 }) - .should("exist"), - { - errorMsg: "Execute call did not complete evn after 10 secs", - timeout: 20000, - interval: 1000, - }, - ).then(() => cy.wait(500)); - - cy.get(selector + " button span") - .invoke("text") - .then((statetxt) => { - cy.xpath("//div[contains(@class, ' t--widget-textwidget')][1]") - .eq(0) - .invoke("text") - .then((txtWidtxt) => { - cy.log("statetxt is:" + statetxt); - let text = - statetxt == "Activate" ? "State:Inactive" : "State:Active"; - expect(text).to.eq(txtWidtxt); - }); - }); - }); + .wait(2000); - //Validating Image URL click & navigation! - cy.getTableDataSelector("2", "19").then((selector) => { - cy.window().then((win) => { - // Stub `window.open` to prevent new tabs - cy.stub(win, "open").as("windowOpenStub"); - cy.get(selector + " span").then(($link) => { - cy.wrap($link).click(); - cy.get("@windowOpenStub").should("have.been.called"); - }); + cy.readTabledataPublish("0", "1").then((cellData) => { + expect(cellData).to.be.equal("100"); }); - }); - - cy.wait("@getWorkspace"); - cy.waitUntil(() => cy.get("div.tableWrap").should("be.visible"), { - errorMsg: "Page is not loaded evn after 10 secs", - timeout: 30000, - interval: 2000, - }).then(() => cy.wait(1000)); //wait for page load! + cy.readTabledataPublish("1", "1").then((cellData) => { + expect(cellData).to.be.equal("99"); + }); - table.SelectTableRow(2); - cy.getTableDataSelector("2", "18").then((selector) => { - cy.get(selector + " button") - .click() - .wait(1000); + cy.readTabledataPublish("2", "1").then((cellData) => { + expect(cellData).to.be.equal("98"); + }); + //Revert the Id column sorting! cy.xpath( - "//div//a[contains(@class, 'bp3-menu-item')]/div[text()='AddcreditLimit']/parent::a", + "//div[@class='tableWrap']//div[@class='thead']//div[@class='tr'][1]//div[@role='columnheader']//span[text()='id']", ) .click() .wait(2000); - cy.waitUntil( - () => - cy - .xpath("//div[contains(@class, ' t--widget-textwidget')][2]", { - timeout: 50000, - }) - .eq(0) - .contains("CreditLimit:", { timeout: 30000 }) - .should("exist"), - { - errorMsg: "Execute call did not complete evn after 10 secs", - timeout: 20000, - interval: 1000, - }, - ).then(() => cy.wait(500)); //allow time for n/w to finish - - cy.xpath("//div[contains(@class, ' t--widget-textwidget')][2]", { - timeout: 30000, - }) - .eq(0) - .invoke("text") - .then((addreduce) => { - expect(addreduce).to.eq("CreditLimit:Add"); + cy.readTabledataPublish("0", "1").then((cellData) => { + expect(cellData).to.be.equal("1"); + }); + + cy.readTabledataPublish("1", "1").then((cellData) => { + expect(cellData).to.be.equal("2"); + }); + + cy.readTabledataPublish("2", "1").then((cellData) => { + expect(cellData).to.be.equal("3"); + }); + + //Validating image column is present: + cy.getTableDataSelector("0", "10").then((selector) => { + cy.get(selector + " div") + .invoke("attr", "class") + .then((classes) => { + cy.log("classes are:" + classes); + expect(classes).to.eq("image-cell"); + }); + }); + + //Card Number mapping to text widget! + table.SelectTableRow(2); + cy.wait(2500); //time for table row select to reflect! + cy.readTabledataPublish("2", "0").then((cardNumber) => { + cy.xpath("//div[contains(@class, ' t--widget-textwidget')][1]") + .eq(1) + .invoke("text") + .then((cardNo) => { + var format = /^\d{4}-\d{4}-\d{4}(-\d{4})?$/; + expect(cardNumber).match(format); + expect(cardNumber).to.be.equal(cardNo); + }); + }); + + //Address mapping to text widget! + cy.readTabledataPublish("2", "4").then((address) => { + cy.xpath("//div[contains(@class, ' t--widget-textwidget')][2]") + .eq(1) + .invoke("text") + .then((addr) => { + expect(address.replace(/\r?\n|\r/, "")).to.eq(addr); + }); + }); + + //Validating Available limit column computation maintained! + cy.readTabledataPublish("2", "16").then((availLimit) => { + cy.readTabledataPublish("2", "13").then((creditLimit) => { + cy.readTabledataPublish("2", "14").then((outstanding) => { + expect(Number(availLimit)).to.eq(creditLimit - outstanding); + }); }); - }); + }); - //Manu Btn validation: - 2nd menu item - cy.getTableDataSelector("2", "18").then((selector) => { - cy.get(selector + " button") - .click() - .wait(1000); + //Validating State button click & binding & text widget mapping! + cy.getTableDataSelector("2", "15").then((selector) => { + cy.get(selector + " button.bp3-button") + .click() + .wait(3000); + + cy.waitUntil( + () => + cy + .xpath("//div[contains(@class, ' t--widget-textwidget')][1]") + .eq(0) + .contains("State:", { timeout: 30000 }) + .should("exist"), + { + errorMsg: "Execute call did not complete evn after 10 secs", + timeout: 20000, + interval: 1000, + }, + ).then(() => cy.wait(500)); + + cy.get(selector + " button span") + .invoke("text") + .then((statetxt) => { + cy.xpath("//div[contains(@class, ' t--widget-textwidget')][1]") + .eq(0) + .invoke("text") + .then((txtWidtxt) => { + cy.log("statetxt is:" + statetxt); + let text = + statetxt == "Activate" ? "State:Inactive" : "State:Active"; + expect(text).to.eq(txtWidtxt); + }); + }); + }); - cy.xpath( - "//div//a[contains(@class, 'bp3-menu-item')]/div[text()='Reducecreditlimit']/parent::a", - ) - .click() - .wait(2000); + //Validating Image URL click & navigation! + cy.getTableDataSelector("2", "19").then((selector) => { + cy.window().then((win) => { + // Stub `window.open` to prevent new tabs + cy.stub(win, "open").as("windowOpenStub"); + cy.get(selector + " span").then(($link) => { + cy.wrap($link).click(); + cy.get("@windowOpenStub").should("have.been.called"); + }); + }); + }); - cy.waitUntil( - () => - cy - .xpath("//div[contains(@class, ' t--widget-textwidget')][2]", { - timeout: 50000, - }) - .eq(0) - .contains("CreditLimit:", { timeout: 30000 }) - .should("exist"), - { - errorMsg: "Execute call did not complete evn after 10 secs", - timeout: 20000, - interval: 1000, - }, - ).then(() => cy.wait(500)); //allow time for n/w to finish - - cy.xpath("//div[contains(@class, ' t--widget-textwidget')][2]", { + cy.wait("@getWorkspace"); + + cy.waitUntil(() => cy.get("div.tableWrap").should("be.visible"), { + errorMsg: "Page is not loaded evn after 10 secs", timeout: 30000, - }) - .eq(0) - .invoke("text") - .then((addreduce) => { - expect(addreduce).to.eq("CreditLimit:Reduce"); - }); + interval: 2000, + }).then(() => cy.wait(1000)); //wait for page load! + + table.SelectTableRow(2); + cy.getTableDataSelector("2", "18").then((selector) => { + cy.get(selector + " button") + .click() + .wait(1000); + + cy.xpath( + "//div//a[contains(@class, 'bp3-menu-item')]/div[text()='AddcreditLimit']/parent::a", + ) + .click() + .wait(2000); + + cy.waitUntil( + () => + cy + .xpath("//div[contains(@class, ' t--widget-textwidget')][2]", { + timeout: 50000, + }) + .eq(0) + .contains("CreditLimit:", { timeout: 30000 }) + .should("exist"), + { + errorMsg: "Execute call did not complete evn after 10 secs", + timeout: 20000, + interval: 1000, + }, + ).then(() => cy.wait(500)); //allow time for n/w to finish + + cy.xpath("//div[contains(@class, ' t--widget-textwidget')][2]", { + timeout: 30000, + }) + .eq(0) + .invoke("text") + .then((addreduce) => { + expect(addreduce).to.eq("CreditLimit:Add"); + }); + }); + + //Manu Btn validation: - 2nd menu item + cy.getTableDataSelector("2", "18").then((selector) => { + cy.get(selector + " button") + .click() + .wait(1000); + + cy.xpath( + "//div//a[contains(@class, 'bp3-menu-item')]/div[text()='Reducecreditlimit']/parent::a", + ) + .click() + .wait(2000); + + cy.waitUntil( + () => + cy + .xpath("//div[contains(@class, ' t--widget-textwidget')][2]", { + timeout: 50000, + }) + .eq(0) + .contains("CreditLimit:", { timeout: 30000 }) + .should("exist"), + { + errorMsg: "Execute call did not complete evn after 10 secs", + timeout: 20000, + interval: 1000, + }, + ).then(() => cy.wait(500)); //allow time for n/w to finish + + cy.xpath("//div[contains(@class, ' t--widget-textwidget')][2]", { + timeout: 30000, + }) + .eq(0) + .invoke("text") + .then((addreduce) => { + expect(addreduce).to.eq("CreditLimit:Reduce"); + }); + }); }); - }); - //Page 2 Validations: - EditorNavigation.SelectEntityByName( - "Change color and font", - EntityType.Page, - ); - EditorNavigation.SelectEntityByName("Table1", EntityType.Widget); - - cy.get(widgetsPage.bold) - .invoke("attr", "data-selected") - .then((sel) => expect(Boolean(sel)).to.be.true); - cy.xpath(widgetsPage.textCenterAlign) - .eq(0) - .invoke("attr", "data-selected") - .then((sel) => expect(Boolean(sel)).to.be.true); //Text align - cy.xpath(widgetsPage.textCenterAlign) - .eq(1) - .invoke("attr", "data-selected") - .then((sel) => expect(Boolean(sel)).to.be.true); //Vertical align - cy.get(widgetsPage.textColor) - .first() - .invoke("attr", "value") - .should("contain", "#2E3D49"); - cy.get(`${widgetsPage.cellBackground_tablev1} input`) - .first() - .invoke("attr", "value") - .should("contain", "#FFC13D"); - cy.validateCodeEditorContent(".t--property-control-textsize", "1.5rem"); - }); -}); + //Page 2 Validations: + EditorNavigation.SelectEntityByName( + "Change color and font", + EntityType.Page, + ); + EditorNavigation.SelectEntityByName("Table1", EntityType.Widget); + + cy.get(widgetsPage.bold) + .invoke("attr", "data-selected") + .then((sel) => expect(Boolean(sel)).to.be.true); + cy.xpath(widgetsPage.textCenterAlign) + .eq(0) + .invoke("attr", "data-selected") + .then((sel) => expect(Boolean(sel)).to.be.true); //Text align + cy.xpath(widgetsPage.textCenterAlign) + .eq(1) + .invoke("attr", "data-selected") + .then((sel) => expect(Boolean(sel)).to.be.true); //Vertical align + cy.get(widgetsPage.textColor) + .first() + .invoke("attr", "value") + .should("contain", "#2E3D49"); + cy.get(`${widgetsPage.cellBackground_tablev1} input`) + .first() + .invoke("attr", "value") + .should("contain", "#FFC13D"); + cy.validateCodeEditorContent(".t--property-control-textsize", "1.5rem"); + }); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Modal/Modal_On_Table_Filter_Pane_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Modal/Modal_On_Table_Filter_Pane_spec.ts index bc08dc34d61e..02a3804f1d9b 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Modal/Modal_On_Table_Filter_Pane_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Modal/Modal_On_Table_Filter_Pane_spec.ts @@ -3,7 +3,7 @@ const widgets = require("../../../../../locators/Widgets.json"); describe( "Modal Widget Functionality", - { tags: ["@tag.Widget", "@tag.Modal"] }, + { tags: ["@tag.Widget", "@tag.Modal", "@tag.Binding"] }, function () { before(() => { _.agHelper.AddDsl("modalOnTableFilterPaneDsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Modal/Modal_Widget_With_Button_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Modal/Modal_Widget_With_Button_spec.ts index 58ca9bb19eb4..8eda0ff4a5b0 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Modal/Modal_Widget_With_Button_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Modal/Modal_Widget_With_Button_spec.ts @@ -2,7 +2,7 @@ import * as _ from "../../../../../support/Objects/ObjectsCore"; describe( "Modal Widget with auto-layout usecases", - { tags: ["@tag.Widget", "@tag.Modal"] }, + { tags: ["@tag.Widget", "@tag.Modal", "@tag.Binding"] }, function () { it("1. Add new Modal widget with other widgets and validate with auto-layout", () => { _.autoLayout.ConvertToAutoLayoutAndVerify(false); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Modal/Modal_background_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Modal/Modal_background_spec.ts index 1e748bfcf12d..5c8933c7161b 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Modal/Modal_background_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Modal/Modal_background_spec.ts @@ -6,7 +6,7 @@ import { describe( "Modal Widget background color spec", - { tags: ["@tag.Widget", "@tag.Modal"] }, + { tags: ["@tag.Widget", "@tag.Modal", "@tag.Binding"] }, () => { before(() => { agHelper.AddDsl("modalWidgetBGcolorDSL"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Modal/Modal_focus_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Modal/Modal_focus_spec.js index 8d774a60f021..594a04581709 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Modal/Modal_focus_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Modal/Modal_focus_spec.js @@ -6,86 +6,90 @@ import EditorNavigation, { const widgets = require("../../../../../locators/Widgets.json"); import * as _ from "../../../../../support/Objects/ObjectsCore"; -describe("Modal focus", { tags: ["@tag.Widget", "@tag.Modal"] }, function () { - const someInputText = "some text"; +describe( + "Modal focus", + { tags: ["@tag.Widget", "@tag.Modal", "@tag.Binding"] }, + function () { + const someInputText = "some text"; - function setupModalWithInputWidget() { - //drag a button to open modal - cy.dragAndDropToCanvas("buttonwidget", { x: 400, y: 550 }); - cy.openPropertyPane("buttonwidget"); - cy.get(widgets.toggleOnClick).click(); + function setupModalWithInputWidget() { + //drag a button to open modal + cy.dragAndDropToCanvas("buttonwidget", { x: 400, y: 550 }); + cy.openPropertyPane("buttonwidget"); + cy.get(widgets.toggleOnClick).click(); - cy.updateCodeInput( - ".t--property-control-onclick", - `{{showModal(Modal1.name)}}`, - ); - //add modal - EditorNavigation.SelectEntityByName("Modal1", EntityType.Widget); - cy.get(widgets.modalWidget).should("exist"); + cy.updateCodeInput( + ".t--property-control-onclick", + `{{showModal(Modal1.name)}}`, + ); + //add modal + EditorNavigation.SelectEntityByName("Modal1", EntityType.Widget); + cy.get(widgets.modalWidget).should("exist"); - PageLeftPane.switchToAddNew(); + PageLeftPane.switchToAddNew(); - cy.wait(500); - //drag input field into modal - cy.get(".t--widget-card-draggable-inputwidgetv2") - .first() - .trigger("dragstart", { - force: true, - }); + cy.wait(500); + //drag input field into modal + cy.get(".t--widget-card-draggable-inputwidgetv2") + .first() + .trigger("dragstart", { + force: true, + }); - cy.get(widgets.modalWidget) - .scrollIntoView() - .trigger("mousemove", 50, 100, { eventConstructor: "MouseEvent" }) - .trigger("mousemove", 50, 100, { eventConstructor: "MouseEvent" }) - .trigger("mouseup", 50, 100, { eventConstructor: "MouseEvent" }); - } + cy.get(widgets.modalWidget) + .scrollIntoView() + .trigger("mousemove", 50, 100, { eventConstructor: "MouseEvent" }) + .trigger("mousemove", 50, 100, { eventConstructor: "MouseEvent" }) + .trigger("mouseup", 50, 100, { eventConstructor: "MouseEvent" }); + } - after(() => { - _.agHelper.SaveLocalStorageCache(); - }); + after(() => { + _.agHelper.SaveLocalStorageCache(); + }); - before(() => { - _.agHelper.RestoreLocalStorageCache(); - _.agHelper.AddDsl("ModalDsl"); - }); + before(() => { + _.agHelper.RestoreLocalStorageCache(); + _.agHelper.AddDsl("ModalDsl"); + }); - it("1. Should focus on the input field when autofocus for the input field is enabled", () => { - setupModalWithInputWidget(); - cy.openPropertyPaneFromModal("inputwidgetv2"); + it("1. Should focus on the input field when autofocus for the input field is enabled", () => { + setupModalWithInputWidget(); + cy.openPropertyPaneFromModal("inputwidgetv2"); - // autofocus for input field is enabled - cy.get(".t--property-control-autofocus") - .find(".ads-v2-switch") - .click({ force: true }); - //enter some text to the input field - cy.get(`${widgets.modalWidget} .t--widget-inputwidgetv2 input`) - .click() - .type(someInputText); + // autofocus for input field is enabled + cy.get(".t--property-control-autofocus") + .find(".ads-v2-switch") + .click({ force: true }); + //enter some text to the input field + cy.get(`${widgets.modalWidget} .t--widget-inputwidgetv2 input`) + .click() + .type(someInputText); - //close Modal - cy.get(widgets.modalCloseButton).click({ force: true }); - cy.get(widgets.modalCloseButton).should("not.be.visible"); + //close Modal + cy.get(widgets.modalCloseButton).click({ force: true }); + cy.get(widgets.modalCloseButton).should("not.be.visible"); - cy.wait(1500); - //open the modal - cy.get(widgets.widgetBtn).contains("Submit").click({ force: true }); - //check if the focus is on the input field - cy.focused().should("have.value", someInputText); - }); - it("2. Should not focus on the input field if autofocus is disabled", () => { - cy.openPropertyPaneFromModal("inputwidgetv2"); - // autofocus for input field is disabled - cy.get(".t--property-control-autofocus") - .find(".ads-v2-switch") - .click({ force: true }); - //close Modal - cy.get(widgets.modalCloseButton).click({ force: true }); - cy.get(widgets.modalCloseButton).should("not.be.visible"); + cy.wait(1500); + //open the modal + cy.get(widgets.widgetBtn).contains("Submit").click({ force: true }); + //check if the focus is on the input field + cy.focused().should("have.value", someInputText); + }); + it("2. Should not focus on the input field if autofocus is disabled", () => { + cy.openPropertyPaneFromModal("inputwidgetv2"); + // autofocus for input field is disabled + cy.get(".t--property-control-autofocus") + .find(".ads-v2-switch") + .click({ force: true }); + //close Modal + cy.get(widgets.modalCloseButton).click({ force: true }); + cy.get(widgets.modalCloseButton).should("not.be.visible"); - //open the modal - cy.get(widgets.modalWidget).should("not.exist"); - cy.get(widgets.widgetBtn).contains("Submit").click({ force: true }); - //check if the focus is not on the input field - cy.focused().should("not.have.value", someInputText); - }); -}); + //open the modal + cy.get(widgets.modalWidget).should("not.exist"); + cy.get(widgets.widgetBtn).contains("Submit").click({ force: true }); + //check if the focus is not on the input field + cy.focused().should("not.have.value", someInputText); + }); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Modal/Modal_functionaliy_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Modal/Modal_functionaliy_spec.js index eb63818e2acf..55c3bc8adbe0 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Modal/Modal_functionaliy_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Modal/Modal_functionaliy_spec.js @@ -10,7 +10,7 @@ import * as _ from "../../../../../support/Objects/ObjectsCore"; describe( "Modal Widget Functionality", - { tags: ["@tag.Widget", "@tag.Modal"] }, + { tags: ["@tag.Widget", "@tag.Modal", "@tag.Binding"] }, function () { afterEach(() => { _.agHelper.SaveLocalStorageCache(); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Modal/Modal_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Modal/Modal_spec.ts index 86cad0ac3623..de830dd41369 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Modal/Modal_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Modal/Modal_spec.ts @@ -15,12 +15,12 @@ import EditorNavigation, { describe( "Modal Widget test cases", - { tags: ["@tag.Widget", "@tag.Modal"] }, + { tags: ["@tag.Widget", "@tag.Modal", "@tag.Binding"] }, function () { const image = (src: string) => 'img[src="' + src + '"]'; - const jpgImg = "https://jpeg.org/images/jpegsystems-home.jpg"; - const gifImg = - "https://mir-s3-cdn-cf.behance.net/project_modules/max_1200/5eeea355389655.59822ff824b72.gif"; + const jpgImg = + "https://community.appsmith.com/sites/default/files/styles/small_thumbnail/public/2024-03/aws-logo.jpg"; + const gifImg = "https://docs.appsmith.com/img/multi-update-sql.gif"; it("1. Modal widget functionality", () => { entityExplorer.DragDropWidgetNVerify(draggableWidgets.BUTTON); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Multiselect/MultiSelect1_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Multiselect/MultiSelect1_spec.js index 90dce2f693ba..ac125df73900 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Multiselect/MultiSelect1_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Multiselect/MultiSelect1_spec.js @@ -3,7 +3,7 @@ import * as _ from "../../../../../support/Objects/ObjectsCore"; describe( "MultiSelect Widget Functionality", - { tags: ["@tag.Widget", "@tag.Multiselect", "@tag.Sanity"] }, + { tags: ["@tag.Widget", "@tag.Multiselect", "@tag.Sanity", "@tag.Binding"] }, function () { before(() => { _.agHelper.AddDsl("emptyDSL"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Multiselect/MultiSelect2_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Multiselect/MultiSelect2_spec.js index ed1a0968ba9b..56c708217258 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Multiselect/MultiSelect2_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Multiselect/MultiSelect2_spec.js @@ -14,7 +14,7 @@ import * as _ from "../../../../../support/Objects/ObjectsCore"; describe( "MultiSelect Widget Functionality", - { tags: ["@tag.Widget", "@tag.Multiselect"] }, + { tags: ["@tag.Widget", "@tag.Multiselect", "@tag.Binding"] }, function () { before(() => { _.agHelper.AddDsl("multiSelectDsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Multiselect/MultiSelect4_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Multiselect/MultiSelect4_spec.js index f27136699c9b..57e3884b2a69 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Multiselect/MultiSelect4_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Multiselect/MultiSelect4_spec.js @@ -20,7 +20,7 @@ const defaultValue = `[ describe( "MultiSelect Widget Functionality", - { tags: ["@tag.Widget", "@tag.Multiselect"] }, + { tags: ["@tag.Widget", "@tag.Multiselect", "@tag.Binding"] }, function () { before(() => { _.agHelper.AddDsl("emptyDSL"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Multiselect/MultiSelect5_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Multiselect/MultiSelect5_spec.ts index d5d1f62a1aac..acad6e559f0e 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Multiselect/MultiSelect5_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Multiselect/MultiSelect5_spec.ts @@ -12,7 +12,7 @@ import EditorNavigation, { describe( "Multi Select widget Tests", - { tags: ["@tag.Widget", "@tag.Multiselect"] }, + { tags: ["@tag.Widget", "@tag.Multiselect", "@tag.Binding"] }, function () { before(() => { entityExplorer.DragDropWidgetNVerify("multiselectwidgetv2", 550, 100); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Multiselect/MultiTreeSelect_2_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Multiselect/MultiTreeSelect_2_spec.ts index 0d0437231cf1..19759c3c7dda 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Multiselect/MultiTreeSelect_2_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Multiselect/MultiTreeSelect_2_spec.ts @@ -12,7 +12,7 @@ import EditorNavigation, { describe( "Multi Select widget Tests", - { tags: ["@tag.Widget", "@tag.Multiselect"] }, + { tags: ["@tag.Widget", "@tag.Multiselect", "@tag.Binding"] }, function () { before(() => { agHelper.AddDsl("multiTreeSelectDsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Multiselect/MultiTreeSelect_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Multiselect/MultiTreeSelect_spec.js index f8be47ba867e..b510970f2b9a 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Multiselect/MultiTreeSelect_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Multiselect/MultiTreeSelect_spec.js @@ -2,7 +2,7 @@ import * as _ from "../../../../../support/Objects/ObjectsCore"; describe( "Multi Tree Select Widget", - { tags: ["@tag.Widget", "@tag.Multiselect"] }, + { tags: ["@tag.Widget", "@tag.Multiselect", "@tag.Binding"] }, function () { before(() => { _.agHelper.AddDsl("emptyDSL"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Multiselect/Multi_Select_Tree_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Multiselect/Multi_Select_Tree_spec.js index 8b051bbab9ce..b614134f52e7 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Multiselect/Multi_Select_Tree_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Multiselect/Multi_Select_Tree_spec.js @@ -6,7 +6,7 @@ import * as _ from "../../../../../support/Objects/ObjectsCore"; describe( "MultiSelectTree Widget Functionality", - { tags: ["@tag.Widget", "@tag.Multiselect"] }, + { tags: ["@tag.Widget", "@tag.Multiselect", "@tag.Binding"] }, function () { before(() => { _.agHelper.AddDsl("TreeSelectDsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Others/Camera_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Others/Camera_spec.js index 051b21b774a4..3b8f4e7cf7d6 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Others/Camera_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Others/Camera_spec.js @@ -1,47 +1,51 @@ import * as _ from "../../../../../support/Objects/ObjectsCore"; -describe("Camera Widget", { tags: ["@tag.Widget", "@tag.Image"] }, () => { - before(() => { - _.agHelper.AddDsl("CameraDsl"); - }); - - beforeEach(() => { - cy.openPropertyPane("camerawidget"); - }); - - it("1. Check isDirty, onImageSave, imageBlobURL, imageDataURL", () => { - const mainControlSelector = - "//div[contains(@class, 't--widget-camerawidget')]//button"; - - cy.get(".t--property-control-onimagecapture .t--js-toggle").click(); - - cy.testJsontext("onimagecapture", "{{showAlert('captured','success')}}"); - - cy.openPropertyPane("textwidget"); - cy.updateCodeInput( - ".t--property-control-text", - `{{Camera1.isDirty}}:{{Camera1.imageDataURL}}:{{Camera1.imageBlobURL}}`, - ); - // Initial value of isDirty should be false - cy.get(".t--widget-textwidget").should( - "contain", - "false:undefined:undefined", - ); - // Take photo - cy.xpath(mainControlSelector).eq(2).click(); //taking photo - cy.wait(2000); - // Save photo - cy.xpath(mainControlSelector).eq(2).click(); //saving it - - // Assert: should trigger onImageSave action - cy.validateToastMessage("captured"); - - // Check if isDirty is set to true - cy.get(".t--widget-textwidget") - .invoke("text") - .should( - "match", - /true:blob:[a-z0-9-]*\?type=Base64:blob:https?:\/\/[^/]*\/[a-z0-9-]*/, +describe( + "Camera Widget", + { tags: ["@tag.Widget", "@tag.Image", "@tag.Binding"] }, + () => { + before(() => { + _.agHelper.AddDsl("CameraDsl"); + }); + + beforeEach(() => { + cy.openPropertyPane("camerawidget"); + }); + + it("1. Check isDirty, onImageSave, imageBlobURL, imageDataURL", () => { + const mainControlSelector = + "//div[contains(@class, 't--widget-camerawidget')]//button"; + + cy.get(".t--property-control-onimagecapture .t--js-toggle").click(); + + cy.testJsontext("onimagecapture", "{{showAlert('captured','success')}}"); + + cy.openPropertyPane("textwidget"); + cy.updateCodeInput( + ".t--property-control-text", + `{{Camera1.isDirty}}:{{Camera1.imageDataURL}}:{{Camera1.imageBlobURL}}`, ); - }); -}); + // Initial value of isDirty should be false + cy.get(".t--widget-textwidget").should( + "contain", + "false:undefined:undefined", + ); + // Take photo + cy.xpath(mainControlSelector).eq(2).click(); //taking photo + cy.wait(2000); + // Save photo + cy.xpath(mainControlSelector).eq(2).click(); //saving it + + // Assert: should trigger onImageSave action + cy.validateToastMessage("captured"); + + // Check if isDirty is set to true + cy.get(".t--widget-textwidget") + .invoke("text") + .should( + "match", + /true:blob:[a-z0-9-]*\?type=Base64:blob:https?:\/\/[^/]*\/[a-z0-9-]*/, + ); + }); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Others/Canvas_scrolling_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Others/Canvas_scrolling_spec.js index 0c91fd6ff79d..2ce858f511dc 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Others/Canvas_scrolling_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Others/Canvas_scrolling_spec.js @@ -2,7 +2,7 @@ import * as _ from "../../../../../support/Objects/ObjectsCore"; describe( "Modal Widget Functionality", - { tags: ["@tag.Widget", "@tag.Modal"] }, + { tags: ["@tag.Widget", "@tag.Modal", "@tag.Binding"] }, function () { before(() => { _.agHelper.AddDsl("modalScroll"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Others/Divider_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Others/Divider_spec.js index 991af1ffedfd..29d28219653b 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Others/Divider_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Others/Divider_spec.js @@ -5,7 +5,7 @@ import EditorNavigation, { describe( "Divider Widget Functionality", - { tags: ["@tag.Widget", "@tag.Divider"] }, + { tags: ["@tag.Widget", "@tag.Divider", "@tag.Binding"] }, function () { before(() => { _.agHelper.AddDsl("DividerDsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Others/IconButton_2_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Others/IconButton_2_spec.ts index 3df7914335f7..24d9b4b8d115 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Others/IconButton_2_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Others/IconButton_2_spec.ts @@ -13,7 +13,7 @@ import EditorNavigation, { describe( "Icon Button widget Tests", - { tags: ["@tag.Widget", "@tag.IconButton"] }, + { tags: ["@tag.Widget", "@tag.IconButton", "@tag.Binding"] }, function () { before(() => { entityExplorer.DragDropWidgetNVerify(draggableWidgets.ICONBUTTON); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Others/IconButton_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Others/IconButton_spec.js index 454444d6dcc1..ff0a6d1b7cb4 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Others/IconButton_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Others/IconButton_spec.js @@ -9,7 +9,7 @@ import * as _ from "../../../../../support/Objects/ObjectsCore"; describe( "Icon button Widget Functionality", - { tags: ["@tag.Widget", "@tag.IconButton"] }, + { tags: ["@tag.Widget", "@tag.IconButton", "@tag.Binding"] }, function () { before(() => { _.entityExplorer.DragDropWidgetNVerify(_.draggableWidgets.ICONBUTTON); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Others/MapChart_Spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Others/MapChart_Spec.ts index d08455c47be4..e7d14151cecb 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Others/MapChart_Spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Others/MapChart_Spec.ts @@ -18,7 +18,7 @@ const _mapChartPlot = (text: string) => describe( "Map Chart Widget Functionality", - { tags: ["@tag.Widget", "@tag.Maps", "@tag.Visual"] }, + { tags: ["@tag.Widget", "@tag.Maps", "@tag.Visual", "@tag.Binding"] }, function () { it("1. Drag and drop a Map Chart widget and verify", function () { entityExplorer.DragDropWidgetNVerify(draggableWidgets.MAPCHART, 200, 200); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Others/MapWidget_Spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Others/MapWidget_Spec.ts index 96a6cb701f9d..68bbeafc5a69 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Others/MapWidget_Spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Others/MapWidget_Spec.ts @@ -31,7 +31,7 @@ const location = [ describe( "Map Widget", - { tags: ["@tag.Widget", "@tag.Maps", "@tag.Visual"] }, + { tags: ["@tag.Widget", "@tag.Maps", "@tag.Visual", "@tag.Binding"] }, function () { it("1.Drag Map Widget and Verify the Map Widget with Initial Location", () => { //Add map and verify diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Others/MapWidget_loading_Spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Others/MapWidget_loading_Spec.ts index e3e56ddefc87..7d905e38eedd 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Others/MapWidget_loading_Spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Others/MapWidget_loading_Spec.ts @@ -7,7 +7,7 @@ import { describe( "Map chart Widget", - { tags: ["@tag.Widget", "@tag.Maps"] }, + { tags: ["@tag.Widget", "@tag.Maps", "@tag.Binding"] }, function () { it("1.Drag two Map Widget and Verify the Map Widget is loading", () => { //Add map and verify diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Others/MenuButton_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Others/MenuButton_spec.js index 7e4b34e83832..f94c0bc06f24 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Others/MenuButton_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Others/MenuButton_spec.js @@ -5,7 +5,7 @@ const { modifierKey } = require("../../../../../support/Constants"); describe( "Menu button Widget Functionality", - { tags: ["@tag.Widget", "@tag.MenuButton"] }, + { tags: ["@tag.Widget", "@tag.MenuButton", "@tag.Binding"] }, () => { before(() => { _.agHelper.AddDsl("menuButtonDsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Others/OthersAutocomplete_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Others/OthersAutocomplete_spec.js index 090bd656d0c4..d40ec14ca1d6 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Others/OthersAutocomplete_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Others/OthersAutocomplete_spec.js @@ -7,7 +7,7 @@ import * as _ from "../../../../../support/Objects/ObjectsCore"; describe( "Autocomplete using slash command and mustache tests", - { tags: ["@tag.JS"] }, + { tags: ["@tag.JS", "@tag.Binding"] }, function () { before(() => { _.agHelper.AddDsl("slashcommandDsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Others/Progress_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Others/Progress_spec.js index 5451ff9bbf41..085bfc389993 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Others/Progress_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Others/Progress_spec.js @@ -11,7 +11,7 @@ import { progressWidgetProgress } from "../../../../../locators/WidgetLocators"; describe( "Progress Widget", - { tags: ["@tag.Widget", "@tag.Progress"] }, + { tags: ["@tag.Widget", "@tag.Progress", "@tag.Binding"] }, function () { before(() => { entityExplorer.DragDropWidgetNVerify(draggableWidgets.PROGRESS); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Others/StatBox_DragAndDrop_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Others/StatBox_DragAndDrop_spec.js index 11b7e4937140..181e0f491f6d 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Others/StatBox_DragAndDrop_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Others/StatBox_DragAndDrop_spec.js @@ -10,7 +10,7 @@ import { describe( "Statbox Widget Functionality", - { tags: ["@tag.Widget", "@tag.Statbox"] }, + { tags: ["@tag.Widget", "@tag.Statbox", "@tag.Binding"] }, function () { before(() => { agHelper.AddDsl("dynamicHeightStatboxdsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Others/StatboxDsl_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Others/StatboxDsl_spec.js index 36ff5136ab3a..f48f179d6e6e 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Others/StatboxDsl_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Others/StatboxDsl_spec.js @@ -12,7 +12,7 @@ import { describe( "Statbox Widget", - { tags: ["@tag.Widget", "@tag.Statbox"] }, + { tags: ["@tag.Widget", "@tag.Statbox", "@tag.Binding"] }, function () { before(() => { agHelper.AddDsl("StatboxDsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/PhoneInput/PhoneInputDynamicValue_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/PhoneInput/PhoneInputDynamicValue_spec.js index 78631547f355..b5e60b77840f 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/PhoneInput/PhoneInputDynamicValue_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/PhoneInput/PhoneInputDynamicValue_spec.js @@ -12,7 +12,7 @@ const widgetName = "phoneinputwidget"; describe( "Phone input widget - ", - { tags: ["@tag.Widget", "@tag.PhoneInput"] }, + { tags: ["@tag.Widget", "@tag.PhoneInput", "@tag.Binding"] }, () => { before(() => { agHelper.AddDsl("PhoneInputDynamic"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/PhoneInput/PhoneInput_Part2_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/PhoneInput/PhoneInput_Part2_spec.ts index 9eede0aa2b78..6c8cd50ae65d 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/PhoneInput/PhoneInput_Part2_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/PhoneInput/PhoneInput_Part2_spec.ts @@ -12,7 +12,7 @@ import EditorNavigation, { describe( "Phone Input widget Tests", - { tags: ["@tag.Widget", "@tag.PhoneInput"] }, + { tags: ["@tag.Widget", "@tag.PhoneInput", "@tag.Binding"] }, function () { before(() => { entityExplorer.DragDropWidgetNVerify("phoneinputwidget", 550, 100); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/PhoneInput/Phone_input_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/PhoneInput/Phone_input_spec.js index d3806f52ec07..a539adac574c 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/PhoneInput/Phone_input_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/PhoneInput/Phone_input_spec.js @@ -15,7 +15,7 @@ const searchAndSelectOption = (optionValue) => { }; describe( "Phone input widget - ", - { tags: ["@tag.Widget", "@tag.PhoneInput"] }, + { tags: ["@tag.Widget", "@tag.PhoneInput", "@tag.Binding"] }, () => { before(() => { _.agHelper.AddDsl("emptyDSL"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/RTE/RichTextEditor3_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/RTE/RichTextEditor3_spec.ts index b99358500d53..7fa1bc92ebb5 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/RTE/RichTextEditor3_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/RTE/RichTextEditor3_spec.ts @@ -10,7 +10,7 @@ import EditorNavigation, { describe( "Rich Text Editor widget Tests", - { tags: ["@tag.Widget", "@tag.TextEditor"] }, + { tags: ["@tag.Widget", "@tag.TextEditor", "@tag.Binding"] }, function () { before(() => { agHelper.AddDsl("richTextEditorDsl"); @@ -49,7 +49,7 @@ describe( }); it("3. Verify applying style in one line should be observed in next line", function () { - agHelper.GetNClick(locators._richText_Text_Color); + agHelper.GetNClick(locators._richText_Text_Color("Black")); agHelper.GetNClick(locators._richText_color("Red")); agHelper .GetElement( diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/RTE/RichTextEditor_1_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/RTE/RichTextEditor_1_spec.js index 65829529af73..de2b53e0032e 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/RTE/RichTextEditor_1_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/RTE/RichTextEditor_1_spec.js @@ -8,7 +8,7 @@ import * as _ from "../../../../../support/Objects/ObjectsCore"; describe( "RichTextEditor Widget Functionality", - { tags: ["@tag.Widget", "@tag.TextEditor"] }, + { tags: ["@tag.Widget", "@tag.TextEditor", "@tag.Binding"] }, function () { before(() => { _.agHelper.AddDsl("formdsl1"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/RTE/RichTextEditor_2_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/RTE/RichTextEditor_2_spec.js index 3b9042c8baf6..1ca9207fd7f6 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/RTE/RichTextEditor_2_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/RTE/RichTextEditor_2_spec.js @@ -36,7 +36,7 @@ const testCursorPoistion = (textValueLen, tinyMceId) => { describe( "RichTextEditor Widget Functionality", - { tags: ["@tag.Widget", "@tag.TextEditor"] }, + { tags: ["@tag.Widget", "@tag.TextEditor", "@tag.Binding"] }, function () { before(() => { _.agHelper.AddDsl("formdsl1"); @@ -137,18 +137,18 @@ describe( cy.get('[aria-label="Underline"]').should("exist"); //Check if button for Background Color is rendered only once within the Toolbar of RTE widget - cy.get('[data-mce-name="backcolor"]').should("have.length", 1); + cy.get('[aria-label="Background color Black"]').should("have.length", 1); //Check if button for Text Color is rendered only once within the Toolbar of RTE widget - cy.get('[data-mce-name="forecolor"]').should("have.length", 1); + cy.get('[aria-label="Text color Black"]').should("have.length", 1); }); it("6. Check if able to add an emoji through toolbar", () => { - cy.get('[data-mce-name="overflow-button"]').click({ force: true }); - cy.wait(500); - cy.get('[data-mce-name="emoticons"]').click({ force: true }); - cy.wait(500); - cy.get('[data-mce-tooltip="grinning"]').click({ force: true }); + cy.get('[aria-label="Reveal or hide additional toolbar items"]').click({ + force: true, + }); + cy.get('[aria-label="Emojis"]').click({ force: true }); + cy.get('[aria-label="grinning"]').click({ force: true }); const getEditorContent = (win) => { const tinyMceId = "rte-component-vw4zehojqt"; const editor = win.tinymce.EditorManager.get(tinyMceId); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/RTE/RichTextEditor_Validation_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/RTE/RichTextEditor_Validation_spec.js index 850e1709fe6d..547164629aef 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/RTE/RichTextEditor_Validation_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/RTE/RichTextEditor_Validation_spec.js @@ -6,7 +6,7 @@ import * as _ from "../../../../../support/Objects/ObjectsCore"; describe( "RichTextEditor Widget Validation", - { tags: ["@tag.Widget", "@tag.TextEditor"] }, + { tags: ["@tag.Widget", "@tag.TextEditor", "@tag.Binding"] }, function () { before(() => { _.agHelper.AddDsl("formdsl1"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Radio/Radio2_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Radio/Radio2_spec.ts index f8fb3832b059..b01f39c2ac92 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Radio/Radio2_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Radio/Radio2_spec.ts @@ -16,7 +16,7 @@ import EditorNavigation, { describe( "Radio Widget test cases", - { tags: ["@tag.Widget", "@tag.Radio"] }, + { tags: ["@tag.Widget", "@tag.Radio", "@tag.Binding"] }, function () { it("1. Validate radio widget bindings", () => { //JS Object diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Radio/RadioGroup1_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Radio/RadioGroup1_spec.js index 76754f740d02..088ca5013d4c 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Radio/RadioGroup1_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Radio/RadioGroup1_spec.js @@ -2,7 +2,7 @@ import * as _ from "../../../../../support/Objects/ObjectsCore"; describe( "Radiogroup Widget Functionality", - { tags: ["@tag.Widget", "@tag.Radio"] }, + { tags: ["@tag.Widget", "@tag.Radio", "@tag.Binding"] }, function () { before(() => { _.agHelper.AddDsl("emptyDSL"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Radio/RadioGroup2_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Radio/RadioGroup2_spec.js index dd47f2387eb2..751138e75adb 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Radio/RadioGroup2_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Radio/RadioGroup2_spec.js @@ -1,25 +1,32 @@ const widgetName = "radiogroupwidget"; -describe("Radio Group Widget", { tags: ["@tag.Widget", "@tag.Radio"] }, () => { - it("Drag & drop Radio group & Text widgets", () => { - cy.dragAndDropToCanvas(widgetName, { x: 300, y: 300 }); - cy.get(`.t--widget-${widgetName}`).should("exist"); - cy.dragAndDropToCanvas("textwidget", { x: 300, y: 500 }); - cy.openPropertyPane("textwidget"); - cy.updateCodeInput(".t--property-control-text", `{{RadioGroup1.isDirty}}`); - }); +describe( + "Radio Group Widget", + { tags: ["@tag.Widget", "@tag.Radio", "@tag.Binding"] }, + () => { + it("Drag & drop Radio group & Text widgets", () => { + cy.dragAndDropToCanvas(widgetName, { x: 300, y: 300 }); + cy.get(`.t--widget-${widgetName}`).should("exist"); + cy.dragAndDropToCanvas("textwidget", { x: 300, y: 500 }); + cy.openPropertyPane("textwidget"); + cy.updateCodeInput( + ".t--property-control-text", + `{{RadioGroup1.isDirty}}`, + ); + }); - it("Check isDirty meta property", function () { - // Check if initial value of isDirty is false - cy.get(".t--widget-textwidget").should("contain", "false"); - // Interact with UI - cy.get(".t--widget-radiogroupwidget .bp3-radio").last().click(); - // Check if isDirty is set to true - cy.get(".t--widget-textwidget").should("contain", "true"); - // Change defaultOptionValue - cy.openPropertyPane(widgetName); - cy.updateCodeInput(".t--property-control-defaultselectedvalue", "N"); - // Check if isDirty is reset to false - cy.get(".t--widget-textwidget").should("contain", "false"); - }); -}); + it("Check isDirty meta property", function () { + // Check if initial value of isDirty is false + cy.get(".t--widget-textwidget").should("contain", "false"); + // Interact with UI + cy.get(".t--widget-radiogroupwidget .bp3-radio").last().click(); + // Check if isDirty is set to true + cy.get(".t--widget-textwidget").should("contain", "true"); + // Change defaultOptionValue + cy.openPropertyPane(widgetName); + cy.updateCodeInput(".t--property-control-defaultselectedvalue", "N"); + // Check if isDirty is reset to false + cy.get(".t--widget-textwidget").should("contain", "false"); + }); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Radio/RadioGroup_Int_Value_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Radio/RadioGroup_Int_Value_spec.js index f3cd3befa00b..2b067d93d6bd 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Radio/RadioGroup_Int_Value_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Radio/RadioGroup_Int_Value_spec.js @@ -12,7 +12,7 @@ function checkSelectedRadioValue(selector, value) { describe( "RadioGroup widget testing", - { tags: ["@tag.Widget", "@tag.Radio"] }, + { tags: ["@tag.Widget", "@tag.Radio", "@tag.Binding"] }, function () { before(() => { _.agHelper.AddDsl("radioGroup_int_value_dsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Radio/Radio_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Radio/Radio_spec.js index 1b1810efa3c9..52bcf63014a3 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Radio/Radio_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Radio/Radio_spec.js @@ -15,7 +15,7 @@ import { describe( "Radio Widget Functionality", - { tags: ["@tag.Widget", "@tag.Radio"] }, + { tags: ["@tag.Widget", "@tag.Radio", "@tag.Binding"] }, function () { before(() => { agHelper.AddDsl("newFormDsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Rating/Rating_Widget_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Rating/Rating_Widget_spec.ts index f06811d548bf..d0278d6b6307 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Rating/Rating_Widget_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Rating/Rating_Widget_spec.ts @@ -12,7 +12,7 @@ import { describe( "Rating widet testcases", - { tags: ["@tag.Widget", "@tag.Rating"] }, + { tags: ["@tag.Widget", "@tag.Rating", "@tag.Binding"] }, () => { before(() => { entityExplorer.DragDropWidgetNVerify(draggableWidgets.RATING); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Select/Select2_Spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Select/Select2_Spec.ts index 30f1a3f108df..4f91c5c0c9f1 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Select/Select2_Spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Select/Select2_Spec.ts @@ -15,7 +15,7 @@ import EditorNavigation, { describe( "Select widget tests", - { tags: ["@tag.Widget", "@tag.Select"] }, + { tags: ["@tag.Widget", "@tag.Select", "@tag.Binding"] }, function () { before(() => { entityExplorer.DragDropWidgetNVerify(draggableWidgets.SELECT); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Select/Select3_Spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Select/Select3_Spec.ts index 7394090d06cf..e7af98c41846 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Select/Select3_Spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Select/Select3_Spec.ts @@ -14,7 +14,7 @@ import EditorNavigation, { describe( "Select widget tests", - { tags: ["@tag.Widget", "@tag.Select"] }, + { tags: ["@tag.Widget", "@tag.Select", "@tag.Binding"] }, function () { before(() => { entityExplorer.DragDropWidgetNVerify(draggableWidgets.SELECT); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Select/Select_TreeSelect_MultiSelect_OnFocus_OnBlur_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Select/Select_TreeSelect_MultiSelect_OnFocus_OnBlur_spec.js index 75b0802bcdf9..714fd662dd4a 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Select/Select_TreeSelect_MultiSelect_OnFocus_OnBlur_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Select/Select_TreeSelect_MultiSelect_OnFocus_OnBlur_spec.js @@ -3,7 +3,7 @@ import * as _ from "../../../../../support/Objects/ObjectsCore"; describe( "Select, MultiSelect, Tree Select and Multi Tree Select Widget Property tests onFocus and onBlur", - { tags: ["@tag.Widget", "@tag.Select"] }, + { tags: ["@tag.Widget", "@tag.Select", "@tag.Binding"] }, function () { before(() => { _.agHelper.AddDsl("selectMultiSelectTreeSelectWidgetDsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Select/Select_Validation_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Select/Select_Validation_spec.js index 7924ea4e9ecd..51a05b009445 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Select/Select_Validation_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Select/Select_Validation_spec.js @@ -8,7 +8,7 @@ import * as _ from "../../../../../support/Objects/ObjectsCore"; describe( "Select Widget Functionality", - { tags: ["@tag.Widget", "@tag.Select", "@tag.Sanity"] }, + { tags: ["@tag.Widget", "@tag.Select", "@tag.Sanity", "@tag.Binding"] }, function () { before(() => { _.entityExplorer.DragDropWidgetNVerify(_.draggableWidgets.SELECT); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Select/Select_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Select/Select_spec.js index 059d27c6ca20..2583741fc9be 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Select/Select_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Select/Select_spec.js @@ -19,122 +19,128 @@ const { OneClickBinding } = require("../../OneClickBinding/spec_utility"); const oneClickBinding = new OneClickBinding(); -describe("Select widget", { tags: ["@tag.Widget", "@tag.Select"] }, () => { - it("1. Drag and drop Select/Text widgets", () => { - cy.dragAndDropToCanvas("selectwidget", { x: 300, y: 300 }); - cy.get(formWidgetsPage.selectWidget).should("exist"); - }); - - it("2. Check isDirty meta property", () => { - cy.dragAndDropToCanvas("textwidget", { x: 300, y: 500 }); - cy.updateCodeInput(".t--property-control-text", `{{Select1.isDirty}}`); - // Check if initial value of isDirty is false - cy.get(".t--widget-textwidget").should("contain", "false"); - // Interact with UI - cy.get(formWidgetsPage.selectWidget) - .find(widgetLocators.dropdownSingleSelect) - .click({ force: true }); - cy.get(commonlocators.singleSelectWidgetMenuItem) - .contains("Blue") - .click({ force: true }); - // Check if isDirty is set to true - cy.get(".t--widget-textwidget").should("contain", "true"); - // Change defaultOptionValue property - cy.updateCodeInput(".t--property-control-defaultselectedvalue", "RED"); - // Check if isDirty is reset to false - cy.get(".t--widget-textwidget").should("contain", "false"); - }); - - it("3. Clears the search field when widget is closed and serverSideFiltering is off", () => { - // open the select widget - cy.get(formWidgetsPage.selectWidget) - .find(widgetLocators.dropdownSingleSelect) - .click({ force: true }); - // search for option Red in the search input - cy.get(commonlocators.selectInputSearch).type("Red"); - // Select the Red option from dropdown list - cy.get(commonlocators.singleSelectWidgetMenuItem) - .contains("Red") - .click({ force: true }); - cy.wait(200); - // Assert if the select widget has Red as the selected value - cy.get(formWidgetsPage.selectWidget).contains("Red"); - // Open the select widget again - cy.get(formWidgetsPage.selectWidget) - .find(widgetLocators.dropdownSingleSelect) - .click({ force: true }); - // Assert if the search input is empty now - cy.get(commonlocators.selectInputSearch).invoke("val").should("be.empty"); - }); - - it("4. Does not clear the search field when widget is closed and serverSideFiltering is on", () => { - // toggle the serversidefiltering option on - agHelper.CheckUncheck(widgetLocators.serversideFilteringInput); - // search for option Red in the search input - cy.get(commonlocators.selectInputSearch).type("Red"); - // Select the Red option from dropdown list - cy.get(commonlocators.singleSelectWidgetMenuItem) - .contains("Red") - .click({ force: true }); - cy.wait(200); - // Open the select widget again - cy.get(formWidgetsPage.selectWidget) - .find(widgetLocators.dropdownSingleSelect) - .click({ force: true }); - // Assert if the search input is not empty - cy.get(commonlocators.selectInputSearch) - .invoke("val") - .should("not.be.empty"); - }); - - it("5. Select widget selection is not cleared when the widget is server side filtered", () => { - dataSources.CreateDataSource("Postgres"); - - cy.get("@dsName").then((dsName) => { - EditorNavigation.SelectEntityByName("Select1", EntityType.Widget); - propPane.ToggleJSMode("sourcedata", false); - - oneClickBinding.ChooseAndAssertForm( - `${dsName}`, - dsName, - "public.employees", - { - label: "first_name", - value: "last_name", - }, - ); +describe( + "Select widget", + { tags: ["@tag.Widget", "@tag.Select", "@tag.Binding"] }, + () => { + it("1. Drag and drop Select/Text widgets", () => { + cy.dragAndDropToCanvas("selectwidget", { x: 300, y: 300 }); + cy.get(formWidgetsPage.selectWidget).should("exist"); + }); + + it("2. Check isDirty meta property", () => { + cy.dragAndDropToCanvas("textwidget", { x: 300, y: 500 }); + cy.updateCodeInput(".t--property-control-text", `{{Select1.isDirty}}`); + // Check if initial value of isDirty is false + cy.get(".t--widget-textwidget").should("contain", "false"); + // Interact with UI + cy.get(formWidgetsPage.selectWidget) + .find(widgetLocators.dropdownSingleSelect) + .click({ force: true }); + cy.get(commonlocators.singleSelectWidgetMenuItem) + .contains("Blue") + .click({ force: true }); + // Check if isDirty is set to true + cy.get(".t--widget-textwidget").should("contain", "true"); + // Change defaultOptionValue property + cy.updateCodeInput(".t--property-control-defaultselectedvalue", "RED"); + // Check if isDirty is reset to false + cy.get(".t--widget-textwidget").should("contain", "false"); + }); + + it("3. Clears the search field when widget is closed and serverSideFiltering is off", () => { + // open the select widget + cy.get(formWidgetsPage.selectWidget) + .find(widgetLocators.dropdownSingleSelect) + .click({ force: true }); + // search for option Red in the search input + cy.get(commonlocators.selectInputSearch).type("Red"); + // Select the Red option from dropdown list + cy.get(commonlocators.singleSelectWidgetMenuItem) + .contains("Red") + .click({ force: true }); + cy.wait(200); + // Assert if the select widget has Red as the selected value + cy.get(formWidgetsPage.selectWidget).contains("Red"); + // Open the select widget again + cy.get(formWidgetsPage.selectWidget) + .find(widgetLocators.dropdownSingleSelect) + .click({ force: true }); + // Assert if the search input is empty now + cy.get(commonlocators.selectInputSearch).invoke("val").should("be.empty"); + }); + + it("4. Does not clear the search field when widget is closed and serverSideFiltering is on", () => { + // toggle the serversidefiltering option on + agHelper.CheckUncheck(widgetLocators.serversideFilteringInput); + // search for option Red in the search input + cy.get(commonlocators.selectInputSearch).type("Red"); + // Select the Red option from dropdown list + cy.get(commonlocators.singleSelectWidgetMenuItem) + .contains("Red") + .click({ force: true }); + cy.wait(200); + // Open the select widget again + cy.get(formWidgetsPage.selectWidget) + .find(widgetLocators.dropdownSingleSelect) + .click({ force: true }); + // Assert if the search input is not empty + cy.get(commonlocators.selectInputSearch) + .invoke("val") + .should("not.be.empty"); }); - agHelper.GetNClick(OneClickBindingLocator.connectData); + it("5. Select widget selection is not cleared when the widget is server side filtered", () => { + dataSources.CreateDataSource("Postgres"); - assertHelper.AssertNetworkStatus("@postExecute"); + cy.get("@dsName").then((dsName) => { + EditorNavigation.SelectEntityByName("Select1", EntityType.Widget); + propPane.ToggleJSMode("sourcedata", false); - cy.get(formWidgetsPage.selectWidget) - .find(widgetLocators.dropdownSingleSelect) - .click({ force: true }); + oneClickBinding.ChooseAndAssertForm( + `${dsName}`, + dsName, + "public.employees", + { + label: "first_name", + value: "last_name", + }, + ); + }); - cy.get(commonlocators.selectInputSearch).clear().type("Janet"); + agHelper.GetNClick(OneClickBindingLocator.connectData); - cy.get(commonlocators.singleSelectWidgetMenuItem) - .contains("Janet") - .click({ force: true }); + assertHelper.AssertNetworkStatus("@postExecute"); - cy.get(formWidgetsPage.selectWidget) - .find(widgetLocators.dropdownSingleSelect) - .click({ force: true }); + cy.get(formWidgetsPage.selectWidget) + .find(widgetLocators.dropdownSingleSelect) + .click({ force: true }); - cy.get(commonlocators.selectInputSearch).clear().type("Steven"); + cy.get(commonlocators.selectInputSearch).clear().type("Janet"); - assertHelper.AssertNetworkStatus("@postExecute"); + cy.get(commonlocators.singleSelectWidgetMenuItem) + .contains("Janet") + .click({ force: true }); - cy.get(".select-button").should("contain", "Janet"); - }); + cy.get(formWidgetsPage.selectWidget) + .find(widgetLocators.dropdownSingleSelect) + .click({ force: true }); - it("6. Select tooltip renders if tooltip prop is not empty", () => { - cy.openPropertyPane("selectwidget"); - // enter tooltip in property pan - cy.get(widgetsPage.inputTooltipControl).type("Helpful text for tooltip !"); - // tooltip help icon shows - cy.get(".select-tooltip").scrollIntoView().should("be.visible"); - }); -}); + cy.get(commonlocators.selectInputSearch).clear().type("Steven"); + + assertHelper.AssertNetworkStatus("@postExecute"); + + cy.get(".select-button").should("contain", "Janet"); + }); + + it("6. Select tooltip renders if tooltip prop is not empty", () => { + cy.openPropertyPane("selectwidget"); + // enter tooltip in property pan + cy.get(widgetsPage.inputTooltipControl).type( + "Helpful text for tooltip !", + ); + // tooltip help icon shows + cy.get(".select-tooltip").scrollIntoView().should("be.visible"); + }); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Select/Select_widget1_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Select/Select_widget1_spec.js index 4dc40ede6cfb..73fd969d1947 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Select/Select_widget1_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Select/Select_widget1_spec.js @@ -9,7 +9,7 @@ const defaultValue = ` describe( "Select Widget Functionality", - { tags: ["@tag.Widget", "@tag.Select", "@tag.Sanity"] }, + { tags: ["@tag.Widget", "@tag.Select", "@tag.Sanity", "@tag.Binding"] }, function () { before(() => { _.agHelper.AddDsl("emptyDSL"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Select/select_Widget_Bug_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Select/select_Widget_Bug_spec.js index 1f674e6d2e1f..dd931962d4b7 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Select/select_Widget_Bug_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Select/select_Widget_Bug_spec.js @@ -6,7 +6,7 @@ import * as _ from "../../../../../support/Objects/ObjectsCore"; describe( "Select Widget Functionality", - { tags: ["@tag.Widget", "@tag.Select"] }, + { tags: ["@tag.Widget", "@tag.Select", "@tag.Binding"] }, function () { before(() => { _.agHelper.AddDsl("formSelectDsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Sliders/CategorySlider_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Sliders/CategorySlider_spec.ts index 41bd965b2ee7..9b7ab1312679 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Sliders/CategorySlider_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Sliders/CategorySlider_spec.ts @@ -17,7 +17,7 @@ import EditorNavigation, { describe( "Category Slider spec", - { tags: ["@tag.Widget", "@tag.Slider"] }, + { tags: ["@tag.Widget", "@tag.Slider", "@tag.Binding"] }, () => { const options = `[ { diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Sliders/NumberSlider_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Sliders/NumberSlider_spec.ts index 51643b41556f..df056b74fc31 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Sliders/NumberSlider_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Sliders/NumberSlider_spec.ts @@ -13,519 +13,537 @@ import EditorNavigation, { PagePaneSegment, } from "../../../../../support/Pages/EditorNavigation"; -describe("Number Slider spec", { tags: ["@tag.Widget", "@tag.Slider"] }, () => { - before(() => { - entityExplorer.DragDropWidgetNVerify("numbersliderwidget", 550, 100); - entityExplorer.DragDropWidgetNVerify("textwidget", 300, 300); - EditorNavigation.SelectEntityByName("Text1", EntityType.Widget); - propPane.UpdatePropertyFieldValue("Text", "{{NumberSlider1.value}}"); - }); - - it("1. Verify property visibility and default values", () => { - const dataSectionProperties = [ - "min\\.value", - "max\\.value", - "stepsize", - "defaultvalue", - ]; - const generalProperties = [ - "showmarks", - "marks", - "visible", - "disabled", - "animateloading", - "showvaluealways", - ]; - const eventsProperties = ["onchange"]; - - EditorNavigation.SelectEntityByName("NumberSlider1", EntityType.Widget); - // Data Section properties - dataSectionProperties.forEach((dataSectionProperty) => { - agHelper.AssertElementVisibility( - propPane._propertyPanePropertyControl("data", `${dataSectionProperty}`), - ); +describe( + "Number Slider spec", + { tags: ["@tag.Widget", "@tag.Slider", "@tag.Binding"] }, + () => { + before(() => { + entityExplorer.DragDropWidgetNVerify("numbersliderwidget", 550, 100); + entityExplorer.DragDropWidgetNVerify("textwidget", 300, 300); + EditorNavigation.SelectEntityByName("Text1", EntityType.Widget); + propPane.UpdatePropertyFieldValue("Text", "{{NumberSlider1.value}}"); }); - // General Section Properties - generalProperties.forEach((generalProperty) => { + + it("1. Verify property visibility and default values", () => { + const dataSectionProperties = [ + "min\\.value", + "max\\.value", + "stepsize", + "defaultvalue", + ]; + const generalProperties = [ + "showmarks", + "marks", + "visible", + "disabled", + "animateloading", + "showvaluealways", + ]; + const eventsProperties = ["onchange"]; + + EditorNavigation.SelectEntityByName("NumberSlider1", EntityType.Widget); + // Data Section properties + dataSectionProperties.forEach((dataSectionProperty) => { + agHelper.AssertElementVisibility( + propPane._propertyPanePropertyControl( + "data", + `${dataSectionProperty}`, + ), + ); + }); + // General Section Properties + generalProperties.forEach((generalProperty) => { + agHelper.AssertElementVisibility( + propPane._propertyPanePropertyControl( + "general", + `${generalProperty}`, + ), + ); + }); + // Events Section properties + eventsProperties.forEach((eventsProperty) => { + agHelper.AssertElementVisibility( + propPane._propertyPanePropertyControl("events", `${eventsProperty}`), + ); + }); + //Style Section properties + propPane.MoveToTab("Style"); + agHelper.AssertElementVisibility(propPane._propertyControl("size")); agHelper.AssertElementVisibility( - propPane._propertyPanePropertyControl("general", `${generalProperty}`), + propPane._propertyPanePropertyControl("color", "fillcolor"), ); + + propPane.MoveToTab("Content"); + // Verify default value + propPane + .EvaluateExistingPropertyFieldValue("Min. value") + .then((val: any) => { + expect(val).to.eq("0"); + }); + propPane + .EvaluateExistingPropertyFieldValue("Max. value") + .then((val: any) => { + expect(val).to.eq("100"); + }); + propPane + .EvaluateExistingPropertyFieldValue("Step size") + .then((val: any) => { + expect(val).to.eq("1"); + }); + propPane + .EvaluateExistingPropertyFieldValue("Default value") + .then((val: any) => { + expect(val).to.eq("10"); + }); }); - // Events Section properties - eventsProperties.forEach((eventsProperty) => { - agHelper.AssertElementVisibility( - propPane._propertyPanePropertyControl("events", `${eventsProperty}`), + + it("2. Validates accepted and unaccepted 'Min. value' values", () => { + propPane.UpdatePropertyFieldValue("Min. value", "110"); + + agHelper.VerifyEvaluatedErrorMessage( + "This value must be less than max value", ); - }); - //Style Section properties - propPane.MoveToTab("Style"); - agHelper.AssertElementVisibility(propPane._propertyControl("size")); - agHelper.AssertElementVisibility( - propPane._propertyPanePropertyControl("color", "fillcolor"), - ); - - propPane.MoveToTab("Content"); - // Verify default value - propPane - .EvaluateExistingPropertyFieldValue("Min. value") - .then((val: any) => { - expect(val).to.eq("0"); - }); - propPane - .EvaluateExistingPropertyFieldValue("Max. value") - .then((val: any) => { - expect(val).to.eq("100"); - }); - propPane - .EvaluateExistingPropertyFieldValue("Step size") - .then((val: any) => { - expect(val).to.eq("1"); - }); - propPane - .EvaluateExistingPropertyFieldValue("Default value") - .then((val: any) => { - expect(val).to.eq("10"); - }); - }); - it("2. Validates accepted and unaccepted 'Min. value' values", () => { - propPane.UpdatePropertyFieldValue("Min. value", "110"); + propPane.UpdatePropertyFieldValue("Min. value", ""); - agHelper.VerifyEvaluatedErrorMessage( - "This value must be less than max value", - ); + agHelper.VerifyEvaluatedErrorMessage("This value is required"); - propPane.UpdatePropertyFieldValue("Min. value", ""); + propPane.UpdatePropertyFieldValue("Min. value", "zero"); - agHelper.VerifyEvaluatedErrorMessage("This value is required"); + agHelper.VerifyEvaluatedErrorMessage("This value must be a number"); - propPane.UpdatePropertyFieldValue("Min. value", "zero"); + // Allows negative value and validate + propPane.UpdatePropertyFieldValue("Min. value", "-10"); + propPane.UpdatePropertyFieldValue("Step size", "10"); - agHelper.VerifyEvaluatedErrorMessage("This value must be a number"); + // Verify in Preview mode negative value + agHelper.GetNClick(locators._enterPreviewMode); + agHelper + .GetElement(locators._sliderThumb) + .focus() + .type("{leftArrow}") + .type("{leftArrow}"); + agHelper.Sleep(2000); + agHelper + .GetText(getWidgetSelector(draggableWidgets.TEXT), "text") + .then(($label) => { + expect($label).to.eq("-10"); + }); + agHelper.GetNClick(locators._exitPreviewMode); - // Allows negative value and validate - propPane.UpdatePropertyFieldValue("Min. value", "-10"); - propPane.UpdatePropertyFieldValue("Step size", "10"); + // Verify in Deploy mode negative value + deployMode.DeployApp(); + agHelper + .GetElement(locators._sliderThumb) + .focus() + .type("{leftArrow}{leftArrow}"); + agHelper.Sleep(2000); + agHelper + .GetText(getWidgetSelector(draggableWidgets.TEXT), "text") + .then(($label) => { + expect($label).to.eq("-10"); + }); + deployMode.NavigateBacktoEditor(); - // Verify in Preview mode negative value - agHelper.GetNClick(locators._enterPreviewMode); - agHelper - .GetElement(locators._sliderThumb) - .focus() - .type("{leftArrow}") - .type("{leftArrow}"); - agHelper.Sleep(2000); - agHelper - .GetText(getWidgetSelector(draggableWidgets.TEXT), "text") - .then(($label) => { - expect($label).to.eq("-10"); - }); - agHelper.GetNClick(locators._exitPreviewMode); - - // Verify in Deploy mode negative value - deployMode.DeployApp(); - agHelper - .GetElement(locators._sliderThumb) - .focus() - .type("{leftArrow}{leftArrow}"); - agHelper.Sleep(2000); - agHelper - .GetText(getWidgetSelector(draggableWidgets.TEXT), "text") - .then(($label) => { - expect($label).to.eq("-10"); - }); - deployMode.NavigateBacktoEditor(); - - // Allows decimal value - EditorNavigation.SelectEntityByName("NumberSlider1", EntityType.Widget); - propPane.UpdatePropertyFieldValue("Min. value", "10.5"); - - // Verify Decimal value - agHelper.GetElement(locators._sliderThumb).focus().type("{leftArrow}"); - agHelper.Sleep(2000); - agHelper - .GetText(getWidgetSelector(draggableWidgets.TEXT), "text") - .then(($label) => { - expect($label).to.eq("10.5"); - }); - }); + // Allows decimal value + EditorNavigation.SelectEntityByName("NumberSlider1", EntityType.Widget); + propPane.UpdatePropertyFieldValue("Min. value", "10.5"); - it("3. Validate accepted and unaccepted 'Max. value' values", () => { - propPane.UpdatePropertyFieldValue("Max. value", "0"); + // Verify Decimal value + agHelper.GetElement(locators._sliderThumb).focus().type("{leftArrow}"); + agHelper.Sleep(2000); + agHelper + .GetText(getWidgetSelector(draggableWidgets.TEXT), "text") + .then(($label) => { + expect($label).to.eq("10.5"); + }); + }); - agHelper.VerifyEvaluatedErrorMessage( - "This value must be greater than min value", - ); + it("3. Validate accepted and unaccepted 'Max. value' values", () => { + propPane.UpdatePropertyFieldValue("Max. value", "0"); - propPane.UpdatePropertyFieldValue("Max. value", ""); + agHelper.VerifyEvaluatedErrorMessage( + "This value must be greater than min value", + ); - agHelper.VerifyEvaluatedErrorMessage("This value is required"); + propPane.UpdatePropertyFieldValue("Max. value", ""); - propPane.UpdatePropertyFieldValue("Max. value", "asd"); + agHelper.VerifyEvaluatedErrorMessage("This value is required"); - agHelper.VerifyEvaluatedErrorMessage("This value must be a number"); + propPane.UpdatePropertyFieldValue("Max. value", "asd"); - // Allows decimal value - propPane.UpdatePropertyFieldValue("Max. value", "100.5"); - propPane.UpdatePropertyFieldValue("Step size", "90"); - // Verify decimal value - agHelper.GetElement(locators._sliderThumb).focus().type("{rightArrow}"); - agHelper.Sleep(2000); - agHelper - .GetText(getWidgetSelector(draggableWidgets.TEXT), "text") - .then(($label) => { - expect($label).to.eq("100.5"); - }); + agHelper.VerifyEvaluatedErrorMessage("This value must be a number"); - // Accepts negative value - propPane.UpdatePropertyFieldValue("Min. value", "-50"); - propPane.UpdatePropertyFieldValue("Max. value", "-30"); + // Allows decimal value + propPane.UpdatePropertyFieldValue("Max. value", "100.5"); + propPane.UpdatePropertyFieldValue("Step size", "90"); + // Verify decimal value + agHelper.GetElement(locators._sliderThumb).focus().type("{rightArrow}"); + agHelper.Sleep(2000); + agHelper + .GetText(getWidgetSelector(draggableWidgets.TEXT), "text") + .then(($label) => { + expect($label).to.eq("100.5"); + }); - agHelper.GetElement(locators._sliderThumb).focus().type("{rightArrow}"); - agHelper.Sleep(2000); - agHelper - .GetText(getWidgetSelector(draggableWidgets.TEXT), "text") - .then(($label) => { - expect($label).to.eq("-30"); - }); + // Accepts negative value + propPane.UpdatePropertyFieldValue("Min. value", "-50"); + propPane.UpdatePropertyFieldValue("Max. value", "-30"); - // Verify in Preview mode negative value - agHelper.GetNClick(locators._enterPreviewMode); - agHelper.GetElement(locators._sliderThumb).focus().type("{rightArrow}"); - agHelper.Sleep(2000); - agHelper - .GetText(getWidgetSelector(draggableWidgets.TEXT), "text") - .then(($label) => { - expect($label).to.eq("-30"); - }); - agHelper.GetNClick(locators._exitPreviewMode); - - // Verify in Deploy mode negative value - deployMode.DeployApp(); - agHelper.GetElement(locators._sliderThumb).focus().type("{rightArrow}"); - agHelper.Sleep(2000); - agHelper - .GetText(getWidgetSelector(draggableWidgets.TEXT), "text", 0) - .then(($label) => { - expect($label).to.eq("-30"); - }); - deployMode.NavigateBacktoEditor(); - }); + agHelper.GetElement(locators._sliderThumb).focus().type("{rightArrow}"); + agHelper.Sleep(2000); + agHelper + .GetText(getWidgetSelector(draggableWidgets.TEXT), "text") + .then(($label) => { + expect($label).to.eq("-30"); + }); - it("4. Validate accepted and unaccepted 'Step Value' values", () => { - EditorNavigation.SelectEntityByName("NumberSlider1", EntityType.Widget); + // Verify in Preview mode negative value + agHelper.GetNClick(locators._enterPreviewMode); + agHelper.GetElement(locators._sliderThumb).focus().type("{rightArrow}"); + agHelper.Sleep(2000); + agHelper + .GetText(getWidgetSelector(draggableWidgets.TEXT), "text") + .then(($label) => { + expect($label).to.eq("-30"); + }); + agHelper.GetNClick(locators._exitPreviewMode); - propPane.UpdatePropertyFieldValue("Step size", "-10"); + // Verify in Deploy mode negative value + deployMode.DeployApp(); + agHelper.GetElement(locators._sliderThumb).focus().type("{rightArrow}"); + agHelper.Sleep(2000); + agHelper + .GetText(getWidgetSelector(draggableWidgets.TEXT), "text", 0) + .then(($label) => { + expect($label).to.eq("-30"); + }); + deployMode.NavigateBacktoEditor(); + }); - agHelper.VerifyEvaluatedErrorMessage("This value must be greater than 0.1"); + it("4. Validate accepted and unaccepted 'Step Value' values", () => { + EditorNavigation.SelectEntityByName("NumberSlider1", EntityType.Widget); - propPane.UpdatePropertyFieldValue("Step size", "110"); + propPane.UpdatePropertyFieldValue("Step size", "-10"); - agHelper.VerifyEvaluatedErrorMessage("This value must be less than 20"); + agHelper.VerifyEvaluatedErrorMessage( + "This value must be greater than 0.1", + ); - propPane.UpdatePropertyFieldValue("Step size", "asd"); + propPane.UpdatePropertyFieldValue("Step size", "110"); - agHelper.VerifyEvaluatedErrorMessage("This value must be a number"); + agHelper.VerifyEvaluatedErrorMessage("This value must be less than 20"); - propPane.UpdatePropertyFieldValue("Step size", "10"); - agHelper.AssertElementAbsence(locators._evaluatedErrorMessage); - }); + propPane.UpdatePropertyFieldValue("Step size", "asd"); - it("5. Validates accepted and unaccepted 'Default Value' values", () => { - propPane.UpdatePropertyFieldValue("Max. value", "100"); - propPane.UpdatePropertyFieldValue("Min. value", "10"); - propPane.UpdatePropertyFieldValue("Default value", "-10"); + agHelper.VerifyEvaluatedErrorMessage("This value must be a number"); - agHelper.VerifyEvaluatedErrorMessage( - "This value must be greater than or equal to the min value", - ); + propPane.UpdatePropertyFieldValue("Step size", "10"); + agHelper.AssertElementAbsence(locators._evaluatedErrorMessage); + }); - propPane.UpdatePropertyFieldValue("Default value", "110"); + it("5. Validates accepted and unaccepted 'Default Value' values", () => { + propPane.UpdatePropertyFieldValue("Max. value", "100"); + propPane.UpdatePropertyFieldValue("Min. value", "10"); + propPane.UpdatePropertyFieldValue("Default value", "-10"); - agHelper.VerifyEvaluatedErrorMessage( - "This value must be less than or equal to the max value", - ); + agHelper.VerifyEvaluatedErrorMessage( + "This value must be greater than or equal to the min value", + ); - propPane.UpdatePropertyFieldValue("Default value", "asd"); + propPane.UpdatePropertyFieldValue("Default value", "110"); - agHelper.VerifyEvaluatedErrorMessage("This value must be a number"); + agHelper.VerifyEvaluatedErrorMessage( + "This value must be less than or equal to the max value", + ); - propPane.UpdatePropertyFieldValue("Default value", "10"); - agHelper.AssertElementAbsence(locators._evaluatedErrorMessage); - }); + propPane.UpdatePropertyFieldValue("Default value", "asd"); - it("6. Change Step size and check if value changes", () => { - // Assert Text widget has value 10 - agHelper - .GetText(getWidgetSelector(draggableWidgets.TEXT)) - .then(($label) => { - expect($label).to.eq("10"); - }); + agHelper.VerifyEvaluatedErrorMessage("This value must be a number"); - // Change the slider value - agHelper - .GetElement(locators._sliderThumb) - .focus() - .type("{rightArrow}") - .wait(500); + propPane.UpdatePropertyFieldValue("Default value", "10"); + agHelper.AssertElementAbsence(locators._evaluatedErrorMessage); + }); - agHelper.Sleep(2000); //for the changes to reflect in text widget + it("6. Change Step size and check if value changes", () => { + // Assert Text widget has value 10 + agHelper + .GetText(getWidgetSelector(draggableWidgets.TEXT)) + .then(($label) => { + expect($label).to.eq("10"); + }); - // Assert the Text widget has value 20 - agHelper - .GetText(getWidgetSelector(draggableWidgets.TEXT)) - .then(($label) => { - expect($label).to.eq("20"); - }); + // Change the slider value + agHelper + .GetElement(locators._sliderThumb) + .focus() + .type("{rightArrow}") + .wait(500); - // Change the slider value - agHelper.GetElement(locators._sliderThumb).focus().type("{leftArrow}"); + agHelper.Sleep(2000); //for the changes to reflect in text widget - agHelper.Sleep(2000); //for the changes to reflect in text widget - // Assert the Text widget has value 0 - agHelper - .GetText(getWidgetSelector(draggableWidgets.TEXT)) - .then(($label) => { - expect($label).to.eq("10"); - }); - }); - - it("7. Verify Range slider visibility in explorer", () => { - PageLeftPane.switchSegment(PagePaneSegment.UI); - PageLeftPane.switchToAddNew(); - agHelper.ClearTextField(locators._entityExplorersearch); - agHelper.TypeText(locators._entityExplorersearch, "Number"); - agHelper.AssertElementExist(locators._widgetPageIcon("numbersliderwidget")); - agHelper.ClearTextField(locators._entityExplorersearch); - agHelper.TypeText(locators._entityExplorersearch, "slider"); - agHelper.AssertElementExist(locators._widgetPageIcon("numbersliderwidget")); - }); - - it("8. Validate 'show marks', 'visible' and 'disable' toggle", () => { - EditorNavigation.SelectEntityByName("NumberSlider1", EntityType.Widget); - - // Verify Show marks toggle - agHelper.AssertContains("50%", "be.visible", "p"); - propPane.TogglePropertyState("showmarks", "Off"); - agHelper.AssertContains("50%", "not.exist", "p"); - // Verify Disabled toggle - propPane.TogglePropertyState("disabled", "On"); - agHelper.AssertAttribute(locators._sliderThumb, "disabled", "disabled"); - propPane.TogglePropertyState("disabled", "Off"); - // Verify Visible toggle - propPane.TogglePropertyState("visible", "Off"); - agHelper.AssertExistingToggleState("visible", "false"); - propPane.TogglePropertyState("visible", "On"); - agHelper.AssertExistingToggleState("visible", "true"); - }); - - it("9. Validate Events section onChange tests", () => { - // Verify Events onChange - propPane.SelectPlatformFunction("onChange", "Show alert"); - agHelper.TypeText( - propPane._actionSelectorFieldByLabel("Message"), - "Value Changed", - ); - agHelper.GetNClick(propPane._actionSelectorPopupClose); - // Change the slider value - agHelper.GetElement(locators._sliderThumb).focus().type("{rightArrow}"); - agHelper.ValidateToastMessage("Value Changed"); - - // Verify in Preview mode - agHelper.GetNClick(locators._enterPreviewMode); - agHelper.GetElement(locators._sliderThumb).focus().type("{rightArrow}"); - agHelper.ValidateToastMessage("Value Changed"); - agHelper.GetNClick(locators._exitPreviewMode); - - // Verifying onChange in Deploy mode - deployMode.DeployApp(); - agHelper.GetElement(locators._sliderThumb).focus().type("{rightArrow}"); - agHelper.ValidateToastMessage("Value Changed"); - deployMode.NavigateBacktoEditor(); - }); - - it("10. Verify size change and color change", () => { - EditorNavigation.SelectEntityByName("NumberSlider1", EntityType.Widget); - propPane.MoveToTab("Style"); - // Verify Size - agHelper.GetWidgetCSSHeight(locators._sliderThumb).then((initialHeight) => { - agHelper.GetNClick(propPane._styleSize("s")); + // Assert the Text widget has value 20 + agHelper + .GetText(getWidgetSelector(draggableWidgets.TEXT)) + .then(($label) => { + expect($label).to.eq("20"); + }); + + // Change the slider value + agHelper.GetElement(locators._sliderThumb).focus().type("{leftArrow}"); + + agHelper.Sleep(2000); //for the changes to reflect in text widget + // Assert the Text widget has value 0 + agHelper + .GetText(getWidgetSelector(draggableWidgets.TEXT)) + .then(($label) => { + expect($label).to.eq("10"); + }); + }); + + it("7. Verify Range slider visibility in explorer", () => { + PageLeftPane.switchSegment(PagePaneSegment.UI); + PageLeftPane.switchToAddNew(); + agHelper.ClearTextField(locators._entityExplorersearch); + agHelper.TypeText(locators._entityExplorersearch, "Number"); + agHelper.AssertElementExist( + locators._widgetPageIcon("numbersliderwidget"), + ); + agHelper.ClearTextField(locators._entityExplorersearch); + agHelper.TypeText(locators._entityExplorersearch, "slider"); + agHelper.AssertElementExist( + locators._widgetPageIcon("numbersliderwidget"), + ); + }); + + it("8. Validate 'show marks', 'visible' and 'disable' toggle", () => { + EditorNavigation.SelectEntityByName("NumberSlider1", EntityType.Widget); + + // Verify Show marks toggle + agHelper.AssertContains("50%", "be.visible", "p"); + propPane.TogglePropertyState("showmarks", "Off"); + agHelper.AssertContains("50%", "not.exist", "p"); + // Verify Disabled toggle + propPane.TogglePropertyState("disabled", "On"); + agHelper.AssertAttribute(locators._sliderThumb, "disabled", "disabled"); + propPane.TogglePropertyState("disabled", "Off"); + // Verify Visible toggle + propPane.TogglePropertyState("visible", "Off"); + agHelper.AssertExistingToggleState("visible", "false"); + propPane.TogglePropertyState("visible", "On"); + agHelper.AssertExistingToggleState("visible", "true"); + }); + + it("9. Validate Events section onChange tests", () => { + // Verify Events onChange + propPane.SelectPlatformFunction("onChange", "Show alert"); + agHelper.TypeText( + propPane._actionSelectorFieldByLabel("Message"), + "Value Changed", + ); + agHelper.GetNClick(propPane._actionSelectorPopupClose); + // Change the slider value + agHelper.GetElement(locators._sliderThumb).focus().type("{rightArrow}"); + agHelper.ValidateToastMessage("Value Changed"); + + // Verify in Preview mode + agHelper.GetNClick(locators._enterPreviewMode); + agHelper.GetElement(locators._sliderThumb).focus().type("{rightArrow}"); + agHelper.ValidateToastMessage("Value Changed"); + agHelper.GetNClick(locators._exitPreviewMode); + + // Verifying onChange in Deploy mode + deployMode.DeployApp(); + agHelper.GetElement(locators._sliderThumb).focus().type("{rightArrow}"); + agHelper.ValidateToastMessage("Value Changed"); + deployMode.NavigateBacktoEditor(); + }); + + it("10. Verify size change and color change", () => { + EditorNavigation.SelectEntityByName("NumberSlider1", EntityType.Widget); + propPane.MoveToTab("Style"); + // Verify Size agHelper .GetWidgetCSSHeight(locators._sliderThumb) - .then((currentHeight) => { - expect(initialHeight).to.not.eq(currentHeight); + .then((initialHeight) => { + agHelper.GetNClick(propPane._styleSize("s")); + agHelper + .GetWidgetCSSHeight(locators._sliderThumb) + .then((currentHeight) => { + expect(initialHeight).to.not.eq(currentHeight); + }); + }); + + // Verify Color + agHelper + .GetWidgetCSSFrAttribute(locators._sliderThumb, "background-color") + .then((sliderColor) => { + agHelper.GetNClick( + propPane._propertyPanePropertyControl("color", "fillcolor"), + ); + agHelper + .GetWidgetCSSFrAttribute(propPane._themeColor, "background-color") + .then((themeColor) => { + expect(sliderColor).to.eq(themeColor); + }); + }); + + // Select color and verify + propPane.SelectColorFromColorPicker("fillcolor", 10); + agHelper + .GetWidgetCSSFrAttribute(locators._sliderThumb, "background-color") + .then((sliderColor) => { + agHelper + .GetWidgetCSSFrAttribute( + `${propPane._propertyControlSelectedColorButton("fillcolor")}`, + "background-color", + ) + .then((newColor) => { + expect(sliderColor).to.eq(newColor); + }); }); }); - // Verify Color - agHelper - .GetWidgetCSSFrAttribute(locators._sliderThumb, "background-color") - .then((sliderColor) => { - agHelper.GetNClick( - propPane._propertyPanePropertyControl("color", "fillcolor"), - ); - agHelper - .GetWidgetCSSFrAttribute(propPane._themeColor, "background-color") - .then((themeColor) => { - expect(sliderColor).to.eq(themeColor); - }); - }); + it("11. Verify Slider value change using left, right, up and down arrows", () => { + // Verify in Preview mode + // Verify slides right with right and up arrow + agHelper.GetNClick(locators._enterPreviewMode); + agHelper + .GetElement(locators._sliderThumb) + .focus() + .type("{rightArrow}") + .type("{upArrow}"); - // Select color and verify - propPane.SelectColorFromColorPicker("fillcolor", 10); - agHelper - .GetWidgetCSSFrAttribute(locators._sliderThumb, "background-color") - .then((sliderColor) => { - agHelper - .GetWidgetCSSFrAttribute( - `${propPane._propertyControlSelectedColorButton("fillcolor")}`, - "background-color", - ) - .then((newColor) => { - expect(sliderColor).to.eq(newColor); - }); - }); - }); - - it("11. Verify Slider value change using left, right, up and down arrows", () => { - // Verify in Preview mode - // Verify slides right with right and up arrow - agHelper.GetNClick(locators._enterPreviewMode); - agHelper - .GetElement(locators._sliderThumb) - .focus() - .type("{rightArrow}") - .type("{upArrow}"); - - agHelper.Sleep(200); - - agHelper - .GetText(getWidgetSelector(draggableWidgets.TEXT)) - .then(($label) => { - expect($label).to.eq("30"); - }); + agHelper.Sleep(200); - // Verify slides left with left and down arrow - agHelper - .GetElement(locators._sliderThumb) - .focus() - .type("{leftArrow}") - .type("{downArrow}"); + agHelper + .GetText(getWidgetSelector(draggableWidgets.TEXT)) + .then(($label) => { + expect($label).to.eq("30"); + }); - agHelper.Sleep(200); + // Verify slides left with left and down arrow + agHelper + .GetElement(locators._sliderThumb) + .focus() + .type("{leftArrow}") + .type("{downArrow}"); - agHelper - .GetText(getWidgetSelector(draggableWidgets.TEXT)) - .then(($label) => { - expect($label).to.eq("10"); - }); + agHelper.Sleep(200); - agHelper.GetNClick(locators._exitPreviewMode); + agHelper + .GetText(getWidgetSelector(draggableWidgets.TEXT)) + .then(($label) => { + expect($label).to.eq("10"); + }); - //Verify in Deploy mode - deployMode.DeployApp(); + agHelper.GetNClick(locators._exitPreviewMode); - // Verify slides right with right and up arrow - agHelper - .GetElement(locators._sliderThumb) - .focus() - .type("{rightArrow}") - .type("{upArrow}"); + //Verify in Deploy mode + deployMode.DeployApp(); - agHelper.Sleep(); + // Verify slides right with right and up arrow + agHelper + .GetElement(locators._sliderThumb) + .focus() + .type("{rightArrow}") + .type("{upArrow}"); - agHelper - .GetText(getWidgetSelector(draggableWidgets.TEXT)) - .then(($label) => { - expect($label).to.eq("30"); - }); + agHelper.Sleep(); - // Verify slides left with left and down arrow - agHelper - .GetElement(locators._sliderThumb) - .focus() - .type("{leftArrow}") - .type("{downArrow}"); + agHelper + .GetText(getWidgetSelector(draggableWidgets.TEXT)) + .then(($label) => { + expect($label).to.eq("30"); + }); - agHelper.Sleep(1000); + // Verify slides left with left and down arrow + agHelper + .GetElement(locators._sliderThumb) + .focus() + .type("{leftArrow}") + .type("{downArrow}"); - agHelper - .GetText(getWidgetSelector(draggableWidgets.TEXT)) - .then(($label) => { - expect($label).to.eq("10"); - }); + agHelper.Sleep(1000); - deployMode.NavigateBacktoEditor(); - }); - - it("12. Verify various modes", () => { - // Verify in Preview mode - // Verify slides right with right and up arrow - agHelper.GetNClick(locators._enterPreviewMode); - agHelper - .GetElement(locators._sliderThumb) - .focus() - .type("{rightArrow}") - .type("{upArrow}"); - - agHelper.Sleep(1000); - - agHelper - .GetText(getWidgetSelector(draggableWidgets.TEXT)) - .then(($label) => { - expect($label).to.eq("30"); - }); + agHelper + .GetText(getWidgetSelector(draggableWidgets.TEXT)) + .then(($label) => { + expect($label).to.eq("10"); + }); - // Verify slides left with left and down arrow - agHelper - .GetElement(locators._sliderThumb) - .focus() - .type("{leftArrow}") - .type("{downArrow}"); + deployMode.NavigateBacktoEditor(); + }); - agHelper.Sleep(1000); + it("12. Verify various modes", () => { + // Verify in Preview mode + // Verify slides right with right and up arrow + agHelper.GetNClick(locators._enterPreviewMode); + agHelper + .GetElement(locators._sliderThumb) + .focus() + .type("{rightArrow}") + .type("{upArrow}"); - agHelper - .GetText(getWidgetSelector(draggableWidgets.TEXT)) - .then(($label) => { - expect($label).to.eq("10"); - }); + agHelper.Sleep(1000); + + agHelper + .GetText(getWidgetSelector(draggableWidgets.TEXT)) + .then(($label) => { + expect($label).to.eq("30"); + }); - agHelper.GetNClick(locators._exitPreviewMode); + // Verify slides left with left and down arrow + agHelper + .GetElement(locators._sliderThumb) + .focus() + .type("{leftArrow}") + .type("{downArrow}"); - // Verify in Deploy mode - deployMode.DeployApp(); + agHelper.Sleep(1000); - // Verify slides right with right and up arrow - agHelper - .GetElement(locators._sliderThumb) - .focus() - .type("{rightArrow}") - .type("{upArrow}"); + agHelper + .GetText(getWidgetSelector(draggableWidgets.TEXT)) + .then(($label) => { + expect($label).to.eq("10"); + }); - agHelper.Sleep(1000); + agHelper.GetNClick(locators._exitPreviewMode); - agHelper - .GetText(getWidgetSelector(draggableWidgets.TEXT)) - .then(($label) => { - expect($label).to.eq("30"); - }); + // Verify in Deploy mode + deployMode.DeployApp(); - // Verify slides left with left and down arrow - agHelper - .GetElement(locators._sliderThumb) - .focus() - .type("{leftArrow}") - .type("{downArrow}"); + // Verify slides right with right and up arrow + agHelper + .GetElement(locators._sliderThumb) + .focus() + .type("{rightArrow}") + .type("{upArrow}"); - agHelper.Sleep(1000); + agHelper.Sleep(1000); - agHelper - .GetText(getWidgetSelector(draggableWidgets.TEXT)) - .then(($label) => { - expect($label).to.eq("10"); - }); + agHelper + .GetText(getWidgetSelector(draggableWidgets.TEXT)) + .then(($label) => { + expect($label).to.eq("30"); + }); - deployMode.NavigateBacktoEditor(); - }); -}); + // Verify slides left with left and down arrow + agHelper + .GetElement(locators._sliderThumb) + .focus() + .type("{leftArrow}") + .type("{downArrow}"); + + agHelper.Sleep(1000); + + agHelper + .GetText(getWidgetSelector(draggableWidgets.TEXT)) + .then(($label) => { + expect($label).to.eq("10"); + }); + + deployMode.NavigateBacktoEditor(); + }); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Sliders/RangeSlider_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Sliders/RangeSlider_spec.ts index 9e91e87030ff..25353e17e6d2 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Sliders/RangeSlider_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Sliders/RangeSlider_spec.ts @@ -13,416 +13,438 @@ import EditorNavigation, { PagePaneSegment, } from "../../../../../support/Pages/EditorNavigation"; -describe("Range Slider spec", { tags: ["@tag.Widget", "@tag.Slider"] }, () => { - before(() => { - entityExplorer.DragDropWidgetNVerify("rangesliderwidget", 550, 100); - entityExplorer.DragDropWidgetNVerify("textwidget", 300, 300); - entityExplorer.DragDropWidgetNVerify("textwidget", 600, 300); - EditorNavigation.SelectEntityByName("Text1", EntityType.Widget); - propPane.UpdatePropertyFieldValue("Text", "{{RangeSlider1.end}}"); - EditorNavigation.SelectEntityByName("Text2", EntityType.Widget); - propPane.UpdatePropertyFieldValue("Text", "{{RangeSlider1.start}}"); - }); - - it("1. Verify property visibility and default values", () => { - const dataSectionProperties = [ - "min\\.value", - "max\\.value", - "stepsize", - "min\\.range", - "defaultstartvalue", - "defaultendvalue", - ]; - const generalProperties = [ - "showmarks", - "marks", - "visible", - "disabled", - "animateloading", - "showvaluealways", - ]; - const eventsProperties = ["onstartvaluechange", "onendvaluechange"]; - - EditorNavigation.SelectEntityByName("RangeSlider1", EntityType.Widget); - // Data Section properties - dataSectionProperties.forEach((dataSectionProperty) => { - agHelper.AssertElementVisibility( - propPane._propertyPanePropertyControl("data", `${dataSectionProperty}`), - ); - }); - // General Section Properties - generalProperties.forEach((generalProperty) => { - agHelper.AssertElementVisibility( - propPane._propertyPanePropertyControl("general", `${generalProperty}`), - ); - }); - // Events Section properties - eventsProperties.forEach((eventsProperty) => { - agHelper.AssertElementVisibility( - propPane._propertyPanePropertyControl("events", `${eventsProperty}`), - ); +describe( + "Range Slider spec", + { tags: ["@tag.Widget", "@tag.Slider", "@tag.Binding"] }, + () => { + before(() => { + entityExplorer.DragDropWidgetNVerify("rangesliderwidget", 550, 100); + entityExplorer.DragDropWidgetNVerify("textwidget", 300, 300); + entityExplorer.DragDropWidgetNVerify("textwidget", 600, 300); + EditorNavigation.SelectEntityByName("Text1", EntityType.Widget); + propPane.UpdatePropertyFieldValue("Text", "{{RangeSlider1.end}}"); + EditorNavigation.SelectEntityByName("Text2", EntityType.Widget); + propPane.UpdatePropertyFieldValue("Text", "{{RangeSlider1.start}}"); }); - // Style Section properties - propPane.MoveToTab("Style"); - propPane._propertyControl("size"); - agHelper.AssertElementVisibility( - propPane._propertyPanePropertyControl("color", "fillcolor"), - ); - - propPane.MoveToTab("Content"); - // Verify default value - propPane - .EvaluateExistingPropertyFieldValue("Min. value") - .then((val: any) => { - expect(val).to.eq("0"); - }); - propPane - .EvaluateExistingPropertyFieldValue("Max. value") - .then((val: any) => { - expect(val).to.eq("100"); - }); - propPane - .EvaluateExistingPropertyFieldValue("Step size") - .then((val: any) => { - expect(val).to.eq("1"); - }); - propPane - .EvaluateExistingPropertyFieldValue("Min. range") - .then((val: any) => { - expect(val).to.eq("5"); - }); - }); - - it("2. Validate accepted and unaccepted 'Min. value' values", () => { - propPane.UpdatePropertyFieldValue("Min. value", "110"); - - agHelper.VerifyEvaluatedErrorMessage( - "This value must be less than max value", - ); - - propPane.UpdatePropertyFieldValue("Min. value", ""); - - agHelper.VerifyEvaluatedErrorMessage("This value is required"); - - propPane.UpdatePropertyFieldValue("Min. value", "zero"); - - agHelper.VerifyEvaluatedErrorMessage("This value must be a number"); - - propPane.UpdatePropertyFieldValue("Min. range", "10"); - propPane.UpdatePropertyFieldValue("Step size", "10"); - propPane.UpdatePropertyFieldValue("Min. value", "-10"); - agHelper.AssertElementAbsence(locators._evaluatedErrorMessage); - - // Verify in Preview mode negative value - agHelper.GetNClick(locators._enterPreviewMode); - agHelper - .GetElement(locators._sliderThumb) - .eq(0) - .focus() - .type("{leftArrow}") - .type("{leftArrow}") - .type("{leftArrow}"); - agHelper.Sleep(3000); - agHelper - .GetText(getWidgetSelector(draggableWidgets.TEXT), "text", 1) - .then(($label) => { - expect($label).to.eq("-10"); - }); - agHelper.GetNClick(locators._exitPreviewMode); - - // Verify in Deploy mode negative value - deployMode.DeployApp(); - agHelper - .GetElement(locators._sliderThumb) - .eq(0) - .focus() - .type("{leftArrow}") - .type("{leftArrow}"); - agHelper.Sleep(3000); - agHelper - .GetText(getWidgetSelector(draggableWidgets.TEXT), "text", 1) - .then(($label) => { - expect($label).to.eq("-10"); + + it("1. Verify property visibility and default values", () => { + const dataSectionProperties = [ + "min\\.value", + "max\\.value", + "stepsize", + "min\\.range", + "defaultstartvalue", + "defaultendvalue", + ]; + const generalProperties = [ + "showmarks", + "marks", + "visible", + "disabled", + "animateloading", + "showvaluealways", + ]; + const eventsProperties = ["onstartvaluechange", "onendvaluechange"]; + + EditorNavigation.SelectEntityByName("RangeSlider1", EntityType.Widget); + // Data Section properties + dataSectionProperties.forEach((dataSectionProperty) => { + agHelper.AssertElementVisibility( + propPane._propertyPanePropertyControl( + "data", + `${dataSectionProperty}`, + ), + ); }); - deployMode.NavigateBacktoEditor(); - - // Allows decimal value - EditorNavigation.SelectEntityByName("RangeSlider1", EntityType.Widget); - propPane.UpdatePropertyFieldValue("Min. value", "10.5"); - - // Verify Decimal value - agHelper - .GetElement(locators._sliderThumb) - .eq(0) - .focus() - .type("{leftArrow}"); - agHelper.Sleep(3000); - agHelper - .GetText(getWidgetSelector(draggableWidgets.TEXT), "text", 1) - .then(($label) => { - expect($label).to.eq("10.5"); + // General Section Properties + generalProperties.forEach((generalProperty) => { + agHelper.AssertElementVisibility( + propPane._propertyPanePropertyControl( + "general", + `${generalProperty}`, + ), + ); }); - // Does not allow value greater than Max value - propPane.UpdatePropertyFieldValue("Min. value", "110"); - agHelper.VerifyEvaluatedErrorMessage( - "This value must be less than max value", - ); - // Updating to allowed value - propPane.UpdatePropertyFieldValue("Min. value", "10"); - agHelper.AssertElementAbsence(locators._evaluatedErrorMessage); - }); - - it("3. Validate accepted and unaccepted 'Max. value' values", () => { - propPane.UpdatePropertyFieldValue("Max. value", "0"); - - agHelper.VerifyEvaluatedErrorMessage( - "This value must be greater than min value", - ); - - propPane.UpdatePropertyFieldValue("Max. value", ""); - - agHelper.VerifyEvaluatedErrorMessage("This value is required"); - - propPane.UpdatePropertyFieldValue("Max. value", "asd"); - - agHelper.VerifyEvaluatedErrorMessage("This value must be a number"); - - // Allows decimal value - propPane.UpdatePropertyFieldValue("Max. value", "100.5"); - // Updating step size to verify Max value - propPane.UpdatePropertyFieldValue("Step size", "90"); - // Verify decimal value - agHelper - .GetElement(locators._sliderThumb) - .eq(1) - .focus() - .type("{rightArrow}"); - agHelper.Sleep(3000); - agHelper - .GetText(getWidgetSelector(draggableWidgets.TEXT), "text", 0) - .then(($label) => { - expect($label).to.eq("100.5"); + // Events Section properties + eventsProperties.forEach((eventsProperty) => { + agHelper.AssertElementVisibility( + propPane._propertyPanePropertyControl("events", `${eventsProperty}`), + ); }); + // Style Section properties + propPane.MoveToTab("Style"); + propPane._propertyControl("size"); + agHelper.AssertElementVisibility( + propPane._propertyPanePropertyControl("color", "fillcolor"), + ); - // Does not allow value less than min value - propPane.UpdatePropertyFieldValue("Max. value", "-20"); - agHelper.VerifyEvaluatedErrorMessage( - "This value must be greater than min value", - ); - - // Accepts negative value - propPane.UpdatePropertyFieldValue("Min. value", "-50"); - agHelper.AssertElementAbsence(locators._evaluatedErrorMessage); - propPane.UpdatePropertyFieldValue("Max. value", "-30"); - agHelper.AssertElementAbsence(locators._evaluatedErrorMessage); - - agHelper - .GetElement(locators._sliderThumb) - .eq(1) - .focus() - .type("{rightArrow}{rightArrow}{rightArrow}"); - agHelper - .GetText(getWidgetSelector(draggableWidgets.TEXT), "text", 0) - .then(($label) => { - expect($label).to.eq("-30"); - }); + propPane.MoveToTab("Content"); + // Verify default value + propPane + .EvaluateExistingPropertyFieldValue("Min. value") + .then((val: any) => { + expect(val).to.eq("0"); + }); + propPane + .EvaluateExistingPropertyFieldValue("Max. value") + .then((val: any) => { + expect(val).to.eq("100"); + }); + propPane + .EvaluateExistingPropertyFieldValue("Step size") + .then((val: any) => { + expect(val).to.eq("1"); + }); + propPane + .EvaluateExistingPropertyFieldValue("Min. range") + .then((val: any) => { + expect(val).to.eq("5"); + }); + }); - // Verify in Preview mode negative value - agHelper.GetNClick(locators._enterPreviewMode); - agHelper - .GetElement(locators._sliderThumb) - .eq(1) - .focus() - .type("{rightArrow}"); - agHelper.Sleep(2000); - agHelper - .GetText(getWidgetSelector(draggableWidgets.TEXT), "text", 0) - .then(($label) => { - expect($label).to.eq("-30"); - }); - agHelper.GetNClick(locators._exitPreviewMode); - - // Verify in Deploy mode negative value - deployMode.DeployApp(); - agHelper - .GetElement(locators._sliderThumb) - .eq(1) - .focus() - .type("{rightArrow}"); - agHelper.Sleep(3000); - agHelper - .GetText(getWidgetSelector(draggableWidgets.TEXT), "text", 0) - .then(($label) => { - expect($label).to.eq("-30"); - }); - deployMode.NavigateBacktoEditor(); - }); + it("2. Validate accepted and unaccepted 'Min. value' values", () => { + propPane.UpdatePropertyFieldValue("Min. value", "110"); + + agHelper.VerifyEvaluatedErrorMessage( + "This value must be less than max value", + ); - it("4. Validate accepted and unaccepted 'Step size' values", () => { - EditorNavigation.SelectEntityByName("RangeSlider1", EntityType.Widget); - propPane.UpdatePropertyFieldValue("Min. range", "5"); - propPane.UpdatePropertyFieldValue("Step size", "10"); + propPane.UpdatePropertyFieldValue("Min. value", ""); + + agHelper.VerifyEvaluatedErrorMessage("This value is required"); + + propPane.UpdatePropertyFieldValue("Min. value", "zero"); + + agHelper.VerifyEvaluatedErrorMessage("This value must be a number"); + + propPane.UpdatePropertyFieldValue("Min. range", "10"); + propPane.UpdatePropertyFieldValue("Step size", "10"); + propPane.UpdatePropertyFieldValue("Min. value", "-10"); + agHelper.AssertElementAbsence(locators._evaluatedErrorMessage); + + // Verify in Preview mode negative value + agHelper.GetNClick(locators._enterPreviewMode); + agHelper + .GetElement(locators._sliderThumb) + .eq(0) + .focus() + .type("{leftArrow}") + .type("{leftArrow}") + .type("{leftArrow}"); + agHelper.Sleep(3000); + agHelper + .GetText(getWidgetSelector(draggableWidgets.TEXT), "text", 1) + .then(($label) => { + expect($label).to.eq("-10"); + }); + agHelper.GetNClick(locators._exitPreviewMode); + + // Verify in Deploy mode negative value + deployMode.DeployApp(); + agHelper + .GetElement(locators._sliderThumb) + .eq(0) + .focus() + .type("{leftArrow}") + .type("{leftArrow}"); + agHelper.Sleep(3000); + agHelper + .GetText(getWidgetSelector(draggableWidgets.TEXT), "text", 1) + .then(($label) => { + expect($label).to.eq("-10"); + }); + deployMode.NavigateBacktoEditor(); + + // Allows decimal value + EditorNavigation.SelectEntityByName("RangeSlider1", EntityType.Widget); + propPane.UpdatePropertyFieldValue("Min. value", "10.5"); + + // Verify Decimal value + agHelper + .GetElement(locators._sliderThumb) + .eq(0) + .focus() + .type("{leftArrow}"); + agHelper.Sleep(3000); + agHelper + .GetText(getWidgetSelector(draggableWidgets.TEXT), "text", 1) + .then(($label) => { + expect($label).to.eq("10.5"); + }); + // Does not allow value greater than Max value + propPane.UpdatePropertyFieldValue("Min. value", "110"); + agHelper.VerifyEvaluatedErrorMessage( + "This value must be less than max value", + ); + // Updating to allowed value + propPane.UpdatePropertyFieldValue("Min. value", "10"); + agHelper.AssertElementAbsence(locators._evaluatedErrorMessage); + }); - agHelper.VerifyEvaluatedErrorMessage( - "This value must be less than or equal to minRange", - ); + it("3. Validate accepted and unaccepted 'Max. value' values", () => { + propPane.UpdatePropertyFieldValue("Max. value", "0"); - propPane.UpdatePropertyFieldValue("Step size", ""); + agHelper.VerifyEvaluatedErrorMessage( + "This value must be greater than min value", + ); - agHelper.VerifyEvaluatedErrorMessage("This value is required"); + propPane.UpdatePropertyFieldValue("Max. value", ""); + + agHelper.VerifyEvaluatedErrorMessage("This value is required"); + + propPane.UpdatePropertyFieldValue("Max. value", "asd"); + + agHelper.VerifyEvaluatedErrorMessage("This value must be a number"); + + // Allows decimal value + propPane.UpdatePropertyFieldValue("Max. value", "100.5"); + // Updating step size to verify Max value + propPane.UpdatePropertyFieldValue("Step size", "90"); + // Verify decimal value + agHelper + .GetElement(locators._sliderThumb) + .eq(1) + .focus() + .type("{rightArrow}"); + agHelper.Sleep(3000); + agHelper + .GetText(getWidgetSelector(draggableWidgets.TEXT), "text", 0) + .then(($label) => { + expect($label).to.eq("100.5"); + }); + + // Does not allow value less than min value + propPane.UpdatePropertyFieldValue("Max. value", "-20"); + agHelper.VerifyEvaluatedErrorMessage( + "This value must be greater than min value", + ); - propPane.UpdatePropertyFieldValue("Step size", "asd"); + // Accepts negative value + propPane.UpdatePropertyFieldValue("Min. value", "-50"); + agHelper.AssertElementAbsence(locators._evaluatedErrorMessage); + propPane.UpdatePropertyFieldValue("Max. value", "-30"); + agHelper.AssertElementAbsence(locators._evaluatedErrorMessage); + + agHelper + .GetElement(locators._sliderThumb) + .eq(1) + .focus() + .type("{rightArrow}{rightArrow}{rightArrow}"); + agHelper + .GetText(getWidgetSelector(draggableWidgets.TEXT), "text", 0) + .then(($label) => { + expect($label).to.eq("-30"); + }); + + // Verify in Preview mode negative value + agHelper.GetNClick(locators._enterPreviewMode); + agHelper + .GetElement(locators._sliderThumb) + .eq(1) + .focus() + .type("{rightArrow}"); + agHelper.Sleep(2000); + agHelper + .GetText(getWidgetSelector(draggableWidgets.TEXT), "text", 0) + .then(($label) => { + expect($label).to.eq("-30"); + }); + agHelper.GetNClick(locators._exitPreviewMode); + + // Verify in Deploy mode negative value + deployMode.DeployApp(); + agHelper + .GetElement(locators._sliderThumb) + .eq(1) + .focus() + .type("{rightArrow}"); + agHelper.Sleep(3000); + agHelper + .GetText(getWidgetSelector(draggableWidgets.TEXT), "text", 0) + .then(($label) => { + expect($label).to.eq("-30"); + }); + deployMode.NavigateBacktoEditor(); + }); - agHelper.VerifyEvaluatedErrorMessage("This value must be a number"); + it("4. Validate accepted and unaccepted 'Step size' values", () => { + EditorNavigation.SelectEntityByName("RangeSlider1", EntityType.Widget); + propPane.UpdatePropertyFieldValue("Min. range", "5"); + propPane.UpdatePropertyFieldValue("Step size", "10"); - // Does not allow value less than 0.1 - EditorNavigation.SelectEntityByName("RangeSlider1", EntityType.Widget); - propPane.UpdatePropertyFieldValue("Step size", "0"); - agHelper.VerifyEvaluatedErrorMessage("This value must be greater than 0.1"); - // Does not allow negative value - propPane.UpdatePropertyFieldValue("Step size", "-10"); - agHelper.VerifyEvaluatedErrorMessage("This value must be greater than 0.1"); - propPane.UpdatePropertyFieldValue("Step size", "5"); - // Does not allow value greater than max value - propPane.UpdatePropertyFieldValue("Max. value", "100"); - agHelper.AssertElementAbsence(locators._evaluatedErrorMessage); - propPane.UpdatePropertyFieldValue("Min. value", "10"); - agHelper.AssertElementAbsence(locators._evaluatedErrorMessage); - propPane.UpdatePropertyFieldValue("Step size", "110"); - agHelper.VerifyEvaluatedErrorMessage("This value must be less than 90"); + agHelper.VerifyEvaluatedErrorMessage( + "This value must be less than or equal to minRange", + ); - // Updating to allowed value - propPane.UpdatePropertyFieldValue("Step size", "5"); - agHelper.AssertElementAbsence(locators._evaluatedErrorMessage); - }); + propPane.UpdatePropertyFieldValue("Step size", ""); - it("5. Validate accepted and unaccepted 'Min Range' values", () => { - propPane.UpdatePropertyFieldValue("Min. range", "0"); + agHelper.VerifyEvaluatedErrorMessage("This value is required"); - agHelper.VerifyEvaluatedErrorMessage("This value must be greater than 0.1"); + propPane.UpdatePropertyFieldValue("Step size", "asd"); - propPane.UpdatePropertyFieldValue("Min. range", "-10"); + agHelper.VerifyEvaluatedErrorMessage("This value must be a number"); - agHelper.VerifyEvaluatedErrorMessage("This value must be greater than 0.1"); + // Does not allow value less than 0.1 + EditorNavigation.SelectEntityByName("RangeSlider1", EntityType.Widget); + propPane.UpdatePropertyFieldValue("Step size", "0"); + agHelper.VerifyEvaluatedErrorMessage( + "This value must be greater than 0.1", + ); + // Does not allow negative value + propPane.UpdatePropertyFieldValue("Step size", "-10"); + agHelper.VerifyEvaluatedErrorMessage( + "This value must be greater than 0.1", + ); + propPane.UpdatePropertyFieldValue("Step size", "5"); + // Does not allow value greater than max value + propPane.UpdatePropertyFieldValue("Max. value", "100"); + agHelper.AssertElementAbsence(locators._evaluatedErrorMessage); + propPane.UpdatePropertyFieldValue("Min. value", "10"); + agHelper.AssertElementAbsence(locators._evaluatedErrorMessage); + propPane.UpdatePropertyFieldValue("Step size", "110"); + agHelper.VerifyEvaluatedErrorMessage("This value must be less than 90"); + + // Updating to allowed value + propPane.UpdatePropertyFieldValue("Step size", "5"); + agHelper.AssertElementAbsence(locators._evaluatedErrorMessage); + }); - propPane.UpdatePropertyFieldValue("Min. range", "asd"); + it("5. Validate accepted and unaccepted 'Min Range' values", () => { + propPane.UpdatePropertyFieldValue("Min. range", "0"); - agHelper.VerifyEvaluatedErrorMessage("This value must be a number"); + agHelper.VerifyEvaluatedErrorMessage( + "This value must be greater than 0.1", + ); - propPane.UpdatePropertyFieldValue("Min. range", "110"); + propPane.UpdatePropertyFieldValue("Min. range", "-10"); - agHelper.VerifyEvaluatedErrorMessage("This value must be less than 90"); + agHelper.VerifyEvaluatedErrorMessage( + "This value must be greater than 0.1", + ); - // Does not accept value less than step size - propPane.UpdatePropertyFieldValue("Min. range", "2"); - agHelper.VerifyEvaluatedErrorMessage( - "This value must be greater than or equal to step size", - ); + propPane.UpdatePropertyFieldValue("Min. range", "asd"); - // Updating to allowed value - propPane.UpdatePropertyFieldValue("Min. range", "5"); - agHelper.AssertElementAbsence(locators._evaluatedErrorMessage); - }); + agHelper.VerifyEvaluatedErrorMessage("This value must be a number"); - it("6. Validate accepted and unaccepted 'Default start' value", () => { - propPane.UpdatePropertyFieldValue("Default start value", "-100"); + propPane.UpdatePropertyFieldValue("Min. range", "110"); - agHelper.VerifyEvaluatedErrorMessage( - "This value must be greater than or equal to the min value", - ); + agHelper.VerifyEvaluatedErrorMessage("This value must be less than 90"); - propPane.UpdatePropertyFieldValue("Default end value", "100"); - propPane.UpdatePropertyFieldValue("Default start value", "110"); + // Does not accept value less than step size + propPane.UpdatePropertyFieldValue("Min. range", "2"); + agHelper.VerifyEvaluatedErrorMessage( + "This value must be greater than or equal to step size", + ); - agHelper.VerifyEvaluatedErrorMessage( - "This value must be less than defaultEnd value", - ); + // Updating to allowed value + propPane.UpdatePropertyFieldValue("Min. range", "5"); + agHelper.AssertElementAbsence(locators._evaluatedErrorMessage); + }); - propPane.UpdatePropertyFieldValue("Default start value", "asd"); + it("6. Validate accepted and unaccepted 'Default start' value", () => { + propPane.UpdatePropertyFieldValue("Default start value", "-100"); - agHelper.VerifyEvaluatedErrorMessage("This value must be a number"); + agHelper.VerifyEvaluatedErrorMessage( + "This value must be greater than or equal to the min value", + ); - propPane.UpdatePropertyFieldValue("Default start value", "10"); - agHelper.AssertElementAbsence(locators._evaluatedErrorMessage); + propPane.UpdatePropertyFieldValue("Default end value", "100"); + propPane.UpdatePropertyFieldValue("Default start value", "110"); - //Validate accepted and unaccepted 'Default end' value - propPane.UpdatePropertyFieldValue("Default end value", "-10"); + agHelper.VerifyEvaluatedErrorMessage( + "This value must be less than defaultEnd value", + ); - agHelper.VerifyEvaluatedErrorMessage( - "This value must be greater than defaultStart value", - ); + propPane.UpdatePropertyFieldValue("Default start value", "asd"); - propPane.UpdatePropertyFieldValue("Default end value", "110"); + agHelper.VerifyEvaluatedErrorMessage("This value must be a number"); - agHelper.VerifyEvaluatedErrorMessage( - "This value must be less than or equal to the max value", - ); + propPane.UpdatePropertyFieldValue("Default start value", "10"); + agHelper.AssertElementAbsence(locators._evaluatedErrorMessage); - propPane.UpdatePropertyFieldValue("Default end value", "asd"); + //Validate accepted and unaccepted 'Default end' value + propPane.UpdatePropertyFieldValue("Default end value", "-10"); - agHelper.VerifyEvaluatedErrorMessage("This value must be a number"); + agHelper.VerifyEvaluatedErrorMessage( + "This value must be greater than defaultStart value", + ); - propPane.UpdatePropertyFieldValue("Default end value", "100"); - agHelper.AssertElementAbsence(locators._evaluatedErrorMessage); - }); + propPane.UpdatePropertyFieldValue("Default end value", "110"); - it("7. Change Step size and check if binding value changes", () => { - // Assert Text widget has value 10 - agHelper - .GetText(getWidgetSelector(draggableWidgets.TEXT), "text", 1) - .then(($label) => { - expect($label).to.eq("10"); - }); + agHelper.VerifyEvaluatedErrorMessage( + "This value must be less than or equal to the max value", + ); - agHelper - .GetText(getWidgetSelector(draggableWidgets.TEXT), "text", 0) - .then(($label) => { - expect($label).to.eq("100"); - }); + propPane.UpdatePropertyFieldValue("Default end value", "asd"); - // Change the Step size to 10 - propPane.UpdatePropertyFieldValue("Min. range", "10", true, false); - propPane.UpdatePropertyFieldValue("Step size", "10", true, false); - - agHelper - .GetElement(locators._sliderThumb) - .eq(0) - .focus() - .type("{rightArrow}") - .wait(2000); - - // Assert the Text widget has value 20 - agHelper - .GetText(getWidgetSelector(draggableWidgets.TEXT), "text", 1) - .then(($label) => { - expect($label).to.eq("20"); - }); + agHelper.VerifyEvaluatedErrorMessage("This value must be a number"); - // Change the slider value - agHelper - .GetElement(locators._sliderThumb) - .eq(1) - .focus() - .type("{leftArrow}") - .type("{leftArrow}"); + propPane.UpdatePropertyFieldValue("Default end value", "100"); + agHelper.AssertElementAbsence(locators._evaluatedErrorMessage); + }); - agHelper.Sleep(2000); + it("7. Change Step size and check if binding value changes", () => { + // Assert Text widget has value 10 + agHelper + .GetText(getWidgetSelector(draggableWidgets.TEXT), "text", 1) + .then(($label) => { + expect($label).to.eq("10"); + }); + + agHelper + .GetText(getWidgetSelector(draggableWidgets.TEXT), "text", 0) + .then(($label) => { + expect($label).to.eq("100"); + }); + + // Change the Step size to 10 + propPane.UpdatePropertyFieldValue("Min. range", "10", true, false); + propPane.UpdatePropertyFieldValue("Step size", "10", true, false); + + agHelper + .GetElement(locators._sliderThumb) + .eq(0) + .focus() + .type("{rightArrow}") + .wait(2000); + + // Assert the Text widget has value 20 + agHelper + .GetText(getWidgetSelector(draggableWidgets.TEXT), "text", 1) + .then(($label) => { + expect($label).to.eq("20"); + }); + + // Change the slider value + agHelper + .GetElement(locators._sliderThumb) + .eq(1) + .focus() + .type("{leftArrow}") + .type("{leftArrow}"); + + agHelper.Sleep(2000); + + agHelper + .GetText(getWidgetSelector(draggableWidgets.TEXT), "text", 0) + .then(($label) => { + expect($label).to.eq("80"); + }); + }); - agHelper - .GetText(getWidgetSelector(draggableWidgets.TEXT), "text", 0) - .then(($label) => { - expect($label).to.eq("80"); - }); - }); - - it("8. Verify Range slider visibility in explorer", () => { - PageLeftPane.switchSegment(PagePaneSegment.UI); - PageLeftPane.switchToAddNew(); - agHelper.ClearTextField(locators._entityExplorersearch); - agHelper.TypeText(locators._entityExplorersearch, "Range"); - agHelper.AssertElementExist(locators._widgetPageIcon("rangesliderwidget")); - agHelper.ClearTextField(locators._entityExplorersearch); - agHelper.TypeText(locators._entityExplorersearch, "slider"); - agHelper.AssertElementExist(locators._widgetPageIcon("rangesliderwidget")); - }); -}); + it("8. Verify Range slider visibility in explorer", () => { + PageLeftPane.switchSegment(PagePaneSegment.UI); + PageLeftPane.switchToAddNew(); + agHelper.ClearTextField(locators._entityExplorersearch); + agHelper.TypeText(locators._entityExplorersearch, "Range"); + agHelper.AssertElementExist( + locators._widgetPageIcon("rangesliderwidget"), + ); + agHelper.ClearTextField(locators._entityExplorersearch); + agHelper.TypeText(locators._entityExplorersearch, "slider"); + agHelper.AssertElementExist( + locators._widgetPageIcon("rangesliderwidget"), + ); + }); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Statbox/Statbox_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Statbox/Statbox_spec.ts index 03046026784f..29b2902542bf 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Statbox/Statbox_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Statbox/Statbox_spec.ts @@ -12,140 +12,148 @@ import EditorNavigation, { PagePaneSegment, } from "../../../../../support/Pages/EditorNavigation"; -describe("Statbox spec", { tags: ["@tag.Widget", "@tag.Statbox"] }, () => { - before(() => { - /** - * On the canvas we have a Statbox Widget - */ - entityExplorer.DragDropWidgetNVerify(draggableWidgets.STATBOX, 329, 124); - }); +describe( + "Statbox spec", + { tags: ["@tag.Widget", "@tag.Statbox", "@tag.Binding"] }, + () => { + before(() => { + /** + * On the canvas we have a Statbox Widget + */ + entityExplorer.DragDropWidgetNVerify(draggableWidgets.STATBOX, 329, 124); + }); - it("1. Validate all the respective properties are present on the Content and Style sections in the property pane", () => { - const generalProperties = ["visible", "animateloading", "height"]; + it("1. Validate all the respective properties are present on the Content and Style sections in the property pane", () => { + const generalProperties = ["visible", "animateloading", "height"]; - generalProperties.forEach((generalSectionProperty) => { - agHelper.AssertElementVisibility( - propPane._propertyPanePropertyControl( - "general", - `${generalSectionProperty}`, - ), - ); - }); + generalProperties.forEach((generalSectionProperty) => { + agHelper.AssertElementVisibility( + propPane._propertyPanePropertyControl( + "general", + `${generalSectionProperty}`, + ), + ); + }); + + // Switch to the Style Tab + propPane.MoveToTab("Style"); - // Switch to the Style Tab - propPane.MoveToTab("Style"); + const colorProperties = ["backgroundcolor", "bordercolor"]; + colorProperties.forEach((labelStyleSectionProperty) => { + agHelper.AssertElementVisibility( + propPane._propertyPanePropertyControl( + "color", + `${labelStyleSectionProperty}`, + ), + ); + }); - const colorProperties = ["backgroundcolor", "bordercolor"]; - colorProperties.forEach((labelStyleSectionProperty) => { + const borderShadows = ["borderwidth", "borderradius", "boxshadow"]; + borderShadows.forEach((borderShadowSectionProperty) => { + agHelper.AssertElementVisibility( + propPane._propertyPanePropertyControl( + "borderandshadow", + `${borderShadowSectionProperty}`, + ), + ); + }); + }); + it("2. Validate if the default widgets are present inside the statbox", () => { + PageLeftPane.switchSegment(PagePaneSegment.UI); + PageLeftPane.assertPresence("Statbox1"); + PageLeftPane.expandCollapseItem("Statbox1"); + PageLeftPane.assertPresence("Text1"); + PageLeftPane.assertPresence("Text2"); + PageLeftPane.assertPresence("IconButton1"); + PageLeftPane.assertPresence("Text3"); + }); + it("3. Validate visibility", () => { + EditorNavigation.SelectEntityByName("Statbox1", EntityType.Widget); + propPane.MoveToTab("Content"); + propPane.TogglePropertyState("Visible", "Off"); + // Ensure that the widget isnt visible once deployed + deployMode.DeployApp(); + agHelper.AssertElementAbsence(locators._widgetInDeployed("statbox1")); + deployMode.NavigateBacktoEditor(); + //Ensure that the widget is not visible in preview mode + agHelper.GetNClick(locators._enterPreviewMode); + agHelper.AssertElementAbsence(locators._widgetInDeployed("statbox1")); + agHelper.GetNClick(locators._exitPreviewMode); + EditorNavigation.SelectEntityByName("Statbox1", EntityType.Widget); + propPane.TogglePropertyState("Visible", "On"); + //Ensure that the widget is visible once deployed + deployMode.DeployApp(); + agHelper.AssertElementVisibility( + locators._widgetInDeployed("statbox1"), + true, + ); + deployMode.NavigateBacktoEditor(); + //Ensure that the widget is visible in preview mode + agHelper.GetNClick(locators._enterPreviewMode); agHelper.AssertElementVisibility( - propPane._propertyPanePropertyControl( - "color", - `${labelStyleSectionProperty}`, - ), + locators._widgetInDeployed("statbox1"), + true, ); + agHelper.GetNClick(locators._exitPreviewMode); }); - const borderShadows = ["borderwidth", "borderradius", "boxshadow"]; - borderShadows.forEach((borderShadowSectionProperty) => { + it("4. Validate if widgets can be D&D inside the Statbox widget", () => { + PageLeftPane.switchSegment(PagePaneSegment.UI); + PageLeftPane.expandCollapseItem("Statbox1"); + propPane.DeleteWidgetFromPropertyPane("IconButton1"); + entityExplorer.DragDropWidgetNVerify( + draggableWidgets.ICONBUTTON, + 260, + 189, + ); + //Verifying if the dropped widget exists in the container + PageLeftPane.switchSegment(PagePaneSegment.UI); + PageLeftPane.expandCollapseItem("Statbox1"); + PageLeftPane.assertPresence("IconButton1"); + //Verifying if the dropped widget exists once deployed + deployMode.DeployApp(); + agHelper.AssertElementVisibility( + locators._widgetInDeployed("iconbutton1"), + true, + ); + deployMode.NavigateBacktoEditor(); + //Verifying if the dropped widget exists in preview mode + agHelper.GetNClick(locators._enterPreviewMode); agHelper.AssertElementVisibility( - propPane._propertyPanePropertyControl( - "borderandshadow", - `${borderShadowSectionProperty}`, - ), + locators._widgetInDeployed("iconbutton1"), + true, ); + agHelper.GetNClick(locators._exitPreviewMode); }); - }); - it("2. Validate if the default widgets are present inside the statbox", () => { - PageLeftPane.switchSegment(PagePaneSegment.UI); - PageLeftPane.assertPresence("Statbox1"); - PageLeftPane.expandCollapseItem("Statbox1"); - PageLeftPane.assertPresence("Text1"); - PageLeftPane.assertPresence("Text2"); - PageLeftPane.assertPresence("IconButton1"); - PageLeftPane.assertPresence("Text3"); - }); - it("3. Validate visibility", () => { - EditorNavigation.SelectEntityByName("Statbox1", EntityType.Widget); - propPane.MoveToTab("Content"); - propPane.TogglePropertyState("Visible", "Off"); - // Ensure that the widget isnt visible once deployed - deployMode.DeployApp(); - agHelper.AssertElementAbsence(locators._widgetInDeployed("statbox1")); - deployMode.NavigateBacktoEditor(); - //Ensure that the widget is not visible in preview mode - agHelper.GetNClick(locators._enterPreviewMode); - agHelper.AssertElementAbsence(locators._widgetInDeployed("statbox1")); - agHelper.GetNClick(locators._exitPreviewMode); - EditorNavigation.SelectEntityByName("Statbox1", EntityType.Widget); - propPane.TogglePropertyState("Visible", "On"); - //Ensure that the widget is visible once deployed - deployMode.DeployApp(); - agHelper.AssertElementVisibility( - locators._widgetInDeployed("statbox1"), - true, - ); - deployMode.NavigateBacktoEditor(); - //Ensure that the widget is visible in preview mode - agHelper.GetNClick(locators._enterPreviewMode); - agHelper.AssertElementVisibility( - locators._widgetInDeployed("statbox1"), - true, - ); - agHelper.GetNClick(locators._exitPreviewMode); - }); - - it("4. Validate if widgets can be D&D inside the Statbox widget", () => { - PageLeftPane.switchSegment(PagePaneSegment.UI); - PageLeftPane.expandCollapseItem("Statbox1"); - propPane.DeleteWidgetFromPropertyPane("IconButton1"); - entityExplorer.DragDropWidgetNVerify(draggableWidgets.ICONBUTTON, 260, 189); - //Verifying if the dropped widget exists in the container - PageLeftPane.switchSegment(PagePaneSegment.UI); - PageLeftPane.expandCollapseItem("Statbox1"); - PageLeftPane.assertPresence("IconButton1"); - //Verifying if the dropped widget exists once deployed - deployMode.DeployApp(); - agHelper.AssertElementVisibility( - locators._widgetInDeployed("iconbutton1"), - true, - ); - deployMode.NavigateBacktoEditor(); - //Verifying if the dropped widget exists in preview mode - agHelper.GetNClick(locators._enterPreviewMode); - agHelper.AssertElementVisibility( - locators._widgetInDeployed("iconbutton1"), - true, - ); - agHelper.GetNClick(locators._exitPreviewMode); - }); - it("5: Verify statbox widget styles", () => { - EditorNavigation.SelectEntityByName("Statbox1", EntityType.Widget); - //Switch to Style tab - propPane.MoveToTab("Style"); - propPane.EnterJSContext("Background color", "#f3e8ff"); - propPane.EnterJSContext("Border color", "#be185d"); - // Click on Deploy and ensure it is deployed appropriately - deployMode.DeployApp(); - // Ensure the Background Color is applied - agHelper.AssertCSS( - locators._statboxWidget, - "background-color", - "rgb(243, 232, 255)", - ); - //Ensure that the border colour is applied - agHelper.AssertCSS( - locators._statboxWidget, - "border-color", - "rgb(205, 213, 223)", - ); - deployMode.NavigateBacktoEditor(); - }); + it("5: Verify statbox widget styles", () => { + EditorNavigation.SelectEntityByName("Statbox1", EntityType.Widget); + //Switch to Style tab + propPane.MoveToTab("Style"); + propPane.EnterJSContext("Background color", "#f3e8ff"); + propPane.EnterJSContext("Border color", "#be185d"); + // Click on Deploy and ensure it is deployed appropriately + deployMode.DeployApp(); + // Ensure the Background Color is applied + agHelper.AssertCSS( + locators._statboxWidget, + "background-color", + "rgb(243, 232, 255)", + ); + //Ensure that the border colour is applied + agHelper.AssertCSS( + locators._statboxWidget, + "border-color", + "rgb(205, 213, 223)", + ); + deployMode.NavigateBacktoEditor(); + }); - it("6. Rename, copy-paste and delete the widget", () => { - EditorNavigation.SelectEntityByName("Statbox1", EntityType.Widget); - entityExplorer.RenameEntityFromExplorer("Statbox1", "Stats", true); - propPane.CopyPasteWidgetFromPropertyPane("Stats"); - entityExplorer.DeleteWidgetFromEntityExplorer("Stats"); - }); -}); + it("6. Rename, copy-paste and delete the widget", () => { + EditorNavigation.SelectEntityByName("Statbox1", EntityType.Widget); + entityExplorer.RenameEntityFromExplorer("Statbox1", "Stats", true); + propPane.CopyPasteWidgetFromPropertyPane("Stats"); + entityExplorer.DeleteWidgetFromEntityExplorer("Stats"); + }); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Switch/Switch2_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Switch/Switch2_spec.ts index 8effb0f12ed6..50429c7df6c7 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Switch/Switch2_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Switch/Switch2_spec.ts @@ -16,7 +16,7 @@ import EditorNavigation, { describe( "Switch widget testcases", - { tags: ["@tag.Widget", "@tag.Switch"] }, + { tags: ["@tag.Widget", "@tag.Switch", "@tag.Binding"] }, () => { const jsonData = `[ { diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Switch/SwitchGroup1_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Switch/SwitchGroup1_spec.ts index 2e965258b01f..c1304c05669a 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Switch/SwitchGroup1_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Switch/SwitchGroup1_spec.ts @@ -21,7 +21,7 @@ import EditorNavigation, { describe( "Switchgroup Widget Functionality", - { tags: ["@tag.Widget", "@tag.Switch"] }, + { tags: ["@tag.Widget", "@tag.Switch", "@tag.Binding"] }, function () { /** * Adding switch group, checkbox group and text widgets diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Switch/SwitchGroup2_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Switch/SwitchGroup2_spec.js index 0d8c730d46b4..8cb895a36377 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Switch/SwitchGroup2_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Switch/SwitchGroup2_spec.js @@ -4,7 +4,7 @@ import * as _ from "../../../../../support/Objects/ObjectsCore"; describe( "Switch Group Widget Functionality", - { tags: ["@tag.Widget", "@tag.Switch"] }, + { tags: ["@tag.Widget", "@tag.Switch", "@tag.Binding"] }, function () { before(() => { _.agHelper.AddDsl("SwitchGroupWidgetDsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Switch/Switch_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Switch/Switch_spec.js index e15d11407d2d..30b890e77051 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Switch/Switch_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Switch/Switch_spec.js @@ -6,7 +6,7 @@ import * as _ from "../../../../../support/Objects/ObjectsCore"; describe( "Switch Widget Functionality", - { tags: ["@tag.Widget", "@tag.Switch"] }, + { tags: ["@tag.Widget", "@tag.Switch", "@tag.Binding"] }, function () { before(() => { _.agHelper.AddDsl("newFormDsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Tab/Tab_Duplicate_TabName_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Tab/Tab_Duplicate_TabName_spec.js index 658dfb75c7aa..6aa3a264bf08 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Tab/Tab_Duplicate_TabName_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Tab/Tab_Duplicate_TabName_spec.js @@ -2,7 +2,7 @@ import * as _ from "../../../../../support/Objects/ObjectsCore"; describe( "Tab widget test duplicate tab name validation", - { tags: ["@tag.Widget", "@tag.Tab"] }, + { tags: ["@tag.Widget", "@tag.Tab", "@tag.Binding"] }, function () { before(() => { _.agHelper.AddDsl("tabsWidgetDsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Tab/Tab_OnEvent_Navigation_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Tab/Tab_OnEvent_Navigation_spec.js index 62412658e7ba..5ebdfc168845 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Tab/Tab_OnEvent_Navigation_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Tab/Tab_OnEvent_Navigation_spec.js @@ -2,7 +2,7 @@ import * as _ from "../../../../../support/Objects/ObjectsCore"; describe( "Tabs widget on change of selection navigation usecases", - { tags: ["@tag.Widget", "@tag.Tab"] }, + { tags: ["@tag.Widget", "@tag.Tab", "@tag.Binding"] }, function () { before(() => { _.agHelper.AddDsl("tabsWidgetReset"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Tab/Tab_new_scenario_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Tab/Tab_new_scenario_spec.js index 0518c7bd9485..f67c636c4059 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Tab/Tab_new_scenario_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Tab/Tab_new_scenario_spec.js @@ -3,34 +3,38 @@ const publish = require("../../../../../locators/publishWidgetspage.json"); const widgetsPage = require("../../../../../locators/Widgets.json"); import * as _ from "../../../../../support/Objects/ObjectsCore"; -describe("Tab widget test", { tags: ["@tag.Widget", "@tag.Tab"] }, function () { - before(() => { - _.agHelper.AddDsl("tabsWithWidgetDsl"); - }); - it("Tab Widget Functionality Test with Modal on change of selected tab", function () { - cy.openPropertyPane("tabswidget"); - cy.widgetText("tab", Layoutpage.tabWidget, widgetsPage.widgetNameSpan); - cy.AddActionWithModal(); - cy.get(".t--draggable-buttonwidget:contains('Close')").click({ - force: true, +describe( + "Tab widget test", + { tags: ["@tag.Widget", "@tag.Tab", "@tag.Binding"] }, + function () { + before(() => { + _.agHelper.AddDsl("tabsWithWidgetDsl"); + }); + it("Tab Widget Functionality Test with Modal on change of selected tab", function () { + cy.openPropertyPane("tabswidget"); + cy.widgetText("tab", Layoutpage.tabWidget, widgetsPage.widgetNameSpan); + cy.AddActionWithModal(); + cy.get(".t--draggable-buttonwidget:contains('Close')").click({ + force: true, + }); }); - }); - it("Publish the app and validate the widgets displayed under each tab", function () { - _.deployMode.DeployApp(); - cy.get(publish.buttonWidget).should("be.visible"); - cy.get(publish.textWidget).should("be.visible"); - cy.get(publish.datePickerNew).should("be.visible"); - cy.wait(3000); - cy.get(publish.tab).contains("Tab 2").click({ force: true }); - cy.get(publish.checkboxWidget).should("be.visible"); - cy.get(publish.radioWidget).should("be.visible"); + it("Publish the app and validate the widgets displayed under each tab", function () { + _.deployMode.DeployApp(); + cy.get(publish.buttonWidget).should("be.visible"); + cy.get(publish.textWidget).should("be.visible"); + cy.get(publish.datePickerNew).should("be.visible"); + cy.wait(3000); + 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, + cy.get(publish.buttonWidget).contains("Confirm").click({ + force: true, + }); }); - }); -}); + }, +); afterEach(() => { // put your clean up code if any }); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Tab/Tabs_2_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Tab/Tabs_2_spec.ts index 583a205e54dc..ae871b77beb0 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Tab/Tabs_2_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Tab/Tabs_2_spec.ts @@ -15,7 +15,7 @@ import EditorNavigation, { describe( "Tabs widget Tests", - { tags: ["@tag.Widget", "@tag.Tab"] }, + { tags: ["@tag.Widget", "@tag.Tab", "@tag.Binding"] }, function () { before(() => { agHelper.AddDsl("tabsDsl"); @@ -189,7 +189,7 @@ describe( }); // to work on redesign of the test, commenting for now - it.skip("7. Verify colors, borders and shadows", () => { + it("7. Verify colors, borders and shadows", () => { // Verify font color picker opens up propPane.MoveToTab("Style"); agHelper.GetNClick(propPane._propertyControlColorPicker("accentcolor")); @@ -220,11 +220,16 @@ describe( // Border Color propPane.SelectColorFromColorPicker("bordercolor", 13); assertHelper.AssertNetworkStatus("@updateLayout"); - agHelper.AssertCSS( - tabs._tabsWidgetStyle, - "border-color", - "rgb(185, 28, 28)", - ); + + agHelper + .GetWidgetCSSFrAttribute(propPane._borderColorCursor, "color") + .then((color) => { + agHelper + .GetWidgetCSSFrAttribute(locators._widgetBorder, "color", 1) + .then((bgcolor) => { + expect(color).to.eq(bgcolor); + }); + }); agHelper.AssertAttribute(propPane._colorPickerInput, "type", "text", 2); propPane.TogglePropertyState("bordercolor", "On", ""); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Tab/Widget_Tab_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Tab/Widget_Tab_spec.js index 3e3b5104e5ea..4a500f29d214 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Tab/Widget_Tab_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Tab/Widget_Tab_spec.js @@ -8,99 +8,102 @@ import { propPane, } from "../../../../../support/Objects/ObjectsCore"; -describe("Tab widget test", { tags: ["@tag.Widget", "@tag.Tab"] }, function () { - before(() => { - agHelper.AddDsl("layoutdsl"); - }); - it("1. Tab Widget Functionality Test", function () { - cy.openPropertyPane("tabswidget"); - /** - * @param{Text} Random Text - * @param{TabWidget}Mouseover - * @param{TabPre Css} Assertion - */ - cy.widgetText("tab", Layoutpage.tabWidget, widgetsPage.widgetNameSpan); - /** - * @param{IndexValue} Provide input Index Value - * @param{Text} Provide Index Text Value - */ - cy.tabVerify(0, "Aditya"); - cy.tabVerify(1, "test"); - //Default tab selection and validation - cy.testJsontext("defaulttab", "test"); - cy.get(Layoutpage.tabWidget) - .contains("test") - .click({ force: true }) - .should("be.visible"); - cy.get(Layoutpage.tabButton).last().click({ force: true }); - // eslint-disable-next-line cypress/no-unnecessary-waiting - cy.tabVerify(1, "Day"); - cy.xpath(Layoutpage.deleteTab.replace("tabName", "Day")).click({ - force: true, +describe( + "Tab widget test", + { tags: ["@tag.Widget", "@tag.Tab", "@tag.Binding"] }, + function () { + before(() => { + agHelper.AddDsl("layoutdsl"); + }); + it("1. Tab Widget Functionality Test", function () { + cy.openPropertyPane("tabswidget"); + /** + * @param{Text} Random Text + * @param{TabWidget}Mouseover + * @param{TabPre Css} Assertion + */ + cy.widgetText("tab", Layoutpage.tabWidget, widgetsPage.widgetNameSpan); + /** + * @param{IndexValue} Provide input Index Value + * @param{Text} Provide Index Text Value + */ + cy.tabVerify(0, "Aditya"); + cy.tabVerify(1, "test"); + //Default tab selection and validation + cy.testJsontext("defaulttab", "test"); + cy.get(Layoutpage.tabWidget) + .contains("test") + .click({ force: true }) + .should("be.visible"); + cy.get(Layoutpage.tabButton).last().click({ force: true }); + // eslint-disable-next-line cypress/no-unnecessary-waiting + cy.tabVerify(1, "Day"); + cy.xpath(Layoutpage.deleteTab.replace("tabName", "Day")).click({ + force: true, + }); + cy.get(Layoutpage.tabWidget).contains("Day").should("not.exist"); + // eslint-disable-next-line cypress/no-unnecessary-waiting + cy.wait(500); + /** + * @param{toggleButton Css} Assert to be checked + */ + agHelper.CheckUncheck(widgetsPage.Scrollbutton); + cy.get(Layoutpage.tabContainer) + .scrollIntoView({ easing: "linear" }) + .should("be.visible"); + agHelper.AssertAutoSave(); + deployMode.DeployApp(); }); - cy.get(Layoutpage.tabWidget).contains("Day").should("not.exist"); - // eslint-disable-next-line cypress/no-unnecessary-waiting - cy.wait(500); - /** - * @param{toggleButton Css} Assert to be checked - */ - agHelper.CheckUncheck(widgetsPage.Scrollbutton); - cy.get(Layoutpage.tabContainer) - .scrollIntoView({ easing: "linear" }) - .should("be.visible"); - agHelper.AssertAutoSave(); - deployMode.DeployApp(); - }); - it("2. Tab Widget Functionality To Select Tabs", function () { - cy.get(publish.tabWidget) - .contains(this.dataSet.tabName) - .last() - .click({ force: true }) - .should("have.class", "is-selected"); - deployMode.NavigateBacktoEditor(); - }); + it("2. Tab Widget Functionality To Select Tabs", function () { + cy.get(publish.tabWidget) + .contains(this.dataSet.tabName) + .last() + .click({ force: true }) + .should("have.class", "is-selected"); + deployMode.NavigateBacktoEditor(); + }); - it("3. Tab Widget Functionality To Unchecked Visible Widget", function () { - cy.openPropertyPane("tabswidget"); - agHelper.CheckUncheck(commonlocators.visibleCheckbox, false); - deployMode.DeployApp(); - cy.get(publish.tabWidget).should("not.exist"); - deployMode.NavigateBacktoEditor(); - }); + it("3. Tab Widget Functionality To Unchecked Visible Widget", function () { + cy.openPropertyPane("tabswidget"); + agHelper.CheckUncheck(commonlocators.visibleCheckbox, false); + deployMode.DeployApp(); + cy.get(publish.tabWidget).should("not.exist"); + deployMode.NavigateBacktoEditor(); + }); - it("4. Tab Widget Functionality To Check Visible Widget", function () { - cy.openPropertyPane("tabswidget"); - agHelper.CheckUncheck(commonlocators.visibleCheckbox); - deployMode.DeployApp(); - cy.get(publish.tabWidget).should("be.visible"); - deployMode.NavigateBacktoEditor(); - }); + it("4. Tab Widget Functionality To Check Visible Widget", function () { + cy.openPropertyPane("tabswidget"); + agHelper.CheckUncheck(commonlocators.visibleCheckbox); + deployMode.DeployApp(); + cy.get(publish.tabWidget).should("be.visible"); + deployMode.NavigateBacktoEditor(); + }); - it("5. Tab Widget Functionality To Check tab invisiblity", function () { - cy.openPropertyPane("tabswidget"); - cy.xpath(Layoutpage.tabEdit.replace("tabName", "Tab 1")).click({ - force: true, + it("5. Tab Widget Functionality To Check tab invisiblity", function () { + cy.openPropertyPane("tabswidget"); + cy.xpath(Layoutpage.tabEdit.replace("tabName", "Tab 1")).click({ + force: true, + }); + cy.get(Layoutpage.tabVisibility).first().click({ force: true }); + cy.get(Layoutpage.tabWidget).contains("Tab 1").should("not.exist"); + deployMode.DeployApp(); + cy.get(publish.tabWidget).contains("Tab 1").should("not.exist"); + deployMode.NavigateBacktoEditor(); }); - cy.get(Layoutpage.tabVisibility).first().click({ force: true }); - cy.get(Layoutpage.tabWidget).contains("Tab 1").should("not.exist"); - deployMode.DeployApp(); - cy.get(publish.tabWidget).contains("Tab 1").should("not.exist"); - deployMode.NavigateBacktoEditor(); - }); - it("6. Tab Widget Functionality To Check tab visibility", function () { - cy.openPropertyPane("tabswidget"); - cy.xpath(Layoutpage.tabEdit.replace("tabName", "Tab 1")).click({ - force: true, + it("6. Tab Widget Functionality To Check tab visibility", function () { + cy.openPropertyPane("tabswidget"); + cy.xpath(Layoutpage.tabEdit.replace("tabName", "Tab 1")).click({ + force: true, + }); + cy.get(Layoutpage.tabVisibility).first().click({ force: true }); + cy.get(Layoutpage.tabWidget).contains("Tab 1").should("be.visible"); + deployMode.DeployApp(); + cy.get(publish.tabWidget).contains("Tab 1").should("be.visible"); + deployMode.NavigateBacktoEditor(); }); - cy.get(Layoutpage.tabVisibility).first().click({ force: true }); - cy.get(Layoutpage.tabWidget).contains("Tab 1").should("be.visible"); - deployMode.DeployApp(); - cy.get(publish.tabWidget).contains("Tab 1").should("be.visible"); - deployMode.NavigateBacktoEditor(); - }); - /* Test to be revisted as the undo action is inconsistent in automation + /* Test to be revisted as the undo action is inconsistent in automation it("7. Tab Widget Functionality To Check undo action after delete", function() { cy.openPropertyPane("tabswidget"); cy.get(Layoutpage.tabDelete) @@ -125,58 +128,59 @@ describe("Tab widget test", { tags: ["@tag.Widget", "@tag.Tab"] }, function () { .should("be.visible"); }); */ - it("7. Tabs widget should have navigation arrows if tabs don't fit", function () { - const rightNavButtonSelector = - Layoutpage.tabWidget + " .scroll-nav-right-button"; - const leftNavButtonSelector = - Layoutpage.tabWidget + " .scroll-nav-left-button"; + it("7. Tabs widget should have navigation arrows if tabs don't fit", function () { + const rightNavButtonSelector = + Layoutpage.tabWidget + " .scroll-nav-right-button"; + const leftNavButtonSelector = + Layoutpage.tabWidget + " .scroll-nav-left-button"; - cy.openPropertyPane("tabswidget"); - // Add a new tab - agHelper.ClickButton("Add tab"); - agHelper.ClickButton("Add tab"); - cy.tabVerify(3, "Tab3-for-testing-scroll-navigation-controls"); - // Should show off right navigation arrow - cy.get(leftNavButtonSelector).should("exist"); - // Click on the right navigation arrow - cy.get(leftNavButtonSelector).click({ force: true }); - // Should show off left navigation arrow - cy.get(rightNavButtonSelector).should("exist"); - }); + cy.openPropertyPane("tabswidget"); + // Add a new tab + agHelper.ClickButton("Add tab"); + agHelper.ClickButton("Add tab"); + cy.tabVerify(3, "Tab3-for-testing-scroll-navigation-controls"); + // Should show off right navigation arrow + cy.get(leftNavButtonSelector).should("exist"); + // Click on the right navigation arrow + cy.get(leftNavButtonSelector).click({ force: true }); + // Should show off left navigation arrow + cy.get(rightNavButtonSelector).should("exist"); + }); - it("8. Tab Widget Functionality To Check Default Tab selected After Selected Tab Delete", function () { - propPane.UpdatePropertyFieldValue("Default tab", "Tab 1"); - cy.tabVerify(3, "Tab3-for-testing-scroll-navigation-controls"); - cy.get(Layoutpage.tabWidget) - .contains("Tab3-for-testing-scroll-navigation-controls") - .should("have.class", "is-selected"); - cy.xpath( - Layoutpage.deleteTab.replace( - "tabName", - "Tab3-for-testing-scroll-navigation-controls", - ), - ).click({ force: true }); - cy.get(Layoutpage.tabWidget) - .contains("Tab 1") - .should("have.class", "is-selected"); - }); + it("8. Tab Widget Functionality To Check Default Tab selected After Selected Tab Delete", function () { + propPane.UpdatePropertyFieldValue("Default tab", "Tab 1"); + cy.tabVerify(3, "Tab3-for-testing-scroll-navigation-controls"); + cy.get(Layoutpage.tabWidget) + .contains("Tab3-for-testing-scroll-navigation-controls") + .should("have.class", "is-selected"); + cy.xpath( + Layoutpage.deleteTab.replace( + "tabName", + "Tab3-for-testing-scroll-navigation-controls", + ), + ).click({ force: true }); + cy.get(Layoutpage.tabWidget) + .contains("Tab 1") + .should("have.class", "is-selected"); + }); - it("9. Tab Widget Functionality To Check First Tab Selected After Selected Tab(Default one) Delete", function () { - cy.get(Layoutpage.tabDelete).eq(1).click({ force: true }); - cy.wait(1000); - cy.get(Layoutpage.tabWidget) - .contains("Aditya") - .should("have.class", "is-selected"); - // Validates Total Number Of Tabs Displayed In The Property Pane - cy.get(Layoutpage.tabNumber).should("have.text", "2"); - // Validates Total Number Of Tabs Displayed In The Property Pane After Adding A Tab - agHelper.ClickButton("Add tab"); - cy.get(Layoutpage.tabNumber).should("have.text", "3"); - //Validates Total Number Of Tabs Displayed In The Property Pane After Deleting A Tab - cy.get(Layoutpage.tabDelete).eq(1).click({ force: true }); - cy.get(Layoutpage.tabNumber).should("have.text", "2"); - }); -}); + it("9. Tab Widget Functionality To Check First Tab Selected After Selected Tab(Default one) Delete", function () { + cy.get(Layoutpage.tabDelete).eq(1).click({ force: true }); + cy.wait(1000); + cy.get(Layoutpage.tabWidget) + .contains("Aditya") + .should("have.class", "is-selected"); + // Validates Total Number Of Tabs Displayed In The Property Pane + cy.get(Layoutpage.tabNumber).should("have.text", "2"); + // Validates Total Number Of Tabs Displayed In The Property Pane After Adding A Tab + agHelper.ClickButton("Add tab"); + cy.get(Layoutpage.tabNumber).should("have.text", "3"); + //Validates Total Number Of Tabs Displayed In The Property Pane After Deleting A Tab + cy.get(Layoutpage.tabDelete).eq(1).click({ force: true }); + cy.get(Layoutpage.tabNumber).should("have.text", "2"); + }); + }, +); afterEach(() => { // put your clean up code if any diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Tab_reset_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Tab_reset_spec.js index 14114f1e447d..67e23d35d1e7 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Tab_reset_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Tab_reset_spec.js @@ -4,7 +4,7 @@ import * as _ from "../../../../support/Objects/ObjectsCore"; describe( "Tabs widget resetting", - { tags: ["@tag.Widget", "@tag.Tab"] }, + { tags: ["@tag.Widget", "@tag.Tab", "@tag.Binding"] }, function () { before(() => { _.agHelper.AddDsl("tabsWidgetReset"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/TableBugs_Spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/TableBugs_Spec.ts index 89f9b2db4140..37b6c2e9081f 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/TableBugs_Spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/TableBugs_Spec.ts @@ -5,7 +5,7 @@ import EditorNavigation, { describe( "Verify various Table property bugs", - { tags: ["@tag.Widget", "@tag.Table"] }, + { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, function () { before(() => { _.agHelper.AddDsl("tablev1NewDsl"); @@ -30,33 +30,31 @@ describe( _.deployMode.DeployApp(); //_.table.SelectTableRow(1) - _.table.ReadTableRowColumnData(0, 0).then(($cellData) => { - expect($cellData).to.eq("1376499.jpg"); + expect($cellData).contains("cube-logo_S50__hLNq.jpeg"); }); _.table.ReadTableRowColumnData(1, 0).then(($cellData) => { - expect($cellData).to.eq("https://wallpaperaccess.com/full/1688623.jpg"); + expect($cellData).to.eq( + "https://docs.appsmith.com/img/Appsmith-Login-Screen-Shows-SAML.jpg", + ); }); _.table.ReadTableRowColumnData(2, 0).then(($cellData) => { - expect($cellData).to.eq("2117775.jpg"); + expect($cellData).contains("zapier-logo_odZ9wZQ3vY.jpeg"); }); _.table.ReadTableRowColumnData(3, 0).then(($cellData) => { - expect($cellData).to.eq("https://wallpaperaccess.com/full/812632.jpg"); + expect($cellData).to.eq( + "https://docs.appsmith.com/img/replyto-logo_6yaZHFIeU.jpeg", + ); }); _.table.AssertURLColumnNavigation( 0, 0, - "https://wallpaperaccess.com/full/1376499.jpg", + "https://docs.appsmith.com/img/cube-logo_S50__hLNq.jpeg", ); - // _.table.AssertURLColumnNavigation( - // 3, - // 0, - // "https://wallpaperaccess.com/full/812632.jpg", - // ); _.deployMode.NavigateBacktoEditor(); }); @@ -73,31 +71,30 @@ describe( _.deployMode.DeployApp(); _.table.ReadTableRowColumnData(0, 0).then(($cellData) => { - expect($cellData).to.eq("1376499.jpg"); + expect($cellData).contains("cube-logo_S50__hLNq.jpeg"); }); _.table.ReadTableRowColumnData(1, 0).then(($cellData) => { - expect($cellData).to.eq("https://wallpaperaccess.com/full/1688623.jpg"); + expect($cellData).to.eq( + "https://docs.appsmith.com/img/Appsmith-Login-Screen-Shows-SAML.jpg", + ); }); _.table.ReadTableRowColumnData(2, 0).then(($cellData) => { - expect($cellData).to.eq("2117775.jpg"); + expect($cellData).contains("zapier-logo_odZ9wZQ3vY.jpeg"); }); _.table.ReadTableRowColumnData(3, 0).then(($cellData) => { - expect($cellData).to.eq("https://wallpaperaccess.com/full/812632.jpg"); + expect($cellData).to.eq( + "https://docs.appsmith.com/img/replyto-logo_6yaZHFIeU.jpeg", + ); }); _.table.AssertURLColumnNavigation( 1, 0, - "https://wallpaperaccess.com/full/1688623.jpg", + "https://docs.appsmith.com/img/Appsmith-Login-Screen-Shows-SAML.jpg", ); - // _.table.AssertURLColumnNavigation( - // 2, - // 0, - // "https://wallpaperaccess.com/full/2117775.jpg", - // ); _.deployMode.NavigateBacktoEditor(); }); @@ -114,31 +111,30 @@ describe( _.deployMode.DeployApp(); _.table.ReadTableRowColumnData(0, 0).then(($cellData) => { - expect($cellData).to.eq("1376499.jpg"); + expect($cellData).contains("cube-logo_S50__hLNq.jpeg"); }); _.table.ReadTableRowColumnData(1, 0).then(($cellData) => { - expect($cellData).to.eq("https://wallpaperaccess.com/full/1688623.jpg"); + expect($cellData).to.eq( + "https://docs.appsmith.com/img/Appsmith-Login-Screen-Shows-SAML.jpg", + ); }); _.table.ReadTableRowColumnData(2, 0).then(($cellData) => { - expect($cellData).to.eq("2117775.jpg"); + expect($cellData).contains("zapier-logo_odZ9wZQ3vY.jpeg"); }); _.table.ReadTableRowColumnData(3, 0).then(($cellData) => { - expect($cellData).to.eq("https://wallpaperaccess.com/full/812632.jpg"); + expect($cellData).to.eq( + "https://docs.appsmith.com/img/replyto-logo_6yaZHFIeU.jpeg", + ); }); _.table.AssertURLColumnNavigation( 0, 0, - "https://wallpaperaccess.com/full/1376499.jpg", + "https://docs.appsmith.com/img/cube-logo_S50__hLNq.jpeg", ); - // _.table.AssertURLColumnNavigation( - // 3, - // 0, - // "https://wallpaperaccess.com/full/812632.jpg", - // ); _.deployMode.NavigateBacktoEditor(); }); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/TableFilter1_1_Spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/TableFilter1_1_Spec.ts index a71a25fcf9fd..6c31e1130c47 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/TableFilter1_1_Spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/TableFilter1_1_Spec.ts @@ -5,7 +5,7 @@ import EditorNavigation, { describe( "Verify various Table_Filter combinations", - { tags: ["@tag.Widget", "@tag.Table"] }, + { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, function () { before(() => { _.agHelper.AddDsl("tablev1NewDsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/TableFilter1_2_Spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/TableFilter1_2_Spec.ts index 94025e4ccc2f..45d0400c73aa 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/TableFilter1_2_Spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/TableFilter1_2_Spec.ts @@ -5,7 +5,7 @@ import EditorNavigation, { describe( "Verify various Table_Filter combinations", - { tags: ["@tag.Widget", "@tag.Table"] }, + { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, function () { before(() => { _.agHelper.AddDsl("tablev1NewDsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/TableFilter2_1_Spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/TableFilter2_1_Spec.ts index c42b8718bc8c..3d56cdaa62ed 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/TableFilter2_1_Spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/TableFilter2_1_Spec.ts @@ -5,7 +5,7 @@ import EditorNavigation, { describe( "Verify various Table_Filter combinations", - { tags: ["@tag.Widget", "@tag.Table"] }, + { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, function () { before(() => { _.agHelper.AddDsl("tablev1NewDsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/TableFilter2_2_Spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/TableFilter2_2_Spec.ts index 877b346348ee..3b281a846e46 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/TableFilter2_2_Spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/TableFilter2_2_Spec.ts @@ -5,7 +5,7 @@ import EditorNavigation, { describe( "Verify various Table_Filter combinations", - { tags: ["@tag.Widget", "@tag.Table"] }, + { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, function () { before(() => { _.agHelper.AddDsl("tablev1NewDsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_Button_Icon_validation_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_Button_Icon_validation_spec.js index e42974f76d31..e222542518fc 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_Button_Icon_validation_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_Button_Icon_validation_spec.js @@ -6,7 +6,7 @@ import * as _ from "../../../../../support/Objects/ObjectsCore"; describe( "Table Widget property pane feature validation", - { tags: ["@tag.Widget", "@tag.Table"] }, + { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, function () { before(() => { _.agHelper.AddDsl("tableNewDsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_Color_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_Color_spec.js index b32233f6c609..5d16abf07734 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_Color_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_Color_spec.js @@ -3,7 +3,7 @@ import * as _ from "../../../../../support/Objects/ObjectsCore"; describe( "Table Widget property pane feature validation", - { tags: ["@tag.Widget", "@tag.Table"] }, + { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, function () { before(() => { _.agHelper.AddDsl("tableNewDsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_Column_Resize_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_Column_Resize_spec.js index b3f62881bc2c..4bae6884bf66 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_Column_Resize_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_Column_Resize_spec.js @@ -3,7 +3,7 @@ import * as _ from "../../../../../support/Objects/ObjectsCore"; describe( "Table Widget Functionality with Hidden and Resized Columns", - { tags: ["@tag.Widget", "@tag.Table"] }, + { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, function () { before(() => { _.agHelper.AddDsl("tableResizedColumnsDsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_Derived_Column_Data_validation_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_Derived_Column_Data_validation_spec.js index 263a55a102d2..8ca5779f33ba 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_Derived_Column_Data_validation_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_Derived_Column_Data_validation_spec.js @@ -13,7 +13,7 @@ import { describe( "Test Create Api and Bind to Table widget", - { tags: ["@tag.Widget", "@tag.Table"] }, + { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, function () { before(() => { agHelper.AddDsl("tableTextPaginationDsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_EmptyRow_Color_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_EmptyRow_Color_spec.js index 380e7b6b4da0..4e618fee9009 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_EmptyRow_Color_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_EmptyRow_Color_spec.js @@ -3,7 +3,7 @@ const commonlocators = require("../../../../../locators/commonlocators.json"); describe( "Table Widget empty row color validation", - { tags: ["@tag.Widget", "@tag.Table"] }, + { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, function () { before(() => { _.agHelper.AddDsl("tableNewDsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_FilteredTableData_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_FilteredTableData_spec.js index 4c4a94024e68..6d5898c59c7c 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_FilteredTableData_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_FilteredTableData_spec.js @@ -10,7 +10,7 @@ const dsl = require("../../../../../fixtures/tableAndTextDsl.json"); describe( "Table Widget Filtered Table data in autocomplete", - { tags: ["@tag.Widget", "@tag.Table"] }, + { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, function () { before(() => { _.agHelper.AddDsl("tableAndTextDsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_GeneralProperty_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_GeneralProperty_spec.js index 092bed9b509c..c12a994ef63e 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_GeneralProperty_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_GeneralProperty_spec.js @@ -7,7 +7,7 @@ import * as _ from "../../../../../support/Objects/ObjectsCore"; describe( "Table Widget property pane feature validation", - { tags: ["@tag.Widget", "@tag.Table"] }, + { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, function () { before(() => { _.agHelper.AddDsl("tableNewDsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_MultiRowSelect_dataUpdation_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_MultiRowSelect_dataUpdation_spec.js index 9bf78ecefb39..2515463b6c58 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_MultiRowSelect_dataUpdation_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_MultiRowSelect_dataUpdation_spec.js @@ -17,7 +17,7 @@ if the primary column value isn't updated. */ describe( "Table Widget row multi select validation", - { tags: ["@tag.Widget", "@tag.Table"] }, + { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, function () { before(() => { agHelper.AddDsl("multiSelectedRowUpdationDsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_MultiRowSelect_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_MultiRowSelect_spec.js index f97940352cb1..ba640223c233 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_MultiRowSelect_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_MultiRowSelect_spec.js @@ -4,7 +4,7 @@ import * as _ from "../../../../../support/Objects/ObjectsCore"; describe( "Table Widget row multi select validation", - { tags: ["@tag.Widget", "@tag.Table"] }, + { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, function () { before(() => { _.agHelper.AddDsl("tableNewDsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_Number_column_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_Number_column_spec.js index 74722e5c1019..05da815adf2c 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_Number_column_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_Number_column_spec.js @@ -3,7 +3,7 @@ import * as _ from "../../../../../support/Objects/ObjectsCore"; describe( "Validate Table Widget Table data", - { tags: ["@tag.Widget", "@tag.Table"] }, + { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, function () { before(() => { _.agHelper.AddDsl("basicNumberDataTableDsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_PropertyPane_1_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_PropertyPane_1_spec.js index b0bf0d75d33d..444225153534 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_PropertyPane_1_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_PropertyPane_1_spec.js @@ -5,7 +5,7 @@ import * as _ from "../../../../../support/Objects/ObjectsCore"; describe( "Table Widget property pane feature validation", - { tags: ["@tag.Widget", "@tag.Table"] }, + { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, function () { before(() => { _.agHelper.AddDsl("tableNewDslWithPagination"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_PropertyPane_2_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_PropertyPane_2_spec.js index 3baf77db5d8a..30f565309753 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_PropertyPane_2_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_PropertyPane_2_spec.js @@ -9,7 +9,7 @@ import { describe( "Table Widget property pane feature validation", - { tags: ["@tag.Widget", "@tag.Table"] }, + { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, function () { before(() => { agHelper.AddDsl("tableNewDslWithPagination"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_PropertyPane_IconName_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_PropertyPane_IconName_spec.js index 0d4b64f35108..d8297951f0fe 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_PropertyPane_IconName_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_PropertyPane_IconName_spec.js @@ -3,7 +3,7 @@ import * as _ from "../../../../../support/Objects/ObjectsCore"; describe( "Table Widget property pane feature validation", - { tags: ["@tag.Widget", "@tag.Table"] }, + { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, function () { before(() => { _.agHelper.AddDsl("tableNewDslWithPagination"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_Property_JsonUpdate_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_Property_JsonUpdate_spec.js index fcf836a308c3..e20ef0227328 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_Property_JsonUpdate_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_Property_JsonUpdate_spec.js @@ -7,7 +7,7 @@ import * as _ from "../../../../../support/Objects/ObjectsCore"; describe( "Test Create Api and Bind to Table widget", - { tags: ["@tag.Widget", "@tag.Table"] }, + { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, function () { before(() => { _.agHelper.AddDsl("tableTextPaginationDsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_Switch_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_Switch_spec.js index 6e5a05019f43..c76445ff7f1c 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_Switch_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_Switch_spec.js @@ -3,7 +3,7 @@ import * as _ from "../../../../../support/Objects/ObjectsCore"; describe( "Table Widget and Switch binding Functionality", - { tags: ["@tag.Widget", "@tag.Table"] }, + { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, function () { before(() => { _.agHelper.AddDsl("swtchTableDsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_Widget_Add_button_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_Widget_Add_button_spec.js index c182f1b9d64c..ad7030e17bd5 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_Widget_Add_button_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_Widget_Add_button_spec.js @@ -5,7 +5,7 @@ const testdata = require("../../../../../fixtures/testdata.json"); describe( "Table Widget property pane feature validation", - { tags: ["@tag.Widget", "@tag.Table"] }, + { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, function () { before(() => { agHelper.AddDsl("tableNewDsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_Widget_Copy_Paste_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_Widget_Copy_Paste_spec.js index 687d25133b9b..eb520e19fb6f 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_Widget_Copy_Paste_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_Widget_Copy_Paste_spec.js @@ -13,7 +13,7 @@ import { describe( "Test Suite to validate copy/paste table Widget", - { tags: ["@tag.Widget", "@tag.Table"] }, + { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, function () { before(() => { agHelper.AddDsl("tableNewDsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_Widget_Default_Row_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_Widget_Default_Row_spec.js index 6fa76ba2f1fe..7a73959022fa 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_Widget_Default_Row_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_Widget_Default_Row_spec.js @@ -5,7 +5,7 @@ import EditorNavigation, { describe( "Table Widget property pane deafult feature validation", - { tags: ["@tag.Widget", "@tag.Table"] }, + { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, function () { before(() => { _.agHelper.AddDsl("defaultTableDsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_Widget_Derived_Column_Computed_value_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_Widget_Derived_Column_Computed_value_spec.js index dd23e314ebcb..6bc2f08ebf7a 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_Widget_Derived_Column_Computed_value_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_Widget_Derived_Column_Computed_value_spec.js @@ -3,7 +3,7 @@ const testdata = require("../../../../../fixtures/testdata.json"); describe( "Table Widget property pane feature validation", - { tags: ["@tag.Widget", "@tag.Table"] }, + { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, function () { before(() => { _.agHelper.AddDsl("tableNewDsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_Widget_Selected_row_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_Widget_Selected_row_spec.js index def8bfdd59c9..8d3c2ccc5d3f 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_Widget_Selected_row_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_Widget_Selected_row_spec.js @@ -2,7 +2,7 @@ import * as _ from "../../../../../support/Objects/ObjectsCore"; describe( "Table Widget property pane feature validation", - { tags: ["@tag.Widget", "@tag.Table"] }, + { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, function () { before(() => { _.agHelper.AddDsl("tableAndTextDsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_spec.js index ea0fa9163df8..3ecac68fe13f 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_spec.js @@ -5,7 +5,7 @@ import * as _ from "../../../../../support/Objects/ObjectsCore"; describe( "Table Widget Functionality", - { tags: ["@tag.Widget", "@tag.Table"] }, + { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, function () { before(() => { _.agHelper.AddDsl("tableWidgetDsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_tabledata_schema_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_tabledata_schema_spec.js index 8ed30919dfb7..f91d34a5317f 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_tabledata_schema_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_tabledata_schema_spec.js @@ -5,47 +5,51 @@ import { import * as _ from "../../../../../support/Objects/ObjectsCore"; -describe("Table Widget", { tags: ["@tag.Widget", "@tag.Table"] }, function () { - before(() => { - _.agHelper.AddDsl("tableNewDsl"); - }); - it("1. Table Widget Functionality To Check with changing schema of tabledata", () => { - let jsContext = `{{Switch1.isSwitchedOn?[{name: "joe"}]:[{employee_name: "john"}];}}`; - cy.wait(5000); - cy.dragAndDropToCanvas("switchwidget", { x: 200, y: 200 }); - cy.wait(2000); - cy.openPropertyPane("tablewidget"); - cy.get(".t--property-control-tabledata").then(($el) => { - cy.updateCodeInput($el, jsContext); +describe( + "Table Widget", + { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, + function () { + before(() => { + _.agHelper.AddDsl("tableNewDsl"); }); - _.deployMode.DeployApp(); - cy.getTableDataSelector("0", "0").then((element) => { - cy.get(element).should("be.visible"); + it("1. Table Widget Functionality To Check with changing schema of tabledata", () => { + let jsContext = `{{Switch1.isSwitchedOn?[{name: "joe"}]:[{employee_name: "john"}];}}`; + cy.wait(5000); + cy.dragAndDropToCanvas("switchwidget", { x: 200, y: 200 }); + cy.wait(2000); + cy.openPropertyPane("tablewidget"); + cy.get(".t--property-control-tabledata").then(($el) => { + cy.updateCodeInput($el, jsContext); + }); + _.deployMode.DeployApp(); + cy.getTableDataSelector("0", "0").then((element) => { + cy.get(element).should("be.visible"); + }); + cy.readTabledataPublish("0", "0").then((value) => { + expect(value).to.be.equal("joe"); + }); + cy.get(".t--switch-widget-active").first().click(); + cy.get(".t--widget-tablewidget").scrollIntoView(); + cy.wait(1000); + cy.getTableDataSelector("0", "0").then((element) => { + cy.get(element).should("be.visible"); + }); + cy.readTabledataPublish("0", "0").then((value) => { + expect(value).to.be.equal("john"); + }); + cy.get(".t--switch-widget-inactive").first().click(); + cy.wait(1000); + cy.get(".t--widget-tablewidget").scrollIntoView(); + cy.getTableDataSelector("0", "0").then((element) => { + cy.get(element).should("be.visible"); + }); + cy.readTabledataPublish("0", "0").then((value) => { + expect(value).to.be.equal("joe"); + }); + _.deployMode.NavigateBacktoEditor(); + PageLeftPane.switchSegment(PagePaneSegment.UI); + _.entityExplorer.DeleteWidgetFromEntityExplorer("Switch1"); + _.entityExplorer.DeleteWidgetFromEntityExplorer("Table1"); }); - cy.readTabledataPublish("0", "0").then((value) => { - expect(value).to.be.equal("joe"); - }); - cy.get(".t--switch-widget-active").first().click(); - cy.get(".t--widget-tablewidget").scrollIntoView(); - cy.wait(1000); - cy.getTableDataSelector("0", "0").then((element) => { - cy.get(element).should("be.visible"); - }); - cy.readTabledataPublish("0", "0").then((value) => { - expect(value).to.be.equal("john"); - }); - cy.get(".t--switch-widget-inactive").first().click(); - cy.wait(1000); - cy.get(".t--widget-tablewidget").scrollIntoView(); - cy.getTableDataSelector("0", "0").then((element) => { - cy.get(element).should("be.visible"); - }); - cy.readTabledataPublish("0", "0").then((value) => { - expect(value).to.be.equal("joe"); - }); - _.deployMode.NavigateBacktoEditor(); - PageLeftPane.switchSegment(PagePaneSegment.UI); - _.entityExplorer.DeleteWidgetFromEntityExplorer("Switch1"); - _.entityExplorer.DeleteWidgetFromEntityExplorer("Table1"); - }); -}); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/table_with_text_no_2dArray_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/table_with_text_no_2dArray_spec.js index 374631ebe8cd..67c03653ff71 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/table_with_text_no_2dArray_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/table_with_text_no_2dArray_spec.js @@ -4,7 +4,7 @@ import { seconds, testTimeout } from "../../../../../support/timeout"; describe( "Table widget edge case scenario testing", - { tags: ["@tag.Widget", "@tag.Table"] }, + { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, function () { before(() => { _.agHelper.AddDsl("tableWithTextWidgetDsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/table_with_text_selRowIndices_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/table_with_text_selRowIndices_spec.js index c7f153bd5be1..f79c2e83490f 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/table_with_text_selRowIndices_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/table_with_text_selRowIndices_spec.js @@ -4,7 +4,7 @@ import * as _ from "../../../../../support/Objects/ObjectsCore"; describe( "Table widget edge case scenario testing", - { tags: ["@tag.Widget", "@tag.Table"] }, + { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, function () { before(() => { _.agHelper.AddDsl("tableWithTextWidgetDsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/AddNewRow1_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/AddNewRow1_spec.js index d3e05b789db0..ac1fb9c58557 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/AddNewRow1_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/AddNewRow1_spec.js @@ -3,11 +3,14 @@ import { propPane, table, } from "../../../../../support/Objects/ObjectsCore"; +import EditorNavigation, { + EntityType, +} from "../../../../../support/Pages/EditorNavigation"; const commonlocators = require("../../../../../locators/commonlocators.json"); describe( "Basic flow ", - { tags: ["@tag.Widget", "@tag.Table", "@tag.Sanity"] }, + { tags: ["@tag.Widget", "@tag.Table", "@tag.Sanity", "@tag.Binding"] }, () => { before(() => { agHelper.RestoreLocalStorageCache(); @@ -16,6 +19,7 @@ describe( it("1.1. should test that allow Add new row property is present", () => { cy.openPropertyPane("tablewidgetv2"); + propPane.ExpandIfCollapsedSection("addingarow"); cy.get(".t--property-control-allowaddingarow").should("exist"); cy.get(".t--property-control-allowaddingarow input").should("exist"); cy.get(".t--add-new-row").should("not.exist"); @@ -150,7 +154,12 @@ describe( it("1.7. should not hide the header section when add new row button is enabled and another header element is disabled", () => { cy.get(".t--discard-new-row").click({ force: true }); + EditorNavigation.SelectEntityByName("Table1", EntityType.Widget); //disable all header widgets for the table + propPane.ExpandIfCollapsedSection("general"); + propPane.ExpandIfCollapsedSection("addingarow"); + propPane.ExpandIfCollapsedSection("search\\&filters"); + propPane.ExpandIfCollapsedSection("pagination"); [ "Show pagination", "Allow searching", diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/AddNewRow2_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/AddNewRow2_spec.js index 23508651c00a..e6e3e81ac3d9 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/AddNewRow2_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/AddNewRow2_spec.js @@ -3,7 +3,7 @@ const commonlocators = require("../../../../../locators/commonlocators.json"); describe( "Validation flow", - { tags: ["@tag.Widget", "@tag.Table", "@tag.Sanity"] }, + { tags: ["@tag.Widget", "@tag.Table", "@tag.Sanity", "@tag.Binding"] }, () => { before(() => { cy.startServerAndRoutes(); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/AddNewRow3_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/AddNewRow3_spec.js index e6a161c1bb28..2a55cf9a3ea7 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/AddNewRow3_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/AddNewRow3_spec.js @@ -3,7 +3,7 @@ const widgetsPage = require("../../../../../locators/Widgets.json"); describe( "Actions flow (save, discard)", - { tags: ["@tag.Widget", "@tag.Table", "@tag.Sanity"] }, + { tags: ["@tag.Widget", "@tag.Table", "@tag.Sanity", "@tag.Binding"] }, () => { before(() => { cy.startServerAndRoutes(); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/Custom_column_alias_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/Custom_column_alias_spec.js index f7e579b36499..1fb746c0d469 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/Custom_column_alias_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/Custom_column_alias_spec.js @@ -14,7 +14,7 @@ const data = [ describe( "Custom column alias functionality", - { tags: ["@tag.Widget", "@tag.Table"] }, + { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, () => { before(() => { _.agHelper.AddDsl("tableV2NewDsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/Date_column_editing_1_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/Date_column_editing_1_spec.ts index 3a0614e7db0d..243e4282ff07 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/Date_column_editing_1_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/Date_column_editing_1_spec.ts @@ -11,7 +11,7 @@ import EditorNavigation, { describe( "Table widget date column inline editing functionality", - { tags: ["@tag.Widget", "@tag.Table"] }, + { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, () => { before(() => { agHelper.AddDsl("Table/DateCellEditingDSL"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/Date_column_editing_2_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/Date_column_editing_2_spec.ts index 50728d23c913..87a0578ba434 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/Date_column_editing_2_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/Date_column_editing_2_spec.ts @@ -13,7 +13,7 @@ import EditorNavigation, { describe( "Table widget date column inline editing functionality", - { tags: ["@tag.Widget", "@tag.Table"] }, + { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, () => { before(() => { agHelper.AddDsl("Table/DateCellEditingDSL"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/Date_column_types_validation_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/Date_column_types_validation_spec.ts index 0ce8bc321a35..312ebb7c946e 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/Date_column_types_validation_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/Date_column_types_validation_spec.ts @@ -43,17 +43,16 @@ describe( // Click unix cell edit table.ClickOnEditIcon(row, column); - // Click on specific date within + // Click on a specific date within the view port of the date picker + // Date picker opens in september 2024 due to the Table data set agHelper.GetNClick( - `${table._dateInputPopover} [aria-label='${table.getFormattedTomorrowDates().verboseFormat}']`, + `${table._dateInputPopover} [aria-label='Thu Sep 26 2024']`, ); - // Check that date is set in column + // Check that the date is set in column table .ReadTableRowColumnData(row, column, "v2") - .then((val) => - expect(val).to.equal(table.getFormattedTomorrowDates().isoFormat), - ); + .then((val) => expect(val).to.equal("2024-09-26")); }; it("1. should allow inline editing of Unix Timestamp in seconds (unix/s)", () => { diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/Edge_case_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/Edge_case_spec.js index 7a5d288e3b4c..36b3cdf7713b 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/Edge_case_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/Edge_case_spec.js @@ -6,14 +6,13 @@ const widgetsPage = require("../../../../../locators/Widgets.json"); const commonlocators = require("../../../../../locators/commonlocators.json"); import { agHelper, - entityExplorer, propPane, table, } from "../../../../../support/Objects/ObjectsCore"; describe( "Table widget v2 edge case scenario testing", - { tags: ["@tag.Widget", "@tag.Table"] }, + { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, function () { afterEach(() => { agHelper.SaveLocalStorageCache(); @@ -26,6 +25,7 @@ describe( it("1. Check if the selectedRowIndices does not contain 2d array", function () { EditorNavigation.SelectEntityByName("Table1", EntityType.Widget); + propPane.ExpandIfCollapsedSection("rowselection"); propPane.TogglePropertyState("Enable multi-row selection", "On"); //Enable Multi row select propPane.UpdatePropertyFieldValue("Default selected rows", "[1]"); //Change the value of default selected row diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/Image_resize_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/Image_resize_spec.js index 12684c40e2bd..76b20ebdd7fe 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/Image_resize_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/Image_resize_spec.js @@ -2,7 +2,7 @@ import * as _ from "../../../../../support/Objects/ObjectsCore"; describe( "Table Widget Image Resize feature validation", - { tags: ["@tag.Widget", "@tag.Table"] }, + { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, function () { before(() => { _.agHelper.AddDsl("Table/ImageResizeDSL"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/Inline_editing_1_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/Inline_editing_1_spec.js index 42cd834ce6ed..08caa2414af7 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/Inline_editing_1_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/Inline_editing_1_spec.js @@ -3,7 +3,7 @@ import { agHelper, table } from "../../../../../support/Objects/ObjectsCore"; describe( "Table widget inline editing functionality", - { tags: ["@tag.Widget", "@tag.Table"] }, + { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, () => { afterEach(() => { agHelper.SaveLocalStorageCache(); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/Inline_editing_2_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/Inline_editing_2_spec.js index 6336b7f58b0e..fd2d3c3c7492 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/Inline_editing_2_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/Inline_editing_2_spec.js @@ -15,7 +15,7 @@ const publish = require("../../../../../locators/publishWidgetspage.json"); describe( "Table widget inline editing functionality", - { tags: ["@tag.Widget", "@tag.Table"] }, + { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, () => { afterEach(() => { agHelper.SaveLocalStorageCache(); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/Inline_editing_3_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/Inline_editing_3_spec.js index 40da3f138e35..e0051272f930 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/Inline_editing_3_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/Inline_editing_3_spec.js @@ -4,12 +4,13 @@ import { agHelper, table as tableHelper, propPane, + locators, } from "../../../../../support/Objects/ObjectsCore"; import { PROPERTY_SELECTOR } from "../../../../../locators/WidgetLocators"; describe( "Table widget inline editing functionality", - { tags: ["@tag.Widget", "@tag.Table"] }, + { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, () => { afterEach(() => { agHelper.SaveLocalStorageCache(); @@ -148,10 +149,16 @@ describe( cy.editTableCell(0, 0); cy.enterTableCellValue(0, 0, "newValue"); cy.saveTableCellValue(0, 0); - cy.get(".t--widget-textwidget .bp3-ui-text").should( - "contain", - `[ { "index": 0, "updatedFields": { "step": "newValue" }, "allFields": { "step": "newValue", "task": "Drop a table", "status": "✅" } }]`, - ); + const exected = [ + { + index: 0, + updatedFields: { step: "newValue" }, + allFields: { step: "newValue", task: "Drop a table", status: "✅" }, + }, + ]; + agHelper + .GetText(locators._textWidget, "text") + .should((text) => expect(JSON.parse(text)).to.deep.equal(exected)); cy.openPropertyPane("textwidget"); cy.updateCodeInput( ".t--property-control-text", diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/Pagesize_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/Pagesize_spec.ts index d29b6575889a..e446d5e6196e 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/Pagesize_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/Pagesize_spec.ts @@ -4,7 +4,7 @@ import PageList from "../../../../../support/Pages/PageList"; describe( "Table widget v2", - { tags: ["@tag.Widget", "@tag.Table"] }, + { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, function () { it("1. should test that pageSize is computed properly for all the row sizes", function () { PageList.AddNewPage(); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2Filter1_1_Spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2Filter1_1_Spec.ts index 142401c067c9..c2048dbf6cd8 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2Filter1_1_Spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2Filter1_1_Spec.ts @@ -1,14 +1,13 @@ import { demoTableDataForSelect } from "../../../../../fixtures/Table/DemoTableData"; -import { featureFlagIntercept } from "../../../../../support/Objects/FeatureFlags"; import { + agHelper, + assertHelper, + deployMode, + draggableWidgets, entityExplorer, + locators, propPane, - deployMode, table, - assertHelper, - locators, - draggableWidgets, - agHelper, } from "../../../../../support/Objects/ObjectsCore"; import EditorNavigation, { EntityType, @@ -16,12 +15,13 @@ import EditorNavigation, { describe( "Verify various Table_Filter combinations", - { tags: ["@tag.Widget", "@tag.Table"] }, + { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, function () { it("1. Adding Data to Table Widget", function () { entityExplorer.DragDropWidgetNVerify("tablewidgetv2", 650, 250); //propPane.EnterJSContext("Table data", JSON.stringify(this.dataSet.TableInput)); // turn on filtering for the table - it is disabled by default in this PR(#34593) + propPane.ExpandIfCollapsedSection("search\\&filters"); agHelper.GetNClick(".t--property-control-allowfiltering input"); table.AddSampleTableData(); //propPane.EnterJSContext("Table Data", JSON.stringify(this.dataSet.TableInput)); @@ -144,9 +144,6 @@ describe( it("11. Verify table search includes label and value for table with select column type", () => { deployMode.NavigateBacktoEditor(); - // This flag is turned on to allow the label show in the table select cell content - // when this feature is turned on fully, this flag will be removed - featureFlagIntercept({ release_table_cell_label_value_enabled: true }); EditorNavigation.SelectEntityByName("Table1", EntityType.Widget); propPane.EnterJSContext("Table data", demoTableDataForSelect); @@ -174,13 +171,16 @@ describe( expect(afterSearch).to.eq("Software Engineer"); }); table.RemoveSearchTextNVerify("1", "v2"); + }); - // Search for a value in the table - table.SearchTable("20"); - table.ReadTableRowColumnData(0, 2, "v2").then((afterSearch) => { - expect(afterSearch).to.eq("Product Manager"); + it("12. Verify table filter for select column type", function () { + table.OpenNFilterTable("role", "is exactly", "Product Manager"); + table.ReadTableRowColumnData(0, 2, "v2").then(($cellData) => { + expect($cellData).to.eq("Product Manager"); + }); + table.ReadTableRowColumnData(1, 2, "v2").then(($cellData) => { + expect($cellData).to.eq("Product Manager"); }); - table.RemoveSearchTextNVerify("1", "v2"); }); }, ); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2Filter1_2_Spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2Filter1_2_Spec.ts index c9a9ea98b721..6832cb146a55 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2Filter1_2_Spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2Filter1_2_Spec.ts @@ -11,11 +11,12 @@ import { describe( "Verify various Table_Filter combinations", - { tags: ["@tag.Widget", "@tag.Table"] }, + { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, function () { it("1. Verify Table Filter for 'empty'", function () { entityExplorer.DragDropWidgetNVerify("tablewidgetv2", 650, 250); // turn on filtering for the table - it is disabled by default in this PR(#34593) + propPane.ExpandIfCollapsedSection("search\\&filters"); agHelper.GetNClick(".t--property-control-allowfiltering input"); table.AddSampleTableData(); propPane.UpdatePropertyFieldValue( diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2Filter2_1_Spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2Filter2_1_Spec.ts index 1c733733fd7e..4d0d311580c7 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2Filter2_1_Spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2Filter2_1_Spec.ts @@ -11,12 +11,13 @@ import { describe( "Verify various Table_Filter combinations", - { tags: ["@tag.Widget", "@tag.Table"] }, + { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, function () { it("1. Adding Data to Table Widget", function () { entityExplorer.DragDropWidgetNVerify("tablewidgetv2", 650, 250); //propPane.EnterJSContext("Table data", JSON.stringify(this.dataSet.TableInput)); // turn on filtering for the table - it is disabled by default in this PR(#34593) + propPane.ExpandIfCollapsedSection("search\\&filters"); agHelper.GetNClick(".t--property-control-allowfiltering input"); table.AddSampleTableData(); //propPane.EnterJSContext("Table Data", JSON.stringify(this.dataSet.TableInput)); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2Filter2_2_Spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2Filter2_2_Spec.ts index c431157de632..d6290210bf01 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2Filter2_2_Spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2Filter2_2_Spec.ts @@ -12,11 +12,12 @@ import { describe( "Verify various Table_Filter combinations", - { tags: ["@tag.Widget", "@tag.Table"] }, + { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, function () { it("1. Verify Full table data - download csv and download Excel", function () { entityExplorer.DragDropWidgetNVerify("tablewidgetv2", 650, 250); // turn on filtering for the table - it is disabled by default in this PR(#34593) + propPane.ExpandIfCollapsedSection("search\\&filters"); agHelper.GetNClick(".t--property-control-allowfiltering input"); table.AddSampleTableData(); propPane.UpdatePropertyFieldValue( diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_Button_Icon_validation_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_Button_Icon_validation_spec.js index 67dc52209533..c97520738f5a 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_Button_Icon_validation_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_Button_Icon_validation_spec.js @@ -6,7 +6,7 @@ import * as _ from "../../../../../support/Objects/ObjectsCore"; describe( "Table Widget V2 property pane feature validation", - { tags: ["@tag.Widget", "@tag.Table"] }, + { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, function () { before(() => { _.agHelper.AddDsl("tableV2NewDsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_Color_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_Color_spec.js index 17bcc5fab18e..104d1313653a 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_Color_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_Color_spec.js @@ -3,7 +3,7 @@ import * as _ from "../../../../../support/Objects/ObjectsCore"; describe( "Table Widget V2 property pane feature validation", - { tags: ["@tag.Widget", "@tag.Table"] }, + { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, function () { beforeEach(() => { _.agHelper.RestoreLocalStorageCache(); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_Column_Order_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_Column_Order_spec.js index 9f783de0e87a..d1a25264f1e5 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_Column_Order_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_Column_Order_spec.js @@ -3,7 +3,7 @@ import * as _ from "../../../../../support/Objects/ObjectsCore"; describe( "Table Widget V2 column order maintained on column change validation", - { tags: ["@tag.Widget", "@tag.Table"] }, + { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, function () { before(() => { _.agHelper.AddDsl("tableV2ColumnOrderDsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_Column_Resize_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_Column_Resize_spec.js index d36e05be8566..ead4a3dead09 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_Column_Resize_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_Column_Resize_spec.js @@ -3,7 +3,7 @@ import * as _ from "../../../../../support/Objects/ObjectsCore"; describe( "Table Widget V2 Functionality with Hidden and Resized Columns", - { tags: ["@tag.Widget", "@tag.Table"] }, + { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, function () { before(() => { _.agHelper.AddDsl("tableV2ResizedColumnsDsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_Derived_Column_Data_validation_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_Derived_Column_Data_validation_spec.js index 82d2f3a93e4a..0a56162c813a 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_Derived_Column_Data_validation_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_Derived_Column_Data_validation_spec.js @@ -13,7 +13,7 @@ import { describe( "Test Create Api and Bind to Table widget", - { tags: ["@tag.Widget", "@tag.Table"] }, + { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, function () { before(() => { agHelper.AddDsl("tableV2TextPaginationDsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_DisplayText_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_DisplayText_spec.ts index 4bd11a80cd2e..9b51a872dd23 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_DisplayText_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_DisplayText_spec.ts @@ -23,11 +23,12 @@ const data = [ describe( "Table V2 sort & filter using display text functionality", - { tags: ["@tag.Widget", "@tag.Table"] }, + { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, () => { before(() => { entityExplorer.DragDropWidgetNVerify("tablewidgetv2", 650, 250); // turn on filtering for the table - it is disabled by default in this PR(#34593) + propPane.ExpandIfCollapsedSection("search\\&filters"); agHelper.GetNClick(".t--property-control-allowfiltering input"); propPane.EnterJSContext("Table data", JSON.stringify(data)); assertHelper.AssertNetworkStatus("@updateLayout"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_FilteredTableData_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_FilteredTableData_spec.ts index 8a0a2cdaba04..79969e09ae52 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_FilteredTableData_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_FilteredTableData_spec.ts @@ -19,7 +19,7 @@ import { describe( "Table Widget V2 Filtered Table data in autocomplete", - { tags: ["@tag.Widget", "@tag.Table", "@tag.Sanity"] }, + { tags: ["@tag.Widget", "@tag.Table", "@tag.Sanity", "@tag.Binding"] }, function () { before("Table Widget V2 Functionality", () => { agHelper.AddDsl("tableV2AndTextDsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_GeneralProperty_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_GeneralProperty_spec.js index ea9ad97ea212..7e5df3cf0ad9 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_GeneralProperty_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_GeneralProperty_spec.js @@ -11,7 +11,7 @@ import { describe( "Table Widget property pane feature validation", - { tags: ["@tag.Widget", "@tag.Table"] }, + { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, function () { before(() => { agHelper.AddDsl("tableV2NewDsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_MultiRowSelect_dataUpdation_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_MultiRowSelect_dataUpdation_spec.js index 6056b97cb510..63c40532cc9d 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_MultiRowSelect_dataUpdation_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_MultiRowSelect_dataUpdation_spec.js @@ -7,7 +7,7 @@ if the primary column value isn't updated. */ describe( "Table Widget V2 row multi select validation", - { tags: ["@tag.Widget", "@tag.Table"] }, + { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, function () { before(() => { _.agHelper.AddDsl("multiSelectedRowUpdationTableV2Dsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_MultiRowSelect_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_MultiRowSelect_spec.js index a0ae9da141d5..ac3e84f41c62 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_MultiRowSelect_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_MultiRowSelect_spec.js @@ -4,7 +4,7 @@ const commonlocators = require("../../../../../locators/commonlocators.json"); describe( "Table Widget V2 row multi select validation", - { tags: ["@tag.Widget", "@tag.Table"] }, + { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, function () { before(() => { _.agHelper.AddDsl("tableV2NewDsl"); @@ -12,6 +12,7 @@ describe( it("1. Test multi select column shows when enable Multirowselection is true", function () { cy.openPropertyPane("tablewidgetv2"); + _.propPane.ExpandIfCollapsedSection("rowselection"); cy.get(widgetsPage.toggleEnableMultirowselection) .first() .click({ force: true }); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_PropertyPane_1_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_PropertyPane_1_spec.js index 8711ea6bf077..39ee101dd4a2 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_PropertyPane_1_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_PropertyPane_1_spec.js @@ -17,7 +17,7 @@ const emptyTableColumnNameData = require("../../../../../fixtures/TableWidgetDat describe( "Table Widget V2 property pane feature validation", - { tags: ["@tag.Widget", "@tag.Table"] }, + { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, function () { before(() => { agHelper.AddDsl("tableV2NewDslWithPagination"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_PropertyPane_2_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_PropertyPane_2_spec.js index 0c73fae21be2..0adedc400137 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_PropertyPane_2_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_PropertyPane_2_spec.js @@ -10,7 +10,7 @@ const widgetsPage = require("../../../../../locators/Widgets.json"); describe( "Table Widget V2 property pane feature validation", - { tags: ["@tag.Widget", "@tag.Table"] }, + { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, function () { before(() => { agHelper.AddDsl("tableV2NewDslWithPagination"); @@ -62,6 +62,7 @@ describe( cy.moveToContentTab(); // Chage deat search text value to "data" cy.backFromPropertyPanel(); + propPane.ExpandIfCollapsedSection("search\\&filters"); cy.testJsontext("defaultsearchtext", "data"); deployMode.DeployApp(locators._widgetInDeployed(draggableWidgets.TABLE)); table.WaitForTableEmpty("v2"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_PropertyPane_IconName_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_PropertyPane_IconName_spec.js index 872098e63a5d..1931c0875985 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_PropertyPane_IconName_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_PropertyPane_IconName_spec.js @@ -3,7 +3,7 @@ import * as _ from "../../../../../support/Objects/ObjectsCore"; describe( "Table Widget property pane feature validation", - { tags: ["@tag.Widget", "@tag.Table"] }, + { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, function () { before(() => { _.agHelper.AddDsl("tableV2NewDslWithPagination"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_Property_JsonUpdate_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_Property_JsonUpdate_spec.js index 1ca0b4bcc39b..21a4d635bd11 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_Property_JsonUpdate_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_Property_JsonUpdate_spec.js @@ -8,7 +8,7 @@ import * as _ from "../../../../../support/Objects/ObjectsCore"; describe( "Test Create Api and Bind to Table widget V2", - { tags: ["@tag.Widget", "@tag.Table"] }, + { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, () => { before("Create an API and Execute the API and bind with Table V", () => { _.agHelper.AddDsl("tableV2TextPaginationDsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_Sorting_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_Sorting_spec.js index facb855e7968..00875ea51c2b 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_Sorting_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_Sorting_spec.js @@ -1,8 +1,7 @@ -import { featureFlagIntercept } from "../../../../../support/Objects/FeatureFlags"; import * as _ from "../../../../../support/Objects/ObjectsCore"; +import PageList from "../../../../../support/Pages/PageList"; const testdata = require("../../../../../fixtures/testdata.json"); const commonlocators = require("../../../../../locators/commonlocators.json"); -import PageList from "../../../../../support/Pages/PageList"; const demoTableData = ` {{ @@ -53,7 +52,7 @@ const demoTableData = ` describe( "Table Widget V2 Sorting", - { tags: ["@tag.Widget", "@tag.Table"] }, + { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, function () { beforeEach(() => { PageList.AddNewPage(); @@ -117,9 +116,6 @@ describe( }); it("2. Verifies that default sorting works for a select column using the value property", function () { - // This flag is turned on to allow the label show in the table select cell content - // when this feature is turned on fully, this flag will be removed - featureFlagIntercept({ release_table_cell_label_value_enabled: true }); cy.dragAndDropToCanvas("tablewidgetv2", { x: 350, y: 500 }); _.propPane.EnterJSContext("Table data", demoTableData); @@ -169,9 +165,6 @@ describe( }); it("3. Verifies that sorting works for the select column type when sortBy is set to label", function () { - // This flag is turned on to allow the label show in the table select cell content - // when this feature is turned on fully, this flag will be removed - featureFlagIntercept({ release_table_cell_label_value_enabled: true }); cy.dragAndDropToCanvas("tablewidgetv2", { x: 350, y: 500 }); _.propPane.EnterJSContext("Table data", demoTableData); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_Switch_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_Switch_spec.js index 9feab8eeb3ea..dfbdb4f4e520 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_Switch_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_Switch_spec.js @@ -3,7 +3,7 @@ import * as _ from "../../../../../support/Objects/ObjectsCore"; describe( "Table Widget V2 and Switch binding Functionality", - { tags: ["@tag.Widget", "@tag.Table"] }, + { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, function () { before(() => { _.agHelper.AddDsl("swtchTableV2Dsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_Url_Column_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_Url_Column_spec.ts index 86497769e65b..e906d531598b 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_Url_Column_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_Url_Column_spec.ts @@ -6,7 +6,7 @@ import { describe( "16108 - Verify Table URL column bugs", - { tags: ["@tag.Widget", "@tag.Table"] }, + { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, function () { before(() => { agHelper.AddDsl("tableV2WithUrlColumnDsl"); @@ -20,18 +20,23 @@ describe( table.ReadTableRowColumnData(3, 0, "v2").then(($cellData) => { expect($cellData).to.eq("Profile pic"); }); - table.AssertURLColumnNavigation( - 0, - 0, - "https://randomuser.me/api/portraits/med/women/39.jpg", - "v2", - ); - table.AssertURLColumnNavigation( - 3, - 0, - "https://randomuser.me/api/portraits/med/men/52.jpg", - "v2", - ); + + agHelper + .GetElement(`${table._tableRowColumnData(0, 0, "v2")} a`) + .should( + "have.attr", + "href", + "https://randomuser.me/api/portraits/med/women/39.jpg", + ) + .should("have.attr", "target", "_blank"); + agHelper + .GetElement(`${table._tableRowColumnData(3, 0, "v2")} a`) + .should( + "have.attr", + "href", + "https://randomuser.me/api/portraits/med/men/52.jpg", + ) + .should("have.attr", "target", "_blank"); }); }, ); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_Widget_Add_button_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_Widget_Add_button_spec.js index e33a1a4d8bff..80c7f0a1cd06 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_Widget_Add_button_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_Widget_Add_button_spec.js @@ -14,7 +14,7 @@ import { describe( "Table Widget V2 property pane feature validation", - { tags: ["@tag.Widget", "@tag.Table"] }, + { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, function () { before(() => { agHelper.AddDsl("tableV2NewDsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_Widget_Copy_Paste_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_Widget_Copy_Paste_spec.js index 8f453239bc97..e141b38b994d 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_Widget_Copy_Paste_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_Widget_Copy_Paste_spec.js @@ -14,7 +14,7 @@ import { describe( "Test Suite to validate copy/paste table Widget V2", - { tags: ["@tag.Widget", "@tag.Table"] }, + { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, function () { before(() => { agHelper.AddDsl("tableV2NewDsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_Widget_Default_Row_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_Widget_Default_Row_spec.js index 6215d66eec07..458ecb8adba1 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_Widget_Default_Row_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_Widget_Default_Row_spec.js @@ -10,7 +10,7 @@ import { describe( "Table Widget V2 property pane deafult feature validation", - { tags: ["@tag.Widget", "@tag.Table"] }, + { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, function () { before(() => { agHelper.AddDsl("defaultTableV2Dsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_Widget_Derived_Column_Computed_value_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_Widget_Derived_Column_Computed_value_spec.js index b550c866a880..5115c6fcce77 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_Widget_Derived_Column_Computed_value_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_Widget_Derived_Column_Computed_value_spec.js @@ -3,7 +3,7 @@ const testdata = require("../../../../../fixtures/testdata.json"); describe( "Table Widget V2 property pane feature validation", - { tags: ["@tag.Widget", "@tag.Table"] }, + { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, function () { before(() => { _.agHelper.AddDsl("tableV2NewDsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_Widget_Selected_row_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_Widget_Selected_row_spec.js index f1c5cca4be96..dfb8e6554424 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_Widget_Selected_row_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_Widget_Selected_row_spec.js @@ -8,7 +8,7 @@ import EditorNavigation, { describe( "Table Widget v2 property pane feature validation", - { tags: ["@tag.Widget", "@tag.Table"] }, + { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, function () { before(() => { agHelper.AddDsl("tableV2AndTextDsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_header_menu_visibility_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_header_menu_visibility_spec.ts index 7056f91557ee..3b32f35c0eff 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_header_menu_visibility_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_header_menu_visibility_spec.ts @@ -10,7 +10,7 @@ import { TABLE_DATA_STATIC } from "../../../../../support/Constants"; describe( "Table widget v2", - { tags: ["@tag.Widget", "@tag.Table"] }, + { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, function () { it("1. Bug id #24005: should test that header menu should be hidden when sorting and freezing is disabled", function () { entityExplorer.DragDropWidgetNVerify(draggableWidgets.TABLE, 500, 300); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_pagination_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_pagination_spec.js index d55d58c2124f..8c0bfacbafb0 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_pagination_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_pagination_spec.js @@ -3,7 +3,7 @@ import * as _ from "../../../../../support/Objects/ObjectsCore"; describe( "Table Widget property pane feature validation", - { tags: ["@tag.Widget", "@tag.Table", "@tag.Sanity"] }, + { tags: ["@tag.Widget", "@tag.Table", "@tag.Sanity", "@tag.Binding"] }, function () { before(() => { _.agHelper.AddDsl("tableV2NewDslWithPagination"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_spec.js index 3e58e093fa52..19ecf513d671 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_spec.js @@ -5,7 +5,7 @@ import * as _ from "../../../../../support/Objects/ObjectsCore"; describe( "Table Widget V2 Functionality", - { tags: ["@tag.Widget", "@tag.Table"] }, + { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, function () { before(() => { _.agHelper.AddDsl("tableV2WidgetDsl"); @@ -53,6 +53,8 @@ describe( cy.get(commonlocators.editPropBackButton).click(); cy.openPropertyPane("tablewidgetv2"); // Confirm if isSortable is true + _.propPane.ExpandIfCollapsedSection("sorting"); + cy.get(commonlocators.isSortable).should("be.checked"); // Publish App _.deployMode.DeployApp(); @@ -124,6 +126,7 @@ describe( "Table data", `{{[{step: 1, task: 1}]}}`, ); + _.propPane.ExpandIfCollapsedSection("search\\&filters"); cy.get(".t--property-control-allowfiltering input").click(); cy.editColumn("step"); cy.get(".t--table-filter-toggle-btn").click(); @@ -237,6 +240,7 @@ describe( it("7. should check that adding cyclic dependency in the table doesn't crash the app", () => { //_.deployMode.NavigateBacktoEditor(); cy.openPropertyPane("tablewidgetv2"); + _.propPane.ExpandIfCollapsedSection("rowselection"); cy.updateCodeInput( ".t--property-control-defaultselectedrow", diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_tabledata_schema_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_tabledata_schema_spec.js index 3a2c2a8974bd..30ccde329913 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_tabledata_schema_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_tabledata_schema_spec.js @@ -6,50 +6,54 @@ import { import homePage from "../../../../../locators/HomePage"; import * as _ from "../../../../../support/Objects/ObjectsCore"; -describe("Table Widget", { tags: ["@tag.Widget", "@tag.Table"] }, function () { - it("1. Table Widget Functionality To Check with changing schema of tabledata", () => { - let jsContext = `{{Switch1.isSwitchedOn?[{name: "joe"}]:[{employee_name: "john"}];}}`; - _.homePage.NavigateToHome(); - _.homePage.CreateNewApplication(); - cy.wait("@createNewApplication").should( - "have.nested.property", - "response.body.responseMeta.status", - 201, - ); - cy.dragAndDropToCanvas("switchwidget", { x: 200, y: 200 }); - cy.dragAndDropToCanvas("tablewidgetv2", { x: 200, y: 300 }); - _.propPane.EnterJSContext("Table data", jsContext); - _.deployMode.DeployApp(); - cy.wait(5000); - cy.getTableV2DataSelector("0", "0").then((element) => { - cy.get(element).should("be.visible"); - }); - cy.wait(2000); - cy.readTableV2dataPublish("0", "0").then((value) => { - expect(value).to.be.equal("joe"); - }); - cy.get(".t--switch-widget-active").first().click(); - cy.wait(3000); - cy.getTableV2DataSelector("0", "0").then((element) => { - cy.get(element).should("be.visible"); - }); - cy.readTableV2dataPublish("0", "0").then((value) => { - expect(value).to.be.equal("john"); - }); - cy.get(".t--switch-widget-inactive").first().click(); - cy.wait(1000); - cy.getTableV2DataSelector("0", "0").then((element) => { - cy.get(element).should("be.visible"); - }); - cy.readTableV2dataPublish("0", "0").then((value) => { - expect(value).to.be.equal("joe"); - }); +describe( + "Table Widget", + { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, + function () { + it("1. Table Widget Functionality To Check with changing schema of tabledata", () => { + let jsContext = `{{Switch1.isSwitchedOn?[{name: "joe"}]:[{employee_name: "john"}];}}`; + _.homePage.NavigateToHome(); + _.homePage.CreateNewApplication(); + cy.wait("@createNewApplication").should( + "have.nested.property", + "response.body.responseMeta.status", + 201, + ); + cy.dragAndDropToCanvas("switchwidget", { x: 200, y: 200 }); + cy.dragAndDropToCanvas("tablewidgetv2", { x: 200, y: 300 }); + _.propPane.EnterJSContext("Table data", jsContext); + _.deployMode.DeployApp(); + cy.wait(5000); + cy.getTableV2DataSelector("0", "0").then((element) => { + cy.get(element).should("be.visible"); + }); + cy.wait(2000); + cy.readTableV2dataPublish("0", "0").then((value) => { + expect(value).to.be.equal("joe"); + }); + cy.get(".t--switch-widget-active").first().click(); + cy.wait(3000); + cy.getTableV2DataSelector("0", "0").then((element) => { + cy.get(element).should("be.visible"); + }); + cy.readTableV2dataPublish("0", "0").then((value) => { + expect(value).to.be.equal("john"); + }); + cy.get(".t--switch-widget-inactive").first().click(); + cy.wait(1000); + cy.getTableV2DataSelector("0", "0").then((element) => { + cy.get(element).should("be.visible"); + }); + cy.readTableV2dataPublish("0", "0").then((value) => { + expect(value).to.be.equal("joe"); + }); - _.deployMode.NavigateBacktoEditor(); - cy.wait(5000); - PageLeftPane.switchSegment(PagePaneSegment.UI); + _.deployMode.NavigateBacktoEditor(); + cy.wait(5000); + PageLeftPane.switchSegment(PagePaneSegment.UI); - _.entityExplorer.DeleteWidgetFromEntityExplorer("Switch1"); - _.entityExplorer.DeleteWidgetFromEntityExplorer("Table1"); - }); -}); + _.entityExplorer.DeleteWidgetFromEntityExplorer("Switch1"); + _.entityExplorer.DeleteWidgetFromEntityExplorer("Table1"); + }); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/Text_wrapping_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/Text_wrapping_spec.js index fb0e037a8dfb..a1735c561ec2 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/Text_wrapping_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/Text_wrapping_spec.js @@ -3,7 +3,7 @@ import { agHelper, propPane } from "../../../../../support/Objects/ObjectsCore"; describe( "Table Widget text wrapping functionality", - { tags: ["@tag.Widget", "@tag.Table"] }, + { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, function () { afterEach(() => { agHelper.SaveLocalStorageCache(); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/VirtualRow_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/VirtualRow_spec.js index b860bb831c9d..727044b2208d 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/VirtualRow_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/VirtualRow_spec.js @@ -8,7 +8,7 @@ const totalRows = 100; describe( "Table Widget Virtualized Row", - { tags: ["@tag.Widget", "@tag.Table"] }, + { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, function () { before(() => { cy.dragAndDropToCanvas("tablewidgetv2", { x: 300, y: 600 }); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/columnTypes/ColumnTypeMenubutton_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/columnTypes/ColumnTypeMenubutton_spec.js index cc97da7aca93..32375135802c 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/columnTypes/ColumnTypeMenubutton_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/columnTypes/ColumnTypeMenubutton_spec.js @@ -2,7 +2,7 @@ import * as _ from "../../../../../../support/Objects/ObjectsCore"; describe( "Custom column alias functionality", - { tags: ["@tag.Widget", "@tag.Table"] }, + { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, () => { before(() => { cy.dragAndDropToCanvas("tablewidgetv2", { x: 150, y: 300 }); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/columnTypes/ColumnTypesSelect2_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/columnTypes/ColumnTypesSelect2_spec.ts index 00c63976e1fe..4b2618adf07c 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/columnTypes/ColumnTypesSelect2_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/columnTypes/ColumnTypesSelect2_spec.ts @@ -8,7 +8,7 @@ import { describe( "Table widget v2: select column type test", - { tags: ["@tag.Widget", "@tag.Table"] }, + { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, function () { before(() => { entityExplorer.DragDropWidgetNVerify(draggableWidgets.TABLE, 300, 100); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/columnTypes/Select1_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/columnTypes/Select1_spec.ts index dd77c5338ad3..4d7d7036575a 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/columnTypes/Select1_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/columnTypes/Select1_spec.ts @@ -1,15 +1,14 @@ +import * as _ from "../../../../../../support/Objects/ObjectsCore"; import { PageLeftPane, PagePaneSegment, } from "../../../../../../support/Pages/EditorNavigation"; const commonlocators = require("../../../../../../locators/commonlocators.json"); -import * as _ from "../../../../../../support/Objects/ObjectsCore"; -import { featureFlagIntercept } from "../../../../../../support/Objects/FeatureFlags"; describe( "Table widget - Select column type functionality", - { tags: ["@tag.Widget", "@tag.Table"] }, + { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, () => { before(() => { cy.dragAndDropToCanvas("tablewidgetv2", { x: 350, y: 500 }); @@ -206,7 +205,6 @@ describe( it("7. should check that on option select is working", () => { _.agHelper.CheckForPageSaveError(); - featureFlagIntercept({ release_table_cell_label_value_enabled: true }); cy.openPropertyPane("tablewidgetv2"); cy.editColumn("step"); cy.get(".t--property-control-onoptionchange .t--js-toggle").click(); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/columnTypes/checkboxCell_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/columnTypes/checkboxCell_spec.js index 252617d0ab5a..f73ac9eb8fb6 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/columnTypes/checkboxCell_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/columnTypes/checkboxCell_spec.js @@ -30,11 +30,12 @@ const tableData = `[ const checkboxSelector = " .bp3-checkbox input[type='checkbox']"; describe( "Checkbox column type funtionality test", - { tags: ["@tag.Widget", "@tag.Table"] }, + { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, () => { before(() => { _.entityExplorer.DragDropWidgetNVerify(_.draggableWidgets.TABLE); // turn on filtering for the table - it is disabled by default in this PR(#34593) + _.propPane.ExpandIfCollapsedSection("search\\&filters"); _.agHelper.GetNClick(".t--property-control-allowfiltering input"); _.propPane.EnterJSContext("Table data", tableData); cy.editColumn("completed"); @@ -144,6 +145,7 @@ describe( .contains("This is a test message") .should("be.visible"); }); + _.agHelper.ClickButton("Discard", { index: 0 }); // discard changes }); it("4. Verify filter condition", () => { @@ -158,7 +160,17 @@ describe( // filter and verify checked rows cy.getTableV2DataSelector("0", "4").then((selector) => { - cy.get(selector + checkboxSelector).should("be.checked"); + _.agHelper.AssertExistingCheckedState( + selector + checkboxSelector, + "true", + ); + }); + + cy.getTableV2DataSelector("1", "4").then((selector) => { + _.agHelper.AssertExistingCheckedState( + selector + checkboxSelector, + "true", + ); }); // Filter and verify unchecked rows @@ -169,10 +181,10 @@ describe( cy.get(publishPage.applyFiltersBtn).click(); cy.getTableV2DataSelector("0", "4").then((selector) => { - cy.get(selector + checkboxSelector).should("not.be.checked"); - }); - cy.getTableV2DataSelector("1", "4").then((selector) => { - cy.get(selector + checkboxSelector).should("not.be.checked"); + _.agHelper.AssertExistingCheckedState( + selector + checkboxSelector, + "false", + ); }); }); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/columnTypes/currency_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/columnTypes/currency_spec.ts index bdfc5b46a931..535dcecec813 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/columnTypes/currency_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/columnTypes/currency_spec.ts @@ -13,113 +13,122 @@ function updateCellValue(value) { _.agHelper.Sleep(500); } -describe("Currency column", { tags: ["@tag.Widget", "@tag.Table"] }, () => { - before(() => { - _.entityExplorer.DragDropWidgetNVerify(_.draggableWidgets.TEXT, 300, 400); - _.propPane.UpdatePropertyFieldValue( - "Text", - `{{Table1.editableCell.value}}|{{Table1.editableCell.inputValue}}|{{typeof Table1.editableCell.value}}|{{typeof Table1.editableCell.inputValue}}`, - ); - - _.entityExplorer.DragDropWidgetNVerify(_.draggableWidgets.TABLE); - _.propPane.EnterJSContext("Table data", tableData); - _.table.toggleColumnEditableViaColSettingsPane("amount", "v2", true, true); - }); - - it("1. should test that currency column is available", () => { - cy.editColumn("amount"); - cy.changeColumnType("Currency"); - cy.get(".t--property-control-currency").should("exist"); - }); - - it("2. should test that currency column properties are displayed and working", () => { - cy.get(".t--property-control-currency").should("exist"); - - cy.get(".t--property-control-decimalsallowed").should("exist"); - - cy.get(".t--property-control-notation").should("exist"); - - cy.get(".t--property-control-thousandseparator").should("exist"); - }); - - it("3. should test that currency column is formatted correctly", () => { - cy.readTableV2data(0, 0).then((val) => { - expect(val).to.equal("$ 10,000"); +describe( + "Currency column", + { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, + () => { + before(() => { + _.entityExplorer.DragDropWidgetNVerify(_.draggableWidgets.TEXT, 300, 400); + _.propPane.UpdatePropertyFieldValue( + "Text", + `{{Table1.editableCell.value}}|{{Table1.editableCell.inputValue}}|{{typeof Table1.editableCell.value}}|{{typeof Table1.editableCell.inputValue}}`, + ); + + _.entityExplorer.DragDropWidgetNVerify(_.draggableWidgets.TABLE); + _.propPane.EnterJSContext("Table data", tableData); + _.table.toggleColumnEditableViaColSettingsPane( + "amount", + "v2", + true, + true, + ); }); - _.propPane.ToggleJSMode("Currency", true); + it("1. should test that currency column is available", () => { + cy.editColumn("amount"); + cy.changeColumnType("Currency"); + cy.get(".t--property-control-currency").should("exist"); + }); - _.propPane.EnterJSContext("Currency", "INR"); + it("2. should test that currency column properties are displayed and working", () => { + cy.get(".t--property-control-currency").should("exist"); - cy.readTableV2data(0, 0).then((val) => { - expect(val).to.equal("₹ 10,000"); - }); + cy.get(".t--property-control-decimalsallowed").should("exist"); - _.propPane.SelectPropertiesDropDown("Decimals allowed", "1"); + cy.get(".t--property-control-notation").should("exist"); - cy.readTableV2data(0, 0).then((val) => { - expect(val).to.equal("₹ 10,000.0"); + cy.get(".t--property-control-thousandseparator").should("exist"); }); - _.propPane.SelectPropertiesDropDown("Decimals allowed", "2"); + it("3. should test that currency column is formatted correctly", () => { + cy.readTableV2data(0, 0).then((val) => { + expect(val).to.equal("$ 10,000"); + }); - cy.readTableV2data(0, 0).then((val) => { - expect(val).to.equal("₹ 10,000.01"); - }); + _.propPane.ToggleJSMode("Currency", true); - _.propPane.TogglePropertyState("Thousand separator", false); + _.propPane.EnterJSContext("Currency", "INR"); - cy.readTableV2data(0, 0).then((val) => { - expect(val).to.equal("₹ 10000.01"); - }); + cy.readTableV2data(0, 0).then((val) => { + expect(val).to.equal("₹ 10,000"); + }); - _.propPane.SelectPropertiesDropDown("Notation", "Compact"); + _.propPane.SelectPropertiesDropDown("Decimals allowed", "1"); - cy.readTableV2data(0, 0).then((val) => { - expect(val).to.equal("₹ 10.00K"); - }); + cy.readTableV2data(0, 0).then((val) => { + expect(val).to.equal("₹ 10,000.0"); + }); - _.propPane.SelectPropertiesDropDown("Decimals allowed", "0"); + _.propPane.SelectPropertiesDropDown("Decimals allowed", "2"); - cy.readTableV2data(0, 0).then((val) => { - expect(val).to.equal("₹ 10K"); - }); - }); + cy.readTableV2data(0, 0).then((val) => { + expect(val).to.equal("₹ 10,000.01"); + }); - it("4. shoudl test that currency column is editable", () => { - _.propPane.SelectPropertiesDropDown("Notation", "Standard"); + _.propPane.TogglePropertyState("Thousand separator", false); - updateCellValue("1,234.23"); + cy.readTableV2data(0, 0).then((val) => { + expect(val).to.equal("₹ 10000.01"); + }); - cy.readTableV2data(0, 0).then((val) => { - expect(val).to.equal("₹ 123423"); - }); + _.propPane.SelectPropertiesDropDown("Notation", "Compact"); - _.propPane.SelectPropertiesDropDown("Decimals allowed", "1"); + cy.readTableV2data(0, 0).then((val) => { + expect(val).to.equal("₹ 10.00K"); + }); - updateCellValue("4321.23"); + _.propPane.SelectPropertiesDropDown("Decimals allowed", "0"); - cy.readTableV2data(0, 0).then((val) => { - expect(val).to.equal("₹ 4321.2"); + cy.readTableV2data(0, 0).then((val) => { + expect(val).to.equal("₹ 10K"); + }); }); - _.propPane.SelectPropertiesDropDown("Decimals allowed", "2"); + it("4. shoudl test that currency column is editable", () => { + _.propPane.SelectPropertiesDropDown("Notation", "Standard"); - updateCellValue("1234.23"); + updateCellValue("1,234.23"); - cy.readTableV2data(0, 0).then((val) => { - expect(val).to.equal("₹ 1234.23"); - }); + cy.readTableV2data(0, 0).then((val) => { + expect(val).to.equal("₹ 123423"); + }); - cy.editTableCell(0, 0); + _.propPane.SelectPropertiesDropDown("Decimals allowed", "1"); - cy.enterTableCellValue(0, 0, 6543.23); + updateCellValue("4321.23"); - cy.get(".t--widget-textwidget .t--text-widget-container").should( - "have.text", - "6543.23|6543.23|number|string", - ); + cy.readTableV2data(0, 0).then((val) => { + expect(val).to.equal("₹ 4321.2"); + }); - cy.saveTableCellValue(0, 0); - }); -}); + _.propPane.SelectPropertiesDropDown("Decimals allowed", "2"); + + updateCellValue("1234.23"); + + cy.readTableV2data(0, 0).then((val) => { + expect(val).to.equal("₹ 1234.23"); + }); + + cy.editTableCell(0, 0); + + cy.enterTableCellValue(0, 0, 6543.23); + + cy.get(".t--widget-textwidget .t--text-widget-container").should( + "have.text", + "6543.23|6543.23|number|string", + ); + + cy.saveTableCellValue(0, 0); + }); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/columnTypes/switchCell_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/columnTypes/switchCell_spec.js index 56a0f6cf12e9..8625c8898478 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/columnTypes/switchCell_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/columnTypes/switchCell_spec.js @@ -36,11 +36,12 @@ const tableData = `[ const switchSelector = " .bp3-switch input[type='checkbox']"; describe( "Switch column type funtionality test", - { tags: ["@tag.Widget", "@tag.Table"] }, + { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, () => { before(() => { entityExplorer.DragDropWidgetNVerify(draggableWidgets.TABLE); // turn on filtering for the table - it is disabled by default in this PR(#34593) + propPane.ExpandIfCollapsedSection("search\\&filters"); agHelper.GetNClick(".t--property-control-allowfiltering input"); propPane.EnterJSContext("Table data", tableData); cy.editColumn("completed"); @@ -136,6 +137,7 @@ describe( cy.wait(100); agHelper.ValidateToastMessage("This is a test message"); }); + agHelper.ClickButton("Discard", { index: 0 }); // discard changes }); it("4. Verify filter condition", () => { @@ -150,7 +152,11 @@ describe( // filter and verify checked rows cy.getTableV2DataSelector("0", "4").then((selector) => { - cy.get(selector + switchSelector).should("be.checked"); + agHelper.AssertExistingCheckedState(selector + switchSelector, "true"); + }); + + cy.getTableV2DataSelector("1", "4").then((selector) => { + agHelper.AssertExistingCheckedState(selector + switchSelector, "true"); }); // Filter and verify unchecked rows @@ -161,10 +167,7 @@ describe( cy.get(publishPage.applyFiltersBtn).click(); cy.getTableV2DataSelector("0", "4").then((selector) => { - cy.get(selector + switchSelector).should("not.be.checked"); - }); - cy.getTableV2DataSelector("1", "4").then((selector) => { - cy.get(selector + switchSelector).should("not.be.checked"); + agHelper.AssertExistingCheckedState(selector + switchSelector, "false"); }); }); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/freeze_column1_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/freeze_column1_spec.js index bf7400a4e57b..59311ee00d5f 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/freeze_column1_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/freeze_column1_spec.js @@ -9,7 +9,7 @@ const commonlocators = require("../../../../../locators/commonlocators.json"); describe( "Column freeze & unfreeze in canavs mode", - { tags: ["@tag.Widget", "@tag.Table"] }, + { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, () => { before(() => { cy.dragAndDropToCanvas(_.draggableWidgets.TABLE, { x: 200, y: 200 }); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/freeze_column2_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/freeze_column2_spec.js index ce0337d57bda..2df209b3fd31 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/freeze_column2_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/freeze_column2_spec.js @@ -2,7 +2,7 @@ import * as _ from "../../../../../support/Objects/ObjectsCore"; describe( "Column freeze & unfreeze in page mode", - { tags: ["@tag.Widget", "@tag.Table"] }, + { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, () => { before(() => { cy.dragAndDropToCanvas(_.draggableWidgets.TABLE, { x: 200, y: 200 }); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/freeze_column3_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/freeze_column3_spec.js index ef9855b27f3d..93c778a7d746 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/freeze_column3_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/freeze_column3_spec.js @@ -5,7 +5,7 @@ const commonlocators = require("../../../../../locators/commonlocators.json"); describe( "Server-side pagination when turned on test of re-ordering columns", - { tags: ["@tag.Widget", "@tag.Table"] }, + { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, () => { before(() => { cy.dragAndDropToCanvas(_.draggableWidgets.TABLE, { x: 500, y: 200 }); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/freeze_column_query_change_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/freeze_column_query_change_spec.js index 03de7702f9c9..e606409aebce 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/freeze_column_query_change_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/freeze_column_query_change_spec.js @@ -12,7 +12,7 @@ const widgetsPage = require("../../../../../locators/Widgets.json"); describe( "1. Check frozen common and/or custom columns retain position on query change", - { tags: ["@tag.Widget", "@tag.Table"] }, + { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, () => { before(() => { cy.dragAndDropToCanvas(WIDGET.TABLE, { x: 600, y: 200 }); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/inline_editing_validations_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/inline_editing_validations_spec.js index 5330643d0a78..cb25d3b66670 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/inline_editing_validations_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/inline_editing_validations_spec.js @@ -4,7 +4,7 @@ import * as _ from "../../../../../support/Objects/ObjectsCore"; describe( "Table widget inline editing validation functionality", - { tags: ["@tag.Widget", "@tag.Table"] }, + { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, () => { afterEach(() => { _.agHelper.SaveLocalStorageCache(); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/non_ascii_column_name_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/non_ascii_column_name_spec.js index dd913d961659..e7340e94016f 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/non_ascii_column_name_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/non_ascii_column_name_spec.js @@ -13,7 +13,7 @@ const data = [ describe( "Non ASCII character functionality", - { tags: ["@tag.Widget", "@tag.Table"] }, + { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, () => { before(() => { _.agHelper.AddDsl("tableV2NewDsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/scrollbar_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/scrollbar_spec.ts index 46ea5ab0227f..daafb18945ec 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/scrollbar_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/scrollbar_spec.ts @@ -10,7 +10,7 @@ import { describe( "Table widget v2: tableData change test", - { tags: ["@tag.Widget", "@tag.Table"] }, + { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, function () { before(() => { agHelper.AddDsl("Table/ScrollbarDSL"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/server_side_filtering_spec_1.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/server_side_filtering_spec_1.ts index 674f56e06e32..1d4f6fad6166 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/server_side_filtering_spec_1.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/server_side_filtering_spec_1.ts @@ -35,6 +35,7 @@ describe( entityExplorer.DragDropWidgetNVerify(draggableWidgets.TABLE, 300, 300); // turn on filtering for the table - it is disabled by default in this PR(#34593) + propPane.ExpandIfCollapsedSection("search\\&filters"); agHelper.GetNClick(".t--property-control-allowfiltering input"); // Create SQL data-source diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/table_data_change_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/table_data_change_spec.ts index 4433da97b726..e8b145a2a9da 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/table_data_change_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/table_data_change_spec.ts @@ -62,7 +62,7 @@ const TABLE_DATA_2 = `[ "name": "Barty Crouch", "status": "APPROVED", "gender": "", - "avatar": "https://robohash.org/sednecessitatibuset.png?size=100x100&set=set1", + "avatar": "http://host.docker.internal:4200/clouddefaultImage.png", "email": "barty.crouch@gmail.com", "address": "St Petersberg #911 4th main", "createdAt": "2020-03-16T18:00:05.000Z", @@ -73,7 +73,7 @@ const TABLE_DATA_2 = `[ "name": "Jenelle Kibbys", "status": "APPROVED", "gender": "Female", - "avatar": "https://robohash.org/quiaasperiorespariatur.bmp?size=100x100&set=set1", + "avatar": "http://host.docker.internal:4200/453-200x300.jpg", "email": "jkibby1@hp.com", "address": "85 Tennessee Plaza", "createdAt": "2019-10-04T03:22:23.000Z", @@ -84,7 +84,7 @@ const TABLE_DATA_2 = `[ "name": "Demetre", "status": "APPROVED", "gender": "Male", - "avatar": "https://robohash.org/iustooptiocum.jpg?size=100x100&set=set1", + "avatar": "http://host.docker.internal:4200/clouddefaultImage.png", "email": "aaaa@bbb.com", "address": "262 Saint Paul Park", "createdAt": "2020-05-01T17:30:50.000Z", @@ -95,7 +95,7 @@ const TABLE_DATA_2 = `[ "name": "Tobin Shellibeer", "status": "APPROVED", "gender": "Male", - "avatar": "https://robohash.org/odioeumdolores.png?size=100x100&set=set1", + "avatar": "http://host.docker.internal:4200/453-200x300.jpg", "email": "tshellibeer9@ihg.com", "address": "4 Ridgeway Lane", "createdAt": "2019-11-27T06:09:41.000Z", @@ -104,7 +104,7 @@ const TABLE_DATA_2 = `[ describe( "Table widget v2: tableData change test", - { tags: ["@tag.Widget", "@tag.Table"] }, + { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, function () { before(() => { agHelper.ClearLocalStorageCache(); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Text/Text2_Spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Text/Text2_Spec.ts index 436e421c4099..c233ee887494 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Text/Text2_Spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Text/Text2_Spec.ts @@ -14,7 +14,7 @@ import EditorNavigation, { describe( "Text widget tests", - { tags: ["@tag.Widget", "@tag.Text"] }, + { tags: ["@tag.Widget", "@tag.Text", "@tag.Binding"] }, function () { before(() => { entityExplorer.DragDropWidgetNVerify(draggableWidgets.TEXT); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Text/TextWidget_BgColor_TextSize_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Text/TextWidget_BgColor_TextSize_spec.js index e57ec52c35f9..51b20499aa3d 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Text/TextWidget_BgColor_TextSize_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Text/TextWidget_BgColor_TextSize_spec.js @@ -4,7 +4,7 @@ import * as _ from "../../../../../support/Objects/ObjectsCore"; describe( "Text Widget Cell Background and Text Size Validation", - { tags: ["@tag.Widget", "@tag.Text"] }, + { tags: ["@tag.Widget", "@tag.Text", "@tag.Binding"] }, function () { before(() => { _.agHelper.AddDsl("textWidgetDsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Text/TextWidget_LintErrorValidation_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Text/TextWidget_LintErrorValidation_spec.js index b473a01b24d6..d0966f4692a1 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Text/TextWidget_LintErrorValidation_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Text/TextWidget_LintErrorValidation_spec.js @@ -3,7 +3,7 @@ import * as _ from "../../../../../support/Objects/ObjectsCore"; describe( "Linting warning validation with text widget", - { tags: ["@tag.Widget", "@tag.Text"] }, + { tags: ["@tag.Widget", "@tag.Text", "@tag.Binding"] }, function () { before(() => { _.agHelper.AddDsl("textLintErrorDsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Text/Text_new_feature_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Text/Text_new_feature_spec.js index 1f2cabcf57e3..f082695a557f 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Text/Text_new_feature_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Text/Text_new_feature_spec.js @@ -8,7 +8,7 @@ import { describe( "Text Widget color/font/alignment Functionality", - { tags: ["@tag.Widget", "@tag.Text"] }, + { tags: ["@tag.Widget", "@tag.Text", "@tag.Binding"] }, function () { before(() => { agHelper.AddDsl("textDsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Text/Text_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Text/Text_spec.js index 4078aaeaa144..7ec3c3819f04 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Text/Text_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Text/Text_spec.js @@ -4,7 +4,7 @@ import * as _ from "../../../../../support/Objects/ObjectsCore"; describe( "Text Widget Functionality", - { tags: ["@tag.Widget", "@tag.Text"] }, + { tags: ["@tag.Widget", "@tag.Text", "@tag.Binding"] }, function () { before(() => { _.agHelper.AddDsl("displayWidgetDsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Text/Text_truncate_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Text/Text_truncate_spec.js index 6ed7cd0cfe21..f9e0943f4bab 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Text/Text_truncate_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Text/Text_truncate_spec.js @@ -3,7 +3,7 @@ import * as _ from "../../../../../support/Objects/ObjectsCore"; describe( "Text Widget Truncate Functionality", - { tags: ["@tag.Widget", "@tag.Text"] }, + { tags: ["@tag.Widget", "@tag.Text", "@tag.Binding"] }, function () { before(() => { _.agHelper.AddDsl("textNewDsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TreeSelect/Select_TreeSelect_MultiSelect_Empty_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TreeSelect/Select_TreeSelect_MultiSelect_Empty_spec.ts index 31ace1c9d8b6..6b8e2ae88c9e 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TreeSelect/Select_TreeSelect_MultiSelect_Empty_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TreeSelect/Select_TreeSelect_MultiSelect_Empty_spec.ts @@ -2,7 +2,7 @@ import formWidgetsPage from "../../../../../locators/FormWidgets.json"; import * as _ from "../../../../../support/Objects/ObjectsCore"; describe( "MultiSelect, Tree Select and Multi Tree Select Widget Empty Options Functionality", - { tags: ["@tag.Widget", "@tag.Select"] }, + { tags: ["@tag.Widget", "@tag.Select", "@tag.Binding"] }, function () { before(() => { _.agHelper.AddDsl("SelectDslWithEmptyOptions"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TreeSelect/Single_Select_Tree_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TreeSelect/Single_Select_Tree_spec.ts index 8969c96e44ab..a6e2f3131e17 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TreeSelect/Single_Select_Tree_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TreeSelect/Single_Select_Tree_spec.ts @@ -13,7 +13,7 @@ const toggleJSButton = (name) => `.t--property-control-${name} .t--js-toggle`; describe( "Single Select Widget Functionality", - { tags: ["@tag.Widget", "@tag.Select"] }, + { tags: ["@tag.Widget", "@tag.Select", "@tag.Binding"] }, function () { before(() => { agHelper.AddDsl("TreeSelectDsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TreeSelect/Tree_Select_2_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TreeSelect/Tree_Select_2_spec.ts index 2814f31c2ac4..2a8b761d3a00 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TreeSelect/Tree_Select_2_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TreeSelect/Tree_Select_2_spec.ts @@ -15,7 +15,7 @@ import EditorNavigation, { describe( "Tree Select widget Tests", - { tags: ["@tag.Widget", "@tag.Select"] }, + { tags: ["@tag.Widget", "@tag.Select", "@tag.Binding"] }, function () { before(() => { entityExplorer.DragDropWidgetNVerify("formwidget", 500, 100); @@ -170,7 +170,9 @@ describe( }); it("5. Verify Api binding", () => { - apiPage.CreateAndFillApi("https://mock-api.appsmith.com/users"); + apiPage.CreateAndFillApi( + "http://host.docker.internal:5001/v1/dynamicrecords/getrecordsArray", + ); apiPage.RunAPI(); EditorNavigation.SelectEntityByName( "TreeSelect1", @@ -181,7 +183,7 @@ describe( propPane.MoveToTab("Content"); propPane.UpdatePropertyFieldValue( "Options", - `{{Api1.data.users.map((s)=>{return{"label":s.name,"value":s.name}})}}`, + `{{JSON.parse(Api1.data).map((item) => {return {"label":item.value, "value":item.abbr};})}}`, ); agHelper.GetNClick( `${locators._widgetInDeployed("singleselecttreewidget")}`, @@ -308,7 +310,7 @@ describe( propPane.ToggleJSMode("onOptionChange", true); propPane.UpdatePropertyFieldValue( "onOptionChange", - `{{download('http://host.docker.internal:4200/kiwi.svg', 'kiwi.svg', 'image/svg+xml').then(() => { + `{{download('http://host.docker.internal:4200/photo-1503469432756-4aae2e18d881.jpeg', 'flower.svg', 'image/svg+xml').then(() => { showAlert('Download Success', ''); });}}`, ); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TreeSelect/Tree_Select_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TreeSelect/Tree_Select_spec.ts index 7573dbcbffbe..8e1f95fff086 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TreeSelect/Tree_Select_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TreeSelect/Tree_Select_spec.ts @@ -5,7 +5,7 @@ import commonlocators from "../../../../../locators/commonlocators.json"; describe( "Tree Select Widget", - { tags: ["@tag.Widget", "@tag.Select"] }, + { tags: ["@tag.Widget", "@tag.Select", "@tag.Binding"] }, function () { before(() => { _.agHelper.AddDsl("emptyDSL"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Video/Video2_Spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Video/Video2_Spec.ts index ad7e177f8ecd..1179888d2025 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Video/Video2_Spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Video/Video2_Spec.ts @@ -16,7 +16,7 @@ import EditorNavigation, { describe( "Video widget tests", - { tags: ["@tag.Widget", "@tag.Video"] }, + { tags: ["@tag.Widget", "@tag.Video", "@tag.Binding"] }, function () { before(() => { homePage.NavigateToHome(); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Video/Video_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Video/Video_spec.ts index 4cec636c401a..78d0fc8d2a27 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Video/Video_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Video/Video_spec.ts @@ -9,7 +9,7 @@ import { describe( "Video Widget Functionality", - { tags: ["@tag.Widget", "@tag.Video"] }, + { tags: ["@tag.Widget", "@tag.Video", "@tag.Binding"] }, function () { before(() => { entityExplorer.DragDropWidgetNVerify(draggableWidgets.VIDEO); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/WidgetCopyPaste_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/WidgetCopyPaste_spec.js index a00829489b70..04f5e84b09a6 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/WidgetCopyPaste_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/WidgetCopyPaste_spec.js @@ -10,159 +10,163 @@ import * as _ from "../../../../support/Objects/ObjectsCore"; import PageList from "../../../../support/Pages/PageList"; const widgetSelector = (name) => `[data-widgetname-cy="${name}"]`; -describe("Widget Copy paste", { tags: ["@tag.Widget"] }, function () { - const modifierKey = Cypress.platform === "darwin" ? "meta" : "ctrl"; - before(() => { - _.agHelper.AddDsl("WidgetCopyPaste"); - }); - - it("1. When non Layout widget is selected, it should place below the widget selected", function () { - // Selection - cy.get(`#${dsl.dsl.children[1].widgetId}`).click({ - ctrlKey: true, +describe( + "Widget Copy paste", + { tags: ["@tag.Widget", "@tag.Binding"] }, + function () { + const modifierKey = Cypress.platform === "darwin" ? "meta" : "ctrl"; + before(() => { + _.agHelper.AddDsl("WidgetCopyPaste"); }); - cy.get(`div[data-testid='t--selected']`).should("have.length", 1); - - //copy - cy.get("body").type(`{${modifierKey}}{c}`); - cy.get(commonLocators.toastmsg).contains("Copied"); - - //paste - cy.get("body").type(`{${modifierKey}}{v}`); - cy.get(widgetsPage.chartWidget).should("have.length", 2); - - // verify the position - cy.get(widgetsPage.chartWidget) - .eq(0) - .then((element) => { - const elementTop = parseFloat(element.css("top")); - const elementHeight = parseFloat(element.css("height")); - const pastedWidgetTop = - (elementTop + elementHeight + 10).toString() + "px"; - cy.get(widgetsPage.chartWidget) - .eq(1) - .invoke("attr", "style") - .should("contain", `left: ${element.css("left")}`) - .should("contain", `top: ${pastedWidgetTop}`); + + it("1. When non Layout widget is selected, it should place below the widget selected", function () { + // Selection + cy.get(`#${dsl.dsl.children[1].widgetId}`).click({ + ctrlKey: true, + }); + cy.get(`div[data-testid='t--selected']`).should("have.length", 1); + + //copy + cy.get("body").type(`{${modifierKey}}{c}`); + cy.get(commonLocators.toastmsg).contains("Copied"); + + //paste + cy.get("body").type(`{${modifierKey}}{v}`); + cy.get(widgetsPage.chartWidget).should("have.length", 2); + + // verify the position + cy.get(widgetsPage.chartWidget) + .eq(0) + .then((element) => { + const elementTop = parseFloat(element.css("top")); + const elementHeight = parseFloat(element.css("height")); + const pastedWidgetTop = + (elementTop + elementHeight + 10).toString() + "px"; + cy.get(widgetsPage.chartWidget) + .eq(1) + .invoke("attr", "style") + .should("contain", `left: ${element.css("left")}`) + .should("contain", `top: ${pastedWidgetTop}`); + }); + }); + + it("2. When Layout widget is selected, it should place it inside the layout widget", function () { + cy.get(`#div-selection-0`).click({ + force: true, + }); + + // Selection + cy.get(`#${dsl.dsl.children[0].widgetId}`).click({ + ctrlKey: true, }); - }); + cy.get(`div[data-testid='t--selected']`).should("have.length", 1); + + //paste + cy.get("body").type(`{${modifierKey}}{v}`); - it("2. When Layout widget is selected, it should place it inside the layout widget", function () { - cy.get(`#div-selection-0`).click({ - force: true, + cy.get(`#${dsl.dsl.children[0].widgetId}`) + .find(widgetsPage.chartWidget) + .should("have.length", 1); }); - // Selection - cy.get(`#${dsl.dsl.children[0].widgetId}`).click({ - ctrlKey: true, + it("3. When widget inside the layout widget is selected, then it should paste inside the layout widget below the selected widget", function () { + cy.get(`#div-selection-0`).click({ + force: true, + }); + + // Selection + cy.get(`#${dsl.dsl.children[0].widgetId}`) + .find(widgetsPage.chartWidget) + .click({ + ctrlKey: true, + }); + cy.get(`div[data-testid='t--selected']`).should("have.length", 1); + + //paste + cy.get("body").type(`{${modifierKey}}{v}`); + cy.get(`#${dsl.dsl.children[0].widgetId}`) + .find(widgetsPage.chartWidget) + .should("have.length", 2); }); - cy.get(`div[data-testid='t--selected']`).should("have.length", 1); - //paste - cy.get("body").type(`{${modifierKey}}{v}`); + it("4. When modal is open, it should paste inside the modal", () => { + //add modal widget + cy.dragAndDropToCanvas("modalwidget", { x: 300, y: 700 }); + cy.get(".t--modal-widget").should("exist"); - cy.get(`#${dsl.dsl.children[0].widgetId}`) - .find(widgetsPage.chartWidget) - .should("have.length", 1); - }); + //paste + cy.get("body").type(`{${modifierKey}}{v}`); + cy.get(".t--modal-widget") + .find(widgetsPage.chartWidget) + .should("have.length", 1); + }); - it("3. When widget inside the layout widget is selected, then it should paste inside the layout widget below the selected widget", function () { - cy.get(`#div-selection-0`).click({ - force: true, + it("5. When widget Inside a modal is selected, it should paste inside the modal", () => { + //verify modal and selected widget + cy.get(".t--modal-widget").should("exist"); + cy.get(".t--modal-widget") + .find(`div[data-testid='t--selected']`) + .should("have.length", 1); + + //paste + cy.get("body").type(`{${modifierKey}}{v}`); + // cy.get(explorer.entityModal).click(); + cy.get(".t--modal-widget") + .find(widgetsPage.chartWidget) + .should("have.length", 2); }); - // Selection - cy.get(`#${dsl.dsl.children[0].widgetId}`) - .find(widgetsPage.chartWidget) - .click({ - ctrlKey: true, - }); - cy.get(`div[data-testid='t--selected']`).should("have.length", 1); - - //paste - cy.get("body").type(`{${modifierKey}}{v}`); - cy.get(`#${dsl.dsl.children[0].widgetId}`) - .find(widgetsPage.chartWidget) - .should("have.length", 2); - }); - - it("4. When modal is open, it should paste inside the modal", () => { - //add modal widget - cy.dragAndDropToCanvas("modalwidget", { x: 300, y: 700 }); - cy.get(".t--modal-widget").should("exist"); - - //paste - cy.get("body").type(`{${modifierKey}}{v}`); - cy.get(".t--modal-widget") - .find(widgetsPage.chartWidget) - .should("have.length", 1); - }); - - it("5. When widget Inside a modal is selected, it should paste inside the modal", () => { - //verify modal and selected widget - cy.get(".t--modal-widget").should("exist"); - cy.get(".t--modal-widget") - .find(`div[data-testid='t--selected']`) - .should("have.length", 1); - - //paste - cy.get("body").type(`{${modifierKey}}{v}`); - // cy.get(explorer.entityModal).click(); - cy.get(".t--modal-widget") - .find(widgetsPage.chartWidget) - .should("have.length", 2); - }); - - it("6. Should be able to paste list widget inside another list widget", function () { - //clean up - PageList.AddNewPage("New blank page"); - - //add list widget - PageLeftPane.switchToAddNew(); - cy.dragAndDropToCanvas("listwidgetv2", { x: 500, y: 700 }); - cy.get(`div[data-testid='t--selected']`).should("have.length", 1); - - //copy - cy.get("body").type(`{${modifierKey}}{c}`); - - //paste - cy.get(`${widgetSelector("List1")} [type="CONTAINER_WIDGET"]`) - .first() - .type(`{${modifierKey}}{v}`); - cy.get(widgetsPage.listWidgetv2).should("have.length", 4); - cy.get(`${widgetSelector("List1")} [type="CONTAINER_WIDGET"]`) - .first() - .find(widgetsPage.listWidgetv2) - .should("have.length", 1); - }); - - it("7. Should be able to paste widget on the initial generate Page", function () { - cy.Createpage("NewPage", false); - - //paste - cy.get("body").type(`{${modifierKey}}{v}`); - - //verify a pasted list widget - cy.get(widgetsPage.listWidgetv2).should("have.length", 1); - }); - - it("8. Should not be able to copy/cut canvas widgets (i.e. Individual Tabs) of tabs widget", function () { - PageList.AddNewPage("New blank page"); - - _.entityExplorer.DragDropWidgetNVerify(_.draggableWidgets.TAB, 400, 200); - - EditorNavigation.SelectEntityByName("Tab 1", EntityType.Widget, {}, [ - "Tabs1", - ]); - - cy.get("body").type(`{${modifierKey}}{c}`); - - _.agHelper.ValidateToastMessage("This selected widget cannot be copied."); - - _.agHelper.WaitUntilAllToastsDisappear(); - - cy.get("body").type(`{${modifierKey}}{x}`); - - _.agHelper.ValidateToastMessage("This selected widget cannot be cut."); - }); -}); + it("6. Should be able to paste list widget inside another list widget", function () { + //clean up + PageList.AddNewPage("New blank page"); + + //add list widget + PageLeftPane.switchToAddNew(); + cy.dragAndDropToCanvas("listwidgetv2", { x: 500, y: 700 }); + cy.get(`div[data-testid='t--selected']`).should("have.length", 1); + + //copy + cy.get("body").type(`{${modifierKey}}{c}`); + + //paste + cy.get(`${widgetSelector("List1")} [type="CONTAINER_WIDGET"]`) + .first() + .type(`{${modifierKey}}{v}`); + cy.get(widgetsPage.listWidgetv2).should("have.length", 4); + cy.get(`${widgetSelector("List1")} [type="CONTAINER_WIDGET"]`) + .first() + .find(widgetsPage.listWidgetv2) + .should("have.length", 1); + }); + + it("7. Should be able to paste widget on the initial generate Page", function () { + cy.Createpage("NewPage", false); + + //paste + cy.get("body").type(`{${modifierKey}}{v}`); + + //verify a pasted list widget + cy.get(widgetsPage.listWidgetv2).should("have.length", 1); + }); + + it("8. Should not be able to copy/cut canvas widgets (i.e. Individual Tabs) of tabs widget", function () { + PageList.AddNewPage("New blank page"); + + _.entityExplorer.DragDropWidgetNVerify(_.draggableWidgets.TAB, 400, 200); + + EditorNavigation.SelectEntityByName("Tab 1", EntityType.Widget, {}, [ + "Tabs1", + ]); + + cy.get("body").type(`{${modifierKey}}{c}`); + + _.agHelper.ValidateToastMessage("This selected widget cannot be copied."); + + _.agHelper.WaitUntilAllToastsDisappear(); + + cy.get("body").type(`{${modifierKey}}{x}`); + + _.agHelper.ValidateToastMessage("This selected widget cannot be cut."); + }); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/WidgetGrouping_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/WidgetGrouping_spec.js index 63d71bf3d03a..e54e3031acb7 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/WidgetGrouping_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/WidgetGrouping_spec.js @@ -1,48 +1,52 @@ const dsl = require("../../../../fixtures/widgetSelection.json"); import * as _ from "../../../../support/Objects/ObjectsCore"; -describe("Widget Grouping", { tags: ["@tag.Widget"] }, function () { - before(() => { - _.agHelper.AddDsl("widgetSelection"); - }); - - it("Select widgets using cmd + click and group using cmd + G", function () { - // Selection - cy.get(`#${dsl.dsl.children[2].widgetId}`).click({ - ctrlKey: true, - }); - cy.get(`#${dsl.dsl.children[3].widgetId}`).click({ - ctrlKey: true, +describe( + "Widget Grouping", + { tags: ["@tag.Widget", "@tag.Binding"] }, + function () { + before(() => { + _.agHelper.AddDsl("widgetSelection"); }); - cy.get(`div[data-testid='t--selected']`).should("have.length", 2); - cy.get(`.t--multi-selection-box`).should("have.length", 1); - const isMac = Cypress.platform === "darwin"; - // Grouping - if (isMac) { - cy.get("body").type("{cmd}{g}"); - } else { - cy.get("body").type("{ctrl}{g}"); - } - cy.wait(2000); - cy.get(`div[data-testid='t--selected']`) - .should("have.length", 1) - .as("group"); - cy.get("body").click(); - cy.get(`@group`) - .find(`[data-testid="test-widget"]`) - .should("have.length", 2); - cy.get(`@group`).find(`.t--draggable-buttonwidget`); - cy.get(`@group`).find(`.t--draggable-imagewidget`); - // verify the position so that the camera widget is still below the newly grouped container - cy.get(`.t--widget-containerwidget`) - .eq(1) - .then((element) => { - const elementTop = parseFloat(element.css("top")); - cy.get(`.t--widget-camerawidget`).then((element2) => { - const containerTop = parseFloat(element2.css("top")); - expect(containerTop).to.be.greaterThan(elementTop); - }); + it("Select widgets using cmd + click and group using cmd + G", function () { + // Selection + cy.get(`#${dsl.dsl.children[2].widgetId}`).click({ + ctrlKey: true, + }); + cy.get(`#${dsl.dsl.children[3].widgetId}`).click({ + ctrlKey: true, }); - }); -}); + cy.get(`div[data-testid='t--selected']`).should("have.length", 2); + cy.get(`.t--multi-selection-box`).should("have.length", 1); + const isMac = Cypress.platform === "darwin"; + // Grouping + if (isMac) { + cy.get("body").type("{cmd}{g}"); + } else { + cy.get("body").type("{ctrl}{g}"); + } + cy.wait(2000); + cy.get(`div[data-testid='t--selected']`) + .should("have.length", 1) + .as("group"); + cy.get("body").click(); + cy.get(`@group`) + .find(`[data-testid="test-widget"]`) + .should("have.length", 2); + cy.get(`@group`).find(`.t--draggable-buttonwidget`); + cy.get(`@group`).find(`.t--draggable-imagewidget`); + + // verify the position so that the camera widget is still below the newly grouped container + cy.get(`.t--widget-containerwidget`) + .eq(1) + .then((element) => { + const elementTop = parseFloat(element.css("top")); + cy.get(`.t--widget-camerawidget`).then((element2) => { + const containerTop = parseFloat(element2.css("top")); + expect(containerTop).to.be.greaterThan(elementTop); + }); + }); + }); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/WidgetSelection_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/WidgetSelection_spec.js index 85e75b0b90fb..fad3c44d4356 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/WidgetSelection_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/WidgetSelection_spec.js @@ -8,62 +8,66 @@ import { const dsl = require("../../../../fixtures/widgetSelection.json"); import * as _ from "../../../../support/Objects/ObjectsCore"; -describe("Widget Selection", { tags: ["@tag.Widget"] }, function () { - before(() => { - _.agHelper.AddDsl("widgetSelection"); - }); - - it("1. 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(`div[data-testid='t--selected']`).should("have.length", 2); - cy.get(`#${dsl.dsl.children[2].widgetId}`).click({ - ctrlKey: true, +describe( + "Widget Selection", + { tags: ["@tag.Widget", "@tag.Binding"] }, + function () { + before(() => { + _.agHelper.AddDsl("widgetSelection"); }); - cy.get(`div[data-testid='t--selected']`).should("have.length", 3); - cy.get(`#${dsl.dsl.children[0].widgetId}`).click({ - ctrlKey: true, - }); - cy.get(`div[data-testid='t--selected']`).should("have.length", 2); - cy.get(`.t--multi-selection-box`).should("have.length", 1); - }); + it("1. 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(`div[data-testid='t--selected']`).should("have.length", 2); + cy.get(`#${dsl.dsl.children[2].widgetId}`).click({ + ctrlKey: true, + }); + cy.get(`div[data-testid='t--selected']`).should("have.length", 3); + cy.get(`#${dsl.dsl.children[0].widgetId}`).click({ + ctrlKey: true, + }); + cy.get(`div[data-testid='t--selected']`).should("have.length", 2); - it("2. Select widgets using cmd + click and open property pane by clicking on the widget from right side panel", function () { - // Selection - cy.get(`#${dsl.dsl.children[0].widgetId}`).click({ - ctrlKey: true, - }); - cy.get(`#${dsl.dsl.children[2].widgetId}`).click({ - ctrlKey: true, + cy.get(`.t--multi-selection-box`).should("have.length", 1); }); - cy.get(`div[data-testid='t--selected']`).should("have.length", 2); - cy.get(`.t--multi-selection-box`).should("have.length", 1); - //select on one of the widgets from the right side panel - cy.get(`.t-multi-widget-property-pane`).should("have.length", 1); - cy.get(`#${dsl.dsl.children[2].widgetId}`).should("have.length", 1); - cy.get(`#widget_name_${dsl.dsl.children[2].widgetId}`).click({ - force: true, - }); + it("2. Select widgets using cmd + click and open property pane by clicking on the widget from right side panel", function () { + // Selection + cy.get(`#${dsl.dsl.children[0].widgetId}`).click({ + ctrlKey: true, + }); + cy.get(`#${dsl.dsl.children[2].widgetId}`).click({ + ctrlKey: true, + }); + cy.get(`div[data-testid='t--selected']`).should("have.length", 2); + cy.get(`.t--multi-selection-box`).should("have.length", 1); + + //select on one of the widgets from the right side panel + cy.get(`.t-multi-widget-property-pane`).should("have.length", 1); + cy.get(`#${dsl.dsl.children[2].widgetId}`).should("have.length", 1); + cy.get(`#widget_name_${dsl.dsl.children[2].widgetId}`).click({ + force: true, + }); - //should open property pane - cy.get(`.t--property-pane-view`).should("have.length", 1); - }); + //should open property pane + cy.get(`.t--property-pane-view`).should("have.length", 1); + }); - it("3. Should not select widgets if we hit CTRL + A on other Pages", function () { - // Click to create a New Data Source - _.dataSources.NavigateToDSCreateNew(); - // Hit CTRL +A - cy.get("body").type("{ctrl}{a}"); - // Switch to the Canvas - AppSidebar.navigate(AppSidebarButton.Editor); - PageLeftPane.switchSegment(PagePaneSegment.UI); - // Widgets should not be selected - cy.get(".t--multi-selection-box").should("not.exist"); - }); -}); + it("3. Should not select widgets if we hit CTRL + A on other Pages", function () { + // Click to create a New Data Source + _.dataSources.NavigateToDSCreateNew(); + // Hit CTRL +A + cy.get("body").type("{ctrl}{a}"); + // Switch to the Canvas + AppSidebar.navigate(AppSidebarButton.Editor); + PageLeftPane.switchSegment(PagePaneSegment.UI); + // Widgets should not be selected + cy.get(".t--multi-selection-box").should("not.exist"); + }); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Widgets_Labels_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Widgets_Labels_spec.js index 5fa084c1be3b..81328b3a81a0 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Widgets_Labels_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Widgets_Labels_spec.js @@ -1,6 +1,6 @@ let COLUMN_SPACE = 0; -describe("Label feature", { tags: ["@tag.Widget"] }, () => { +describe("Label feature", { tags: ["@tag.Widget", "@tag.Binding"] }, () => { before(() => { cy.get("#canvas-viewport").invoke("width", `640px`); // 72 - gutter width diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/deprecatedWidgets_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/deprecatedWidgets_spec.js index f3532f72d336..c18f1524543c 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/deprecatedWidgets_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/deprecatedWidgets_spec.js @@ -1,28 +1,35 @@ const dsl = require("../../../../fixtures/deprecatedWidgets.json"); import * as _ from "../../../../support/Objects/ObjectsCore"; -describe("Deprecation warning feature", { tags: ["@tag.Widget"] }, function () { - before(() => { - _.agHelper.AddDsl("deprecatedWidgets"); - }); - - it("should have deprecation warning on all the deprecated widgets", function () { - cy.get(`#div-selection-0`).click({ - force: true, +describe( + "Deprecation warning feature", + { tags: ["@tag.Widget", "@tag.Binding"] }, + function () { + before(() => { + _.agHelper.AddDsl("deprecatedWidgets"); }); - for (const widgets of dsl.dsl.children) { + it("should have deprecation warning on all the deprecated widgets", function () { cy.get(`#div-selection-0`).click({ force: true, }); - cy.get(`#${widgets.widgetId}`).click({ - ctrlKey: true, - }); + for (const widgets of dsl.dsl.children) { + cy.get(`#div-selection-0`).click({ + force: true, + }); - cy.get(`div[data-testid='t--selected']`).should("have.length", 1); + cy.get(`#${widgets.widgetId}`).click({ + ctrlKey: true, + }); - cy.get(`[data-testid='t--deprecation-warning']`).should("have.length", 1); - } - }); -}); + cy.get(`div[data-testid='t--selected']`).should("have.length", 1); + + cy.get(`[data-testid='t--deprecation-warning']`).should( + "have.length", + 1, + ); + } + }); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Workspace/CreateAppWithSameNameInWorkspace_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Workspace/CreateAppWithSameNameInWorkspace_spec.js index 53a40823ec35..578a482c4167 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Workspace/CreateAppWithSameNameInWorkspace_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Workspace/CreateAppWithSameNameInWorkspace_spec.js @@ -7,7 +7,7 @@ import { featureFlagIntercept } from "../../../../support/Objects/FeatureFlags"; describe( "Create workspace and a new app / delete and recreate app", - { tags: ["@tag.Workspace"] }, + { tags: ["@tag.Workspace", "@tag.AccessControl"] }, function () { let workspaceId; let appid; diff --git a/app/client/cypress/e2e/Regression/ClientSide/Workspace/CreateSameAppInDiffWorkspace_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Workspace/CreateSameAppInDiffWorkspace_spec.js index 0f7441e383c9..4cfb7b0032fc 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Workspace/CreateSameAppInDiffWorkspace_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Workspace/CreateSameAppInDiffWorkspace_spec.js @@ -6,7 +6,7 @@ import * as _ from "../../../../support/Objects/ObjectsCore"; describe( "Create app same name in different workspace", - { tags: ["@tag.Workspace"] }, + { tags: ["@tag.Workspace", "@tag.AccessControl"] }, function () { let workspaceId; let appid; diff --git a/app/client/cypress/e2e/Regression/ClientSide/Workspace/DeleteWorkspace_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Workspace/DeleteWorkspace_spec.ts index ba1a8ebf24e9..34acb3ad1f87 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Workspace/DeleteWorkspace_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Workspace/DeleteWorkspace_spec.ts @@ -10,7 +10,7 @@ import { describe( "Delete workspace test spec", - { tags: ["@tag.Workspace"] }, + { tags: ["@tag.Workspace", "@tag.AccessControl"] }, function () { let newWorkspaceName: any; diff --git a/app/client/cypress/e2e/Regression/ClientSide/Workspace/LeaveWorkspaceTest_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Workspace/LeaveWorkspaceTest_spec.js index dfa129f097ed..a22854042b47 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Workspace/LeaveWorkspaceTest_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Workspace/LeaveWorkspaceTest_spec.js @@ -9,7 +9,7 @@ import { REPO, CURRENT_REPO } from "../../../../fixtures/REPO"; describe( "Leave workspace test spec", - { tags: ["@tag.Workspace"] }, + { tags: ["@tag.Workspace", "@tag.AccessControl"] }, function () { let newWorkspaceName; diff --git a/app/client/cypress/e2e/Regression/ClientSide/Workspace/LoginFromUIApp_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Workspace/LoginFromUIApp_spec.js index 397d25274795..4b35e95cc5de 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Workspace/LoginFromUIApp_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Workspace/LoginFromUIApp_spec.js @@ -8,7 +8,7 @@ import EditorNavigation, { describe( "Create page & delete page from UI", - { tags: ["@tag.Workspace"] }, + { tags: ["@tag.Workspace", "@tag.AccessControl"] }, function () { let pageid; it("1. Create page & delete page from UI", function () { diff --git a/app/client/cypress/e2e/Regression/ClientSide/Workspace/MemberRoles_Spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Workspace/MemberRoles_Spec.ts index f747ffc96d27..85fab4226730 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Workspace/MemberRoles_Spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Workspace/MemberRoles_Spec.ts @@ -5,7 +5,7 @@ let workspaceId: any, appid: any; describe( "Create new workspace and invite user & validate all roles", - { tags: ["@tag.Workspace", "@tag.Sanity"] }, + { tags: ["@tag.Workspace", "@tag.Sanity", "@tag.AccessControl"] }, () => { it("1. Create new Workspace, Share with a user from UI & verify", () => { if (CURRENT_REPO === REPO.EE) _.adminSettings.EnableGAC(true, false); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Workspace/ShareAppTests_Spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Workspace/ShareAppTests_Spec.ts index 54ea1884ee16..94cc7ba412fd 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Workspace/ShareAppTests_Spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Workspace/ShareAppTests_Spec.ts @@ -13,7 +13,7 @@ const appNavigationLocators = require("../../../../locators/AppNavigation.json") describe( "Create new workspace and share with a user", - { tags: ["@tag.Workspace", "@tag.Sanity"] }, + { tags: ["@tag.Workspace", "@tag.Sanity", "@tag.AccessControl"] }, function () { let workspaceId: string, appid: string, currentUrl: any; @@ -113,6 +113,7 @@ describe( agHelper.AssertElementExist(homePage._appEditIcon); agHelper.GetNClick(homePage._appEditIcon, 0, true); agHelper.AssertElementAbsence(locators._loading); + assertHelper.AssertNetworkStatus("@getConsolidatedData", 200, true); agHelper.GetNClick(inviteModal.locators._shareButton, 0, true); agHelper.GetNClick(homePage._sharePublicToggle, 0, true); agHelper.GetNClick(locators._dialogCloseButton, 0, true); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Workspace/UpdateWorkspaceTests_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Workspace/UpdateWorkspaceTests_spec.js index aa3f46cad051..1f52daa85e54 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Workspace/UpdateWorkspaceTests_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Workspace/UpdateWorkspaceTests_spec.js @@ -1,92 +1,96 @@ import homePage from "../../../../locators/HomePage"; import * as _ from "../../../../support/Objects/ObjectsCore"; -describe("Update Workspace", { tags: ["@tag.Workspace"] }, function () { - let workspaceId; - let newWorkspaceName; - let appid; - - it("1. Open the workspace general settings and update workspace name. The update should reflect in the workspace. It should also reflect in the workspace names on the left side and the workspace dropdown. ", function () { - _.homePage.NavigateToHome(); - _.homePage.NavigateToHome(); - _.agHelper.GenerateUUID(); - cy.get("@guid").then((uid) => { - appid = "App" + uid; - workspaceId = uid; - _.homePage.CreateNewWorkspace(workspaceId); - cy.get(homePage.workspaceSettingOption).click({ force: true }); - //_.homePage.CreateAppInWorkspace(workspaceId, appid); - cy.get(homePage.workspaceNameInput).click({ force: true }); - cy.get(homePage.workspaceNameInput).clear(); - cy.get(homePage.workspaceNameInput).type(workspaceId); - // eslint-disable-next-line cypress/no-unnecessary-waiting - cy.wait(2000); - cy.get(homePage.workspaceHeaderName).should( - "have.text", - `${workspaceId}`, - ); +describe( + "Update Workspace", + { tags: ["@tag.Workspace", "@tag.AccessControl"] }, + function () { + let workspaceId; + let newWorkspaceName; + let appid; + it("1. Open the workspace general settings and update workspace name. The update should reflect in the workspace. It should also reflect in the workspace names on the left side and the workspace dropdown. ", function () { + _.homePage.NavigateToHome(); _.homePage.NavigateToHome(); - cy.get(homePage.leftPanelContainer).within(() => { - cy.get("span").should((item) => { - expect(item).to.contain.text(workspaceId); + _.agHelper.GenerateUUID(); + cy.get("@guid").then((uid) => { + appid = "App" + uid; + workspaceId = uid; + _.homePage.CreateNewWorkspace(workspaceId); + cy.get(homePage.workspaceSettingOption).click({ force: true }); + //_.homePage.CreateAppInWorkspace(workspaceId, appid); + cy.get(homePage.workspaceNameInput).click({ force: true }); + cy.get(homePage.workspaceNameInput).clear(); + cy.get(homePage.workspaceNameInput).type(workspaceId); + // eslint-disable-next-line cypress/no-unnecessary-waiting + cy.wait(2000); + cy.get(homePage.workspaceHeaderName).should( + "have.text", + `${workspaceId}`, + ); + + _.homePage.NavigateToHome(); + cy.get(homePage.leftPanelContainer).within(() => { + cy.get("span").should((item) => { + expect(item).to.contain.text(workspaceId); + }); }); }); }); - }); - it("2. Open the workspace general settings and update workspace email. The update should reflect in the workspace.", function () { - _.agHelper.GenerateUUID(); - cy.get("@guid").then((uid) => { - newWorkspaceName = "SettingsUpdate" + uid; - _.homePage.CreateNewWorkspace(newWorkspaceName); + it("2. Open the workspace general settings and update workspace email. The update should reflect in the workspace.", function () { + _.agHelper.GenerateUUID(); + cy.get("@guid").then((uid) => { + newWorkspaceName = "SettingsUpdate" + uid; + _.homePage.CreateNewWorkspace(newWorkspaceName); + }); + cy.get(homePage.workspaceSettingOption).click({ force: true }); + cy.get(homePage.workspaceEmailInput).clear(); + cy.get(homePage.workspaceEmailInput).type(Cypress.env("TESTUSERNAME2")); + cy.wait("@updateWorkspace").should( + "have.nested.property", + "response.body.responseMeta.status", + 200, + ); + cy.get(homePage.workspaceEmailInput).should( + "have.value", + Cypress.env("TESTUSERNAME2"), + ); + // update workspace website + cy.get(homePage.workspaceWebsiteInput).clear(); + cy.get(homePage.workspaceWebsiteInput).type("demowebsite.com"); + cy.wait("@updateWorkspace").should( + "have.nested.property", + "response.body.responseMeta.status", + 200, + ); + cy.get(homePage.workspaceWebsiteInput).should( + "have.value", + "demowebsite.com", + ); }); - cy.get(homePage.workspaceSettingOption).click({ force: true }); - cy.get(homePage.workspaceEmailInput).clear(); - cy.get(homePage.workspaceEmailInput).type(Cypress.env("TESTUSERNAME2")); - cy.wait("@updateWorkspace").should( - "have.nested.property", - "response.body.responseMeta.status", - 200, - ); - cy.get(homePage.workspaceEmailInput).should( - "have.value", - Cypress.env("TESTUSERNAME2"), - ); - // update workspace website - cy.get(homePage.workspaceWebsiteInput).clear(); - cy.get(homePage.workspaceWebsiteInput).type("demowebsite.com"); - cy.wait("@updateWorkspace").should( - "have.nested.property", - "response.body.responseMeta.status", - 200, - ); - cy.get(homePage.workspaceWebsiteInput).should( - "have.value", - "demowebsite.com", - ); - }); - it("3. Upload logo / delete logo and validate", function () { - const fixturePath = "cypress/fixtures/appsmithlogo.png"; - cy.xpath(homePage.uploadLogo).first().selectFile(fixturePath, { - force: true, + it("3. Upload logo / delete logo and validate", function () { + const fixturePath = "cypress/fixtures/appsmithlogo.png"; + cy.xpath(homePage.uploadLogo).first().selectFile(fixturePath, { + force: true, + }); + cy.wait("@updateLogo").should( + "have.nested.property", + "response.body.responseMeta.status", + 200, + ); + cy.wait(1000); + cy.get(homePage.removeLogo) + .last() + .should("be.hidden") + .invoke("show") + .click({ force: true }); + cy.wait("@deleteLogo").should( + "have.nested.property", + "response.body.responseMeta.status", + 200, + ); }); - cy.wait("@updateLogo").should( - "have.nested.property", - "response.body.responseMeta.status", - 200, - ); - cy.wait(1000); - cy.get(homePage.removeLogo) - .last() - .should("be.hidden") - .invoke("show") - .click({ force: true }); - cy.wait("@deleteLogo").should( - "have.nested.property", - "response.body.responseMeta.status", - 200, - ); - }); -}); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Workspace/WorkspaceImportApplication_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Workspace/WorkspaceImportApplication_spec.js index ba5a8f83d1d9..33033fa577af 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Workspace/WorkspaceImportApplication_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Workspace/WorkspaceImportApplication_spec.js @@ -3,7 +3,7 @@ import { agHelper, homePage } from "../../../../support/Objects/ObjectsCore"; describe( "Workspace Import Application", - { tags: ["@tag.Workspace", "@tag.Sanity"] }, + { tags: ["@tag.Workspace", "@tag.Sanity", "@tag.AccessControl"] }, function () { let workspaceId; let newWorkspaceName; diff --git a/app/client/cypress/e2e/Regression/ClientSide/Workspace/Workspace_validation_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Workspace/Workspace_validation_spec.js index 98ed4776f685..60f805652354 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Workspace/Workspace_validation_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Workspace/Workspace_validation_spec.js @@ -5,7 +5,7 @@ import * as _ from "../../../../support/Objects/ObjectsCore"; describe( "Workspace name validation spec", - { tags: ["@tag.Workspace"] }, + { tags: ["@tag.Workspace", "@tag.AccessControl"] }, function () { let workspaceId; let newWorkspaceName; diff --git a/app/client/cypress/e2e/Regression/ServerSide/ApiTests/API_All_Verb_spec.js b/app/client/cypress/e2e/Regression/ServerSide/ApiTests/API_All_Verb_spec.js index d88c2c7ba3e8..8c4cfa434edc 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/ApiTests/API_All_Verb_spec.js +++ b/app/client/cypress/e2e/Regression/ServerSide/ApiTests/API_All_Verb_spec.js @@ -16,7 +16,7 @@ import { describe( "API Panel Test Functionality", - { tags: ["@tag.Datasource"] }, + { tags: ["@tag.Datasource", "@tag.Git", "@tag.AccessControl"] }, function () { const successMsg = "Executed successfully from user request"; afterEach(function () { diff --git a/app/client/cypress/e2e/Regression/ServerSide/ApiTests/API_Auto_Generated_Header_spec.ts b/app/client/cypress/e2e/Regression/ServerSide/ApiTests/API_Auto_Generated_Header_spec.ts index 5acbf74d906b..bead7f2dc5c2 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/ApiTests/API_Auto_Generated_Header_spec.ts +++ b/app/client/cypress/e2e/Regression/ServerSide/ApiTests/API_Auto_Generated_Header_spec.ts @@ -2,7 +2,7 @@ import * as _ from "../../../../support/Objects/ObjectsCore"; describe( "Validate API Auto generated headers", - { tags: ["@tag.Datasource"] }, + { tags: ["@tag.Datasource", "@tag.Git", "@tag.AccessControl"] }, () => { it("1. Check whether auto generated header is set and overidden", () => { _.apiPage.CreateApi("FirstAPI"); diff --git a/app/client/cypress/e2e/Regression/ServerSide/ApiTests/API_Bugs_Spec.js b/app/client/cypress/e2e/Regression/ServerSide/ApiTests/API_Bugs_Spec.js index 7feda064b36f..8f1a58ebc09f 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/ApiTests/API_Bugs_Spec.js +++ b/app/client/cypress/e2e/Regression/ServerSide/ApiTests/API_Bugs_Spec.js @@ -18,211 +18,217 @@ import { } from "../../../../support/Objects/ObjectsCore"; import PageList from "../../../../support/Pages/PageList"; -describe("Rest Bugs tests", { tags: ["@tag.Datasource"] }, function () { - beforeEach(() => { - agHelper.RestoreLocalStorageCache(); - }); - - afterEach(() => { - agHelper.SaveLocalStorageCache(); - }); - - it("1. Bug 5550: Not able to run APIs in parallel", function () { - agHelper.AddDsl("apiParallelDsl"); - cy.get(".ads-v2-spinner").should("not.exist"); - - //Api 1 - apiPage.CreateAndFillApi( - dataManager.dsValues[dataManager.defaultEnviorment].flowerImageUrl1, - "FlowerImage1", - ); - agHelper.PressEscape(); - - //Api 2 - apiPage.CreateAndFillApi( - dataManager.dsValues[dataManager.defaultEnviorment].flowerImageUrl2, - "FlowerImage2", - ); - agHelper.PressEscape(); - - //Api 3 - apiPage.CreateAndFillApi( - "http://host.docker.internal:8000/a.txt", - "SampleText", - ); - agHelper.PressEscape(); - - //Api 4 - apiPage.CreateAndFillApi( - "http://host.docker.internal:5001/v1/dynamicrecords/getrecordsArray", - "dynamicRecords", - ); - agHelper.PressEscape(); - - PageLeftPane.switchSegment(PagePaneSegment.UI); - agHelper.ClickButton("Invoke APIs!"); - cy.wait(12000); // for all api calls to complete! - - //Flower1 Image - cy.xpath("//img/parent::div") - .eq(0) - .find("img") - .invoke("attr", "src") - .then(($src) => { - expect($src).not.eq( - "http://host.docker.internal:4200/clouddefaultImage.png", - ); - //expect($src).contains("cat"); - }); +describe( + "Rest Bugs tests", + { tags: ["@tag.Datasource", "@tag.Git", "@tag.AccessControl"] }, + function () { + beforeEach(() => { + agHelper.RestoreLocalStorageCache(); + }); - // cy.wait("@postExecute").then(({ response }) => { - // expect(response.body.data.isExecutionSuccess).to.eq(true); - // expect(response.body.data.body[0].url.length).to.be.above(0); //Cat image - // }); - - // cy.wait("@postExecute").then(({ response }) => { - // expect(response.body.data.isExecutionSuccess).to.eq(true); - // expect(response.body.data.body.message.length).to.be.above(0); //Dog Image - // }); - - //Flower2 Image - cy.xpath("//img/parent::div") - .eq(1) - .find("img") - .invoke("attr", "src") - .then(($src) => { - expect($src).not.eq( - "http://host.docker.internal:4200/clouddefaultImage.png", - ); - //expect($src).contains("dog"); - }); + afterEach(() => { + agHelper.SaveLocalStorageCache(); + }); - // cy.wait("@postExecute").then(({ response }) => { - // expect(response.body.data.isExecutionSuccess).to.eq(true); - // expect(response.body.data.body.length).to.be.above(0); //Number fact - // }); - - cy.get(".t--widget-buttonwidget").scrollIntoView(); - - cy.get(".t--widget-textwidget") - .eq(0) - .invoke("text") - .then(($txt) => expect($txt).to.have.length.greaterThan(20)); - - // cy.wait("@postExecute").then(({ response }) => { - // //cy.log("Response is :"+ JSON.stringify(response.body)) - // expect(response.body.data.isExecutionSuccess).to.eq(true); - // expect(response.body.data.request.url.length).to.be.above(0); //Cocktail - // }); - - //Cocktail DB - cy.xpath("//img/parent::div") - .eq(2) - .find("img") - .invoke("attr", "src") - .then(($src) => { - expect($src).not.eq( - "http://host.docker.internal:4200/clouddefaultImage.png", - ); - //expect($src).contains("cocktail"); - }); + it("1. Bug 5550: Not able to run APIs in parallel", function () { + agHelper.AddDsl("apiParallelDsl"); + cy.get(".ads-v2-spinner").should("not.exist"); + + //Api 1 + apiPage.CreateAndFillApi( + dataManager.dsValues[dataManager.defaultEnviorment].flowerImageUrl1, + "FlowerImage1", + ); + agHelper.PressEscape(); + + //Api 2 + apiPage.CreateAndFillApi( + dataManager.dsValues[dataManager.defaultEnviorment].flowerImageUrl2, + "FlowerImage2", + ); + agHelper.PressEscape(); + + //Api 3 + apiPage.CreateAndFillApi( + "http://host.docker.internal:8000/a.txt", + "SampleText", + ); + agHelper.PressEscape(); + + //Api 4 + apiPage.CreateAndFillApi( + "http://host.docker.internal:5001/v1/dynamicrecords/getrecordsArray", + "dynamicRecords", + ); + agHelper.PressEscape(); + + PageLeftPane.switchSegment(PagePaneSegment.UI); + agHelper.ClickButton("Invoke APIs!"); + cy.wait(12000); // for all api calls to complete! + + //Flower1 Image + cy.xpath("//img/parent::div") + .eq(0) + .find("img") + .invoke("attr", "src") + .then(($src) => { + expect($src).not.eq( + "http://host.docker.internal:4200/clouddefaultImage.png", + ); + //expect($src).contains("cat"); + }); + + // cy.wait("@postExecute").then(({ response }) => { + // expect(response.body.data.isExecutionSuccess).to.eq(true); + // expect(response.body.data.body[0].url.length).to.be.above(0); //Cat image + // }); + + // cy.wait("@postExecute").then(({ response }) => { + // expect(response.body.data.isExecutionSuccess).to.eq(true); + // expect(response.body.data.body.message.length).to.be.above(0); //Dog Image + // }); + + //Flower2 Image + cy.xpath("//img/parent::div") + .eq(1) + .find("img") + .invoke("attr", "src") + .then(($src) => { + expect($src).not.eq( + "http://host.docker.internal:4200/clouddefaultImage.png", + ); + //expect($src).contains("dog"); + }); + + // cy.wait("@postExecute").then(({ response }) => { + // expect(response.body.data.isExecutionSuccess).to.eq(true); + // expect(response.body.data.body.length).to.be.above(0); //Number fact + // }); + + cy.get(".t--widget-buttonwidget").scrollIntoView(); + + cy.get(".t--widget-textwidget") + .eq(0) + .invoke("text") + .then(($txt) => expect($txt).to.have.length.greaterThan(20)); + + // cy.wait("@postExecute").then(({ response }) => { + // //cy.log("Response is :"+ JSON.stringify(response.body)) + // expect(response.body.data.isExecutionSuccess).to.eq(true); + // expect(response.body.data.request.url.length).to.be.above(0); //Cocktail + // }); + + //Cocktail DB + cy.xpath("//img/parent::div") + .eq(2) + .find("img") + .invoke("attr", "src") + .then(($src) => { + expect($src).not.eq( + "http://host.docker.internal:4200/clouddefaultImage.png", + ); + //expect($src).contains("cocktail"); + }); + + //Spread to check later! + // cy.wait(['@postExecute', '@postExecute', '@postExecute', '@postExecute'], { timeout: 8000 }).spread( + // (postExecute1, postExecute2, postExecute3, postExecute4) => { + // expect(postExecute1.body.data.isExecutionSuccess).to.eq(true); + // expect(postExecute1.body.data.body.url.length).to.be.above(0); + + // expect(postExecute2.body.data.isExecutionSuccess).to.eq(true); + // expect(postExecute2.body.data.body.type).to.eq('cat'); + + // expect(postExecute3.body.data.isExecutionSuccess).to.eq(true); + // expect(postExecute3.body.data.body.message.length).to.be.above(0); + + // expect(postExecute4.body.data.isExecutionSuccess).to.eq(true); + // expect(postExecute4.body.data.body.type).to.eq('dog'); + + // }) + }); - //Spread to check later! - // cy.wait(['@postExecute', '@postExecute', '@postExecute', '@postExecute'], { timeout: 8000 }).spread( - // (postExecute1, postExecute2, postExecute3, postExecute4) => { - // expect(postExecute1.body.data.isExecutionSuccess).to.eq(true); - // expect(postExecute1.body.data.body.url.length).to.be.above(0); - - // expect(postExecute2.body.data.isExecutionSuccess).to.eq(true); - // expect(postExecute2.body.data.body.type).to.eq('cat'); - - // expect(postExecute3.body.data.isExecutionSuccess).to.eq(true); - // expect(postExecute3.body.data.body.message.length).to.be.above(0); - - // expect(postExecute4.body.data.isExecutionSuccess).to.eq(true); - // expect(postExecute4.body.data.body.type).to.eq('dog'); - - // }) - }); - - it("2. Bug 6863: Clicking on 'debug' crashes the appsmith application", function () { - cy.startErrorRoutes(); - PageList.AddNewPage(); - //Api 1 - apiPage.CreateAndFillApi( - dataManager.dsValues[dataManager.defaultEnviorment].flowerImageUrl1, - "InternalServerErrorApi", - ); - apiPage.RunAPI(false); - cy.wait("@postExecuteError"); - cy.get(commonlocators.errorTab).should("be.visible").click({ force: true }); - cy.get(commonlocators.debuggerLabel) - .invoke("text") - .then(($text) => { - expect($text).to.eq("An unexpected error occurred"); - }); - }); - - it("3. Bug 4775: No Cyclical dependency when Api returns an error", function () { - entityExplorer.DragDropWidgetNVerify(draggableWidgets.TABLE); - propPane.EnterJSContext("Table data", "{{MockApi.data}}"); - //Api 1 - apiPage.CreateAndFillApi( - dataManager.dsValues[dataManager.defaultEnviorment].mockApiUrl, - "MockApi", - ); - apiPage.RunAPI(); - cy.ResponseStatusCheck(testdata.successStatusCode); - EditorNavigation.SelectEntityByName("Table1", EntityType.Widget); - table.WaitUntilTableLoad(0, 0, "v2"); - - EditorNavigation.SelectEntityByName("MockApi", EntityType.Api); - apiPage.EnterURL( - dataManager.dsValues[dataManager.defaultEnviorment].mockHttpCodeUrl + - "404", - ); - apiPage.RunAPI(false); - agHelper.AssertElementAbsence( - locators._specificToast("Cyclic dependency found while evaluating"), - ); - cy.ResponseStatusCheck("404 NOT_FOUND"); - agHelper.GetNClick(commonlocators.errorTab); - agHelper.GetNClick(commonlocators.debuggerToggle); - cy.get(commonlocators.debuggerLabel) - .invoke("text") - .then(($text) => { - expect($text.toLowerCase()).contains("Not Found".toLowerCase()); + it("2. Bug 6863: Clicking on 'debug' crashes the appsmith application", function () { + cy.startErrorRoutes(); + PageList.AddNewPage(); + //Api 1 + apiPage.CreateAndFillApi( + dataManager.dsValues[dataManager.defaultEnviorment].flowerImageUrl1, + "InternalServerErrorApi", + ); + apiPage.RunAPI(false); + cy.wait("@postExecuteError"); + cy.get(commonlocators.errorTab) + .should("be.visible") + .click({ force: true }); + cy.get(commonlocators.debuggerLabel) + .invoke("text") + .then(($text) => { + expect($text).to.eq("An unexpected error occurred"); + }); + }); + + it("3. Bug 4775: No Cyclical dependency when Api returns an error", function () { + entityExplorer.DragDropWidgetNVerify(draggableWidgets.TABLE); + propPane.EnterJSContext("Table data", "{{MockApi.data}}"); + //Api 1 + apiPage.CreateAndFillApi( + dataManager.dsValues[dataManager.defaultEnviorment].mockApiUrl, + "MockApi", + ); + apiPage.RunAPI(); + cy.ResponseStatusCheck(testdata.successStatusCode); + EditorNavigation.SelectEntityByName("Table1", EntityType.Widget); + table.WaitUntilTableLoad(0, 0, "v2"); + + EditorNavigation.SelectEntityByName("MockApi", EntityType.Api); + apiPage.EnterURL( + dataManager.dsValues[dataManager.defaultEnviorment].mockHttpCodeUrl + + "404", + ); + apiPage.RunAPI(false); + agHelper.AssertElementAbsence( + locators._specificToast("Cyclic dependency found while evaluating"), + ); + cy.ResponseStatusCheck("404 NOT_FOUND"); + agHelper.GetNClick(commonlocators.errorTab); + agHelper.GetNClick(commonlocators.debuggerToggle); + cy.get(commonlocators.debuggerLabel) + .invoke("text") + .then(($text) => { + expect($text.toLowerCase()).contains("Not Found".toLowerCase()); + }); + }); + + it("4. Bug 13515: API Response gets garbled if encoded with gzip", function () { + apiPage.CreateAndFillApi( + dataManager.dsValues[dataManager.defaultEnviorment].mockGzipApi, + "GarbledResponseAPI", + ); + apiPage.RunAPI(false); + apiPage.SelectPaneTab("Response"); + cy.wait("@postExecute").then(({ response }) => { + expect(response.body.data.isExecutionSuccess).to.eq(true); + const bodyArr = response.body.data.body; + expect(bodyArr).to.have.any.keys("gzipped"); }); - }); - - it("4. Bug 13515: API Response gets garbled if encoded with gzip", function () { - apiPage.CreateAndFillApi( - dataManager.dsValues[dataManager.defaultEnviorment].mockGzipApi, - "GarbledResponseAPI", - ); - apiPage.RunAPI(false); - apiPage.SelectPaneTab("Response"); - cy.wait("@postExecute").then(({ response }) => { - expect(response.body.data.isExecutionSuccess).to.eq(true); - const bodyArr = response.body.data.body; - expect(bodyArr).to.have.any.keys("gzipped"); }); - }); - - // this test applies to other fields as well - params and body formdata - it("5. Bug 25817: Assert that header fields are correctly updated.", function () { - apiPage.CreateAndFillApi( - dataManager.dsValues[dataManager.defaultEnviorment].mockGzipApi, - "HeaderTest", - ); - apiPage.EnterHeader("hello", "world", 0); - apiPage.EnterHeader("", "", 1); - agHelper.GetNClick(apiPage._addMoreHeaderFieldButton); - apiPage.EnterHeader("hey", "there", 2); - - agHelper.RefreshPage(); - - apiPage.ValidateHeaderParams({ key: "hello", value: "world" }, 0); - apiPage.ValidateHeaderParams({ key: "hey", value: "there" }, 1); - }); -}); + + // this test applies to other fields as well - params and body formdata + it("5. Bug 25817: Assert that header fields are correctly updated.", function () { + apiPage.CreateAndFillApi( + dataManager.dsValues[dataManager.defaultEnviorment].mockGzipApi, + "HeaderTest", + ); + apiPage.EnterHeader("hello", "world", 0); + apiPage.EnterHeader("", "", 1); + agHelper.GetNClick(apiPage._addMoreHeaderFieldButton); + apiPage.EnterHeader("hey", "there", 2); + + agHelper.RefreshPage(); + + apiPage.ValidateHeaderParams({ key: "hello", value: "world" }, 0); + apiPage.ValidateHeaderParams({ key: "hey", value: "there" }, 1); + }); + }, +); diff --git a/app/client/cypress/e2e/Regression/ServerSide/ApiTests/API_ContextMenu_spec.js b/app/client/cypress/e2e/Regression/ServerSide/ApiTests/API_ContextMenu_spec.js index aef13e574d23..3c717e80e373 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/ApiTests/API_ContextMenu_spec.js +++ b/app/client/cypress/e2e/Regression/ServerSide/ApiTests/API_ContextMenu_spec.js @@ -15,7 +15,7 @@ import { describe( "API Panel Test Functionality ", - { tags: ["@tag.Datasource"] }, + { tags: ["@tag.Datasource", "@tag.Git", "@tag.AccessControl"] }, function () { it("1. Test API copy/Move/delete feature", function () { cy.Createpage("SecondPage"); diff --git a/app/client/cypress/e2e/Regression/ServerSide/ApiTests/API_CurlPOSTImport_spec.js b/app/client/cypress/e2e/Regression/ServerSide/ApiTests/API_CurlPOSTImport_spec.js index a5e910cff0ac..573b74152c34 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/ApiTests/API_CurlPOSTImport_spec.js +++ b/app/client/cypress/e2e/Regression/ServerSide/ApiTests/API_CurlPOSTImport_spec.js @@ -1,48 +1,52 @@ const apiwidget = require("../../../../locators/apiWidgetslocator.json"); import { apiPage, assertHelper } from "../../../../support/Objects/ObjectsCore"; -describe("Test curl import flow", { tags: ["@tag.Datasource"] }, function () { - it("1. Test curl import flow for POST action with JSON body", function () { - cy.fixture("datasources").then((datasourceFormData) => { - localStorage.setItem("ApiPaneV2", "ApiPaneV2"); - apiPage.FillCurlNImport( - 'curl -d \'{"name":"morpheus","job":"leader"}\' -H Content-Type:application/json -X POST ' + - datasourceFormData["echoApiUrl"], - { - force: true, - parseSpecialCharSequences: false, - }, - ); - assertHelper.AssertNetworkExecutionSuccess("@postExecute"); - cy.get("@curlImport").then((response) => { - cy.expect(response.response.body.responseMeta.success).to.eq(true); - cy.get(apiwidget.ApiName) - .invoke("text") - .then((text) => { - const someText = text; - expect(someText).to.equal(response.response.body.data.name); - }); +describe( + "Test curl import flow", + { tags: ["@tag.Datasource", "@tag.Git", "@tag.AccessControl"] }, + function () { + it("1. Test curl import flow for POST action with JSON body", function () { + cy.fixture("datasources").then((datasourceFormData) => { + localStorage.setItem("ApiPaneV2", "ApiPaneV2"); + apiPage.FillCurlNImport( + 'curl -d \'{"name":"morpheus","job":"leader"}\' -H Content-Type:application/json -X POST ' + + datasourceFormData["echoApiUrl"], + { + force: true, + parseSpecialCharSequences: false, + }, + ); + assertHelper.AssertNetworkExecutionSuccess("@postExecute"); + cy.get("@curlImport").then((response) => { + cy.expect(response.response.body.responseMeta.success).to.eq(true); + cy.get(apiwidget.ApiName) + .invoke("text") + .then((text) => { + const someText = text; + expect(someText).to.equal(response.response.body.data.name); + }); + }); }); }); - }); - it("2. Test curl import flow for POST action with multipart form data", function () { - cy.fixture("datasources").then((datasourceFormData) => { - apiPage.FillCurlNImport( - `curl --request POST ${datasourceFormData["multipartAPI"]} -F 'randomKey=randomValue' --form 'randomKey2=\"randomValue2\"'`, - ); - cy.get("@postExecute").then((response) => { - cy.log(response); - cy.expect(response.response.body.responseMeta.success).to.eq(true); - // Asserting if the form key value are returned in the response - cy.expect(response.response.body.data.body.data.randomKey).to.eq( - "randomValue", + it("2. Test curl import flow for POST action with multipart form data", function () { + cy.fixture("datasources").then((datasourceFormData) => { + apiPage.FillCurlNImport( + `curl --request POST ${datasourceFormData["multipartAPI"]} -F 'randomKey=randomValue' --form 'randomKey2=\"randomValue2\"'`, ); - apiPage.ValidateHeaderParams({ - key: "Content-Type", - value: "multipart/form-data", + cy.get("@postExecute").then((response) => { + cy.log(response); + cy.expect(response.response.body.responseMeta.success).to.eq(true); + // Asserting if the form key value are returned in the response + cy.expect(response.response.body.data.body.data.randomKey).to.eq( + "randomValue", + ); + apiPage.ValidateHeaderParams({ + key: "Content-Type", + value: "multipart/form-data", + }); }); }); }); - }); -}); + }, +); diff --git a/app/client/cypress/e2e/Regression/ServerSide/ApiTests/API_DefaultContentType_spec.js b/app/client/cypress/e2e/Regression/ServerSide/ApiTests/API_DefaultContentType_spec.js index 75f2ba07d7d0..a673acae0ed4 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/ApiTests/API_DefaultContentType_spec.js +++ b/app/client/cypress/e2e/Regression/ServerSide/ApiTests/API_DefaultContentType_spec.js @@ -8,70 +8,74 @@ import appPage from "../../../../locators/CMSApplocators"; import apiEditor from "../../../../locators/ApiEditor"; import { apiPage } from "../../../../support/Objects/ObjectsCore"; -describe("API Panel request body", { tags: ["@tag.Datasource"] }, function () { - it("1. Check whether the default content-type changes on changing method types and remains unchanged on switching to GET", function () { - cy.CreateAPI("FirstAPI"); +describe( + "API Panel request body", + { tags: ["@tag.Datasource", "@tag.Git", "@tag.AccessControl"] }, + function () { + it("1. Check whether the default content-type changes on changing method types and remains unchanged on switching to GET", function () { + cy.CreateAPI("FirstAPI"); - // Checking for default Body type to be NONE - cy.contains(apiEditor.bodyTab).click({ force: true }); - cy.get(apiEditor.bodyTypeSelected).should("have.text", "NONE"); + // Checking for default Body type to be NONE + cy.contains(apiEditor.bodyTab).click({ force: true }); + cy.get(apiEditor.bodyTypeSelected).should("have.text", "NONE"); - apiPage.SelectSubTab("JSON"); + apiPage.SelectSubTab("JSON"); - //Switch to headers tab - cy.contains(apiEditor.headersTab).click(); + //Switch to headers tab + cy.contains(apiEditor.headersTab).click(); - // Changing method type to POST - cy.get(apiEditor.ApiVerb).click(); - cy.get(appPage.selectPost).click(); + // Changing method type to POST + cy.get(apiEditor.ApiVerb).click(); + cy.get(appPage.selectPost).click(); - // Checking Header for POST Type - cy.get(apiwidget.autoGeneratedHeaderKey) - .first() - .should("have.text", "content-type"); - cy.get(apiwidget.autoGeneratedHeaderValue) - .first() - .should("have.text", "application/json"); + // Checking Header for POST Type + cy.get(apiwidget.autoGeneratedHeaderKey) + .first() + .should("have.text", "content-type"); + cy.get(apiwidget.autoGeneratedHeaderValue) + .first() + .should("have.text", "application/json"); - // Checking Body type to be JSON - cy.contains(apiEditor.bodyTab).click({ force: true }); - apiPage.SelectSubTab("JSON"); - cy.get(apiEditor.bodyTypeSelected).should("have.text", "JSON"); + // Checking Body type to be JSON + cy.contains(apiEditor.bodyTab).click({ force: true }); + apiPage.SelectSubTab("JSON"); + cy.get(apiEditor.bodyTypeSelected).should("have.text", "JSON"); - // Changing method type to GET - cy.get(apiEditor.ApiVerb).first().click(); - cy.get(appPage.selectGet).first().click(); + // Changing method type to GET + cy.get(apiEditor.ApiVerb).first().click(); + cy.get(appPage.selectGet).first().click(); - // Checking Header for GET Type - cy.contains(apiEditor.headersTab).click(); - cy.get(apiwidget.autoGeneratedHeaderKey) - .first() - .should("have.text", "content-type"); - cy.get(apiwidget.autoGeneratedHeaderValue) - .first() - .should("have.text", "application/json"); + // Checking Header for GET Type + cy.contains(apiEditor.headersTab).click(); + cy.get(apiwidget.autoGeneratedHeaderKey) + .first() + .should("have.text", "content-type"); + cy.get(apiwidget.autoGeneratedHeaderValue) + .first() + .should("have.text", "application/json"); - cy.DeleteAPI(); - }); + cy.DeleteAPI(); + }); - it("2. Bug 14624 - Verifying the content-type none is not added", function () { - AppSidebar.navigate(AppSidebarButton.Editor); - cy.CreateAPI("FirstAPI"); + it("2. Bug 14624 - Verifying the content-type none is not added", function () { + AppSidebar.navigate(AppSidebarButton.Editor); + cy.CreateAPI("FirstAPI"); - // Checking for default Body type to be NONE - cy.contains(apiEditor.bodyTab).click({ force: true }); - cy.get(apiEditor.bodyTypeSelected).should("have.text", "NONE"); + // Checking for default Body type to be NONE + cy.contains(apiEditor.bodyTab).click({ force: true }); + cy.get(apiEditor.bodyTypeSelected).should("have.text", "NONE"); - //Switch to headers tab - cy.contains(apiEditor.headersTab).click(); + //Switch to headers tab + cy.contains(apiEditor.headersTab).click(); - // Checking Header to not have content-type:none - cy.get(`${apiwidget.headerKey} .CodeMirror .CodeMirror-code`) - .first() - .should("not.have.text", "content-type"); - cy.get(`${apiwidget.headerValue} .CodeMirror .CodeMirror-code`) - .first() - .should("not.have.text", "none"); - cy.DeleteAPI(); - }); -}); + // Checking Header to not have content-type:none + cy.get(`${apiwidget.headerKey} .CodeMirror .CodeMirror-code`) + .first() + .should("not.have.text", "content-type"); + cy.get(`${apiwidget.headerValue} .CodeMirror .CodeMirror-code`) + .first() + .should("not.have.text", "none"); + cy.DeleteAPI(); + }); + }, +); diff --git a/app/client/cypress/e2e/Regression/ServerSide/ApiTests/API_Edit_spec.js b/app/client/cypress/e2e/Regression/ServerSide/ApiTests/API_Edit_spec.js index 32f675a51fac..d0f1a21dd872 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/ApiTests/API_Edit_spec.js +++ b/app/client/cypress/e2e/Regression/ServerSide/ApiTests/API_Edit_spec.js @@ -16,7 +16,7 @@ import { describe( "API Panel Test Functionality", - { tags: ["@tag.Datasource"] }, + { tags: ["@tag.Datasource", "@tag.Git", "@tag.AccessControl"] }, function () { before(() => { agHelper.AddDsl("uiBindDsl"); diff --git a/app/client/cypress/e2e/Regression/ServerSide/ApiTests/API_EvaluatedValue_spec.ts b/app/client/cypress/e2e/Regression/ServerSide/ApiTests/API_EvaluatedValue_spec.ts index 81439b394ae3..033506650095 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/ApiTests/API_EvaluatedValue_spec.ts +++ b/app/client/cypress/e2e/Regression/ServerSide/ApiTests/API_EvaluatedValue_spec.ts @@ -2,7 +2,7 @@ import { apiPage, dataManager } from "../../../../support/Objects/ObjectsCore"; describe( "Validate API URL Evaluated value", - { tags: ["@tag.Datasource"] }, + { tags: ["@tag.Datasource", "@tag.Git", "@tag.AccessControl"] }, () => { it("1. Check if url object does not crash App", () => { apiPage.CreateApi("FirstAPI"); diff --git a/app/client/cypress/e2e/Regression/ServerSide/ApiTests/API_MultiPart_Spec.ts b/app/client/cypress/e2e/Regression/ServerSide/ApiTests/API_MultiPart_Spec.ts index 7d05cf8f040e..44800a8afb24 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/ApiTests/API_MultiPart_Spec.ts +++ b/app/client/cypress/e2e/Regression/ServerSide/ApiTests/API_MultiPart_Spec.ts @@ -17,7 +17,7 @@ import EditorNavigation, { describe( "Validate API request body panel", - { tags: ["@tag.Datasource"] }, + { tags: ["@tag.Datasource", "@tag.Git", "@tag.AccessControl"] }, () => { beforeEach(() => { agHelper.RestoreLocalStorageCache(); diff --git a/app/client/cypress/e2e/Regression/ServerSide/ApiTests/API_Mustache_spec.js b/app/client/cypress/e2e/Regression/ServerSide/ApiTests/API_Mustache_spec.js index 3fe959483399..625b54243b5d 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/ApiTests/API_Mustache_spec.js +++ b/app/client/cypress/e2e/Regression/ServerSide/ApiTests/API_Mustache_spec.js @@ -8,7 +8,7 @@ import { agHelper } from "../../../../support/Objects/ObjectsCore"; describe( "Moustache test Functionality", - { tags: ["@tag.Datasource"] }, + { tags: ["@tag.Datasource", "@tag.Git", "@tag.AccessControl"] }, function () { beforeEach(() => { agHelper.AddDsl("commondsl"); diff --git a/app/client/cypress/e2e/Regression/ServerSide/ApiTests/API_RequestBody_spec.ts b/app/client/cypress/e2e/Regression/ServerSide/ApiTests/API_RequestBody_spec.ts index 950aa5c90a25..b1d11a12a5ee 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/ApiTests/API_RequestBody_spec.ts +++ b/app/client/cypress/e2e/Regression/ServerSide/ApiTests/API_RequestBody_spec.ts @@ -4,16 +4,20 @@ import { agHelper, } from "../../../../support/Objects/ObjectsCore"; -describe("API Panel request body", { tags: ["@tag.Datasource"] }, function () { - it("1. Check whether input exists when form-encoded is selected", function () { - apiPage.CreateApi("FirstAPI"); - apiPage.SelectAPIVerb("POST"); - apiPage.SelectPaneTab("Body"); - apiPage.SelectSubTab("FORM_URLENCODED"); - agHelper.AssertElementVisibility(apiPage._bodyKey(0)); - agHelper.ActionContextMenuWithInPane({ - action: "Delete", - entityType: entityItems.Api, +describe( + "API Panel request body", + { tags: ["@tag.Datasource", "@tag.Git", "@tag.AccessControl"] }, + function () { + it("1. Check whether input exists when form-encoded is selected", function () { + apiPage.CreateApi("FirstAPI"); + apiPage.SelectAPIVerb("POST"); + apiPage.SelectPaneTab("Body"); + apiPage.SelectSubTab("FORM_URLENCODED"); + agHelper.AssertElementVisibility(apiPage._bodyKey(0)); + agHelper.ActionContextMenuWithInPane({ + action: "Delete", + entityType: entityItems.Api, + }); }); - }); -}); + }, +); diff --git a/app/client/cypress/e2e/Regression/ServerSide/ApiTests/API_Response_View_spec.js b/app/client/cypress/e2e/Regression/ServerSide/ApiTests/API_Response_View_spec.js index 71a4106f6fde..630146e5d5e8 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/ApiTests/API_Response_View_spec.js +++ b/app/client/cypress/e2e/Regression/ServerSide/ApiTests/API_Response_View_spec.js @@ -11,7 +11,7 @@ const testUrl1 = describe( "Bug 14666: Api Response Test Functionality ", - { tags: ["@tag.Datasource"] }, + { tags: ["@tag.Datasource", "@tag.Git", "@tag.AccessControl"] }, function () { it("1. Test table loading when data is in array format", function () { cy.log("Login Successful"); diff --git a/app/client/cypress/e2e/Regression/ServerSide/ApiTests/API_Search_spec.js b/app/client/cypress/e2e/Regression/ServerSide/ApiTests/API_Search_spec.js index bf98cae0b2db..a2e9fc56c0c6 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/ApiTests/API_Search_spec.js +++ b/app/client/cypress/e2e/Regression/ServerSide/ApiTests/API_Search_spec.js @@ -20,7 +20,7 @@ const testUrl3 = describe( "API Panel Test Functionality ", - { tags: ["@tag.Datasource"] }, + { tags: ["@tag.Datasource", "@tag.Git", "@tag.AccessControl"] }, function () { it("1. Test Search API fetaure", function () { cy.log("Login Successful"); diff --git a/app/client/cypress/e2e/Regression/ServerSide/ApiTests/API_Styles_spec.js b/app/client/cypress/e2e/Regression/ServerSide/ApiTests/API_Styles_spec.js index eb249e75cf6e..12f5ad350a96 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/ApiTests/API_Styles_spec.js +++ b/app/client/cypress/e2e/Regression/ServerSide/ApiTests/API_Styles_spec.js @@ -12,7 +12,7 @@ import EditorNavigation, { describe( "Validate API Panel CSS Styles", - { tags: ["@tag.Datasource"] }, + { tags: ["@tag.Datasource", "@tag.Git", "@tag.AccessControl"] }, function () { const backgroundColorGray200 = "rgb(227, 232, 239)"; const backgroundColorwhite = "rgb(255, 255, 255)"; diff --git a/app/client/cypress/e2e/Regression/ServerSide/ApiTests/API_TestExecuteWithDynamicBindingInUrl_spec.ts b/app/client/cypress/e2e/Regression/ServerSide/ApiTests/API_TestExecuteWithDynamicBindingInUrl_spec.ts index 36df01ae346a..bdc97797f400 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/ApiTests/API_TestExecuteWithDynamicBindingInUrl_spec.ts +++ b/app/client/cypress/e2e/Regression/ServerSide/ApiTests/API_TestExecuteWithDynamicBindingInUrl_spec.ts @@ -8,7 +8,9 @@ import { describe( "Test API execution with dynamic binding in URL - Bug #24218", - { tags: ["@tag.Datasource", "@tag.Sanity"] }, + { + tags: ["@tag.Datasource", "@tag.Sanity", "@tag.Git", "@tag.AccessControl"], + }, () => { it("1. Test API execution with dynamic binding in URL", () => { // Create JS Object to set Appsmith store variable to mockApiUrl diff --git a/app/client/cypress/e2e/Regression/ServerSide/ApiTests/API_Unique_name_spec.js b/app/client/cypress/e2e/Regression/ServerSide/ApiTests/API_Unique_name_spec.js index fcf9d24b21b5..4679e43b2672 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/ApiTests/API_Unique_name_spec.js +++ b/app/client/cypress/e2e/Regression/ServerSide/ApiTests/API_Unique_name_spec.js @@ -1,13 +1,17 @@ import { apiPage } from "../../../../support/Objects/ObjectsCore"; -describe("Name uniqueness test", { tags: ["@tag.Datasource"] }, function () { - it("1. Validate Unique Name", () => { - apiPage.CreateApi("Uni"); //Creation of UniqueName Action successful - cy.CreationOfUniqueAPIcheck("Uni"); - //2. Validate download apiname check - cy.CreationOfUniqueAPIcheck("download"); - //3. Validate dedicated worker scope object property(Blob)apiname check - cy.CreationOfUniqueAPIcheck("Blob"); - // expect(2 + 2).to.equal(5); - }); -}); +describe( + "Name uniqueness test", + { tags: ["@tag.Datasource", "@tag.Git", "@tag.AccessControl"] }, + function () { + it("1. Validate Unique Name", () => { + apiPage.CreateApi("Uni"); //Creation of UniqueName Action successful + cy.CreationOfUniqueAPIcheck("Uni"); + //2. Validate download apiname check + cy.CreationOfUniqueAPIcheck("download"); + //3. Validate dedicated worker scope object property(Blob)apiname check + cy.CreationOfUniqueAPIcheck("Blob"); + // expect(2 + 2).to.equal(5); + }); + }, +); diff --git a/app/client/cypress/e2e/Regression/ServerSide/ApiTests/Api_XSS_Vulnerability_spec.ts b/app/client/cypress/e2e/Regression/ServerSide/ApiTests/Api_XSS_Vulnerability_spec.ts index ecd353533faf..574ffee3f7e5 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/ApiTests/Api_XSS_Vulnerability_spec.ts +++ b/app/client/cypress/e2e/Regression/ServerSide/ApiTests/Api_XSS_Vulnerability_spec.ts @@ -2,9 +2,10 @@ import { apiPage, agHelper } from "../../../../support/Objects/ObjectsCore"; describe( "Ensure XSS vulnerability are handled", - { tags: ["@tag.Datasource"] }, + { tags: ["@tag.Datasource", "@tag.Git", "@tag.AccessControl"] }, () => { - const test_rest_api_url1 = "https://jsonplaceholder.typicode.com/users"; + const test_rest_api_url1 = + "http://host.docker.internal:5001/v1/mock-api?records=20"; it("1. Ensures xss scripts are not executed when an API is run.", () => { apiPage.CreateApi("FirstAPI"); diff --git a/app/client/cypress/e2e/Regression/ServerSide/ApiTests/CurlImportFlow_spec.js b/app/client/cypress/e2e/Regression/ServerSide/ApiTests/CurlImportFlow_spec.js index 5059038431e6..68bd1520957e 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/ApiTests/CurlImportFlow_spec.js +++ b/app/client/cypress/e2e/Regression/ServerSide/ApiTests/CurlImportFlow_spec.js @@ -15,36 +15,40 @@ import { dataManager, } from "../../../../support/Objects/ObjectsCore"; -describe("Test curl import flow", { tags: ["@tag.Datasource"] }, function () { - it("1. Test curl import flow Run and Delete", function () { - localStorage.setItem("ApiPaneV2", "ApiPaneV2"); - apiPage.FillCurlNImport( - "curl -X GET " + - dataManager.dsValues[dataManager.defaultEnviorment].mockApiUrl, - ); - agHelper.ActionContextMenuWithInPane({ - action: "Delete", - entityType: entityItems.Api, - }); - }); - - it("2. Bug:15175 Creating new cURL import query from entity explorer crashes the app", function () { - cy.fixture("datasources").then((datasourceFormData) => { - EditorNavigation.SelectEntityByName("Page1", EntityType.Page); +describe( + "Test curl import flow", + { tags: ["@tag.Datasource", "@tag.Git", "@tag.AccessControl"] }, + function () { + it("1. Test curl import flow Run and Delete", function () { + localStorage.setItem("ApiPaneV2", "ApiPaneV2"); apiPage.FillCurlNImport( - 'curl -d \'{"name":"morpheus","job":"leader"}\' -H Content-Type:application/json -X POST ' + - datasourceFormData["echoApiUrl"], + "curl -X GET " + + dataManager.dsValues[dataManager.defaultEnviorment].mockApiUrl, ); + agHelper.ActionContextMenuWithInPane({ + action: "Delete", + entityType: entityItems.Api, + }); }); - }); - it("3. Bug:19214 Test curl import flow for request without any headers", function () { - cy.fixture("datasources").then((datasourceFormData) => { - apiPage.FillCurlNImport( - "curl -X GET " + datasourceFormData["echoApiUrl"], - ); - apiPage.AssertEmptyHeaderKeyValuePairsPresent(0); - apiPage.AssertEmptyHeaderKeyValuePairsPresent(1); + it("2. Bug:15175 Creating new cURL import query from entity explorer crashes the app", function () { + cy.fixture("datasources").then((datasourceFormData) => { + EditorNavigation.SelectEntityByName("Page1", EntityType.Page); + apiPage.FillCurlNImport( + 'curl -d \'{"name":"morpheus","job":"leader"}\' -H Content-Type:application/json -X POST ' + + datasourceFormData["echoApiUrl"], + ); + }); + }); + + it("3. Bug:19214 Test curl import flow for request without any headers", function () { + cy.fixture("datasources").then((datasourceFormData) => { + apiPage.FillCurlNImport( + "curl -X GET " + datasourceFormData["echoApiUrl"], + ); + apiPage.AssertEmptyHeaderKeyValuePairsPresent(0); + apiPage.AssertEmptyHeaderKeyValuePairsPresent(1); + }); }); - }); -}); + }, +); diff --git a/app/client/cypress/e2e/Regression/ServerSide/AppLevelImport/AppImportwithDS_Spec.ts b/app/client/cypress/e2e/Regression/ServerSide/AppLevelImport/AppImportwithDS_Spec.ts index b57c449e5515..2574b63898d2 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/AppLevelImport/AppImportwithDS_Spec.ts +++ b/app/client/cypress/e2e/Regression/ServerSide/AppLevelImport/AppImportwithDS_Spec.ts @@ -11,7 +11,7 @@ import { describe( "App level import with Datasource", - { tags: ["@tag.ImportExport"] }, + { tags: ["@tag.ImportExport", "@tag.Git"] }, () => { //this tests coveres Applevel import for MySql, Gsheet is covered in Gsheet folder it("1. Bug #26024 - Import an app at App Level with Datasource - MySql", () => { diff --git a/app/client/cypress/e2e/Regression/ServerSide/Datasources/ConnectionErrors_Spec.ts b/app/client/cypress/e2e/Regression/ServerSide/Datasources/ConnectionErrors_Spec.ts index 27933ddf85e2..9b7e3aeff018 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/Datasources/ConnectionErrors_Spec.ts +++ b/app/client/cypress/e2e/Regression/ServerSide/Datasources/ConnectionErrors_Spec.ts @@ -8,7 +8,7 @@ import { describe( "Validate Empty DS error messages", - { tags: ["@tag.Datasource"] }, + { tags: ["@tag.Datasource", "@tag.Git", "@tag.AccessControl"] }, () => { let dataSourceName: string; diff --git a/app/client/cypress/e2e/Regression/ServerSide/Datasources/ElasticSearch_Basic_Spec.ts b/app/client/cypress/e2e/Regression/ServerSide/Datasources/ElasticSearch_Basic_Spec.ts index 37685be9ec54..ca372a29f6ac 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/Datasources/ElasticSearch_Basic_Spec.ts +++ b/app/client/cypress/e2e/Regression/ServerSide/Datasources/ElasticSearch_Basic_Spec.ts @@ -4,21 +4,24 @@ import { entityItems, } from "../../../../support/Objects/ObjectsCore"; -describe("Validate Elasticsearch DS", { tags: ["@tag.Datasource"] }, () => { - let dsName: any, - books: any, - containerName = "elasticsearch"; - - before("Create a new ElasticSearch DS", () => { - dataSources.StartContainerNVerify("Elasticsearch", containerName, 45000); - dataSources.CreateDataSource("Elasticsearch"); - cy.get("@dsName").then(($dsName) => { - dsName = $dsName; - }); - }); - - it("1. Validate POST/GET/PUT/DELETE", () => { - let singleBook = `{ +describe( + "Validate Elasticsearch DS", + { tags: ["@tag.Datasource", "@tag.Git", "@tag.AccessControl"] }, + () => { + let dsName: any, + books: any, + containerName = "elasticsearch"; + + before("Create a new ElasticSearch DS", () => { + dataSources.StartContainerNVerify("Elasticsearch", containerName, 45000); + dataSources.CreateDataSource("Elasticsearch"); + cy.get("@dsName").then(($dsName) => { + dsName = $dsName; + }); + }); + + it("1. Validate POST/GET/PUT/DELETE", () => { + let singleBook = `{ "title": "The Lord of the Rings", "author": "J.R.R. Tolkien", "genre": ["Fantasy", "Adventure"], @@ -27,187 +30,194 @@ describe("Validate Elasticsearch DS", { tags: ["@tag.Datasource"] }, () => { "description": "The Lord of the Rings is an epic high fantasy novel written by English author and scholar J. R. R. Tolkien. The story began as a sequel to Tolkien's earlier fantasy book The Hobbit and soon developed into a much larger story." }`; - let bulkBooks = `{ "index": {"_index": "books", "_id": "2"}} + let bulkBooks = `{ "index": {"_index": "books", "_id": "2"}} { "title": "To Kill a Mockingbird", "author": "Harper Lee", "genre": ["Classic Literature", "Coming-of-Age"], "rating": 4.5, "published_date": "1960-07-11", "description": "To Kill a Mockingbird is a novel by Harper Lee, published in 1960. It is a coming-of-age story about a young girl named Scout Finch in a fictional town in Alabama during the Great Depression. The novel is renowned for its warmth and humor, despite dealing with serious issues of rape and racial inequality." } { "index": {"_index": "books", "_id": "3"}} { "title": "The Hitchhiker's Guide to the Galaxy", "author": "Douglas Adams", "genre": ["Science Fiction", "Comedy"], "rating": 4.4, "published_date": "1979-10-12", "description": "The Hitchhiker's Guide to the Galaxy is a comedy science fiction series created by Douglas Adams. It follows the misadventures of hapless human Arthur Dent and his alien friend Ford Prefect as they travel through space and time." }`; - dataSources.CreateQueryAfterDSSaved(); - - //POST - single record - dataSources.ValidateNSelectDropdown("Method", "GET", "POST"); - - agHelper.EnterValue("/books/_doc/1", { - propFieldName: "", - directInput: false, - inputFieldName: "Path", - }); - - agHelper.EnterValue(singleBook, { - propFieldName: "", - directInput: false, - inputFieldName: "Body", - }); - - dataSources.RunQuery(); - cy.get("@postExecute").then((resObj: any) => { - books = JSON.parse(JSON.stringify(resObj.response.body.data.body.result)); - expect(books).to.eq("created"); - }); - - //GET - single record - dataSources.ValidateNSelectDropdown("Method", "POST", "GET"); - agHelper.EnterValue("", { - propFieldName: "", - directInput: false, - inputFieldName: "Body", - }); - dataSources.RunQuery(); - cy.get("@postExecute").then((resObj: any) => { - books = JSON.parse( - JSON.stringify(resObj.response.body.data.body._source.title), - ); - expect(books).to.eq("The Lord of the Rings"); - }); - - //POST - bulk record - dataSources.ValidateNSelectDropdown("Method", "GET", "POST"); - - agHelper.EnterValue("/_bulk", { - propFieldName: "", - directInput: false, - inputFieldName: "Path", - }); - - //We need to enter new line at end, since without that body data not getting considered - agHelper.EnterValue(bulkBooks, { - propFieldName: "", - directInput: false, - inputFieldName: "Body", - }); - - agHelper - .GetElement(dataSources._bodyCodeMirror) - .type("{downarrow}".repeat(10)); - - agHelper.PressEnter(); - - agHelper.Sleep(2000); - dataSources.RunQuery(); - cy.get("@postExecute").then((resObj: any) => { - expect( - JSON.parse( - JSON.stringify(resObj.response.body.data.body.items[0].index._id), - ), - ).to.eq("2"); - expect( - JSON.parse( - JSON.stringify(resObj.response.body.data.body.items[1].index._id), - ), - ).to.eq("3"); - }); - - //GET - All inserted record - dataSources.ValidateNSelectDropdown("Method", "POST", "GET"); - agHelper.EnterValue("", { - propFieldName: "", - directInput: false, - inputFieldName: "Body", - }); - - agHelper.EnterValue("/books/_search", { - propFieldName: "", - directInput: false, - inputFieldName: "Path", - }); - dataSources.RunQuery(); - cy.get("@postExecute").then((resObj: any) => { - books = JSON.parse( - JSON.stringify(resObj.response.body.data.body.hits.total.value), - ); - expect(books).to.be.oneOf([1, 3]); - }); - - //PUT - update - let updateBook = `{ "title": "Pride and Prejudice", "author": "Jane Austen", "genre": ["Romance", "Classic Literature"], "rating": 4.5, "published_date": "1813-01-28", "description": "Pride and Prejudice is a romantic novel by Jane Austen, first published in 1813. The story follows the main character Elizabeth Bennet as she deals with issues of manners, upbringing, morality, education, and marriage in the society of the landed gentry of the British Regency." }`; - dataSources.ValidateNSelectDropdown("Method", "GET", "PUT"); - - agHelper.EnterValue("/books/_doc/1", { - propFieldName: "", - directInput: false, - inputFieldName: "Path", - }); - - agHelper.EnterValue(updateBook, { - propFieldName: "", - directInput: false, - inputFieldName: "Body", - }); - - agHelper - .GetElement(dataSources._bodyCodeMirror) - .type("{downarrow}".repeat(5)); - - agHelper.PressEnter(); - agHelper.Sleep(2000); - dataSources.RunQuery(); - - cy.get("@postExecute").then((resObj: any) => { - books = JSON.parse(JSON.stringify(resObj.response.body.data.body.result)); - expect(books).to.eq("updated"); - }); - - //GET - single record - after update - dataSources.ValidateNSelectDropdown("Method", "PUT", "GET"); - agHelper.EnterValue("", { - propFieldName: "", - directInput: false, - inputFieldName: "Body", - }); - dataSources.RunQuery(); - cy.get("@postExecute").then((resObj: any) => { - books = JSON.parse( - JSON.stringify(resObj.response.body.data.body._source.title), - ); - expect(books).to.eq("Pride and Prejudice"); - }); - - //DELETE - single record - dataSources.ValidateNSelectDropdown("Method", "GET", "DELETE"); - - agHelper.EnterValue("/books/_doc/1", { - propFieldName: "", - directInput: false, - inputFieldName: "Path", - }); - dataSources.RunQuery(); - - cy.get("@postExecute").then((resObj: any) => { - books = JSON.parse(JSON.stringify(resObj.response.body.data.body.result)); - expect(books).to.eq("deleted"); - }); - - //DELETE - all records - agHelper.EnterValue("/_all", { - propFieldName: "", - directInput: false, - inputFieldName: "Path", - }); - dataSources.RunQuery(); - - cy.get("@postExecute").then((resObj: any) => { - books = JSON.parse( - JSON.stringify(resObj.response.body.data.body.acknowledged), - ); - expect(books).to.be.true; - }); - }); - - after("Delete the query & datasource", () => { - agHelper.ActionContextMenuWithInPane({ - action: "Delete", - entityType: entityItems.Query, - }); - dataSources.DeleteDatasourceFromWithinDS(dsName); - dataSources.StopNDeleteContainer(containerName); - }); -}); + dataSources.CreateQueryAfterDSSaved(); + + //POST - single record + dataSources.ValidateNSelectDropdown("Method", "GET", "POST"); + + agHelper.EnterValue("/books/_doc/1", { + propFieldName: "", + directInput: false, + inputFieldName: "Path", + }); + + agHelper.EnterValue(singleBook, { + propFieldName: "", + directInput: false, + inputFieldName: "Body", + }); + + dataSources.RunQuery(); + cy.get("@postExecute").then((resObj: any) => { + books = JSON.parse( + JSON.stringify(resObj.response.body.data.body.result), + ); + expect(books).to.eq("created"); + }); + + //GET - single record + dataSources.ValidateNSelectDropdown("Method", "POST", "GET"); + agHelper.EnterValue("", { + propFieldName: "", + directInput: false, + inputFieldName: "Body", + }); + dataSources.RunQuery(); + cy.get("@postExecute").then((resObj: any) => { + books = JSON.parse( + JSON.stringify(resObj.response.body.data.body._source.title), + ); + expect(books).to.eq("The Lord of the Rings"); + }); + + //POST - bulk record + dataSources.ValidateNSelectDropdown("Method", "GET", "POST"); + + agHelper.EnterValue("/_bulk", { + propFieldName: "", + directInput: false, + inputFieldName: "Path", + }); + + //We need to enter new line at end, since without that body data not getting considered + agHelper.EnterValue(bulkBooks, { + propFieldName: "", + directInput: false, + inputFieldName: "Body", + }); + + agHelper + .GetElement(dataSources._bodyCodeMirror) + .type("{downarrow}".repeat(10)); + + agHelper.PressEnter(); + + agHelper.Sleep(2000); + dataSources.RunQuery(); + cy.get("@postExecute").then((resObj: any) => { + expect( + JSON.parse( + JSON.stringify(resObj.response.body.data.body.items[0].index._id), + ), + ).to.eq("2"); + expect( + JSON.parse( + JSON.stringify(resObj.response.body.data.body.items[1].index._id), + ), + ).to.eq("3"); + }); + + //GET - All inserted record + dataSources.ValidateNSelectDropdown("Method", "POST", "GET"); + agHelper.EnterValue("", { + propFieldName: "", + directInput: false, + inputFieldName: "Body", + }); + + agHelper.EnterValue("/books/_search", { + propFieldName: "", + directInput: false, + inputFieldName: "Path", + }); + dataSources.RunQuery(); + cy.get("@postExecute").then((resObj: any) => { + books = JSON.parse( + JSON.stringify(resObj.response.body.data.body.hits.total.value), + ); + expect(books).to.be.oneOf([1, 3]); + }); + + //PUT - update + let updateBook = `{ "title": "Pride and Prejudice", "author": "Jane Austen", "genre": ["Romance", "Classic Literature"], "rating": 4.5, "published_date": "1813-01-28", "description": "Pride and Prejudice is a romantic novel by Jane Austen, first published in 1813. The story follows the main character Elizabeth Bennet as she deals with issues of manners, upbringing, morality, education, and marriage in the society of the landed gentry of the British Regency." }`; + dataSources.ValidateNSelectDropdown("Method", "GET", "PUT"); + + agHelper.EnterValue("/books/_doc/1", { + propFieldName: "", + directInput: false, + inputFieldName: "Path", + }); + + agHelper.EnterValue(updateBook, { + propFieldName: "", + directInput: false, + inputFieldName: "Body", + }); + + agHelper + .GetElement(dataSources._bodyCodeMirror) + .type("{downarrow}".repeat(5)); + + agHelper.PressEnter(); + agHelper.Sleep(2000); + dataSources.RunQuery(); + + cy.get("@postExecute").then((resObj: any) => { + books = JSON.parse( + JSON.stringify(resObj.response.body.data.body.result), + ); + expect(books).to.eq("updated"); + }); + + //GET - single record - after update + dataSources.ValidateNSelectDropdown("Method", "PUT", "GET"); + agHelper.EnterValue("", { + propFieldName: "", + directInput: false, + inputFieldName: "Body", + }); + dataSources.RunQuery(); + cy.get("@postExecute").then((resObj: any) => { + books = JSON.parse( + JSON.stringify(resObj.response.body.data.body._source.title), + ); + expect(books).to.eq("Pride and Prejudice"); + }); + + //DELETE - single record + dataSources.ValidateNSelectDropdown("Method", "GET", "DELETE"); + + agHelper.EnterValue("/books/_doc/1", { + propFieldName: "", + directInput: false, + inputFieldName: "Path", + }); + dataSources.RunQuery(); + + cy.get("@postExecute").then((resObj: any) => { + books = JSON.parse( + JSON.stringify(resObj.response.body.data.body.result), + ); + expect(books).to.eq("deleted"); + }); + + //DELETE - all records + agHelper.EnterValue("/_all", { + propFieldName: "", + directInput: false, + inputFieldName: "Path", + }); + dataSources.RunQuery(); + + cy.get("@postExecute").then((resObj: any) => { + books = JSON.parse( + JSON.stringify(resObj.response.body.data.body.acknowledged), + ); + expect(books).to.be.true; + }); + }); + + after("Delete the query & datasource", () => { + agHelper.ActionContextMenuWithInPane({ + action: "Delete", + entityType: entityItems.Query, + }); + dataSources.DeleteDatasourceFromWithinDS(dsName); + dataSources.StopNDeleteContainer(containerName); + }); + }, +); diff --git a/app/client/cypress/e2e/Regression/ServerSide/Datasources/Firestore_Basic_Spec.ts b/app/client/cypress/e2e/Regression/ServerSide/Datasources/Firestore_Basic_Spec.ts index 8412f77a9ca2..733ce02fff3c 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/Datasources/Firestore_Basic_Spec.ts +++ b/app/client/cypress/e2e/Regression/ServerSide/Datasources/Firestore_Basic_Spec.ts @@ -19,165 +19,97 @@ let dsName: any, newCityPath: any, createCity: any, cityName = "LA_"; -describe("Validate Firestore DS", { tags: ["@tag.Datasource"] }, () => { - before("Generate GUID for new Firestore DS", () => { - agHelper.GenerateUUID(); - cy.get("@guid").then((uid) => { - guid = uid; - dsName = "Firestore" + " " + uid; +describe( + "Validate Firestore DS", + { tags: ["@tag.Datasource", "@tag.Git", "@tag.AccessControl"] }, + () => { + before("Generate GUID for new Firestore DS", () => { + agHelper.GenerateUUID(); + cy.get("@guid").then((uid) => { + guid = uid; + dsName = "Firestore" + " " + uid; + }); }); - }); - - it("1. Firestore placeholder & mandatory mark verification", () => { - dataSources.NavigateToDSCreateNew(); - dataSources.CreatePlugIn("Firestore"); - agHelper.AssertElementVisibility(dataSources._imgFireStoreLogo); - agHelper.GetNAssertContains(locators._dsName, "Untitled datasource"); - agHelper.GetNClick(locators._dsName); - agHelper.ClearTextField(locators._dsNameTxt); //removing ds name - agHelper.AssertTooltip(Cypress.env("MESSAGES").ACTION_INVALID_NAME_ERROR()); - agHelper.TypeText(locators._dsNameTxt, dsName); - agHelper.PressEnter(); - agHelper.AssertAttribute( - locators._inputFieldByName("Database URL") + "//" + locators._inputField, - "placeholder", - "https://your-project-id.firebaseio.com", - ); - agHelper - .GetElement( - locators._inputFieldByName("Project Id") + "//" + locators._inputField, - ) - .should("not.have.attr", "placeholder"); - dataSources.TestDatasource(false); - agHelper.ValidateToastMessage("Missing Firestore URL."); - agHelper.ValidateToastMessage("Missing ProjectID in datasource."); - agHelper.ValidateToastMessage("Missing ClientJSON in datasource."); - dataSources.FillFirestoreDSForm(); - dataSources.TestSaveDatasource(); - }); - - it("2. Validate List/Create/Update/Get", () => { - agHelper.GenerateUUID(); - cy.get("@guid").then((uid) => { - cityName += uid; - createCity = - `{ + + it("1. Firestore placeholder & mandatory mark verification", () => { + dataSources.NavigateToDSCreateNew(); + dataSources.CreatePlugIn("Firestore"); + agHelper.AssertElementVisibility(dataSources._imgFireStoreLogo); + agHelper.GetNAssertContains(locators._dsName, "Untitled datasource"); + agHelper.GetNClick(locators._dsName); + agHelper.ClearTextField(locators._dsNameTxt); //removing ds name + agHelper.AssertTooltip( + Cypress.env("MESSAGES").ACTION_INVALID_NAME_ERROR(), + ); + agHelper.TypeText(locators._dsNameTxt, dsName); + agHelper.PressEnter(); + agHelper.AssertAttribute( + locators._inputFieldByName("Database URL") + + "//" + + locators._inputField, + "placeholder", + "https://your-project-id.firebaseio.com", + ); + agHelper + .GetElement( + locators._inputFieldByName("Project Id") + + "//" + + locators._inputField, + ) + .should("not.have.attr", "placeholder"); + dataSources.TestDatasource(false); + agHelper.ValidateToastMessage("Missing Firestore URL."); + agHelper.ValidateToastMessage("Missing ProjectID in datasource."); + agHelper.ValidateToastMessage("Missing ClientJSON in datasource."); + dataSources.FillFirestoreDSForm(); + dataSources.TestSaveDatasource(); + }); + + it("2. Validate List/Create/Update/Get", () => { + agHelper.GenerateUUID(); + cy.get("@guid").then((uid) => { + cityName += uid; + createCity = + `{ "name": "` + - cityName + - `", + cityName + + `", "state": "CA", "country": "USA", "capital": false, "population": 3900000, "regions": ["west_coast", "socal"] }`; - dataSources.CreateQueryAfterDSSaved(); - - //Create - dataSources.ValidateNSelectDropdown( - "Command", - "List Documents", - "Create document", - ); - - agHelper.EnterValue( - "cities/{{Math.random().toString(36).substring(2, 24)}}", - { - propFieldName: "", - directInput: false, - inputFieldName: "Collection Name", - }, - ); - - agHelper.EnterValue(createCity, { - propFieldName: "", - directInput: false, - inputFieldName: "Body", - }); - - dataSources.RunQuery(); //Create the document - - //Find the document id of the newly inserted record + Verify List all records - dataSources.ValidateNSelectDropdown( - "Command", - "Create document", - "List Documents", - ); - agHelper.EnterValue("cities", { - propFieldName: "", - directInput: false, - inputFieldName: "Collection Name", - }); - - agHelper.TypeDynamicInputValueNValidate( - "name", - dataSources._nestedWhereClauseKey(0), - ); - agHelper.TypeDynamicInputValueNValidate( - cityName, - dataSources._nestedWhereClauseValue(0), - ); - - dataSources.RunQuery(); - cy.get("@postExecute").then((resObj: any) => { - cities = JSON.parse(JSON.stringify(resObj.response.body.data.body)); - - cy.wrap(cities) - .should("be.an", "array") - .its(0) - .should("have.property", "name", cityName); //making sure newly inserted record is returned - const newCity = cities.find( - (city: { name: string }) => city.name === cityName, - ); - newCityPath = newCity._ref.path; - - agHelper.GetNClick(dataSources._whereDelete(0)); //removign where clause, add new condition - agHelper.TypeDynamicInputValueNValidate( - "capital", - dataSources._nestedWhereClauseKey(0), - ); - agHelper.TypeDynamicInputValueNValidate( - "true", - dataSources._nestedWhereClauseValue(0), - ); - dataSources.RunQuery(); - cy.get("@postExecute").then((resObj: any) => { - cities = JSON.stringify(resObj.response.body.data.body); - cy.wrap(cities).should("deep.equal", "[]"); //validating no record is returned - }); - - agHelper.GetNClick(dataSources._whereDelete(0)); //removign where clause + dataSources.CreateQueryAfterDSSaved(); - //Update document + //Create dataSources.ValidateNSelectDropdown( "Command", "List Documents", - "Update document", + "Create document", ); - agHelper.EnterValue(newCityPath, { - propFieldName: "", - directInput: false, - inputFieldName: "Collection Name", - }); - agHelper.EnterValue( - `{ - "state": "LL" - }`, + "cities/{{Math.random().toString(36).substring(2, 24)}}", { propFieldName: "", directInput: false, - inputFieldName: "Body", + inputFieldName: "Collection Name", }, ); - dataSources.RunQuery(); //Update the document + agHelper.EnterValue(createCity, { + propFieldName: "", + directInput: false, + inputFieldName: "Body", + }); + + dataSources.RunQuery(); //Create the document - //Validate the update happened fine + //Find the document id of the newly inserted record + Verify List all records dataSources.ValidateNSelectDropdown( "Command", - "Update document", + "Create document", "List Documents", ); agHelper.EnterValue("cities", { @@ -185,6 +117,7 @@ describe("Validate Firestore DS", { tags: ["@tag.Datasource"] }, () => { directInput: false, inputFieldName: "Collection Name", }); + agHelper.TypeDynamicInputValueNValidate( "name", dataSources._nestedWhereClauseKey(0), @@ -193,178 +126,255 @@ describe("Validate Firestore DS", { tags: ["@tag.Datasource"] }, () => { cityName, dataSources._nestedWhereClauseValue(0), ); - dataSources.RunQuery(); + dataSources.RunQuery(); cy.get("@postExecute").then((resObj: any) => { cities = JSON.parse(JSON.stringify(resObj.response.body.data.body)); - const losAngeles = cities.find( + + cy.wrap(cities) + .should("be.an", "array") + .its(0) + .should("have.property", "name", cityName); //making sure newly inserted record is returned + const newCity = cities.find( (city: { name: string }) => city.name === cityName, ); - expect(losAngeles.state).to.eq("LL"); //Verifying update is fine - }); + newCityPath = newCity._ref.path; - //Get Document - dataSources.ValidateNSelectDropdown( - "Command", - "List Documents", - "Get Document", - ); + agHelper.GetNClick(dataSources._whereDelete(0)); //removign where clause, add new condition + agHelper.TypeDynamicInputValueNValidate( + "capital", + dataSources._nestedWhereClauseKey(0), + ); + agHelper.TypeDynamicInputValueNValidate( + "true", + dataSources._nestedWhereClauseValue(0), + ); + dataSources.RunQuery(); + cy.get("@postExecute").then((resObj: any) => { + cities = JSON.stringify(resObj.response.body.data.body); + cy.wrap(cities).should("deep.equal", "[]"); //validating no record is returned + }); + + agHelper.GetNClick(dataSources._whereDelete(0)); //removign where clause + + //Update document + dataSources.ValidateNSelectDropdown( + "Command", + "List Documents", + "Update document", + ); - agHelper.EnterValue(newCityPath, { - propFieldName: "", - directInput: false, - inputFieldName: "Collection/Document path", - }); + agHelper.EnterValue(newCityPath, { + propFieldName: "", + directInput: false, + inputFieldName: "Collection Name", + }); - dataSources.RunQuery(); - cy.get("@postExecute").then((resObj: any) => { - cities = JSON.parse(JSON.stringify(resObj.response.body.data.body)); - cy.wrap(cities).should("have.property", "name", cityName); //making sure inserted record is returned + agHelper.EnterValue( + `{ + "state": "LL" + }`, + { + propFieldName: "", + directInput: false, + inputFieldName: "Body", + }, + ); + + dataSources.RunQuery(); //Update the document + + //Validate the update happened fine + dataSources.ValidateNSelectDropdown( + "Command", + "Update document", + "List Documents", + ); + agHelper.EnterValue("cities", { + propFieldName: "", + directInput: false, + inputFieldName: "Collection Name", + }); + agHelper.TypeDynamicInputValueNValidate( + "name", + dataSources._nestedWhereClauseKey(0), + ); + agHelper.TypeDynamicInputValueNValidate( + cityName, + dataSources._nestedWhereClauseValue(0), + ); + dataSources.RunQuery(); + + cy.get("@postExecute").then((resObj: any) => { + cities = JSON.parse(JSON.stringify(resObj.response.body.data.body)); + const losAngeles = cities.find( + (city: { name: string }) => city.name === cityName, + ); + expect(losAngeles.state).to.eq("LL"); //Verifying update is fine + }); + + //Get Document + dataSources.ValidateNSelectDropdown( + "Command", + "List Documents", + "Get Document", + ); + + agHelper.EnterValue(newCityPath, { + propFieldName: "", + directInput: false, + inputFieldName: "Collection/Document path", + }); + + dataSources.RunQuery(); + cy.get("@postExecute").then((resObj: any) => { + cities = JSON.parse(JSON.stringify(resObj.response.body.data.body)); + cy.wrap(cities).should("have.property", "name", cityName); //making sure inserted record is returned + }); }); }); }); - }); - - it("3. Validate Widget binding & Deploy app", () => { - dataSources.ValidateNSelectDropdown( - "Command", - "Get Document", - "List Documents", - ); - agHelper.EnterValue("cities", { - propFieldName: "", - directInput: false, - inputFieldName: "Collection Name", - }); - agHelper.GetNClick(dataSources._whereDelete(0)); //removign where clause, add new condition - dataSources.RunQuery(); - dataSources.AddSuggestedWidget(Widgets.Table); - deployMode.DeployApp(locators._widgetInDeployed(draggableWidgets.TABLE)); - table.WaitUntilTableLoad(0, 0, "v2"); - deployMode.NavigateBacktoEditor(); - EditorNavigation.SelectEntityByName("Query1", EntityType.Query); - }); - - it("4. Validate Upsert [Update & Insert]/Delete documents", () => { - //Validating Upsert - dataSources.ValidateNSelectDropdown( - "Command", - "List Documents", - "Upsert Document", - ); - - agHelper.EnterValue(newCityPath, { - propFieldName: "", - directInput: false, - inputFieldName: "Collection/Document path", + + it("3. Validate Widget binding & Deploy app", () => { + dataSources.ValidateNSelectDropdown( + "Command", + "Get Document", + "List Documents", + ); + agHelper.EnterValue("cities", { + propFieldName: "", + directInput: false, + inputFieldName: "Collection Name", + }); + agHelper.GetNClick(dataSources._whereDelete(0)); //removign where clause, add new condition + dataSources.RunQuery(); + dataSources.AddSuggestedWidget(Widgets.Table); + deployMode.DeployApp(locators._widgetInDeployed(draggableWidgets.TABLE)); + table.WaitUntilTableLoad(0, 0, "v2"); + deployMode.NavigateBacktoEditor(); + EditorNavigation.SelectEntityByName("Query1", EntityType.Query); }); - agHelper.EnterValue( - `{ + it("4. Validate Upsert [Update & Insert]/Delete documents", () => { + //Validating Upsert + dataSources.ValidateNSelectDropdown( + "Command", + "List Documents", + "Upsert Document", + ); + + agHelper.EnterValue(newCityPath, { + propFieldName: "", + directInput: false, + inputFieldName: "Collection/Document path", + }); + + agHelper.EnterValue( + `{ "population": 4000000 }`, - { + { + propFieldName: "", + directInput: false, + inputFieldName: "Body", + }, + ); + dataSources.RunQuery(); //Upsert the document + + dataSources.ValidateNSelectDropdown( + "Command", + "Upsert Document", + "List Documents", + ); + agHelper.EnterValue("cities", { propFieldName: "", directInput: false, - inputFieldName: "Body", - }, - ); - dataSources.RunQuery(); //Upsert the document - - dataSources.ValidateNSelectDropdown( - "Command", - "Upsert Document", - "List Documents", - ); - agHelper.EnterValue("cities", { - propFieldName: "", - directInput: false, - inputFieldName: "Collection Name", - }); - // agHelper.EnterValue('["population"]', { - // propFieldName: "", - // directInput: false, - // inputFieldName: "Order By", - // }); - - agHelper.TypeDynamicInputValueNValidate( - "population", - dataSources._nestedWhereClauseKey(0), - ); - agHelper.TypeDynamicInputValueNValidate( - "4000000", - dataSources._nestedWhereClauseValue(0), - ); - dataSources.RunQuery(); - - const expectedKeys = ["_ref", "population"]; - cy.get("@postExecute").then((resObj: any) => { - cities = JSON.parse(JSON.stringify(resObj.response.body.data.body)); - const firstRecordFields = Object.keys(cities[0]); - cy.log("firstRecordFields is " + firstRecordFields); - expect(firstRecordFields.every((key) => expectedKeys.includes(key))).to.be - .true; //Validating Upsert! - }); + inputFieldName: "Collection Name", + }); + // agHelper.EnterValue('["population"]', { + // propFieldName: "", + // directInput: false, + // inputFieldName: "Order By", + // }); - //Validating Delete - dataSources.ValidateNSelectDropdown( - "Command", - "List Documents", - "Delete document", - ); - - agHelper.EnterValue(newCityPath, { - propFieldName: "", - directInput: false, - inputFieldName: "Collection/Document path", - }); - dataSources.RunQuery(); //Delete the record - - //Validate Deletion - dataSources.ValidateNSelectDropdown( - "Command", - "Delete document", - "List Documents", - ); - agHelper.EnterValue("cities", { - propFieldName: "", - directInput: false, - inputFieldName: "Collection Name", - }); - agHelper.TypeDynamicInputValueNValidate( - "name", - dataSources._nestedWhereClauseKey(0), - ); - agHelper.TypeDynamicInputValueNValidate( - cityName, - dataSources._nestedWhereClauseValue(0), - ); - dataSources.RunQuery(); - - cy.get("@postExecute").then((resObj: any) => { - cities = JSON.parse(JSON.stringify(resObj.response.body.data.body)); - const hasNoInsertedCity = () => { - return Array.isArray(cities) && cities.length === 0; - }; - expect(hasNoInsertedCity()).to.be.true; //Validating Deletion! + agHelper.TypeDynamicInputValueNValidate( + "population", + dataSources._nestedWhereClauseKey(0), + ); + agHelper.TypeDynamicInputValueNValidate( + "4000000", + dataSources._nestedWhereClauseValue(0), + ); + dataSources.RunQuery(); + + const expectedKeys = ["_ref", "population"]; + cy.get("@postExecute").then((resObj: any) => { + cities = JSON.parse(JSON.stringify(resObj.response.body.data.body)); + const firstRecordFields = Object.keys(cities[0]); + cy.log("firstRecordFields is " + firstRecordFields); + expect(firstRecordFields.every((key) => expectedKeys.includes(key))).to + .be.true; //Validating Upsert! + }); + + //Validating Delete + dataSources.ValidateNSelectDropdown( + "Command", + "List Documents", + "Delete document", + ); + + agHelper.EnterValue(newCityPath, { + propFieldName: "", + directInput: false, + inputFieldName: "Collection/Document path", + }); + dataSources.RunQuery(); //Delete the record + + //Validate Deletion + dataSources.ValidateNSelectDropdown( + "Command", + "Delete document", + "List Documents", + ); + agHelper.EnterValue("cities", { + propFieldName: "", + directInput: false, + inputFieldName: "Collection Name", + }); + agHelper.TypeDynamicInputValueNValidate( + "name", + dataSources._nestedWhereClauseKey(0), + ); + agHelper.TypeDynamicInputValueNValidate( + cityName, + dataSources._nestedWhereClauseValue(0), + ); + dataSources.RunQuery(); + + cy.get("@postExecute").then((resObj: any) => { + cities = JSON.parse(JSON.stringify(resObj.response.body.data.body)); + const hasNoInsertedCity = () => { + return Array.isArray(cities) && cities.length === 0; + }; + expect(hasNoInsertedCity()).to.be.true; //Validating Deletion! + }); }); - }); - after("Delete the query & datasource", () => { - agHelper.ActionContextMenuWithInPane({ - action: "Delete", - entityType: entityItems.Query, + after("Delete the query & datasource", () => { + agHelper.ActionContextMenuWithInPane({ + action: "Delete", + entityType: entityItems.Query, + }); + dataSources.DeleteDatasourceFromWithinDS(dsName, 409); + //commenting below since after query delete, we run into risk of not seeing the datasource in EntityExplorer + // EditorNavigation.SelectEntityByName(dsName, EntityType.Datasource); + // entityExplorer.ActionContextMenuByEntityName({ + // entityNameinLeftSidebar: dsName, + // action: "Delete", + // entityType: entityItems.Datasource, + // }); + deployMode.DeployApp(); + deployMode.NavigateBacktoEditor(); + dataSources.DeleteDatasourceFromWithinDS(dsName, 200); }); - dataSources.DeleteDatasourceFromWithinDS(dsName, 409); - //commenting below since after query delete, we run into risk of not seeing the datasource in EntityExplorer - // EditorNavigation.SelectEntityByName(dsName, EntityType.Datasource); - // entityExplorer.ActionContextMenuByEntityName({ - // entityNameinLeftSidebar: dsName, - // action: "Delete", - // entityType: entityItems.Datasource, - // }); - deployMode.DeployApp(); - deployMode.NavigateBacktoEditor(); - dataSources.DeleteDatasourceFromWithinDS(dsName, 200); - }); -}); + }, +); diff --git a/app/client/cypress/e2e/Regression/ServerSide/Datasources/Oracle_Spec.ts b/app/client/cypress/e2e/Regression/ServerSide/Datasources/Oracle_Spec.ts index fff33025788c..64eee9596048 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/Datasources/Oracle_Spec.ts +++ b/app/client/cypress/e2e/Regression/ServerSide/Datasources/Oracle_Spec.ts @@ -20,114 +20,131 @@ import EditorNavigation, { } from "../../../../support/Pages/EditorNavigation"; import PageList from "../../../../support/Pages/PageList"; -describe("Validate Oracle DS", { tags: ["@tag.Datasource"] }, () => { - let dataSourceName: string, guid: any, query: string, selectQuery: string; +describe( + "Validate Oracle DS", + { tags: ["@tag.Datasource", "@tag.Git", "@tag.AccessControl"] }, + () => { + let dataSourceName: string, guid: any, query: string, selectQuery: string; - before("Generate GUID", () => { - agHelper.GenerateUUID(); - cy.get("@guid").then((uid) => { - guid = uid; - dataSourceName = "Oracle" + " " + uid; + before("Generate GUID", () => { + agHelper.GenerateUUID(); + cy.get("@guid").then((uid) => { + guid = uid; + dataSourceName = "Oracle" + " " + uid; + }); }); - }); - it("1. Tc #2354, #2204 - Oracle placeholder, port default value & mandatory mark verification", () => { - dataSources.NavigateToDSCreateNew(); - dataSources.CreatePlugIn("Oracle"); - agHelper.GetNAssertContains(locators._dsName, "Untitled datasource"); - agHelper.GetNClick(locators._dsName); - agHelper.ClearTextField(locators._dsNameTxt); //removing ds name - agHelper.AssertTooltip(Cypress.env("MESSAGES").ACTION_INVALID_NAME_ERROR()); - agHelper.TypeText(locators._dsNameTxt, dataSourceName); - agHelper.PressEnter(); - agHelper.AssertAttribute( - dataSources._host(), - "placeholder", - "myapp.abcde.oracle.net", - ); - agHelper.AssertAttribute(dataSources._port, "value", "1521"); - agHelper.AssertAttribute( - dataSources._databaseName, - "placeholder", - "gfb284db6bcee33_testdb_high.adb.oraclecloud.com", - ); - agHelper.AssertAttribute(dataSources._username, "placeholder", "admin"); - agHelper.AssertAttribute(dataSources._password, "placeholder", "password"); - agHelper.AssertElementLength(dataSources._mandatoryMark, 4); //verifyng all 4 fields are mandatory - agHelper.AssertText(dataSources._host(), "val", ""); - agHelper.ClearNType( - dataSources._host(), - dataManager.dsValues[dataManager.environments[1]].oracle_host, - ); - agHelper.AssertText( - dataSources._host(), - "val", - dataManager.dsValues[dataManager.environments[1]].oracle_host, - ); - agHelper.GetNClick(dataSources._deleteDSHostPort); //Delete the value & verify - agHelper.AssertText(dataSources._host(), "val", ""); - agHelper.ClickButton("Add more"); - agHelper.AssertElementVisibility(dataSources._host("1")); - agHelper.ClickButton("Add more"); - agHelper.AssertElementVisibility(dataSources._host("2")); - Cypress._.times(2, () => { - //Delete the added extra hosts - agHelper.GetNClick(dataSources._deleteDSHostPort); + it("1. Tc #2354, #2204 - Oracle placeholder, port default value & mandatory mark verification", () => { + dataSources.NavigateToDSCreateNew(); + dataSources.CreatePlugIn("Oracle"); + agHelper.GetNAssertContains(locators._dsName, "Untitled datasource"); + agHelper.GetNClick(locators._dsName); + agHelper.ClearTextField(locators._dsNameTxt); //removing ds name + agHelper.AssertTooltip( + Cypress.env("MESSAGES").ACTION_INVALID_NAME_ERROR(), + ); + agHelper.TypeText(locators._dsNameTxt, dataSourceName); + agHelper.PressEnter(); + agHelper.AssertAttribute( + dataSources._host(), + "placeholder", + "myapp.abcde.oracle.net", + ); + agHelper.AssertAttribute(dataSources._port, "value", "1521"); + agHelper.AssertAttribute( + dataSources._databaseName, + "placeholder", + "gfb284db6bcee33_testdb_high.adb.oraclecloud.com", + ); + agHelper.AssertAttribute(dataSources._username, "placeholder", "admin"); + agHelper.AssertAttribute( + dataSources._password, + "placeholder", + "password", + ); + agHelper.AssertElementLength(dataSources._mandatoryMark, 4); //verifyng all 4 fields are mandatory + agHelper.AssertText(dataSources._host(), "val", ""); + agHelper.ClearNType( + dataSources._host(), + dataManager.dsValues[dataManager.environments[1]].oracle_host, + ); + agHelper.AssertText( + dataSources._host(), + "val", + dataManager.dsValues[dataManager.environments[1]].oracle_host, + ); + agHelper.GetNClick(dataSources._deleteDSHostPort); //Delete the value & verify + agHelper.AssertText(dataSources._host(), "val", ""); + agHelper.ClickButton("Add more"); + agHelper.AssertElementVisibility(dataSources._host("1")); + agHelper.ClickButton("Add more"); + agHelper.AssertElementVisibility(dataSources._host("2")); + Cypress._.times(2, () => { + //Delete the added extra hosts + agHelper.GetNClick(dataSources._deleteDSHostPort); + }); }); - }); - it("2. Tc #2357, #2356, #2355, #2354 Verify Oracle connection errors", () => { - dataSources.TestDatasource(false); - agHelper.ValidateToastMessage("Missing endpoint"); - agHelper.ValidateToastMessage("Missing authentication details"); - agHelper.WaitUntilAllToastsDisappear(); + it("2. Tc #2357, #2356, #2355, #2354 Verify Oracle connection errors", () => { + dataSources.TestDatasource(false); + agHelper.ValidateToastMessage("Missing endpoint"); + agHelper.ValidateToastMessage("Missing authentication details"); + agHelper.WaitUntilAllToastsDisappear(); - agHelper.ClearNType( - dataSources._host(), - dataManager.dsValues[dataManager.defaultEnviorment].oracle_host, - ); - agHelper.ClearNType( - dataSources._databaseName, - dataManager.dsValues[dataManager.defaultEnviorment].oracle_service, - ); - dataSources.TestDatasource(false); - agHelper.ValidateToastMessage("Missing username for authentication"); - agHelper.ValidateToastMessage("Missing password for authentication"); + agHelper.ClearNType( + dataSources._host(), + dataManager.dsValues[dataManager.defaultEnviorment].oracle_host, + ); + agHelper.ClearNType( + dataSources._databaseName, + dataManager.dsValues[dataManager.defaultEnviorment].oracle_service, + ); + dataSources.TestDatasource(false); + agHelper.ValidateToastMessage("Missing username for authentication"); + agHelper.ValidateToastMessage("Missing password for authentication"); - agHelper.ClearNType( - dataSources._username, - dataManager.dsValues[dataManager.defaultEnviorment].oracle_username, - ); - agHelper.ClearNType( - dataSources._password, - dataManager.dsValues[dataManager.defaultEnviorment].oracle_password, - ); - dataSources.TestDatasource(false); - agHelper.ValidateToastMessage( - "An exception occurred while creating connection pool. One or more arguments in the datasource configuration may be invalid.", - ); - agHelper.ValidateToastMessage("Failed to initialize pool:"); - propPane.AssertPropertiesDropDownValues("SSL mode", ["Disable", "TLS"]); - dataSources.ValidateNSelectDropdown("SSL mode", "TLS", "Disable"); - dataSources.TestSaveDatasource(); - //Validate Review page - dataSources.AssertDataSourceInfo(["Host address", "Port", "Service Name"]); - agHelper.ClickButton("Edit"); //Navigate to Edit page & check if DS edit is opened - dataSources.ValidateNSelectDropdown("SSL mode", "Disable"); - AppSidebar.navigate(AppSidebarButton.Editor); - AppSidebar.navigate(AppSidebarButton.Data); - dataSources.AssertDSInActiveList(dataSourceName); - }); + agHelper.ClearNType( + dataSources._username, + dataManager.dsValues[dataManager.defaultEnviorment].oracle_username, + ); + agHelper.ClearNType( + dataSources._password, + dataManager.dsValues[dataManager.defaultEnviorment].oracle_password, + ); + dataSources.TestDatasource(false); + agHelper.ValidateToastMessage( + "An exception occurred while creating connection pool. One or more arguments in the datasource configuration may be invalid.", + ); + agHelper.ValidateToastMessage("Failed to initialize pool:"); + propPane.AssertPropertiesDropDownValues("SSL mode", ["Disable", "TLS"]); + dataSources.ValidateNSelectDropdown("SSL mode", "TLS", "Disable"); + dataSources.TestSaveDatasource(); + //Validate Review page + dataSources.AssertDataSourceInfo([ + "Host address", + "Port", + "Service Name", + ]); + agHelper.ClickButton("Edit"); //Navigate to Edit page & check if DS edit is opened + dataSources.ValidateNSelectDropdown("SSL mode", "Disable"); + AppSidebar.navigate(AppSidebarButton.Editor); + AppSidebar.navigate(AppSidebarButton.Data); + dataSources.AssertDSInActiveList(dataSourceName); + }); - it("3. Tc #2359, Tc # 2360 , Tc # 2358, Tc # 2366 - Create Insert, Alter & Select queries, Widgets to query binding", () => { - const currentDate = new Date().toISOString().slice(0, 10); + it("3. Tc #2359, Tc # 2360 , Tc # 2358, Tc # 2366 - Create Insert, Alter & Select queries, Widgets to query binding", () => { + const currentDate = new Date().toISOString().slice(0, 10); - entityExplorer.DragDropWidgetNVerify(draggableWidgets.DATEPICKER, 200, 50); - propPane.SelectPropertiesDropDown("Date format", "YYYY-MM-DD"); - entityExplorer.DragDropWidgetNVerify(draggableWidgets.SELECT, 500, 50); - propPane.EnterJSContext( - "Source Data", - `[{ + entityExplorer.DragDropWidgetNVerify( + draggableWidgets.DATEPICKER, + 200, + 50, + ); + propPane.SelectPropertiesDropDown("Date format", "YYYY-MM-DD"); + entityExplorer.DragDropWidgetNVerify(draggableWidgets.SELECT, 500, 50); + propPane.EnterJSContext( + "Source Data", + `[{ "name": "Cargo Plane", "value": "Cargo Plane" }, @@ -139,30 +156,33 @@ describe("Validate Oracle DS", { tags: ["@tag.Datasource"] }, () => { "name": "Helicopter", "code": "Helicopter" }]`, - ); - propPane.UpdatePropertyFieldValue("Default selected value", "Cargo Plane"); - propPane.AssertPropertiesDropDownValues("Label key", [ - "name", - "code", - "value", - ]); - propPane.SelectPropertiesDropDown( - "Label key", - "value", - "Action", - 0, - 0, - true, - ); - propPane.SelectPropertiesDropDown( - "Value key", - "name", - "Action", - 0, - 1, - true, - ); - query = `CREATE TABLE ${guid} ( + ); + propPane.UpdatePropertyFieldValue( + "Default selected value", + "Cargo Plane", + ); + propPane.AssertPropertiesDropDownValues("Label key", [ + "name", + "code", + "value", + ]); + propPane.SelectPropertiesDropDown( + "Label key", + "value", + "Action", + 0, + 0, + true, + ); + propPane.SelectPropertiesDropDown( + "Value key", + "name", + "Action", + 0, + 1, + true, + ); + query = `CREATE TABLE ${guid} ( aircraft_id NUMBER(5) PRIMARY KEY, aircraft_type VARCHAR2(50) NOT NULL, registration_number VARCHAR2(20) UNIQUE, @@ -174,10 +194,10 @@ describe("Validate Oracle DS", { tags: ["@tag.Datasource"] }, () => { maintenance_last_date DATE, notes CLOB );`; - dataSources.CreateQueryForDS(dataSourceName, query); - dataSources.RunQuery(); + dataSources.CreateQueryForDS(dataSourceName, query); + dataSources.RunQuery(); - query = `INSERT INTO ${guid} ( + query = `INSERT INTO ${guid} ( aircraft_id, aircraft_type, registration_number, @@ -198,30 +218,32 @@ describe("Validate Oracle DS", { tags: ["@tag.Datasource"] }, () => { TO_DATE('2020-01-15', 'YYYY-MM-DD'), TO_DATE('{{DatePicker1.formattedDate}}', 'YYYY-MM-DD'), 'This aircraft is used for domestic flights.')`; - selectQuery = `SELECT * FROM ${guid} WHERE ROWNUM < 10`; - dataSources.EnterQuery(selectQuery); + selectQuery = `SELECT * FROM ${guid} WHERE ROWNUM < 10`; + dataSources.EnterQuery(selectQuery); - dataSources.RunQuery(); - agHelper - .GetText(dataSources._noRecordFound) - .then(($noRecMsg) => expect($noRecMsg).to.eq("No data records to show")); - dataSources.EnterQuery(query); - agHelper.VerifyEvaluatedValue( - `INSERT INTO ${guid} (\n aircraft_id,\n aircraft_type,\n registration_number,\n manufacturer,\n seating_capacity,\n maximum_speed,\n range,\n purchase_date,\n maintenance_last_date,\n notes) VALUES (\n 1,\n $1,\n 'N12345',\n 'Boeing',\n 150,\n 550.03,\n 3500.30,\n TO_DATE('2020-01-15', 'YYYY-MM-DD'),\n TO_DATE($2, 'YYYY-MM-DD'),\n 'This aircraft is used for domestic flights.')`, - ); - dataSources.ToggleUsePreparedStatement(false); - agHelper.GetNClick(locators._codeEditorTarget); - agHelper.VerifyEvaluatedValue( - `INSERT INTO ${guid} (\n aircraft_id,\n aircraft_type,\n registration_number,\n manufacturer,\n seating_capacity,\n maximum_speed,\n range,\n purchase_date,\n maintenance_last_date,\n notes) VALUES (\n 1,\n 'Cargo Plane',\n 'N12345',\n 'Boeing',\n 150,\n 550.03,\n 3500.30,\n TO_DATE('2020-01-15', 'YYYY-MM-DD'),\n TO_DATE('${currentDate}', 'YYYY-MM-DD'),\n 'This aircraft is used for domestic flights.')`, - ); - dataSources.RunQuery(); - dataSources.EnterQuery(selectQuery); - dataSources.RunQueryNVerifyResponseViews(); - dataSources.ToggleUsePreparedStatement(true); - query = `ALTER TABLE ${guid} ADD (raw_data RAW(16), maintenance_interval INTERVAL YEAR(3) TO MONTH);`; - dataSources.EnterQuery(query); - dataSources.RunQuery(); - query = `INSERT INTO ${guid} ( + dataSources.RunQuery(); + agHelper + .GetText(dataSources._noRecordFound) + .then(($noRecMsg) => + expect($noRecMsg).to.eq("No data records to show"), + ); + dataSources.EnterQuery(query); + agHelper.VerifyEvaluatedValue( + `INSERT INTO ${guid} (\n aircraft_id,\n aircraft_type,\n registration_number,\n manufacturer,\n seating_capacity,\n maximum_speed,\n range,\n purchase_date,\n maintenance_last_date,\n notes) VALUES (\n 1,\n $1,\n 'N12345',\n 'Boeing',\n 150,\n 550.03,\n 3500.30,\n TO_DATE('2020-01-15', 'YYYY-MM-DD'),\n TO_DATE($2, 'YYYY-MM-DD'),\n 'This aircraft is used for domestic flights.')`, + ); + dataSources.ToggleUsePreparedStatement(false); + agHelper.GetNClick(locators._codeEditorTarget); + agHelper.VerifyEvaluatedValue( + `INSERT INTO ${guid} (\n aircraft_id,\n aircraft_type,\n registration_number,\n manufacturer,\n seating_capacity,\n maximum_speed,\n range,\n purchase_date,\n maintenance_last_date,\n notes) VALUES (\n 1,\n 'Cargo Plane',\n 'N12345',\n 'Boeing',\n 150,\n 550.03,\n 3500.30,\n TO_DATE('2020-01-15', 'YYYY-MM-DD'),\n TO_DATE('${currentDate}', 'YYYY-MM-DD'),\n 'This aircraft is used for domestic flights.')`, + ); + dataSources.RunQuery(); + dataSources.EnterQuery(selectQuery); + dataSources.RunQueryNVerifyResponseViews(); + dataSources.ToggleUsePreparedStatement(true); + query = `ALTER TABLE ${guid} ADD (raw_data RAW(16), maintenance_interval INTERVAL YEAR(3) TO MONTH);`; + dataSources.EnterQuery(query); + dataSources.RunQuery(); + query = `INSERT INTO ${guid} ( aircraft_id, aircraft_type, registration_number, @@ -247,11 +269,11 @@ describe("Validate Oracle DS", { tags: ["@tag.Datasource"] }, () => { UTL_RAW.CAST_TO_RAW('raw_value'), INTERVAL '1' YEAR(3) -- 1 year maintenance interval );`; - dataSources.EnterQuery(query); - dataSources.RunQuery(); - dataSources.EnterQuery(selectQuery); - dataSources.RunQueryNVerifyResponseViews(2); - query = `INSERT ALL + dataSources.EnterQuery(query); + dataSources.RunQuery(); + dataSources.EnterQuery(selectQuery); + dataSources.RunQueryNVerifyResponseViews(2); + query = `INSERT ALL INTO ${guid} ( aircraft_id, aircraft_type, @@ -309,34 +331,34 @@ describe("Validate Oracle DS", { tags: ["@tag.Datasource"] }, () => { INTERVAL '6' MONTH -- Six-month maintenance interval ); SELECT * FROM DUAL;`; - dataSources.EnterQuery(query); - dataSources.RunQuery(); - dataSources.EnterQuery(selectQuery); - dataSources.RunQueryNVerifyResponseViews(4); - selectQuery = selectQuery + ` and aircraft_id IN (1, 6)`; - dataSources.EnterQuery(selectQuery); - dataSources.RunQueryNVerifyResponseViews(2); - dataSources.AddSuggestedWidget(Widgets.Table); - deployMode.DeployApp(locators._widgetInDeployed(draggableWidgets.TABLE)); - table.WaitUntilTableLoad(0, 0, "v2"); - table.ReadTableRowColumnData(0, 10, "v2").then(($cellData) => { - expect($cellData).to.be.empty; - }); - table.ReadTableRowColumnData(0, 11, "v2").then(($cellData) => { - expect($cellData).to.be.empty; - }); - table.ReadTableRowColumnData(1, 10, "v2").then(($cellData) => { - expect($cellData).not.to.be.empty; - }); - table.ReadTableRowColumnData(1, 11, "v2").then(($cellData) => { - expect($cellData).not.to.be.empty; + dataSources.EnterQuery(query); + dataSources.RunQuery(); + dataSources.EnterQuery(selectQuery); + dataSources.RunQueryNVerifyResponseViews(4); + selectQuery = selectQuery + ` and aircraft_id IN (1, 6)`; + dataSources.EnterQuery(selectQuery); + dataSources.RunQueryNVerifyResponseViews(2); + dataSources.AddSuggestedWidget(Widgets.Table); + deployMode.DeployApp(locators._widgetInDeployed(draggableWidgets.TABLE)); + table.WaitUntilTableLoad(0, 0, "v2"); + table.ReadTableRowColumnData(0, 10, "v2").then(($cellData) => { + expect($cellData).to.be.empty; + }); + table.ReadTableRowColumnData(0, 11, "v2").then(($cellData) => { + expect($cellData).to.be.empty; + }); + table.ReadTableRowColumnData(1, 10, "v2").then(($cellData) => { + expect($cellData).not.to.be.empty; + }); + table.ReadTableRowColumnData(1, 11, "v2").then(($cellData) => { + expect($cellData).not.to.be.empty; + }); + deployMode.NavigateBacktoEditor(); }); - deployMode.NavigateBacktoEditor(); - }); - it("4. Tc #2362 - Update query validation", () => { - EditorNavigation.SelectEntityByName("Query1", EntityType.Query); - query = `UPDATE ${guid} + it("4. Tc #2362 - Update query validation", () => { + EditorNavigation.SelectEntityByName("Query1", EntityType.Query); + query = `UPDATE ${guid} SET maximum_speed = CASE WHEN seating_capacity <= 100 THEN 400.89 @@ -349,117 +371,118 @@ SET ELSE TO_YMINTERVAL('1-0') END WHERE aircraft_type = 'Passenger Plane'`; - dataSources.EnterQuery(query); - dataSources.RunQuery(); - selectQuery = selectQuery + ` or aircraft_type = 'Passenger Plane'`; - dataSources.EnterQuery(selectQuery); - dataSources.RunQueryNVerifyResponseViews(3); - dataSources.AddSuggestedWidget( - Widgets.Table, - dataSources._addSuggestedExisting, - ); - deployMode.DeployApp(locators._widgetInDeployed(draggableWidgets.TABLE)); - table.WaitUntilTableLoad(0, 0, "v2"); - table.ReadTableRowColumnData(1, 5, "v2").then(($cellData) => { - expect($cellData).to.eq("400.89"); - }); - table.ReadTableRowColumnData(1, 11, "v2").then(($cellData) => { - expect($cellData).to.eq("0-6"); + dataSources.EnterQuery(query); + dataSources.RunQuery(); + selectQuery = selectQuery + ` or aircraft_type = 'Passenger Plane'`; + dataSources.EnterQuery(selectQuery); + dataSources.RunQueryNVerifyResponseViews(3); + dataSources.AddSuggestedWidget( + Widgets.Table, + dataSources._addSuggestedExisting, + ); + deployMode.DeployApp(locators._widgetInDeployed(draggableWidgets.TABLE)); + table.WaitUntilTableLoad(0, 0, "v2"); + table.ReadTableRowColumnData(1, 5, "v2").then(($cellData) => { + expect($cellData).to.eq("400.89"); + }); + table.ReadTableRowColumnData(1, 11, "v2").then(($cellData) => { + expect($cellData).to.eq("0-6"); + }); + deployMode.NavigateBacktoEditor(); }); - deployMode.NavigateBacktoEditor(); - }); - it("5. Tc #2361 - Delete query validation", () => { - EditorNavigation.SelectEntityByName("Query1", EntityType.Query); - query = `DELETE FROM ${guid} + it("5. Tc #2361 - Delete query validation", () => { + EditorNavigation.SelectEntityByName("Query1", EntityType.Query); + query = `DELETE FROM ${guid} WHERE (aircraft_type = 'Cargo Plane' AND seating_capacity <= 100) OR (aircraft_type = 'Passenger Plane' AND purchase_date < TO_DATE('2020-01-01', 'YYYY-MM-DD')) OR (aircraft_type = 'Helicopter' AND manufacturer = 'Robinson' AND maintenance_interval = INTERVAL '6' MONTH)`; - dataSources.EnterQuery(query); - dataSources.RunQuery(); - selectQuery = `SELECT * FROM ${guid}`; - dataSources.EnterQuery(selectQuery); - dataSources.RunQueryNVerifyResponseViews(2); - dataSources.AddSuggestedWidget( - Widgets.Table, - dataSources._addSuggestedExisting, - ); - deployMode.DeployApp(locators._widgetInDeployed(draggableWidgets.TABLE)); - table.WaitUntilTableLoad(0, 0, "v2"); - for (let i = 0; i < 2; i++) { - table.ReadTableRowColumnData(i, 1, "v2").then(($cellData) => { - expect($cellData).to.eq("Cargo Plane"); - }); - } + dataSources.EnterQuery(query); + dataSources.RunQuery(); + selectQuery = `SELECT * FROM ${guid}`; + dataSources.EnterQuery(selectQuery); + dataSources.RunQueryNVerifyResponseViews(2); + dataSources.AddSuggestedWidget( + Widgets.Table, + dataSources._addSuggestedExisting, + ); + deployMode.DeployApp(locators._widgetInDeployed(draggableWidgets.TABLE)); + table.WaitUntilTableLoad(0, 0, "v2"); + for (let i = 0; i < 2; i++) { + table.ReadTableRowColumnData(i, 1, "v2").then(($cellData) => { + expect($cellData).to.eq("Cargo Plane"); + }); + } - table.OpenNFilterTable("MAINTENANCE_INTERVAL", "not empty"); - table.ReadTableRowColumnData(0, 0, "v2").then(($cellData) => { - expect($cellData).to.eq("5"); + table.OpenNFilterTable("MAINTENANCE_INTERVAL", "not empty"); + table.ReadTableRowColumnData(0, 0, "v2").then(($cellData) => { + expect($cellData).to.eq("5"); + }); + agHelper + .GetText(table._showPageItemsCount) + .then(($count) => expect($count).contain("1")); + table.CloseFilter(); + agHelper + .GetText(table._filtersCount) + .then(($count) => expect($count).contain("1")); + deployMode.NavigateBacktoEditor(); }); - agHelper - .GetText(table._showPageItemsCount) - .then(($count) => expect($count).contain("1")); - table.CloseFilter(); - agHelper - .GetText(table._filtersCount) - .then(($count) => expect($count).contain("1")); - deployMode.NavigateBacktoEditor(); - }); - it("6. Tc #2363 - Copy & Move query validations", () => { - EditorNavigation.SelectEntityByName("Query1", EntityType.Query); - agHelper.ActionContextMenuWithInPane({ - action: "Copy to page", - subAction: "Page1", - toastToValidate: "copied to page", - }); - agHelper.GetNAssertContains(locators._queryName, "Query1Copy"); - dataSources.RunQueryNVerifyResponseViews(2); - PageList.AddNewPage(); - EditorNavigation.SelectEntityByName("Page1", EntityType.Page); - agHelper.ActionContextMenuWithInPane({ - action: "Move to page", - subAction: "Page2", - toastToValidate: "moved to page", - }); - agHelper.WaitUntilAllToastsDisappear(); - agHelper.GetNAssertContains(locators._queryName, "Query1Copy"); - dataSources.RunQueryNVerifyResponseViews(2); - agHelper.ActionContextMenuWithInPane({ - action: "Delete", - entityType: entityItems.Query, + it("6. Tc #2363 - Copy & Move query validations", () => { + EditorNavigation.SelectEntityByName("Query1", EntityType.Query); + agHelper.ActionContextMenuWithInPane({ + action: "Copy to page", + subAction: "Page1", + toastToValidate: "copied to page", + }); + agHelper.GetNAssertContains(locators._queryName, "Query1Copy"); + dataSources.RunQueryNVerifyResponseViews(2); + PageList.AddNewPage(); + EditorNavigation.SelectEntityByName("Page1", EntityType.Page); + agHelper.ActionContextMenuWithInPane({ + action: "Move to page", + subAction: "Page2", + toastToValidate: "moved to page", + }); + agHelper.WaitUntilAllToastsDisappear(); + agHelper.GetNAssertContains(locators._queryName, "Query1Copy"); + dataSources.RunQueryNVerifyResponseViews(2); + agHelper.ActionContextMenuWithInPane({ + action: "Delete", + entityType: entityItems.Query, + }); + EditorNavigation.SelectEntityByName("Page1", EntityType.Page); + EditorNavigation.SelectEntityByName("Query1", EntityType.Query); }); - EditorNavigation.SelectEntityByName("Page1", EntityType.Page); - EditorNavigation.SelectEntityByName("Query1", EntityType.Query); - }); - it("7. Tc #2365 - Query settings tab validations", () => { - apiPage.ToggleOnPageLoadRun(false); // ALl above cases validated for onpage load run with confirmation dialog set to false - apiPage.ToggleConfirmBeforeRunning(true); - deployMode.DeployApp(locators._widgetInDeployed(draggableWidgets.TABLE)); - table.WaitForTableEmpty("v2"); - deployMode.NavigateBacktoEditor(); - entityExplorer.DragDropWidgetNVerify(draggableWidgets.BUTTON, 300, 500); - propPane.EnterJSContext("onClick", `{{Query1.run()}}`); - deployMode.DeployApp(locators._widgetInDeployed(draggableWidgets.TABLE)); - agHelper.ClickButton("Submit"); - jsEditor.ConfirmationClick("No"); //Handling both No & Yes from confirmation dialog - - table.WaitUntilTableLoad(0, 0, "v2"); - deployMode.NavigateBacktoEditor(); - }); + it("7. Tc #2365 - Query settings tab validations", () => { + apiPage.ToggleOnPageLoadRun(false); // ALl above cases validated for onpage load run with confirmation dialog set to false + apiPage.ToggleConfirmBeforeRunning(true); + deployMode.DeployApp(locators._widgetInDeployed(draggableWidgets.TABLE)); + table.WaitForTableEmpty("v2"); + deployMode.NavigateBacktoEditor(); + entityExplorer.DragDropWidgetNVerify(draggableWidgets.BUTTON, 300, 500); + propPane.EnterJSContext("onClick", `{{Query1.run()}}`); + deployMode.DeployApp(locators._widgetInDeployed(draggableWidgets.TABLE)); + agHelper.ClickButton("Submit"); + jsEditor.ConfirmationClick("No"); //Handling both No & Yes from confirmation dialog - after( - "Verify Deletion of the Oracle datasource after all created queries are deleted", - () => { - dataSources.DeleteDatasourceFromWithinDS(dataSourceName, 409); //Since all queries exists - entityExplorer.DeleteAllQueriesForDB(dataSourceName); - deployMode.DeployApp(); + table.WaitUntilTableLoad(0, 0, "v2"); deployMode.NavigateBacktoEditor(); - dataSources.DeleteDatasourceFromWithinDS(dataSourceName, 200); - }, - ); -}); + }); + + after( + "Verify Deletion of the Oracle datasource after all created queries are deleted", + () => { + dataSources.DeleteDatasourceFromWithinDS(dataSourceName, 409); //Since all queries exists + entityExplorer.DeleteAllQueriesForDB(dataSourceName); + deployMode.DeployApp(); + deployMode.NavigateBacktoEditor(); + dataSources.DeleteDatasourceFromWithinDS(dataSourceName, 200); + }, + ); + }, +); diff --git a/app/client/cypress/e2e/Regression/ServerSide/Datasources/Redis_Basic_Spec.ts b/app/client/cypress/e2e/Regression/ServerSide/Datasources/Redis_Basic_Spec.ts index 274533088488..01e4106a4457 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/Datasources/Redis_Basic_Spec.ts +++ b/app/client/cypress/e2e/Regression/ServerSide/Datasources/Redis_Basic_Spec.ts @@ -6,103 +6,107 @@ import { let dsName: any; -describe("Validate Redis DS", { tags: ["@tag.Datasource"] }, () => { - before("Create a new Redis DS", () => { - dataSources.CreateDataSource("Redis"); - cy.get("@dsName").then(($dsName) => { - dsName = $dsName; +describe( + "Validate Redis DS", + { tags: ["@tag.Datasource", "@tag.Git", "@tag.AccessControl"] }, + () => { + before("Create a new Redis DS", () => { + dataSources.CreateDataSource("Redis"); + cy.get("@dsName").then(($dsName) => { + dsName = $dsName; + }); }); - }); - - it("1. Create HAST set (Multiple key value pair under single key name) in redis DB, Read, Delete", () => { - let hSetReceipe = `HSET recipe:1 name "Vegetable Stir Fry" ingredients "2 cups mixed vegetables (broccoli, carrots, bell peppers, mushrooms, snow peas), 2 cloves garlic, minced" instructions "1. Heat vegetable oil in a large skillet over medium-high heat. 2. Add mixed vegetables and garlic to the skillet and cook for 3-4 minutes. 3. In a small bowl, whisk together soy sauce and cornstarch. 4. Pour the soy sauce mixture over the vegetables and stir until the vegetables are coated. 5. Cook for an additional 1-2 minutes. 6. Serve hot." difficulty "easy"`; - let hGetKeys = "HGET recipe:1 name"; - let hMGet = "HMGET recipe:1 difficulty name"; // getting multiple keys - let hUpdate = "HSET recipe:1 difficulty medium"; - let getUpdatedKey = "HGET recipe:1 difficulty"; - let getAll = "HGETALL recipe:1"; - let addNewKeyValue = `HSET recipe:1 prep_time "10 minutes"`; - let deletehKey = "DEL recipe:1"; - - //Add HSET - dataSources.CreateQueryAfterDSSaved(); - dataSources.EnterQuery(hSetReceipe); - dataSources.RunQueryNVerifyResponseViews(1); //verify all views are returned! - dataSources.AssertQueryTableResponse(0, "4"); //Success response for 4 keys inserted via above HSET! - - //Read only one key from above HSET - dataSources.EnterQuery(hGetKeys); - dataSources.RunQueryNVerifyResponseViews(1); //verify all views are returned! - dataSources.AssertQueryTableResponse(0, "Vegetable Stir Fry"); - - //Read more than one key from above HSET - dataSources.EnterQuery(hMGet); - dataSources.RunQueryNVerifyResponseViews(2); - dataSources.AssertQueryTableResponse(0, "easy"); - dataSources.AssertQueryTableResponse(1, "Vegetable Stir Fry"); - - //Update key value in HSET - dataSources.EnterQuery(hUpdate); - dataSources.RunQueryNVerifyResponseViews(1); //verify all views are returned! - - //validate updated key - dataSources.EnterQuery(getUpdatedKey); - dataSources.RunQueryNVerifyResponseViews(1); - dataSources.AssertQueryTableResponse(0, "medium"); - - //Get All keys from HSET - dataSources.EnterQuery(getAll); - dataSources.RunQueryNVerifyResponseViews(8); //4 keys, 4 values - dataSources.ReadQueryTableResponse(0).then(($cellData: any) => { - expect($cellData).to.be.oneOf([ - "name", - "ingredients", - "instructions", - "difficulty", - ]); - }); - // dataSources.ReadQueryTableResponse(6).then(($cellData: any) => { - // expect($cellData).to.eq("instructions"); - // });//order not always matching - hence commented - - //Ading one more key/value to HSET - dataSources.EnterQuery(addNewKeyValue); - dataSources.RunQueryNVerifyResponseViews(1); - - //Verify new key/value also added to HSET - dataSources.EnterQuery(getAll); - dataSources.RunQueryNVerifyResponseViews(10); //5 keys, 5 values - dataSources.ReadQueryTableResponse(0).then(($cellData: any) => { - expect($cellData).to.be.oneOf([ - "name", - "ingredients", - "instructions", - "difficulty", - "prep_time", - ]); - }); - - //Deleting the Hash key - dataSources.EnterQuery(deletehKey); - dataSources.RunQueryNVerifyResponseViews(1); - //Verify Deletion is success - dataSources.EnterQuery(hGetKeys); - dataSources.RunQueryNVerifyResponseViews(); //5 keys, 5 values - dataSources.AssertQueryTableResponse(0, "null"); - - // Delete the query & datasource - agHelper.ActionContextMenuWithInPane({ - action: "Delete", - entityType: entityItems.Query, + it("1. Create HAST set (Multiple key value pair under single key name) in redis DB, Read, Delete", () => { + let hSetReceipe = `HSET recipe:1 name "Vegetable Stir Fry" ingredients "2 cups mixed vegetables (broccoli, carrots, bell peppers, mushrooms, snow peas), 2 cloves garlic, minced" instructions "1. Heat vegetable oil in a large skillet over medium-high heat. 2. Add mixed vegetables and garlic to the skillet and cook for 3-4 minutes. 3. In a small bowl, whisk together soy sauce and cornstarch. 4. Pour the soy sauce mixture over the vegetables and stir until the vegetables are coated. 5. Cook for an additional 1-2 minutes. 6. Serve hot." difficulty "easy"`; + let hGetKeys = "HGET recipe:1 name"; + let hMGet = "HMGET recipe:1 difficulty name"; // getting multiple keys + let hUpdate = "HSET recipe:1 difficulty medium"; + let getUpdatedKey = "HGET recipe:1 difficulty"; + let getAll = "HGETALL recipe:1"; + let addNewKeyValue = `HSET recipe:1 prep_time "10 minutes"`; + let deletehKey = "DEL recipe:1"; + + //Add HSET + dataSources.CreateQueryAfterDSSaved(); + dataSources.EnterQuery(hSetReceipe); + dataSources.RunQueryNVerifyResponseViews(1); //verify all views are returned! + dataSources.AssertQueryTableResponse(0, "4"); //Success response for 4 keys inserted via above HSET! + + //Read only one key from above HSET + dataSources.EnterQuery(hGetKeys); + dataSources.RunQueryNVerifyResponseViews(1); //verify all views are returned! + dataSources.AssertQueryTableResponse(0, "Vegetable Stir Fry"); + + //Read more than one key from above HSET + dataSources.EnterQuery(hMGet); + dataSources.RunQueryNVerifyResponseViews(2); + dataSources.AssertQueryTableResponse(0, "easy"); + dataSources.AssertQueryTableResponse(1, "Vegetable Stir Fry"); + + //Update key value in HSET + dataSources.EnterQuery(hUpdate); + dataSources.RunQueryNVerifyResponseViews(1); //verify all views are returned! + + //validate updated key + dataSources.EnterQuery(getUpdatedKey); + dataSources.RunQueryNVerifyResponseViews(1); + dataSources.AssertQueryTableResponse(0, "medium"); + + //Get All keys from HSET + dataSources.EnterQuery(getAll); + dataSources.RunQueryNVerifyResponseViews(8); //4 keys, 4 values + dataSources.ReadQueryTableResponse(0).then(($cellData: any) => { + expect($cellData).to.be.oneOf([ + "name", + "ingredients", + "instructions", + "difficulty", + ]); + }); + // dataSources.ReadQueryTableResponse(6).then(($cellData: any) => { + // expect($cellData).to.eq("instructions"); + // });//order not always matching - hence commented + + //Ading one more key/value to HSET + dataSources.EnterQuery(addNewKeyValue); + dataSources.RunQueryNVerifyResponseViews(1); + + //Verify new key/value also added to HSET + dataSources.EnterQuery(getAll); + dataSources.RunQueryNVerifyResponseViews(10); //5 keys, 5 values + dataSources.ReadQueryTableResponse(0).then(($cellData: any) => { + expect($cellData).to.be.oneOf([ + "name", + "ingredients", + "instructions", + "difficulty", + "prep_time", + ]); + }); + + //Deleting the Hash key + dataSources.EnterQuery(deletehKey); + dataSources.RunQueryNVerifyResponseViews(1); + + //Verify Deletion is success + dataSources.EnterQuery(hGetKeys); + dataSources.RunQueryNVerifyResponseViews(); //5 keys, 5 values + dataSources.AssertQueryTableResponse(0, "null"); + + // Delete the query & datasource + agHelper.ActionContextMenuWithInPane({ + action: "Delete", + entityType: entityItems.Query, + }); + dataSources.DeleteDatasourceFromWithinDS(dsName); }); - dataSources.DeleteDatasourceFromWithinDS(dsName); - }); - it("2. Verify the default port for the datasource", function () { - dataSources.NavigateToDSCreateNew(); - dataSources.CreatePlugIn("Redis"); + it("2. Verify the default port for the datasource", function () { + dataSources.NavigateToDSCreateNew(); + dataSources.CreatePlugIn("Redis"); - agHelper.AssertAttribute(dataSources._port, "value", "6379"); - }); -}); + agHelper.AssertAttribute(dataSources._port, "value", "6379"); + }); + }, +); diff --git a/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts b/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts index 4b1d780a9ec5..0f7ab34774bf 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts +++ b/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts @@ -19,7 +19,7 @@ import data from "../../../../fixtures/mongouri_data_spec.json"; describe( "Validate Mongo URI CRUD with JSON Form", - { tags: ["@tag.Datasource"] }, + { tags: ["@tag.Datasource", "@tag.Git", "@tag.AccessControl"] }, () => { let dsName: any; let importDataCollectionName: string; diff --git a/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/Mongo_Spec.ts b/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/Mongo_Spec.ts index c6fbdd13f5b9..e85c63d70c18 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/Mongo_Spec.ts +++ b/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/Mongo_Spec.ts @@ -16,7 +16,9 @@ import PageList from "../../../../support/Pages/PageList"; describe( "Validate Mongo CRUD with JSON Form", - { tags: ["@tag.Datasource", "@tag.Sanity"] }, + { + tags: ["@tag.Datasource", "@tag.Sanity", "@tag.Git", "@tag.AccessControl"], + }, () => { let dsName: any; diff --git a/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MySQL1_Spec.ts b/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MySQL1_Spec.ts index d0ee3d3d609f..e174cd171cfa 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MySQL1_Spec.ts +++ b/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MySQL1_Spec.ts @@ -21,7 +21,7 @@ let dsName: any; describe( "Validate MySQL Generate CRUD with JSON Form", - { tags: ["@tag.Datasource"] }, + { tags: ["@tag.Datasource", "@tag.Git", "@tag.AccessControl"] }, () => { // beforeEach(function() { // if (INTERCEPT.MYSQL) { diff --git a/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MySQL2_Spec.ts b/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MySQL2_Spec.ts index 3271e32094da..ce5773313e82 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MySQL2_Spec.ts +++ b/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MySQL2_Spec.ts @@ -19,7 +19,7 @@ let dsName: any, newStoreSecret: any; describe( "Validate MySQL Generate CRUD with JSON Form", - { tags: ["@tag.Datasource"] }, + { tags: ["@tag.Datasource", "@tag.Git", "@tag.AccessControl"] }, () => { // beforeEach(function() { // if (INTERCEPT.MYSQL) { diff --git a/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/Postgres1_Spec.ts b/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/Postgres1_Spec.ts index 70e6147c56e7..8177679f27db 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/Postgres1_Spec.ts +++ b/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/Postgres1_Spec.ts @@ -22,7 +22,7 @@ let dsName: any; describe( "Postgres Generate CRUD with JSON Form", - { tags: ["@tag.Datasource"] }, + { tags: ["@tag.Datasource", "@tag.Git", "@tag.AccessControl"] }, () => { it("1. Create DS & then Add new Page and generate CRUD template using created datasource", () => { dataSources.CreateDataSource("Postgres"); diff --git a/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/Postgres2_Spec.ts b/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/Postgres2_Spec.ts index 1dfb8b5e19a2..09a77eb14b2c 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/Postgres2_Spec.ts +++ b/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/Postgres2_Spec.ts @@ -18,7 +18,7 @@ let dsName: any, newCallsign: any; describe( "Validate Postgres Generate CRUD with JSON Form", - { tags: ["@tag.Datasource"] }, + { tags: ["@tag.Datasource", "@tag.Git", "@tag.AccessControl"] }, () => { before("Create DS for generate CRUD template test", () => { dataSources.CreateDataSource("Postgres"); diff --git a/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/S3_Spec.js b/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/S3_Spec.js index ab6851b32491..cb1be5c1cd5b 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/S3_Spec.js +++ b/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/S3_Spec.js @@ -16,7 +16,7 @@ import EditorNavigation, { describe( "Generate New CRUD Page Inside from entity explorer", - { tags: ["@tag.Datasource"] }, + { tags: ["@tag.Datasource", "@tag.Git", "@tag.AccessControl"] }, function () { let datasourceName; diff --git a/app/client/cypress/e2e/Regression/ServerSide/JsFunctionExecution/Fetch_Spec.ts b/app/client/cypress/e2e/Regression/ServerSide/JsFunctionExecution/Fetch_Spec.ts index b59b5fb9dd2b..69dc83da04d2 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/JsFunctionExecution/Fetch_Spec.ts +++ b/app/client/cypress/e2e/Regression/ServerSide/JsFunctionExecution/Fetch_Spec.ts @@ -1,5 +1,7 @@ import { agHelper, + apiPage, + dataManager, entityExplorer, jsEditor, propPane, @@ -8,7 +10,7 @@ import EditorNavigation, { EntityType, } from "../../../../support/Pages/EditorNavigation"; -describe("Tests fetch calls", { tags: ["@tag.JS"] }, () => { +describe("Tests fetch calls", { tags: ["@tag.JS", "@tag.Binding"] }, () => { it("1. Ensures that cookies are not passed with fetch calls", function () { jsEditor.CreateJSObject( `export default { @@ -76,18 +78,25 @@ describe("Tests fetch calls", { tags: ["@tag.JS"] }, () => { }); it("3. Tests if fetch works with store value", function () { + apiPage.CreateAndFillApi( + dataManager.dsValues[dataManager.defaultEnviorment].mockGenderAge + + `{{this.params.person}}`, + "Gender_Age", + ); + apiPage.RunAPI(); entityExplorer.DragDropWidgetNVerify("buttonwidget", 500, 200); EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); - propPane.TypeTextIntoField("Label", "getUserID"); + propPane.TypeTextIntoField("Label", "getUserName"); propPane.EnterJSContext( "onClick", - `{{fetch('https://jsonplaceholder.typicode.com/todos/1') - .then(res => res.json()) - .then(json => storeValue('userId', json.userId)) - .then(() => showAlert("UserId: " + appsmith.store.userId))}}`, + `{{(async function(){ + const gender = await Gender_Age.run({ person: "sagar" }); + storeValue("Gender", gender); + showAlert("Your name is " + appsmith.store.Gender.name); + })()}}`, ); - agHelper.Sleep(2000); - agHelper.ClickButton("getUserID"); - agHelper.AssertContains("UserId: 1", "exist"); + + agHelper.ClickButton("getUserName"); + agHelper.AssertContains("Your name is sagar", "exist"); }); }); diff --git a/app/client/cypress/e2e/Regression/ServerSide/JsFunctionExecution/JSFunctionExecution_spec.ts b/app/client/cypress/e2e/Regression/ServerSide/JsFunctionExecution/JSFunctionExecution_spec.ts index 71c7ac4762c9..a704db310d01 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/JsFunctionExecution/JSFunctionExecution_spec.ts +++ b/app/client/cypress/e2e/Regression/ServerSide/JsFunctionExecution/JSFunctionExecution_spec.ts @@ -30,7 +30,7 @@ let onPageLoadAndConfirmExecuteFunctionsLength: number, describe( "JS Function Execution", - { tags: ["@tag.JS", "@tag.Sanity"] }, + { tags: ["@tag.JS", "@tag.Sanity", "@tag.Binding"] }, function () { const FUNCTIONS_SETTINGS_DEFAULT_DATA: IFunctionSettingData[] = [ { diff --git a/app/client/cypress/e2e/Regression/ServerSide/JsFunctionExecution/PlatformFn_spec.ts b/app/client/cypress/e2e/Regression/ServerSide/JsFunctionExecution/PlatformFn_spec.ts index 32c1fca74242..a9cd4d73410c 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/JsFunctionExecution/PlatformFn_spec.ts +++ b/app/client/cypress/e2e/Regression/ServerSide/JsFunctionExecution/PlatformFn_spec.ts @@ -11,7 +11,7 @@ import EditorNavigation from "../../../../support/Pages/EditorNavigation"; describe( "Tests functionality of platform function", - { tags: ["@tag.JS"] }, + { tags: ["@tag.JS", "@tag.Binding"] }, () => { it("1. Tests access to outer variable", () => { apiPage.CreateAndFillApi( diff --git a/app/client/cypress/e2e/Regression/ServerSide/JsFunctionExecution/SetTimeout_spec.ts b/app/client/cypress/e2e/Regression/ServerSide/JsFunctionExecution/SetTimeout_spec.ts index fed88aed5966..59fb56693b34 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/JsFunctionExecution/SetTimeout_spec.ts +++ b/app/client/cypress/e2e/Regression/ServerSide/JsFunctionExecution/SetTimeout_spec.ts @@ -9,10 +9,13 @@ import { let userName: string; -describe("Tests setTimeout API", { tags: ["@tag.JS"] }, function () { - it("1. Executes showAlert after 3 seconds and uses default value", () => { - jsEditor.CreateJSObject( - `export default { +describe( + "Tests setTimeout API", + { tags: ["@tag.JS", "@tag.Binding"] }, + function () { + it("1. Executes showAlert after 3 seconds and uses default value", () => { + jsEditor.CreateJSObject( + `export default { myVar1: [], myVar2: {}, myFun1: (x = "default") => { @@ -21,23 +24,23 @@ describe("Tests setTimeout API", { tags: ["@tag.JS"] }, function () { }, 3000); } }`, - { - paste: true, - completeReplace: true, - toRun: false, - shouldCreateNewJSObj: true, - prettify: true, - }, - ); - agHelper.Sleep(2000); - jsEditor.RunJSObj(); - agHelper.Sleep(3000); - agHelper.AssertContains("Hello world - default", "exist"); - }); + { + paste: true, + completeReplace: true, + toRun: false, + shouldCreateNewJSObj: true, + prettify: true, + }, + ); + agHelper.Sleep(2000); + jsEditor.RunJSObj(); + agHelper.Sleep(3000); + agHelper.AssertContains("Hello world - default", "exist"); + }); - it("2. Executes all three alerts in parallel after 3 seconds", () => { - jsEditor.CreateJSObject( - `export default { + it("2. Executes all three alerts in parallel after 3 seconds", () => { + jsEditor.CreateJSObject( + `export default { myVar1: [], myVar2: {}, myFun1: (x = "default") => { @@ -51,26 +54,26 @@ describe("Tests setTimeout API", { tags: ["@tag.JS"] }, function () { this.myFun1(3) } }`, - { - paste: true, - completeReplace: true, - toRun: false, - shouldCreateNewJSObj: true, - prettify: true, - }, - ); - agHelper.Sleep(2000); - jsEditor.SelectFunctionDropdown("myFun2"); - jsEditor.RunJSObj(); - agHelper.Sleep(3000); - agHelper.AssertContains("Hello world - 1", "exist"); - agHelper.AssertContains("Hello world - 2", "exist"); - agHelper.AssertContains("Hello world - 3", "exist"); - }); + { + paste: true, + completeReplace: true, + toRun: false, + shouldCreateNewJSObj: true, + prettify: true, + }, + ); + agHelper.Sleep(2000); + jsEditor.SelectFunctionDropdown("myFun2"); + jsEditor.RunJSObj(); + agHelper.Sleep(3000); + agHelper.AssertContains("Hello world - 1", "exist"); + agHelper.AssertContains("Hello world - 2", "exist"); + agHelper.AssertContains("Hello world - 3", "exist"); + }); - it("3. Resolves promise after 3 seconds and shows alert", () => { - jsEditor.CreateJSObject( - `export default { + it("3. Resolves promise after 3 seconds and shows alert", () => { + jsEditor.CreateJSObject( + `export default { myVar1: [], myVar2: {}, myFun1: (x) => { @@ -79,22 +82,22 @@ describe("Tests setTimeout API", { tags: ["@tag.JS"] }, function () { }); }, }`, - { - paste: true, - completeReplace: true, - toRun: false, - shouldCreateNewJSObj: true, - prettify: true, - }, - ); - agHelper.Sleep(2000); - jsEditor.RunJSObj(); - agHelper.Sleep(3000); - agHelper.AssertContains("resolved"); - }); - it("4. Verifies code execution order when using setTimeout", () => { - jsEditor.CreateJSObject( - `export default { + { + paste: true, + completeReplace: true, + toRun: false, + shouldCreateNewJSObj: true, + prettify: true, + }, + ); + agHelper.Sleep(2000); + jsEditor.RunJSObj(); + agHelper.Sleep(3000); + agHelper.AssertContains("resolved"); + }); + it("4. Verifies code execution order when using setTimeout", () => { + jsEditor.CreateJSObject( + `export default { myVar1: [], myVar2: {}, myFun1: (x) => { @@ -103,27 +106,27 @@ describe("Tests setTimeout API", { tags: ["@tag.JS"] }, function () { console.log("Bye!"); }, }`, - { - paste: true, - completeReplace: true, - toRun: false, - shouldCreateNewJSObj: true, - prettify: true, - }, - ); - agHelper.Sleep(2000); - jsEditor.RunJSObj(); - agHelper.GetNClick(jsEditor._logsTab); - debuggerHelper.DoesConsoleLogExist("Hey there!"); - debuggerHelper.DoesConsoleLogExist("Bye!"); - debuggerHelper.DoesConsoleLogExist("Working!", false); - agHelper.Sleep(4000); - debuggerHelper.DoesConsoleLogExist("Working!"); - }); + { + paste: true, + completeReplace: true, + toRun: false, + shouldCreateNewJSObj: true, + prettify: true, + }, + ); + agHelper.Sleep(2000); + jsEditor.RunJSObj(); + agHelper.GetNClick(jsEditor._logsTab); + debuggerHelper.DoesConsoleLogExist("Hey there!"); + debuggerHelper.DoesConsoleLogExist("Bye!"); + debuggerHelper.DoesConsoleLogExist("Working!", false); + agHelper.Sleep(4000); + debuggerHelper.DoesConsoleLogExist("Working!"); + }); - it("5. Resolves promise after 3 seconds and shows alert", () => { - jsEditor.CreateJSObject( - `export default { + it("5. Resolves promise after 3 seconds and shows alert", () => { + jsEditor.CreateJSObject( + `export default { myVar1: [], myVar2: {}, myFun1: (x) => { @@ -132,26 +135,26 @@ describe("Tests setTimeout API", { tags: ["@tag.JS"] }, function () { }); }, }`, - { - paste: true, - completeReplace: true, - toRun: false, - shouldCreateNewJSObj: true, - prettify: true, - }, - ); - agHelper.Sleep(2000); - jsEditor.RunJSObj(); - agHelper.Sleep(3000); - agHelper.AssertContains("resolved"); - }); + { + paste: true, + completeReplace: true, + toRun: false, + shouldCreateNewJSObj: true, + prettify: true, + }, + ); + agHelper.Sleep(2000); + jsEditor.RunJSObj(); + agHelper.Sleep(3000); + agHelper.AssertContains("resolved"); + }); - it("6. Access to args passed into success/error callback functions in API.run when using setTimeout", () => { - apiPage.CreateAndFillApi( - dataManager.dsValues[dataManager.defaultEnviorment].mockApiUrl, - ); - jsEditor.CreateJSObject( - `export default { + it("6. Access to args passed into success/error callback functions in API.run when using setTimeout", () => { + apiPage.CreateAndFillApi( + dataManager.dsValues[dataManager.defaultEnviorment].mockApiUrl, + ); + jsEditor.CreateJSObject( + `export default { myVar1: [], myVar2: {}, myFun1: (x) => { @@ -171,42 +174,42 @@ describe("Tests setTimeout API", { tags: ["@tag.JS"] }, function () { }); } }`, - { - paste: true, - completeReplace: true, - toRun: false, - shouldCreateNewJSObj: true, - prettify: true, - }, - ); - jsEditor.RenameJSObjFromPane("Timeouts"); - agHelper.Sleep(2000); - jsEditor.RunJSObj(); - agHelper.Sleep(3000); + { + paste: true, + completeReplace: true, + toRun: false, + shouldCreateNewJSObj: true, + prettify: true, + }, + ); + jsEditor.RenameJSObjFromPane("Timeouts"); + agHelper.Sleep(2000); + jsEditor.RunJSObj(); + agHelper.Sleep(3000); - cy.wait("@postExecute").then((interception: any) => { - //Js function to match any name returned from API - userName = JSON.stringify( - interception.response.body.data.body[0].name, - ).replace(/['"]+/g, ""); //removing double quotes - agHelper.AssertContains(userName); - }); + cy.wait("@postExecute").then((interception: any) => { + //Js function to match any name returned from API + userName = JSON.stringify( + interception.response.body.data.body[0].name, + ).replace(/['"]+/g, ""); //removing double quotes + agHelper.AssertContains(userName); + }); - agHelper.Sleep(2000); - jsEditor.SelectFunctionDropdown("myFun2"); - jsEditor.RunJSObj(); - agHelper.Sleep(3000); - cy.wait("@postExecute").then((interception: any) => { - userName = JSON.stringify( - interception.response.body.data.body[0].name, - ).replace(/['"]+/g, ""); - agHelper.AssertContains(userName); + agHelper.Sleep(2000); + jsEditor.SelectFunctionDropdown("myFun2"); + jsEditor.RunJSObj(); + agHelper.Sleep(3000); + cy.wait("@postExecute").then((interception: any) => { + userName = JSON.stringify( + interception.response.body.data.body[0].name, + ).replace(/['"]+/g, ""); + agHelper.AssertContains(userName); + }); }); - }); - it("7. Verifies whether setTimeout executes on page load", () => { - jsEditor.CreateJSObject( - `export default { + it("7. Verifies whether setTimeout executes on page load", () => { + jsEditor.CreateJSObject( + `export default { myVar1: [], myVar2: {}, myFun1: (x) => { @@ -216,24 +219,25 @@ describe("Tests setTimeout API", { tags: ["@tag.JS"] }, function () { }, 3000) }, }`, - { - paste: true, - completeReplace: true, - toRun: false, - shouldCreateNewJSObj: true, - prettify: true, - }, - ); - jsEditor.EnableDisableAsyncFuncSettings("myFun1", true, false); - deployMode.DeployApp(); - agHelper.Sleep(1000); //DeployApp already waiting 2000ms hence reducing it here to equate to 3000 timeout - agHelper.AssertContains("Success!"); - agHelper.Sleep(1000); - cy.wait("@postExecute").then((interception: any) => { - userName = JSON.stringify( - interception.response.body.data.body[0].name, - ).replace(/['"]+/g, ""); - agHelper.AssertContains(userName); + { + paste: true, + completeReplace: true, + toRun: false, + shouldCreateNewJSObj: true, + prettify: true, + }, + ); + jsEditor.EnableDisableAsyncFuncSettings("myFun1", true, false); + deployMode.DeployApp(); + agHelper.Sleep(1000); //DeployApp already waiting 2000ms hence reducing it here to equate to 3000 timeout + agHelper.AssertContains("Success!"); + agHelper.Sleep(1000); + cy.wait("@postExecute").then((interception: any) => { + userName = JSON.stringify( + interception.response.body.data.body[0].name, + ).replace(/['"]+/g, ""); + agHelper.AssertContains(userName); + }); }); - }); -}); + }, +); diff --git a/app/client/cypress/e2e/Regression/ServerSide/MySQL_Datatypes/Basic_Spec.ts b/app/client/cypress/e2e/Regression/ServerSide/MySQL_Datatypes/Basic_Spec.ts index dd05424b0a1c..77211348bab2 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/MySQL_Datatypes/Basic_Spec.ts +++ b/app/client/cypress/e2e/Regression/ServerSide/MySQL_Datatypes/Basic_Spec.ts @@ -20,138 +20,148 @@ import { featureFlagIntercept } from "../../../../support/Objects/FeatureFlags"; let dsName: any, query: string; -describe("MySQL Datatype tests", { tags: ["@tag.Datasource"] }, function () { - before("Load dsl, Change theme, Create Mysql DS", () => { - agHelper.AddDsl("Datatypes/mySQLdsl"); +describe( + "MySQL Datatype tests", + { tags: ["@tag.Datasource", "@tag.Git", "@tag.AccessControl"] }, + function () { + before("Load dsl, Change theme, Create Mysql DS", () => { + agHelper.AddDsl("Datatypes/mySQLdsl"); - appSettings.OpenPaneAndChangeTheme("Moon"); - dataSources.CreateDataSource("MySql"); - cy.get("@dsName").then(($dsName) => { - dsName = $dsName; + appSettings.OpenPaneAndChangeTheme("Moon"); + dataSources.CreateDataSource("MySql"); + cy.get("@dsName").then(($dsName) => { + dsName = $dsName; + }); + AppSidebar.navigate(AppSidebarButton.Editor); }); - AppSidebar.navigate(AppSidebarButton.Editor); - }); - it("1. Creating mysqlDTs table & queries", () => { - //IF NOT EXISTS can be used - which creates tabel if it does not exist and donot throw any error if table exists. - //But if we add this option then next case could fail inn that case. - query = inputData.query.createTable; + it("1. Creating mysqlDTs table & queries", () => { + //IF NOT EXISTS can be used - which creates tabel if it does not exist and donot throw any error if table exists. + //But if we add this option then next case could fail inn that case. + query = inputData.query.createTable; - dataSources.CreateQueryFromOverlay(dsName, query, "createTable"); //Creating query from EE overlay - dataSources.RunQuery(); + dataSources.CreateQueryFromOverlay(dsName, query, "createTable"); //Creating query from EE overlay + dataSources.RunQuery(); - //Other queries - query = inputData.query.insertRecord; - dataSources.createQueryWithDatasourceSchemaTemplate( - dsName, - inputData.tableName, - "Insert", - ); - agHelper.RenameWithInPane("insertRecord"); - dataSources.EnterQuery(query); + //Other queries + query = inputData.query.insertRecord; + dataSources.createQueryWithDatasourceSchemaTemplate( + dsName, + inputData.tableName, + "Insert", + ); + agHelper.RenameWithInPane("insertRecord"); + dataSources.EnterQuery(query); - query = inputData.query.dropTable; - dataSources.createQueryWithDatasourceSchemaTemplate( - dsName, - inputData.tableName, - "Delete", - ); - agHelper.RenameWithInPane("dropTable"); - dataSources.EnterQuery(query); + query = inputData.query.dropTable; + dataSources.createQueryWithDatasourceSchemaTemplate( + dsName, + inputData.tableName, + "Delete", + ); + agHelper.RenameWithInPane("dropTable"); + dataSources.EnterQuery(query); - //Creating SELECT query - dataSources.createQueryWithDatasourceSchemaTemplate( - dsName, - inputData.tableName, - "Select", - ); - agHelper.RenameWithInPane("selectRecords"); - dataSources.RunQuery(); - agHelper - .GetText(dataSources._noRecordFound) - .then(($noRecMsg) => expect($noRecMsg).to.eq("No data records to show")); - }); + //Creating SELECT query + dataSources.createQueryWithDatasourceSchemaTemplate( + dsName, + inputData.tableName, + "Select", + ); + agHelper.RenameWithInPane("selectRecords"); + dataSources.RunQuery(); + agHelper + .GetText(dataSources._noRecordFound) + .then(($noRecMsg) => + expect($noRecMsg).to.eq("No data records to show"), + ); + }); - //Insert valid/true values into datasource - it("2. Inserting record", () => { - deployMode.DeployApp(); - table.WaitForTableEmpty(); //asserting table is empty before inserting! - agHelper.ClickButton("Run InsertQuery"); - inputData.input.forEach((valueArr, i) => { + //Insert valid/true values into datasource + it("2. Inserting record", () => { + deployMode.DeployApp(); + table.WaitForTableEmpty(); //asserting table is empty before inserting! agHelper.ClickButton("Run InsertQuery"); - valueArr.forEach((value, index) => { - if (value !== "") - agHelper.EnterInputText(inputData.inputFieldName[index], value); + inputData.input.forEach((valueArr, i) => { + agHelper.ClickButton("Run InsertQuery"); + valueArr.forEach((value, index) => { + if (value !== "") + agHelper.EnterInputText(inputData.inputFieldName[index], value); + }); + i % 2 && agHelper.ToggleSwitch("Bool_column"); + agHelper.ClickButton("insertRecord"); + agHelper.Sleep(2000); //for the modal to close after entering all values & value to reflect in table + agHelper.AssertElementVisibility( + locators._buttonByText("Run InsertQuery"), + ); + agHelper.Sleep(3000); }); - i % 2 && agHelper.ToggleSwitch("Bool_column"); - agHelper.ClickButton("insertRecord"); - agHelper.Sleep(2000); //for the modal to close after entering all values & value to reflect in table - agHelper.AssertElementVisibility( - locators._buttonByText("Run InsertQuery"), - ); - agHelper.Sleep(3000); }); - }); - //Verify weather expected value is present in each cell - //i.e. weather right data is pushed and fetched from datasource. - it("3. Validating values in each cell", () => { - cy.wait(2000); - inputData.result.forEach((res_array, i) => { - res_array.forEach((value, j) => { - table.ReadTableRowColumnData(j, i, "v1", 0).then(($cellData) => { - if (i === inputData.result.length - 1) { - const obj = JSON.parse($cellData); - expect(JSON.stringify(obj)).to.eq(JSON.stringify(value)); - } else { - expect($cellData).to.eq(value); - } + //Verify weather expected value is present in each cell + //i.e. weather right data is pushed and fetched from datasource. + it("3. Validating values in each cell", () => { + cy.wait(2000); + inputData.result.forEach((res_array, i) => { + res_array.forEach((value, j) => { + table.ReadTableRowColumnData(j, i, "v1", 0).then(($cellData) => { + if (i === inputData.result.length - 1) { + const obj = JSON.parse($cellData); + expect(JSON.stringify(obj)).to.eq(JSON.stringify(value)); + } else { + expect($cellData).to.eq(value); + } + }); }); }); }); - }); - //null will be displayed as empty string in tables - //So test null we have to intercept execute request. - //And check response payload. - it("4. Testing null value", () => { - deployMode.NavigateBacktoEditor(); - EditorNavigation.SelectEntityByName("selectRecords", EntityType.Query); - dataSources.RunQuery({ toValidateResponse: false }); - cy.wait("@postExecute").then((intercept) => { - expect( - typeof intercept.response?.body.data.body[5].varchar_column, - ).to.be.equal("object"); - expect(intercept.response?.body.data.body[5].varchar_column).to.be.equal( - null, - ); + //null will be displayed as empty string in tables + //So test null we have to intercept execute request. + //And check response payload. + it("4. Testing null value", () => { + deployMode.NavigateBacktoEditor(); + EditorNavigation.SelectEntityByName("selectRecords", EntityType.Query); + dataSources.RunQuery({ toValidateResponse: false }); + cy.wait("@postExecute").then((intercept) => { + expect( + typeof intercept.response?.body.data.body[5].varchar_column, + ).to.be.equal("object"); + expect( + intercept.response?.body.data.body[5].varchar_column, + ).to.be.equal(null); + }); }); - }); - after( - "Verify Drop of tables & Deletion of the datasource after all created queries are deleted", - () => { - EditorNavigation.SelectEntityByName("dropTable", EntityType.Query); - dataSources.RunQuery(); - dataSources.AssertQueryTableResponse(0, "0"); //Success response for dropped table! - dataSources.AssertTableInVirtuosoList(dsName, inputData.tableName, false); + after( + "Verify Drop of tables & Deletion of the datasource after all created queries are deleted", + () => { + EditorNavigation.SelectEntityByName("dropTable", EntityType.Query); + dataSources.RunQuery(); + dataSources.AssertQueryTableResponse(0, "0"); //Success response for dropped table! + dataSources.AssertTableInVirtuosoList( + dsName, + inputData.tableName, + false, + ); - //DS deletion - dataSources.DeleteDatasourceFromWithinDS(dsName, 409); //Since all queries exists - AppSidebar.navigate(AppSidebarButton.Editor); - PageLeftPane.switchSegment(PagePaneSegment.Queries); - ["createTable", "dropTable", "insertRecord", "selectRecords"].forEach( - (type) => { - entityExplorer.ActionContextMenuByEntityName({ - entityNameinLeftSidebar: type, - action: "Delete", - entityType: entityItems.Query, - }); - }, - ); - deployMode.DeployApp(); - deployMode.NavigateBacktoEditor(); - dataSources.DeleteDatasourceFromWithinDS(dsName, 200); - }, - ); -}); + //DS deletion + dataSources.DeleteDatasourceFromWithinDS(dsName, 409); //Since all queries exists + AppSidebar.navigate(AppSidebarButton.Editor); + PageLeftPane.switchSegment(PagePaneSegment.Queries); + ["createTable", "dropTable", "insertRecord", "selectRecords"].forEach( + (type) => { + entityExplorer.ActionContextMenuByEntityName({ + entityNameinLeftSidebar: type, + action: "Delete", + entityType: entityItems.Query, + }); + }, + ); + deployMode.DeployApp(); + deployMode.NavigateBacktoEditor(); + dataSources.DeleteDatasourceFromWithinDS(dsName, 200); + }, + ); + }, +); diff --git a/app/client/cypress/e2e/Regression/ServerSide/MySQL_Datatypes/False_Spec.ts b/app/client/cypress/e2e/Regression/ServerSide/MySQL_Datatypes/False_Spec.ts index c32baac8721b..821b89ff3f72 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/MySQL_Datatypes/False_Spec.ts +++ b/app/client/cypress/e2e/Regression/ServerSide/MySQL_Datatypes/False_Spec.ts @@ -9,67 +9,71 @@ import { featureFlagIntercept } from "../../../../support/Objects/FeatureFlags"; let dsName: any, query: string; -describe("MySQL Datatype tests", { tags: ["@tag.Datasource"] }, function () { - before("Create Mysql DS & Create mysqlDTs table", function () { - dataSources.CreateDataSource("MySql"); - cy.get("@dsName").then(($dsName) => { - dsName = $dsName; - //IF NOT EXISTS can be used - which creates tabel if it does not exist and donot throw any error if table exists. - //But if we add this option then next case could fail inn that case. - query = inputData.query.createTable; - dataSources.CreateQueryAfterDSSaved(query, "createTable"); //Creating query from EE overlay - dataSources.RunQuery(); - }); - }); - - //Insert false values to each column and check for the error status of the request. - it("1. False Cases & Long Integer as query param", () => { - dataSources.createQueryWithDatasourceSchemaTemplate( - dsName, - inputData.tableName, - "Insert", - ); - agHelper.RenameWithInPane("falseCases"); - inputData.falseResult.forEach((res_array, i) => { - res_array.forEach((value) => { - query = - typeof value === "string" - ? `INSERT INTO ${inputData.tableName} (${inputData.inputFieldName[i]}) VALUES ({{"${value}"}})` - : `INSERT INTO ${inputData.tableName} (${inputData.inputFieldName[i]}) VALUES ({{${value}}})`; - dataSources.EnterQuery(query); - dataSources.RunQuery({ expectedStatus: false }); +describe( + "MySQL Datatype tests", + { tags: ["@tag.Datasource", "@tag.Git", "@tag.AccessControl"] }, + function () { + before("Create Mysql DS & Create mysqlDTs table", function () { + dataSources.CreateDataSource("MySql"); + cy.get("@dsName").then(($dsName) => { + dsName = $dsName; + //IF NOT EXISTS can be used - which creates tabel if it does not exist and donot throw any error if table exists. + //But if we add this option then next case could fail inn that case. + query = inputData.query.createTable; + dataSources.CreateQueryAfterDSSaved(query, "createTable"); //Creating query from EE overlay + dataSources.RunQuery(); }); }); - agHelper.Sleep(2000); - //agHelper.WaitUntilAllToastsDisappear(); - //This is a special case. - //Added due to server side checks, which was handled in Datatype handling. - //Long Integer as query param + //Insert false values to each column and check for the error status of the request. + it("1. False Cases & Long Integer as query param", () => { + dataSources.createQueryWithDatasourceSchemaTemplate( + dsName, + inputData.tableName, + "Insert", + ); + agHelper.RenameWithInPane("falseCases"); + inputData.falseResult.forEach((res_array, i) => { + res_array.forEach((value) => { + query = + typeof value === "string" + ? `INSERT INTO ${inputData.tableName} (${inputData.inputFieldName[i]}) VALUES ({{"${value}"}})` + : `INSERT INTO ${inputData.tableName} (${inputData.inputFieldName[i]}) VALUES ({{${value}}})`; + dataSources.EnterQuery(query); + dataSources.RunQuery({ expectedStatus: false }); + }); + }); + agHelper.Sleep(2000); + //agHelper.WaitUntilAllToastsDisappear(); - query = `SELECT * FROM ${inputData.tableName} LIMIT {{2147483648}}`; - dataSources.EnterQuery(query); - dataSources.RunQuery(); - }); + //This is a special case. + //Added due to server side checks, which was handled in Datatype handling. + //Long Integer as query param - after( - "Verify Drop table & Deletion of the datasource after all created queries are deleted", - () => { - query = inputData.query.dropTable; + query = `SELECT * FROM ${inputData.tableName} LIMIT {{2147483648}}`; dataSources.EnterQuery(query); dataSources.RunQuery(); + }); - // ["falseCases", "createTable"].forEach((type) => { - // entityExplorer.ActionContextMenuByEntityName( - // type, - // "Delete", - // "Are you sure?", - // ); - // }); - entityExplorer.DeleteAllQueriesForDB(dsName); - deployMode.DeployApp(); - deployMode.NavigateBacktoEditor(); - dataSources.DeleteDatasourceFromWithinDS(dsName, 200); - }, - ); -}); + after( + "Verify Drop table & Deletion of the datasource after all created queries are deleted", + () => { + query = inputData.query.dropTable; + dataSources.EnterQuery(query); + dataSources.RunQuery(); + + // ["falseCases", "createTable"].forEach((type) => { + // entityExplorer.ActionContextMenuByEntityName( + // type, + // "Delete", + // "Are you sure?", + // ); + // }); + entityExplorer.DeleteAllQueriesForDB(dsName); + deployMode.DeployApp(); + deployMode.NavigateBacktoEditor(); + dataSources.DeleteDatasourceFromWithinDS(dsName, 200); + }, + ); + }, +); diff --git a/app/client/cypress/e2e/Regression/ServerSide/OnLoadTests/APIOnLoad_Spec.ts b/app/client/cypress/e2e/Regression/ServerSide/OnLoadTests/APIOnLoad_Spec.ts index 440487f3521c..f5fe03d92b18 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/OnLoadTests/APIOnLoad_Spec.ts +++ b/app/client/cypress/e2e/Regression/ServerSide/OnLoadTests/APIOnLoad_Spec.ts @@ -15,7 +15,7 @@ import EditorNavigation, { describe( "JSObjects OnLoad Actions tests", - { tags: ["@tag.PropertyPane", "@tag.JS"] }, + { tags: ["@tag.PropertyPane", "@tag.JS", "@tag.Binding"] }, function () { before(() => { agHelper.AddDsl("tableWidgetDsl"); diff --git a/app/client/cypress/e2e/Regression/ServerSide/OnLoadTests/ExecuteAction_Spec.ts b/app/client/cypress/e2e/Regression/ServerSide/OnLoadTests/ExecuteAction_Spec.ts index c4653d3f430e..72a9a83cdc1d 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/OnLoadTests/ExecuteAction_Spec.ts +++ b/app/client/cypress/e2e/Regression/ServerSide/OnLoadTests/ExecuteAction_Spec.ts @@ -8,7 +8,7 @@ import { describe( "Execute Action Functionality", - { tags: ["@tag.PropertyPane", "@tag.JS"] }, + { tags: ["@tag.PropertyPane", "@tag.JS", "@tag.Binding"] }, function () { before(() => { homePage.ImportApp("executeAction.json"); diff --git a/app/client/cypress/e2e/Regression/ServerSide/OnLoadTests/JSOnLoad2_Spec.ts b/app/client/cypress/e2e/Regression/ServerSide/OnLoadTests/JSOnLoad2_Spec.ts index 300d27e05787..3e01eada4ec2 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/OnLoadTests/JSOnLoad2_Spec.ts +++ b/app/client/cypress/e2e/Regression/ServerSide/OnLoadTests/JSOnLoad2_Spec.ts @@ -12,7 +12,15 @@ import EditorNavigation, { describe( "JSObjects OnLoad Actions tests", - { tags: ["@tag.PropertyPane", "@tag.JS", "@tag.ImportExport"] }, + { + tags: [ + "@tag.PropertyPane", + "@tag.JS", + "@tag.ImportExport", + "@tag.Binding", + "@tag.Git", + ], + }, function () { before(() => { homePage.CreateNewWorkspace("JSOnLoadTest", true); diff --git a/app/client/cypress/e2e/Regression/ServerSide/OnLoadTests/JSOnLoad4_Spec.ts b/app/client/cypress/e2e/Regression/ServerSide/OnLoadTests/JSOnLoad4_Spec.ts index 44e9d3773415..4d86a896aa8d 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/OnLoadTests/JSOnLoad4_Spec.ts +++ b/app/client/cypress/e2e/Regression/ServerSide/OnLoadTests/JSOnLoad4_Spec.ts @@ -11,7 +11,7 @@ let jsName: any; describe( "JSObjects OnLoad Actions tests", - { tags: ["@tag.PropertyPane", "@tag.JS"] }, + { tags: ["@tag.PropertyPane", "@tag.JS", "@tag.Binding"] }, function () { it("1. Tc 51, 52 Verify that JS editor function has a settings button available for functions", () => { jsEditor.CreateJSObject( diff --git a/app/client/cypress/e2e/Regression/ServerSide/OnLoadTests/JSOnLoad_cyclic_dependency_errors_spec.js b/app/client/cypress/e2e/Regression/ServerSide/OnLoadTests/JSOnLoad_cyclic_dependency_errors_spec.js index bb8cb9c8b9eb..28b691664998 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/OnLoadTests/JSOnLoad_cyclic_dependency_errors_spec.js +++ b/app/client/cypress/e2e/Regression/ServerSide/OnLoadTests/JSOnLoad_cyclic_dependency_errors_spec.js @@ -30,7 +30,7 @@ let dsname; describe( "Cyclic Dependency Informational Error Messages", - { tags: ["@tag.PropertyPane", "@tag.JS"] }, + { tags: ["@tag.PropertyPane", "@tag.JS", "@tag.Binding"] }, function () { before(() => { //appId = localStorage.getItem("applicationId"); diff --git a/app/client/cypress/e2e/Regression/ServerSide/OnLoadTests/JsOnLoad3_Spec.ts b/app/client/cypress/e2e/Regression/ServerSide/OnLoadTests/JsOnLoad3_Spec.ts index 0414b93a8404..ac26d827c7d4 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/OnLoadTests/JsOnLoad3_Spec.ts +++ b/app/client/cypress/e2e/Regression/ServerSide/OnLoadTests/JsOnLoad3_Spec.ts @@ -17,7 +17,7 @@ let jsName: any; describe( "JSObjects OnLoad Actions tests", - { tags: ["@tag.PropertyPane", "@tag.JS"] }, + { tags: ["@tag.PropertyPane", "@tag.JS", "@tag.Binding"] }, function () { beforeEach(() => { agHelper.RestoreLocalStorageCache(); @@ -37,8 +37,8 @@ describe( cy.fixture("datasources").then((datasourceFormData: any) => { AppSidebar.navigate(AppSidebarButton.Editor); apiPage.CreateAndFillApi( - "https://api.forismatic.com/api/1.0/?method=getQuote&lang=en&format=json", - "Quotes", + "http://host.docker.internal:5001", + "AppsmithTed", 30000, ); apiPage.ToggleConfirmBeforeRunning(true); @@ -54,8 +54,8 @@ describe( `export default { callTrump: async () => { return WhatTrumpThinks.run()}, - callQuotes: () => { - return Quotes.run().then(()=> Quotes.data.quoteText);} + callAppsmithTed: () => { + return AppsmithTed.run()} }`, { paste: true, @@ -71,16 +71,16 @@ describe( jsName as string, EntityType.JSObject, ); - jsEditor.EnableDisableAsyncFuncSettings("callQuotes", false); //OnPageLoad made true once mapped with widget + jsEditor.EnableDisableAsyncFuncSettings("callAppsmithTed", false); //OnPageLoad made true once mapped with widget EditorNavigation.SelectEntityByName("Input1", EntityType.Widget); propPane.UpdatePropertyFieldValue( "Default value", - "{{" + jsObjName + ".callQuotes.data}}", + "{{" + jsObjName + ".callAppsmithTed.data}}", ); cy.get(locators._toastMsg) .children() - .should("contain", "Quotes") //Quotes api also since its .data is accessed in callQuotes() + .should("contain", "AppsmithTed") .and("contain", jsName as string) .and("contain", "will be executed automatically on page load"); diff --git a/app/client/cypress/e2e/Regression/ServerSide/OnLoadTests/OnLoadActions_Spec.ts b/app/client/cypress/e2e/Regression/ServerSide/OnLoadTests/OnLoadActions_Spec.ts index 8da531365f60..92a8ce84c282 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/OnLoadTests/OnLoadActions_Spec.ts +++ b/app/client/cypress/e2e/Regression/ServerSide/OnLoadTests/OnLoadActions_Spec.ts @@ -3,6 +3,7 @@ import { apiPage, assertHelper, dataManager, + dataSources, deployMode, entityExplorer, entityItems, @@ -15,7 +16,7 @@ import EditorNavigation, { describe( "Layout OnLoad Actions tests", - { tags: ["@tag.PropertyPane", "@tag.JS", "@tag.Sanity"] }, + { tags: ["@tag.PropertyPane", "@tag.JS", "@tag.Sanity", "@tag.Binding"] }, function () { beforeEach(() => { agHelper.RestoreLocalStorageCache(); @@ -53,22 +54,35 @@ describe( "RandomUser", ); + apiPage.RunAPI(); + agHelper.GetNClick(dataSources._queryResponse("JSON")); + apiPage.CreateAndFillApi( - "https://favqs.com/api/qotd", + "http://host.docker.internal:5001/v1/favqs/qotd", "InspiringQuotes", 30000, ); apiPage.EnterHeader("dependency", "{{RandomUser.data}}"); //via Params tab + apiPage.RunAPI(); + agHelper.GetNClick(dataSources._queryResponse("JSON")); apiPage.CreateAndFillApi( - "https://www.boredapi.com/api/activity", + "http://host.docker.internal:5001/v1/boredapi/activity", "Suggestions", 30000, ); - apiPage.EnterHeader("dependency", "{{InspiringQuotes.data}}"); + apiPage.EnterHeader("dependency", "{{InspiringQuotes.data.data}}"); + apiPage.RunAPI(); + agHelper.GetNClick(dataSources._queryResponse("JSON")); - apiPage.CreateAndFillApi("https://api.genderize.io", "Genderize", 30000); - apiPage.EnterParams("name", "{{RandomUser.data.results[0].name.first}}"); //via Params tab + apiPage.CreateAndFillApi( + "http://host.docker.internal:5001/v1/genderize/sampledata", + "Genderize", + 30000, + ); + apiPage.EnterParams("name", "{{RandomUser.data[0].name}}"); //via Params tab + apiPage.RunAPI(); + agHelper.GetNClick(dataSources._queryResponse("JSON")); //Adding dependency in right order matters! EditorNavigation.SelectEntityByName("Image1", EntityType.Widget); @@ -77,19 +91,19 @@ describe( EditorNavigation.SelectEntityByName("Image2", EntityType.Widget); propPane.UpdatePropertyFieldValue( "Image", - `{{RandomUser.data.results[0].picture.large}}`, + `{{RandomUser.data[0].avatar}}`, ); EditorNavigation.SelectEntityByName("Text1", EntityType.Widget); propPane.UpdatePropertyFieldValue( "Text", - `{{InspiringQuotes.data.quote.body}}\n--\n{{InspiringQuotes.data.quote.author}}\n`, + `{{InspiringQuotes.data.data.quote.body}}\n--\n{{InspiringQuotes.data.data.quote.author}}\n`, ); EditorNavigation.SelectEntityByName("Text2", EntityType.Widget); propPane.UpdatePropertyFieldValue( "Text", - `Hi, here is {{RandomUser.data.results[0].name.first}} & I'm {{RandomUser.data.results[0].dob.age}}'yo\nI live in {{RandomUser.data.results[0].location.country}}\nMy Suggestion : {{Suggestions.data.activity}}\n\nI'm {{Genderize.data.gender}}`, + `Hi, here is {{RandomUser.data[0].name}} & I'm {{RandomUser.data[0].id}}'yo\nI live in {{RandomUser.data[0].address}}\nMy Suggestion : {{Suggestions.data.data.activity}}\n\nI'm {{Genderize.data.data.gender}}`, ); deployMode.DeployApp(locators._widgetInDeployed("textwidget"), false); @@ -99,32 +113,27 @@ describe( cy.get("@getConsolidatedData").then(($response: any) => { const respBody = JSON.stringify($response.response?.body); const { pageWithMigratedDsl } = JSON.parse(respBody)?.data; - const _randomFlora = - pageWithMigratedDsl.data.layouts[0].layoutOnLoadActions[0]; - const _randomUser = - pageWithMigratedDsl.data.layouts[0].layoutOnLoadActions[1]; - const _genderize = - pageWithMigratedDsl.data.layouts[0].layoutOnLoadActions[2]; - const _suggestions = - pageWithMigratedDsl.data.layouts[0].layoutOnLoadActions[3]; - - expect(JSON.parse(JSON.stringify(_randomFlora))[0]["name"]).to.eq( - "RandomFlora", - ); - expect(JSON.parse(JSON.stringify(_randomUser))[0]["name"]).to.eq( - "RandomUser", - ); - expect(JSON.parse(JSON.stringify(_genderize))[0]["name"]).to.be.oneOf([ - "Genderize", - "InspiringQuotes", - ]); - expect(JSON.parse(JSON.stringify(_genderize))[1]["name"]).to.be.oneOf([ - "Genderize", - "InspiringQuotes", - ]); - expect(JSON.parse(JSON.stringify(_suggestions))[0]["name"]).to.eq( - "Suggestions", - ); + + // Extract the layoutOnLoadActions array from the first layout + const layoutActions = + pageWithMigratedDsl.data.layouts[0].layoutOnLoadActions; + + // Get individual actions from the array + const _randomFlora = layoutActions[0][0]; // RandomFlora is the first action in the first array + const _randomUser = layoutActions[1][0]; // RandomUser is the first action in the second array + const _inspiringQuotes = layoutActions[2][0]; // InspiringQuotes is the first action in the third array + const _genderize = layoutActions[3][0]; // Genderize is the first action in the fourth array + const _suggestions = layoutActions[4][0]; // Suggestions is the first action in the fifth array + + // Assertions for the API names + expect(_randomFlora.name).to.eq("RandomFlora"); + expect(_randomUser.name).to.eq("RandomUser"); + + // Check if the name is either 'Genderize' or 'InspiringQuotes' for this position + expect(_inspiringQuotes.name).to.eq("InspiringQuotes"); + expect(_genderize.name).to.eq("Genderize"); + + expect(_suggestions.name).to.eq("Suggestions"); }); deployMode.NavigateBacktoEditor(); @@ -141,7 +150,7 @@ describe( }); apiPage.CreateAndFillApi( - "https://api.genderize.io?name={{RandomUser.data.results[0].name.first}}", + "http://host.docker.internal:5001/v1/genderize/sampledata?name={{RandomUser.data[0].name}}", "Genderize", 30000, "GET", @@ -150,8 +159,10 @@ describe( ); apiPage.ValidateQueryParams({ key: "name", - value: "{{RandomUser.data.results[0].name.first}}", + value: "{{RandomUser.data[0].name}}", }); // verifies Bug 10055 + apiPage.RunAPI(); + agHelper.GetNClick(dataSources._queryResponse("JSON")); deployMode.DeployApp( locators._widgetInDeployed("textwidget"), @@ -164,32 +175,27 @@ describe( const respBody = JSON.stringify($response.response?.body); const { pageWithMigratedDsl } = JSON.parse(respBody)?.data; - const _randomFlora = - pageWithMigratedDsl.data.layouts[0].layoutOnLoadActions[0]; - const _randomUser = - pageWithMigratedDsl.data.layouts[0].layoutOnLoadActions[1]; - const _genderize = - pageWithMigratedDsl.data.layouts[0].layoutOnLoadActions[2]; - const _suggestions = - pageWithMigratedDsl.data.layouts[0].layoutOnLoadActions[3]; - - expect(JSON.parse(JSON.stringify(_randomFlora))[0]["name"]).to.eq( - "RandomFlora", - ); - expect(JSON.parse(JSON.stringify(_randomUser))[0]["name"]).to.eq( - "RandomUser", - ); - expect(JSON.parse(JSON.stringify(_genderize))[0]["name"]).to.be.oneOf([ - "Genderize", - "InspiringQuotes", - ]); - expect(JSON.parse(JSON.stringify(_genderize))[1]["name"]).to.be.oneOf([ - "Genderize", - "InspiringQuotes", - ]); - expect(JSON.parse(JSON.stringify(_suggestions))[0]["name"]).to.eq( - "Suggestions", - ); + // Extract layoutOnLoadActions from the first layout + const layoutActions = + pageWithMigratedDsl.data.layouts[0].layoutOnLoadActions; + + // Get the individual actions + const _randomFlora = layoutActions[0][0]; // First item in the first array + const _randomUser = layoutActions[1][0]; // First item in the second array + const _inspiringQuotes = layoutActions[2][0]; // First item in the third array + const _genderize = layoutActions[3][0]; // First item in the fourth array + const _suggestions = layoutActions[4][0]; // First item in the fifth array + + // Assertions for the API names + expect(_randomFlora.name).to.eq("RandomFlora"); + expect(_randomUser.name).to.eq("RandomUser"); + + // Check if the name is either 'Genderize' or 'InspiringQuotes' for these positions + expect(_inspiringQuotes.name).to.eq("InspiringQuotes"); + expect(_genderize.name).to.eq("Genderize"); + + // Assertions for 'Suggestions' + expect(_suggestions.name).to.eq("Suggestions"); }); }); }, diff --git a/app/client/cypress/e2e/Regression/ServerSide/OnLoadTests/PostgresConnections_spec.ts b/app/client/cypress/e2e/Regression/ServerSide/OnLoadTests/PostgresConnections_spec.ts index 62d096a0f373..df94b5bc09d7 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/OnLoadTests/PostgresConnections_spec.ts +++ b/app/client/cypress/e2e/Regression/ServerSide/OnLoadTests/PostgresConnections_spec.ts @@ -17,7 +17,7 @@ let guid: any, dsName_1: any, dsName_2: any; describe( "Test Postgres number of connections on page load + Bug 11572, Bug 11202", - { tags: ["@tag.PropertyPane", "@tag.JS", "@tag.Sanity"] }, + { tags: ["@tag.PropertyPane", "@tag.JS", "@tag.Sanity", "@tag.Binding"] }, function () { before(() => { agHelper.GenerateUUID(); diff --git a/app/client/cypress/e2e/Regression/ServerSide/Params/ExecutionParams_spec.js b/app/client/cypress/e2e/Regression/ServerSide/Params/ExecutionParams_spec.js index 6e2974a0c778..700bc2da2cf9 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/Params/ExecutionParams_spec.js +++ b/app/client/cypress/e2e/Regression/ServerSide/Params/ExecutionParams_spec.js @@ -13,7 +13,7 @@ import { describe( "API Panel Test Functionality", - { tags: ["@tag.Datasource"] }, + { tags: ["@tag.Datasource", "@tag.Git", "@tag.AccessControl"] }, function () { let datasourceName; before(() => { diff --git a/app/client/cypress/e2e/Regression/ServerSide/Params/PassingParams_Spec.ts b/app/client/cypress/e2e/Regression/ServerSide/Params/PassingParams_Spec.ts index 3abcb2829e4b..b5a82ab53da8 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/Params/PassingParams_Spec.ts +++ b/app/client/cypress/e2e/Regression/ServerSide/Params/PassingParams_Spec.ts @@ -22,7 +22,7 @@ let jsName: any, dsName: any; describe( "Bug #10784 - Passing params from JS to SQL query should not break", - { tags: ["@tag.Datasource"] }, + { tags: ["@tag.Datasource", "@tag.Git", "@tag.AccessControl"] }, () => { before(() => { entityExplorer.DragDropWidgetNVerify(draggableWidgets.BUTTON, 100, 100); diff --git a/app/client/cypress/e2e/Regression/ServerSide/Postgres_DataTypes/Array_Spec.ts b/app/client/cypress/e2e/Regression/ServerSide/Postgres_DataTypes/Array_Spec.ts index 8ac68212e086..7def8bf3e6da 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/Postgres_DataTypes/Array_Spec.ts +++ b/app/client/cypress/e2e/Regression/ServerSide/Postgres_DataTypes/Array_Spec.ts @@ -17,524 +17,544 @@ import EditorNavigation, { PagePaneSegment, } from "../../../../support/Pages/EditorNavigation"; -describe("Array Datatype tests", { tags: ["@tag.Datasource"] }, function () { - let dsName: any, query: string; - - before("Create DS, Add DS & setting theme", () => { - dataSources.CreateDataSource("Postgres"); - cy.get("@dsName").then(($dsName) => { - dsName = $dsName; +describe( + "Array Datatype tests", + { tags: ["@tag.Datasource", "@tag.Git", "@tag.AccessControl"] }, + function () { + let dsName: any, query: string; + + before("Create DS, Add DS & setting theme", () => { + dataSources.CreateDataSource("Postgres"); + cy.get("@dsName").then(($dsName) => { + dsName = $dsName; + }); + agHelper.AddDsl("Datatypes/ArrayDTdsl"); + appSettings.OpenPaneAndChangeThemeColors(-31, -27); }); - agHelper.AddDsl("Datatypes/ArrayDTdsl"); - appSettings.OpenPaneAndChangeThemeColors(-31, -27); - }); - - it("1. Creating table query - arraytypes + Bug 14493", () => { - dataSources.CreateQueryForDS( - dsName, - `CREATE TABLE arraytypes (serialId SERIAL not null primary key, name text, pay_by_quarter integer[], schedule text[][]);`, - "createTable", - ); - dataSources.RunQuery(); - //Creating other queries - query = `INSERT INTO arraytypes ("name", "pay_by_quarter", "schedule") VALUES ('{{Insertname.text}}', ARRAY{{Insertpaybyquarter.text.split(',').map(Number)}}, ARRAY[['{{Insertschedule.text.split(',').slice(0,2).toString()}}'],['{{Insertschedule.text.split(',').slice(2,4).toString()}}']]);`; + it("1. Creating table query - arraytypes + Bug 14493", () => { + dataSources.CreateQueryForDS( + dsName, + `CREATE TABLE arraytypes (serialId SERIAL not null primary key, name text, pay_by_quarter integer[], schedule text[][]);`, + "createTable", + ); + dataSources.RunQuery(); + + //Creating other queries + query = `INSERT INTO arraytypes ("name", "pay_by_quarter", "schedule") VALUES ('{{Insertname.text}}', ARRAY{{Insertpaybyquarter.text.split(',').map(Number)}}, ARRAY[['{{Insertschedule.text.split(',').slice(0,2).toString()}}'],['{{Insertschedule.text.split(',').slice(2,4).toString()}}']]);`; - dataSources.CreateQueryFromOverlay(dsName, query, "insertRecord"); //Creating query from EE overlay - dataSources.ToggleUsePreparedStatement(false); + dataSources.CreateQueryFromOverlay(dsName, query, "insertRecord"); //Creating query from EE overlay + dataSources.ToggleUsePreparedStatement(false); - query = `UPDATE public."arraytypes" SET "name" = '{{Updatename.text}}', "pay_by_quarter" = ARRAY{{Updatepaybyquarter.text.split(',').map(Number)}}, + query = `UPDATE public."arraytypes" SET "name" = '{{Updatename.text}}', "pay_by_quarter" = ARRAY{{Updatepaybyquarter.text.split(',').map(Number)}}, "schedule" = ARRAY[['{{Updateschedule.text.split(',').slice(0,2).toString()}}'],['{{Updateschedule.text.split(',').slice(2,4).toString()}}']] WHERE serialid = {{Table1.selectedRow.serialid}};`; - dataSources.CreateQueryFromOverlay(dsName, query, "updateRecord"); //Creating query from EE overlay - dataSources.ToggleUsePreparedStatement(false); + dataSources.CreateQueryFromOverlay(dsName, query, "updateRecord"); //Creating query from EE overlay + dataSources.ToggleUsePreparedStatement(false); - query = `DELETE FROM public."arraytypes" WHERE serialId = {{Table1.selectedRow.serialid}}`; - dataSources.CreateQueryFromOverlay(dsName, query, "deleteRecord"); //Creating query from EE overlay + query = `DELETE FROM public."arraytypes" WHERE serialId = {{Table1.selectedRow.serialid}}`; + dataSources.CreateQueryFromOverlay(dsName, query, "deleteRecord"); //Creating query from EE overlay - query = `DELETE FROM public."arraytypes"`; - dataSources.CreateQueryFromOverlay(dsName, query, "deleteAllRecords"); //Creating query from EE overlay + query = `DELETE FROM public."arraytypes"`; + dataSources.CreateQueryFromOverlay(dsName, query, "deleteAllRecords"); //Creating query from EE overlay - query = `DROP table public."arraytypes"`; - dataSources.CreateQueryFromOverlay(dsName, query, "dropTable"); //Creating query from EE overlay + query = `DROP table public."arraytypes"`; + dataSources.CreateQueryFromOverlay(dsName, query, "dropTable"); //Creating query from EE overlay - //Creating SELECT query - arraytypes + Bug 14493 - dataSources.createQueryWithDatasourceSchemaTemplate( - dsName, - "public.arraytypes", - "Select", - ); - agHelper.RenameWithInPane("selectRecords"); - dataSources.RunQuery(); - agHelper - .GetText(dataSources._noRecordFound) - .then(($noRecMsg) => expect($noRecMsg).to.eq("No data records to show")); - }); - - it("2. Inserting record - arraytypes", () => { - EditorNavigation.SelectEntityByName("Page1", EntityType.Page); - deployMode.DeployApp(); - table.WaitForTableEmpty(); //asserting table is empty before inserting! - agHelper.ClickButton("Run InsertQuery"); - agHelper.AssertElementVisibility(locators._modal); - - agHelper.EnterInputText("Name", "Lily Bush"); - agHelper.EnterInputText("Pay_by_quarter", "100,200,300,400"); - agHelper.EnterInputText("Schedule", "Arrival,Breakfast,Meeting,Lunch"); - - agHelper.ClickButton("Insert"); - agHelper.AssertElementAbsence(locators._toastMsg); //Assert that Insert did not fail - agHelper.AssertElementVisibility(locators._buttonByText("Run InsertQuery")); - table.ReadTableRowColumnData(0, 0, "v1", 2000).then(($cellData) => { - expect($cellData).to.eq("1"); //asserting serial column is inserting fine in sequence + //Creating SELECT query - arraytypes + Bug 14493 + dataSources.createQueryWithDatasourceSchemaTemplate( + dsName, + "public.arraytypes", + "Select", + ); + agHelper.RenameWithInPane("selectRecords"); + dataSources.RunQuery(); + agHelper + .GetText(dataSources._noRecordFound) + .then(($noRecMsg) => + expect($noRecMsg).to.eq("No data records to show"), + ); }); - table.ReadTableRowColumnData(0, 1, "v1", 200).then(($cellData) => { - expect($cellData).not.to.eq(""); + + it("2. Inserting record - arraytypes", () => { + EditorNavigation.SelectEntityByName("Page1", EntityType.Page); + deployMode.DeployApp(); + table.WaitForTableEmpty(); //asserting table is empty before inserting! + agHelper.ClickButton("Run InsertQuery"); + agHelper.AssertElementVisibility(locators._modal); + + agHelper.EnterInputText("Name", "Lily Bush"); + agHelper.EnterInputText("Pay_by_quarter", "100,200,300,400"); + agHelper.EnterInputText("Schedule", "Arrival,Breakfast,Meeting,Lunch"); + + agHelper.ClickButton("Insert"); + agHelper.AssertElementAbsence(locators._toastMsg); //Assert that Insert did not fail + agHelper.AssertElementVisibility( + locators._buttonByText("Run InsertQuery"), + ); + table.ReadTableRowColumnData(0, 0, "v1", 2000).then(($cellData) => { + expect($cellData).to.eq("1"); //asserting serial column is inserting fine in sequence + }); + table.ReadTableRowColumnData(0, 1, "v1", 200).then(($cellData) => { + expect($cellData).not.to.eq(""); + }); }); - }); - it("3. Inserting another record - arraytypes", () => { - agHelper.ClickButton("Run InsertQuery"); - agHelper.AssertElementVisibility(locators._modal); + it("3. Inserting another record - arraytypes", () => { + agHelper.ClickButton("Run InsertQuery"); + agHelper.AssertElementVisibility(locators._modal); - agHelper.EnterInputText("Name", "Josh William"); - agHelper.EnterInputText("Pay_by_quarter", "8700,5454,9898,23257"); - agHelper.EnterInputText("Schedule", "Stand up,Update,Report,Executive"); + agHelper.EnterInputText("Name", "Josh William"); + agHelper.EnterInputText("Pay_by_quarter", "8700,5454,9898,23257"); + agHelper.EnterInputText("Schedule", "Stand up,Update,Report,Executive"); - agHelper.ClickButton("Insert"); - agHelper.AssertElementVisibility(locators._buttonByText("Run InsertQuery")); - table.ReadTableRowColumnData(1, 0, "v1", 2000).then(($cellData) => { - expect($cellData).to.eq("2"); //asserting serial column is inserting fine in sequence - }); - table.ReadTableRowColumnData(1, 1, "v1", 200).then(($cellData) => { - expect($cellData).not.to.eq(""); + agHelper.ClickButton("Insert"); + agHelper.AssertElementVisibility( + locators._buttonByText("Run InsertQuery"), + ); + table.ReadTableRowColumnData(1, 0, "v1", 2000).then(($cellData) => { + expect($cellData).to.eq("2"); //asserting serial column is inserting fine in sequence + }); + table.ReadTableRowColumnData(1, 1, "v1", 200).then(($cellData) => { + expect($cellData).not.to.eq(""); + }); }); - }); - it("4. Inserting another record - arraytypes", () => { - agHelper.ClickButton("Run InsertQuery"); - agHelper.AssertElementVisibility(locators._modal); + it("4. Inserting another record - arraytypes", () => { + agHelper.ClickButton("Run InsertQuery"); + agHelper.AssertElementVisibility(locators._modal); - agHelper.EnterInputText("Name", "Mary Clark"); - agHelper.EnterInputText("Pay_by_quarter", "9898,21726,87387,8372837"); - agHelper.EnterInputText( - "Schedule", - "Travel,Meet Sales,Take Action,Sky Rocket", - ); + agHelper.EnterInputText("Name", "Mary Clark"); + agHelper.EnterInputText("Pay_by_quarter", "9898,21726,87387,8372837"); + agHelper.EnterInputText( + "Schedule", + "Travel,Meet Sales,Take Action,Sky Rocket", + ); - agHelper.ClickButton("Insert"); - agHelper.AssertElementVisibility(locators._buttonByText("Run InsertQuery")); - table.ReadTableRowColumnData(2, 0, "v1", 2000).then(($cellData) => { - expect($cellData).to.eq("3"); //asserting serial column is inserting fine in sequence - }); - table.ReadTableRowColumnData(2, 1, "v1", 200).then(($cellData) => { - expect($cellData).not.to.eq(""); + agHelper.ClickButton("Insert"); + agHelper.AssertElementVisibility( + locators._buttonByText("Run InsertQuery"), + ); + table.ReadTableRowColumnData(2, 0, "v1", 2000).then(($cellData) => { + expect($cellData).to.eq("3"); //asserting serial column is inserting fine in sequence + }); + table.ReadTableRowColumnData(2, 1, "v1", 200).then(($cellData) => { + expect($cellData).not.to.eq(""); + }); }); - }); - - it("5. Updating record - arraytypes", () => { - table.SelectTableRow(1); - agHelper.ClickButton("Run UpdateQuery"); - agHelper.AssertElementVisibility(locators._modal); - - agHelper.EnterInputText("Name", "Josh Clarion", true); - agHelper.EnterInputText("Pay_by_quarter", "3232,3232,4567,12234", true); - agHelper.EnterInputText( - "Schedule", - "Breakfat,Presentation,Consulting,Training", - true, - ); - agHelper.ClickButton("Update"); - agHelper.AssertElementAbsence(locators._toastMsg); //Assert that Update did not fail - agHelper.AssertElementVisibility(locators._buttonByText("Run UpdateQuery")); - table.WaitUntilTableLoad(); - agHelper.Sleep(5000); //some more time for rows to rearrange! - table.ReadTableRowColumnData(1, 0, "v1", 2000).then(($cellData) => { - expect($cellData).to.eq("3"); - }); - table.ReadTableRowColumnData(2, 0, "v1", 2000).then(($cellData) => { - expect($cellData).to.eq("2"); //Since recently updated column to pushed to last! - }); - table.ReadTableRowColumnData(2, 1, "v1", 200).then(($cellData) => { - expect($cellData).not.to.eq(""); + it("5. Updating record - arraytypes", () => { + table.SelectTableRow(1); + agHelper.ClickButton("Run UpdateQuery"); + agHelper.AssertElementVisibility(locators._modal); + + agHelper.EnterInputText("Name", "Josh Clarion", true); + agHelper.EnterInputText("Pay_by_quarter", "3232,3232,4567,12234", true); + agHelper.EnterInputText( + "Schedule", + "Breakfat,Presentation,Consulting,Training", + true, + ); + + agHelper.ClickButton("Update"); + agHelper.AssertElementAbsence(locators._toastMsg); //Assert that Update did not fail + agHelper.AssertElementVisibility( + locators._buttonByText("Run UpdateQuery"), + ); + table.WaitUntilTableLoad(); + agHelper.Sleep(5000); //some more time for rows to rearrange! + table.ReadTableRowColumnData(1, 0, "v1", 2000).then(($cellData) => { + expect($cellData).to.eq("3"); + }); + table.ReadTableRowColumnData(2, 0, "v1", 2000).then(($cellData) => { + expect($cellData).to.eq("2"); //Since recently updated column to pushed to last! + }); + table.ReadTableRowColumnData(2, 1, "v1", 200).then(($cellData) => { + expect($cellData).not.to.eq(""); + }); }); - }); - - it("6. Validating JSON functions", () => { - deployMode.NavigateBacktoEditor(); - table.WaitUntilTableLoad(); - AppSidebar.navigate(AppSidebarButton.Editor); - PageLeftPane.switchSegment(PagePaneSegment.Queries); - dataSources.CreateQueryForDS(dsName); - agHelper.RenameWithInPane("verifyArrayFunctions"); - - query = `SELECT name FROM arraytypes WHERE pay_by_quarter[1] <> pay_by_quarter[2];`; - dataSources.EnterQuery(query); - dataSources.RunQuery(); - dataSources.AssertQueryResponseHeaders(["name"]); - dataSources.AssertQueryTableResponse(0, "Lily Bush"); - dataSources.AssertQueryTableResponse(1, "Mary Clark"); - - query = `SELECT pay_by_quarter[3] FROM arraytypes;`; - dataSources.EnterQuery(query); - dataSources.RunQuery(); - dataSources.AssertQueryResponseHeaders(["pay_by_quarter"]); - dataSources.AssertQueryTableResponse(0, "300"); - dataSources.AssertQueryTableResponse(1, "87387"); - dataSources.AssertQueryTableResponse(2, "4567"); - - //Verifying OR - query = `SELECT * FROM arraytypes WHERE pay_by_quarter[1] = 300 OR pay_by_quarter[2] = 200 OR pay_by_quarter[3] = 4567 OR pay_by_quarter[4] = 10000;`; - dataSources.EnterQuery(query); - dataSources.RunQuery(); - dataSources.AssertQueryResponseHeaders([ - "serialid", - "name", - "pay_by_quarter", - "schedule", - ]); - dataSources.AssertQueryTableResponse(0, "1"); - dataSources.AssertQueryTableResponse(1, "Lily Bush"); - dataSources.AssertQueryTableResponse(4, "2"); - dataSources.AssertQueryTableResponse(5, "Josh Clarion"); - - //Verifying && - query = `SELECT * FROM arraytypes WHERE pay_by_quarter && ARRAY[87387];`; - dataSources.EnterQuery(query); - dataSources.RunQuery(); - dataSources.AssertQueryResponseHeaders([ - "serialid", - "name", - "pay_by_quarter", - "schedule", - ]); - dataSources.AssertQueryTableResponse(0, "3"); - dataSources.AssertQueryTableResponse(1, "Mary Clark"); - dataSources.AssertQueryTableResponse(2, "[9898,21726,87387,8372837]"); - dataSources.AssertQueryTableResponse( - 3, - `[["Travel,Meet Sales"],["Take Action,Sky Rocket"]]`, - ); - //Verifying ANY - query = `SELECT * FROM arraytypes WHERE 9898 = ANY (pay_by_quarter);`; - dataSources.EnterQuery(query); - dataSources.RunQuery(); - dataSources.AssertQueryResponseHeaders([ - "serialid", - "name", - "pay_by_quarter", - "schedule", - ]); - dataSources.AssertQueryTableResponse(0, "3"); - dataSources.AssertQueryTableResponse(1, "Mary Clark"); - - //Verifying generate_script - query = `SELECT * FROM + it("6. Validating JSON functions", () => { + deployMode.NavigateBacktoEditor(); + table.WaitUntilTableLoad(); + AppSidebar.navigate(AppSidebarButton.Editor); + PageLeftPane.switchSegment(PagePaneSegment.Queries); + dataSources.CreateQueryForDS(dsName); + agHelper.RenameWithInPane("verifyArrayFunctions"); + + query = `SELECT name FROM arraytypes WHERE pay_by_quarter[1] <> pay_by_quarter[2];`; + dataSources.EnterQuery(query); + dataSources.RunQuery(); + dataSources.AssertQueryResponseHeaders(["name"]); + dataSources.AssertQueryTableResponse(0, "Lily Bush"); + dataSources.AssertQueryTableResponse(1, "Mary Clark"); + + query = `SELECT pay_by_quarter[3] FROM arraytypes;`; + dataSources.EnterQuery(query); + dataSources.RunQuery(); + dataSources.AssertQueryResponseHeaders(["pay_by_quarter"]); + dataSources.AssertQueryTableResponse(0, "300"); + dataSources.AssertQueryTableResponse(1, "87387"); + dataSources.AssertQueryTableResponse(2, "4567"); + + //Verifying OR + query = `SELECT * FROM arraytypes WHERE pay_by_quarter[1] = 300 OR pay_by_quarter[2] = 200 OR pay_by_quarter[3] = 4567 OR pay_by_quarter[4] = 10000;`; + dataSources.EnterQuery(query); + dataSources.RunQuery(); + dataSources.AssertQueryResponseHeaders([ + "serialid", + "name", + "pay_by_quarter", + "schedule", + ]); + dataSources.AssertQueryTableResponse(0, "1"); + dataSources.AssertQueryTableResponse(1, "Lily Bush"); + dataSources.AssertQueryTableResponse(4, "2"); + dataSources.AssertQueryTableResponse(5, "Josh Clarion"); + + //Verifying && + query = `SELECT * FROM arraytypes WHERE pay_by_quarter && ARRAY[87387];`; + dataSources.EnterQuery(query); + dataSources.RunQuery(); + dataSources.AssertQueryResponseHeaders([ + "serialid", + "name", + "pay_by_quarter", + "schedule", + ]); + dataSources.AssertQueryTableResponse(0, "3"); + dataSources.AssertQueryTableResponse(1, "Mary Clark"); + dataSources.AssertQueryTableResponse(2, "[9898,21726,87387,8372837]"); + dataSources.AssertQueryTableResponse( + 3, + `[["Travel,Meet Sales"],["Take Action,Sky Rocket"]]`, + ); + + //Verifying ANY + query = `SELECT * FROM arraytypes WHERE 9898 = ANY (pay_by_quarter);`; + dataSources.EnterQuery(query); + dataSources.RunQuery(); + dataSources.AssertQueryResponseHeaders([ + "serialid", + "name", + "pay_by_quarter", + "schedule", + ]); + dataSources.AssertQueryTableResponse(0, "3"); + dataSources.AssertQueryTableResponse(1, "Mary Clark"); + + //Verifying generate_script + query = `SELECT * FROM (SELECT pay_by_quarter, generate_subscripts(pay_by_quarter, 1) AS position FROM arraytypes) AS foo WHERE pay_by_quarter[position] = 100;`; - dataSources.EnterQuery(query); - dataSources.RunQuery(); - dataSources.AssertQueryResponseHeaders(["pay_by_quarter", "position"]); - dataSources.AssertQueryTableResponse(0, "[100,200,300,400]"); - dataSources.AssertQueryTableResponse(1, "1"); + dataSources.EnterQuery(query); + dataSources.RunQuery(); + dataSources.AssertQueryResponseHeaders(["pay_by_quarter", "position"]); + dataSources.AssertQueryTableResponse(0, "[100,200,300,400]"); + dataSources.AssertQueryTableResponse(1, "1"); - query = `SELECT * FROM + query = `SELECT * FROM (SELECT pay_by_quarter, generate_subscripts(pay_by_quarter, 1) AS position FROM arraytypes) AS foo WHERE pay_by_quarter[position] = 3232;`; - dataSources.EnterQuery(query); - dataSources.RunQuery(); - dataSources.AssertQueryResponseHeaders(["pay_by_quarter", "position"]); - dataSources.AssertQueryTableResponse(0, "[3232,3232,4567,12234]"); - dataSources.AssertQueryTableResponse(1, "1"); - dataSources.AssertQueryTableResponse(2, "[3232,3232,4567,12234]"); - dataSources.AssertQueryTableResponse(3, "2"); - - //Verifying ALL - query = `SELECT * FROM arraytypes WHERE 100 = ALL (pay_by_quarter);`; - dataSources.EnterQuery(query); - dataSources.RunQuery(); - agHelper - .GetText(dataSources._noRecordFound) - .then(($noRecMsg) => expect($noRecMsg).to.eq("No data records to show")); - - //Verifying unnest - query = `SELECT name, unnest(schedule) FROM arraytypes;`; - dataSources.EnterQuery(query); - dataSources.RunQuery(); - dataSources.AssertQueryResponseHeaders(["name", "unnest"]); - dataSources.AssertQueryTableResponse(0, "Lily Bush"); - dataSources.AssertQueryTableResponse(1, "Arrival,Breakfast"); - dataSources.AssertQueryTableResponse(4, "Mary Clark"); - dataSources.AssertQueryTableResponse(5, "Travel,Meet Sales"); - dataSources.AssertQueryTableResponse(10, "Josh Clarion"); - dataSources.AssertQueryTableResponse(11, "Consulting,Training"); - - //Verifying index access - query = `SELECT schedule[1:2][1:1] FROM arraytypes WHERE name = 'Lily Bush';`; - dataSources.EnterQuery(query); - dataSources.RunQuery(); - dataSources.AssertQueryResponseHeaders(["schedule"]); - dataSources.AssertQueryTableResponse( - 0, - `[["Arrival,Breakfast"],["Meeting,Lunch"]]`, - ); - - //Verifying index access - query = `SELECT schedule[1:2][2] FROM arraytypes WHERE name = 'Josh Clarion';`; - dataSources.EnterQuery(query); - dataSources.RunQuery(); - dataSources.AssertQueryResponseHeaders(["schedule"]); - dataSources.AssertQueryTableResponse( - 0, - `[["Breakfat,Presentation"],["Consulting,Training"]]`, - ); + dataSources.EnterQuery(query); + dataSources.RunQuery(); + dataSources.AssertQueryResponseHeaders(["pay_by_quarter", "position"]); + dataSources.AssertQueryTableResponse(0, "[3232,3232,4567,12234]"); + dataSources.AssertQueryTableResponse(1, "1"); + dataSources.AssertQueryTableResponse(2, "[3232,3232,4567,12234]"); + dataSources.AssertQueryTableResponse(3, "2"); + + //Verifying ALL + query = `SELECT * FROM arraytypes WHERE 100 = ALL (pay_by_quarter);`; + dataSources.EnterQuery(query); + dataSources.RunQuery(); + agHelper + .GetText(dataSources._noRecordFound) + .then(($noRecMsg) => + expect($noRecMsg).to.eq("No data records to show"), + ); + + //Verifying unnest + query = `SELECT name, unnest(schedule) FROM arraytypes;`; + dataSources.EnterQuery(query); + dataSources.RunQuery(); + dataSources.AssertQueryResponseHeaders(["name", "unnest"]); + dataSources.AssertQueryTableResponse(0, "Lily Bush"); + dataSources.AssertQueryTableResponse(1, "Arrival,Breakfast"); + dataSources.AssertQueryTableResponse(4, "Mary Clark"); + dataSources.AssertQueryTableResponse(5, "Travel,Meet Sales"); + dataSources.AssertQueryTableResponse(10, "Josh Clarion"); + dataSources.AssertQueryTableResponse(11, "Consulting,Training"); + + //Verifying index access + query = `SELECT schedule[1:2][1:1] FROM arraytypes WHERE name = 'Lily Bush';`; + dataSources.EnterQuery(query); + dataSources.RunQuery(); + dataSources.AssertQueryResponseHeaders(["schedule"]); + dataSources.AssertQueryTableResponse( + 0, + `[["Arrival,Breakfast"],["Meeting,Lunch"]]`, + ); - query = `SELECT schedule[:1][1:] FROM arraytypes WHERE name = 'Mary Clark';`; - dataSources.EnterQuery(query); - dataSources.RunQuery(); - dataSources.AssertQueryResponseHeaders(["schedule"]); - dataSources.AssertQueryTableResponse(0, `[["Travel,Meet Sales"]]`); - - query = `SELECT schedule[2:2][:] FROM arraytypes WHERE name = 'Mary Clark';`; - dataSources.EnterQuery(query); - dataSources.RunQuery(); - dataSources.AssertQueryResponseHeaders(["schedule"]); - dataSources.AssertQueryTableResponse(0, `[["Take Action,Sky Rocket"]]`); - - //Verifying array_dims - query = `SELECT array_dims(schedule) FROM arraytypes WHERE name = 'Lily Bush';`; - dataSources.EnterQuery(query); - dataSources.RunQuery(); - dataSources.AssertQueryResponseHeaders(["array_dims"]); - dataSources.AssertQueryTableResponse(0, "[1:2][1:1]"); - - //Verifying array_length - query = `SELECT array_length(schedule, 1) FROM arraytypes WHERE name = 'Mary Clark';`; - dataSources.EnterQuery(query); - dataSources.RunQuery(); - dataSources.AssertQueryResponseHeaders(["array_length"]); - dataSources.AssertQueryTableResponse(0, "2"); - - //Verifying array_upper, cardinality - query = `SELECT array_upper(pay_by_quarter, 1), cardinality(schedule) FROM arraytypes WHERE name = 'Josh Clarion';`; - dataSources.EnterQuery(query); - dataSources.RunQuery(); - dataSources.AssertQueryResponseHeaders(["array_upper", "cardinality"]); - dataSources.AssertQueryTableResponse(0, "4"); - dataSources.AssertQueryTableResponse(1, "2"); - - //Verifying || - query = `SELECT ARRAY[1,2] || ARRAY[3,4] as "Test ||", ARRAY[5,6] || ARRAY[[1,2],[3,4]] as "Test || of 2D Array", ARRAY[1, 2] || '{3, 4}' as "Test || with {}"`; - dataSources.EnterQuery(query); - dataSources.RunQuery(); - dataSources.AssertQueryResponseHeaders([ - "Test ||", - "Test || of 2D Array", - "Test || with {}", - ]); - dataSources.AssertQueryTableResponse(0, "[1,2,3,4]"); - dataSources.AssertQueryTableResponse(1, "[[5,6],[1,2],[3,4]]"); - dataSources.AssertQueryTableResponse(2, "[1,2,3,4]"); - - //Verifying array_dims - query = `SELECT array_dims(1 || '[0:1]={2,3}'::int[]) as "array_dims1", array_dims(ARRAY[1,2] || 3) as "array_dims2", array_dims(ARRAY[1,2] || ARRAY[3,4,5]) as "array_dims3", array_dims(ARRAY[[1,2],[3,4]] || ARRAY[[5,6],[7,8],[9,0]]) as "array_dims4";`; - dataSources.EnterQuery(query); - dataSources.RunQuery(); - dataSources.AssertQueryResponseHeaders([ - "array_dims1", - "array_dims2", - "array_dims3", - "array_dims4", - ]); - dataSources.AssertQueryTableResponse(0, "[0:2]"); - dataSources.AssertQueryTableResponse(1, "[1:3]"); - dataSources.AssertQueryTableResponse(2, "[1:5]"); - dataSources.AssertQueryTableResponse(3, "[1:5][1:2]"); - - //Verifying array_prepend, array_append - query = `SELECT array_prepend(1, ARRAY[2,3]) as "array_prepend", array_append(ARRAY[1,2], 3) as "array_append";`; - dataSources.EnterQuery(query); - dataSources.RunQuery(); - dataSources.AssertQueryResponseHeaders(["array_prepend", "array_append"]); - dataSources.AssertQueryTableResponse(0, "[1,2,3]"); - dataSources.AssertQueryTableResponse(1, "[1,2,3]"); - - //Verifying array_cat - query = `SELECT array_cat(ARRAY[1,2], ARRAY[3,4]) as "array_cat1", array_cat(ARRAY[[1,2],[3,4]], ARRAY[5,6]) as "array_cat2", array_cat(ARRAY[5,6], ARRAY[[1,2],[3,4]]) as "array_cat3"`; - dataSources.EnterQuery(query); - dataSources.RunQuery(); - dataSources.AssertQueryResponseHeaders([ - "array_cat1", - "array_cat2", - "array_cat3", - ]); - dataSources.AssertQueryTableResponse(0, "[1,2,3,4]"); - dataSources.AssertQueryTableResponse(1, "[[1,2],[3,4],[5,6]]"); - dataSources.AssertQueryTableResponse(2, "[[5,6],[1,2],[3,4]]"); - - //Verifying || with NULL - query = `SELECT ARRAY[1, 2] || NULL as "|| with NULL", array_append(ARRAY[1, 2], NULL) as "array_append";`; - dataSources.EnterQuery(query); - dataSources.RunQuery(); - dataSources.AssertQueryResponseHeaders(["|| with NULL", "array_append"]); - dataSources.AssertQueryTableResponse(0, "[1,2]"); - dataSources.AssertQueryTableResponse(1, "[1,2,null]"); - - //Verifying array_position, array_positions - query = `SELECT array_position(ARRAY['sun','mon','tue','wed','thu','fri','sat'], 'sat'), array_positions(ARRAY[1, 4, 3, 1, 3, 4, 2, 1], 1);`; - dataSources.EnterQuery(query); - dataSources.RunQuery(); - dataSources.AssertQueryResponseHeaders([ - "array_position", - "array_positions", - ]); - dataSources.AssertQueryTableResponse(0, "7"); - dataSources.AssertQueryTableResponse(1, "[1,4,8]"); - - //Verifying input & output syntaxes - query = `SELECT f1[1][-2][3] AS e1, f1[1][-1][5] AS e2 FROM (SELECT '[1:1][-2:-1] [3:5]={ {{1,2,3},{4,5,6} } }'::int[] AS f1) AS ss;`; - dataSources.EnterQuery(query); - dataSources.RunQuery(); - dataSources.AssertQueryResponseHeaders(["e1", "e2"]); - dataSources.AssertQueryTableResponse(0, "1"); - dataSources.AssertQueryTableResponse(1, "6"); - - //Verifying array_remove - query = `SELECT array_remove(ARRAY['sun','mon','tue','wed','thu','fri','sat'], 'wed') as "array_remove"`; - dataSources.EnterQuery(query); - dataSources.RunQuery(); - dataSources.AssertQueryResponseHeaders(["array_remove"]); - dataSources.AssertQueryTableResponse( - 0, - `["sun","mon","tue","thu","fri","sat"]`, - ); + //Verifying index access + query = `SELECT schedule[1:2][2] FROM arraytypes WHERE name = 'Josh Clarion';`; + dataSources.EnterQuery(query); + dataSources.RunQuery(); + dataSources.AssertQueryResponseHeaders(["schedule"]); + dataSources.AssertQueryTableResponse( + 0, + `[["Breakfat,Presentation"],["Consulting,Training"]]`, + ); - //Verifying array_replace - query = `select ARRAY[1,2,3,2,5] as "before_replace", array_replace(ARRAY[1,2,3,2,5], 2, 10) as two_becomes_ten;`; - dataSources.EnterQuery(query); - dataSources.RunQuery(); - dataSources.AssertQueryResponseHeaders([ - "before_replace", - "two_becomes_ten", - ]); - dataSources.AssertQueryTableResponse(0, `[1,2,3,2,5]`); - dataSources.AssertQueryTableResponse(1, `[1,10,3,10,5]`); - - //Verifying operators - query = `select ARRAY[1.1,2.1,3.1]::int[] = ARRAY[1,2,3] as "=", ARRAY[1,2,3] <> ARRAY[1,2,4] as "<>", ARRAY[1,2,3] < ARRAY[1,2,4] as "<", ARRAY[1,4,3] > ARRAY[1,2,4] as ">", ARRAY[1,2,3] <= ARRAY[1,2,3] as "<=", ARRAY[1,4,3] >= ARRAY[1,4,3] as ">=", ARRAY[1,4,3] @> ARRAY[3,1,3] as "@>", ARRAY[2,2,7] <@ ARRAY[1,7,4,2,6] as "<@", ARRAY[1,4,3] && ARRAY[2,1] as "&&"`; - dataSources.EnterQuery(query); - dataSources.RunQuery(); - dataSources.AssertQueryResponseHeaders([ - "=", - "<>", - "<", - ">", - "<=", - ">=", - "@>", - "<@", - "&&", - ]); - dataSources.AssertQueryTableResponse(0, "true"); - dataSources.AssertQueryTableResponse(8, "true"); - - //Verifying array_to_string - query = `SELECT array_to_string(ARRAY[1, 2, 3, NULL, 5], ',', '*') as array_to_string, string_to_array('xx~^~yy~^~zz', '~^~', 'yy') as string_to_array;`; - dataSources.EnterQuery(query); - dataSources.RunQuery(); - dataSources.AssertQueryResponseHeaders([ - "array_to_string", - "string_to_array", - ]); - dataSources.AssertQueryTableResponse(0, "1,2,3,*,5"); - dataSources.AssertQueryTableResponse(1, `["xx",null,"zz"]`); - - //Verifying error - query = `SELECT ARRAY[1, 2] || '7';`; - dataSources.EnterQuery(query); - agHelper.FocusElement(locators._codeMirrorTextArea); - dataSources.RunQuery({ expectedStatus: false }); - agHelper - .GetText(dataSources._queryError) - .then(($errorText) => - expect($errorText).to.contain( - `ERROR: malformed array literal: "7"\n Detail: Array value must start with "{" or dimension information`, - ), + query = `SELECT schedule[:1][1:] FROM arraytypes WHERE name = 'Mary Clark';`; + dataSources.EnterQuery(query); + dataSources.RunQuery(); + dataSources.AssertQueryResponseHeaders(["schedule"]); + dataSources.AssertQueryTableResponse(0, `[["Travel,Meet Sales"]]`); + + query = `SELECT schedule[2:2][:] FROM arraytypes WHERE name = 'Mary Clark';`; + dataSources.EnterQuery(query); + dataSources.RunQuery(); + dataSources.AssertQueryResponseHeaders(["schedule"]); + dataSources.AssertQueryTableResponse(0, `[["Take Action,Sky Rocket"]]`); + + //Verifying array_dims + query = `SELECT array_dims(schedule) FROM arraytypes WHERE name = 'Lily Bush';`; + dataSources.EnterQuery(query); + dataSources.RunQuery(); + dataSources.AssertQueryResponseHeaders(["array_dims"]); + dataSources.AssertQueryTableResponse(0, "[1:2][1:1]"); + + //Verifying array_length + query = `SELECT array_length(schedule, 1) FROM arraytypes WHERE name = 'Mary Clark';`; + dataSources.EnterQuery(query); + dataSources.RunQuery(); + dataSources.AssertQueryResponseHeaders(["array_length"]); + dataSources.AssertQueryTableResponse(0, "2"); + + //Verifying array_upper, cardinality + query = `SELECT array_upper(pay_by_quarter, 1), cardinality(schedule) FROM arraytypes WHERE name = 'Josh Clarion';`; + dataSources.EnterQuery(query); + dataSources.RunQuery(); + dataSources.AssertQueryResponseHeaders(["array_upper", "cardinality"]); + dataSources.AssertQueryTableResponse(0, "4"); + dataSources.AssertQueryTableResponse(1, "2"); + + //Verifying || + query = `SELECT ARRAY[1,2] || ARRAY[3,4] as "Test ||", ARRAY[5,6] || ARRAY[[1,2],[3,4]] as "Test || of 2D Array", ARRAY[1, 2] || '{3, 4}' as "Test || with {}"`; + dataSources.EnterQuery(query); + dataSources.RunQuery(); + dataSources.AssertQueryResponseHeaders([ + "Test ||", + "Test || of 2D Array", + "Test || with {}", + ]); + dataSources.AssertQueryTableResponse(0, "[1,2,3,4]"); + dataSources.AssertQueryTableResponse(1, "[[5,6],[1,2],[3,4]]"); + dataSources.AssertQueryTableResponse(2, "[1,2,3,4]"); + + //Verifying array_dims + query = `SELECT array_dims(1 || '[0:1]={2,3}'::int[]) as "array_dims1", array_dims(ARRAY[1,2] || 3) as "array_dims2", array_dims(ARRAY[1,2] || ARRAY[3,4,5]) as "array_dims3", array_dims(ARRAY[[1,2],[3,4]] || ARRAY[[5,6],[7,8],[9,0]]) as "array_dims4";`; + dataSources.EnterQuery(query); + dataSources.RunQuery(); + dataSources.AssertQueryResponseHeaders([ + "array_dims1", + "array_dims2", + "array_dims3", + "array_dims4", + ]); + dataSources.AssertQueryTableResponse(0, "[0:2]"); + dataSources.AssertQueryTableResponse(1, "[1:3]"); + dataSources.AssertQueryTableResponse(2, "[1:5]"); + dataSources.AssertQueryTableResponse(3, "[1:5][1:2]"); + + //Verifying array_prepend, array_append + query = `SELECT array_prepend(1, ARRAY[2,3]) as "array_prepend", array_append(ARRAY[1,2], 3) as "array_append";`; + dataSources.EnterQuery(query); + dataSources.RunQuery(); + dataSources.AssertQueryResponseHeaders(["array_prepend", "array_append"]); + dataSources.AssertQueryTableResponse(0, "[1,2,3]"); + dataSources.AssertQueryTableResponse(1, "[1,2,3]"); + + //Verifying array_cat + query = `SELECT array_cat(ARRAY[1,2], ARRAY[3,4]) as "array_cat1", array_cat(ARRAY[[1,2],[3,4]], ARRAY[5,6]) as "array_cat2", array_cat(ARRAY[5,6], ARRAY[[1,2],[3,4]]) as "array_cat3"`; + dataSources.EnterQuery(query); + dataSources.RunQuery(); + dataSources.AssertQueryResponseHeaders([ + "array_cat1", + "array_cat2", + "array_cat3", + ]); + dataSources.AssertQueryTableResponse(0, "[1,2,3,4]"); + dataSources.AssertQueryTableResponse(1, "[[1,2],[3,4],[5,6]]"); + dataSources.AssertQueryTableResponse(2, "[[5,6],[1,2],[3,4]]"); + + //Verifying || with NULL + query = `SELECT ARRAY[1, 2] || NULL as "|| with NULL", array_append(ARRAY[1, 2], NULL) as "array_append";`; + dataSources.EnterQuery(query); + dataSources.RunQuery(); + dataSources.AssertQueryResponseHeaders(["|| with NULL", "array_append"]); + dataSources.AssertQueryTableResponse(0, "[1,2]"); + dataSources.AssertQueryTableResponse(1, "[1,2,null]"); + + //Verifying array_position, array_positions + query = `SELECT array_position(ARRAY['sun','mon','tue','wed','thu','fri','sat'], 'sat'), array_positions(ARRAY[1, 4, 3, 1, 3, 4, 2, 1], 1);`; + dataSources.EnterQuery(query); + dataSources.RunQuery(); + dataSources.AssertQueryResponseHeaders([ + "array_position", + "array_positions", + ]); + dataSources.AssertQueryTableResponse(0, "7"); + dataSources.AssertQueryTableResponse(1, "[1,4,8]"); + + //Verifying input & output syntaxes + query = `SELECT f1[1][-2][3] AS e1, f1[1][-1][5] AS e2 FROM (SELECT '[1:1][-2:-1] [3:5]={ {{1,2,3},{4,5,6} } }'::int[] AS f1) AS ss;`; + dataSources.EnterQuery(query); + dataSources.RunQuery(); + dataSources.AssertQueryResponseHeaders(["e1", "e2"]); + dataSources.AssertQueryTableResponse(0, "1"); + dataSources.AssertQueryTableResponse(1, "6"); + + //Verifying array_remove + query = `SELECT array_remove(ARRAY['sun','mon','tue','wed','thu','fri','sat'], 'wed') as "array_remove"`; + dataSources.EnterQuery(query); + dataSources.RunQuery(); + dataSources.AssertQueryResponseHeaders(["array_remove"]); + dataSources.AssertQueryTableResponse( + 0, + `["sun","mon","tue","thu","fri","sat"]`, ); - agHelper.ActionContextMenuWithInPane({ - action: "Delete", - entityType: entityItems.Query, - }); - AppSidebar.navigate(AppSidebarButton.Editor); - }); - - it("7. Deleting records - arraytypes", () => { - EditorNavigation.SelectEntityByName("Page1", EntityType.Page); - deployMode.DeployApp(); - table.WaitUntilTableLoad(); - table.SelectTableRow(1); - agHelper.ClickButton("DeleteQuery", 1); - assertHelper.AssertNetworkStatus("@postExecute", 200); - assertHelper.AssertNetworkStatus("@postExecute", 200); - agHelper.Sleep(2500); //Allwowing time for delete to be success - table.ReadTableRowColumnData(1, 0, "v1", 2000).then(($cellData) => { - expect($cellData).not.to.eq("3"); //asserting 2nd record is deleted - }); - table.ReadTableRowColumnData(1, 0, "v1", 200).then(($cellData) => { - expect($cellData).to.eq("2"); + //Verifying array_replace + query = `select ARRAY[1,2,3,2,5] as "before_replace", array_replace(ARRAY[1,2,3,2,5], 2, 10) as two_becomes_ten;`; + dataSources.EnterQuery(query); + dataSources.RunQuery(); + dataSources.AssertQueryResponseHeaders([ + "before_replace", + "two_becomes_ten", + ]); + dataSources.AssertQueryTableResponse(0, `[1,2,3,2,5]`); + dataSources.AssertQueryTableResponse(1, `[1,10,3,10,5]`); + + //Verifying operators + query = `select ARRAY[1.1,2.1,3.1]::int[] = ARRAY[1,2,3] as "=", ARRAY[1,2,3] <> ARRAY[1,2,4] as "<>", ARRAY[1,2,3] < ARRAY[1,2,4] as "<", ARRAY[1,4,3] > ARRAY[1,2,4] as ">", ARRAY[1,2,3] <= ARRAY[1,2,3] as "<=", ARRAY[1,4,3] >= ARRAY[1,4,3] as ">=", ARRAY[1,4,3] @> ARRAY[3,1,3] as "@>", ARRAY[2,2,7] <@ ARRAY[1,7,4,2,6] as "<@", ARRAY[1,4,3] && ARRAY[2,1] as "&&"`; + dataSources.EnterQuery(query); + dataSources.RunQuery(); + dataSources.AssertQueryResponseHeaders([ + "=", + "<>", + "<", + ">", + "<=", + ">=", + "@>", + "<@", + "&&", + ]); + dataSources.AssertQueryTableResponse(0, "true"); + dataSources.AssertQueryTableResponse(8, "true"); + + //Verifying array_to_string + query = `SELECT array_to_string(ARRAY[1, 2, 3, NULL, 5], ',', '*') as array_to_string, string_to_array('xx~^~yy~^~zz', '~^~', 'yy') as string_to_array;`; + dataSources.EnterQuery(query); + dataSources.RunQuery(); + dataSources.AssertQueryResponseHeaders([ + "array_to_string", + "string_to_array", + ]); + dataSources.AssertQueryTableResponse(0, "1,2,3,*,5"); + dataSources.AssertQueryTableResponse(1, `["xx",null,"zz"]`); + + //Verifying error + query = `SELECT ARRAY[1, 2] || '7';`; + dataSources.EnterQuery(query); + agHelper.FocusElement(locators._codeMirrorTextArea); + dataSources.RunQuery({ expectedStatus: false }); + agHelper + .GetText(dataSources._queryError) + .then(($errorText) => + expect($errorText).to.contain( + `ERROR: malformed array literal: "7"\n Detail: Array value must start with "{" or dimension information`, + ), + ); + + agHelper.ActionContextMenuWithInPane({ + action: "Delete", + entityType: entityItems.Query, + }); + AppSidebar.navigate(AppSidebarButton.Editor); }); - //Deleting all records from table - arraytypes - agHelper.GetNClick(locators._deleteIcon); - agHelper.AssertElementVisibility(locators._buttonByText("Run InsertQuery")); - agHelper.Sleep(2000); - table.WaitForTableEmpty(); - }); - - it("8. Inserting another record (to check serial column) - arraytypes", () => { - agHelper.ClickButton("Run InsertQuery"); - agHelper.AssertElementVisibility(locators._modal); - - agHelper.EnterInputText("Name", "Bob Sim"); - agHelper.EnterInputText("Pay_by_quarter", "121,3234,4454,21213"); - agHelper.EnterInputText("Schedule", "Travel,Chillax,Hire,Give rewards"); - - agHelper.ClickButton("Insert"); - agHelper.AssertElementVisibility(locators._buttonByText("Run InsertQuery")); - table.ReadTableRowColumnData(0, 0, "v1", 2000).then(($cellData) => { - expect($cellData).to.eq("4"); //asserting serial column is inserting fine in sequence + it("7. Deleting records - arraytypes", () => { + EditorNavigation.SelectEntityByName("Page1", EntityType.Page); + deployMode.DeployApp(); + table.WaitUntilTableLoad(); + table.SelectTableRow(1); + agHelper.ClickButton("DeleteQuery", 1); + assertHelper.AssertNetworkStatus("@postExecute", 200); + assertHelper.AssertNetworkStatus("@postExecute", 200); + agHelper.Sleep(2500); //Allwowing time for delete to be success + table.ReadTableRowColumnData(1, 0, "v1", 2000).then(($cellData) => { + expect($cellData).not.to.eq("3"); //asserting 2nd record is deleted + }); + table.ReadTableRowColumnData(1, 0, "v1", 200).then(($cellData) => { + expect($cellData).to.eq("2"); + }); + + //Deleting all records from table - arraytypes + agHelper.GetNClick(locators._deleteIcon); + agHelper.AssertElementVisibility( + locators._buttonByText("Run InsertQuery"), + ); + agHelper.Sleep(2000); + table.WaitForTableEmpty(); }); - table.ReadTableRowColumnData(0, 1, "v1", 200).then(($cellData) => { - expect($cellData).not.to.eq(""); + + it("8. Inserting another record (to check serial column) - arraytypes", () => { + agHelper.ClickButton("Run InsertQuery"); + agHelper.AssertElementVisibility(locators._modal); + + agHelper.EnterInputText("Name", "Bob Sim"); + agHelper.EnterInputText("Pay_by_quarter", "121,3234,4454,21213"); + agHelper.EnterInputText("Schedule", "Travel,Chillax,Hire,Give rewards"); + + agHelper.ClickButton("Insert"); + agHelper.AssertElementVisibility( + locators._buttonByText("Run InsertQuery"), + ); + table.ReadTableRowColumnData(0, 0, "v1", 2000).then(($cellData) => { + expect($cellData).to.eq("4"); //asserting serial column is inserting fine in sequence + }); + table.ReadTableRowColumnData(0, 1, "v1", 200).then(($cellData) => { + expect($cellData).not.to.eq(""); + }); }); - }); - - it("9. Validate Drop of the Newly Created - arraytypes - Table from Postgres datasource", () => { - deployMode.NavigateBacktoEditor(); - EditorNavigation.SelectEntityByName("dropTable", EntityType.Query); - dataSources.RunQuery(); - dataSources.AssertQueryTableResponse(0, "0"); - dataSources.AssertTableInVirtuosoList(dsName, "public.arraytypes", false); - }); - - after( - "Verify Deletion of all created queries & Deletion of datasource", - () => { - //Verify Deletion of all created queries - dataSources.DeleteDatasourceFromWithinDS(dsName, 409); //Since all queries exists - entityExplorer.DeleteAllQueriesForDB(dsName); - //Ds Deletion - deployMode.DeployApp(); + + it("9. Validate Drop of the Newly Created - arraytypes - Table from Postgres datasource", () => { deployMode.NavigateBacktoEditor(); - dataSources.DeleteDatasourceFromWithinDS(dsName, 200); - AppSidebar.navigate(AppSidebarButton.Editor); - }, - ); -}); + EditorNavigation.SelectEntityByName("dropTable", EntityType.Query); + dataSources.RunQuery(); + dataSources.AssertQueryTableResponse(0, "0"); + dataSources.AssertTableInVirtuosoList(dsName, "public.arraytypes", false); + }); + + after( + "Verify Deletion of all created queries & Deletion of datasource", + () => { + //Verify Deletion of all created queries + dataSources.DeleteDatasourceFromWithinDS(dsName, 409); //Since all queries exists + entityExplorer.DeleteAllQueriesForDB(dsName); + //Ds Deletion + deployMode.DeployApp(); + deployMode.NavigateBacktoEditor(); + dataSources.DeleteDatasourceFromWithinDS(dsName, 200); + AppSidebar.navigate(AppSidebarButton.Editor); + }, + ); + }, +); diff --git a/app/client/cypress/e2e/Regression/ServerSide/Postgres_DataTypes/Binary_Spec.ts b/app/client/cypress/e2e/Regression/ServerSide/Postgres_DataTypes/Binary_Spec.ts index bb8ad38cb77b..d3b406336b59 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/Postgres_DataTypes/Binary_Spec.ts +++ b/app/client/cypress/e2e/Regression/ServerSide/Postgres_DataTypes/Binary_Spec.ts @@ -16,354 +16,378 @@ import EditorNavigation, { PagePaneSegment, } from "../../../../support/Pages/EditorNavigation"; -describe("Binary Datatype tests", { tags: ["@tag.Datasource"] }, function () { - let dsName: any, query: string, imageNameToUpload: string; - - before("Create DS, Importing App & setting theme", () => { - agHelper.AddDsl("Datatypes/BinaryDTdsl"); - appSettings.OpenPaneAndChangeThemeColors(7, -9); - dataSources.CreateDataSource("Postgres"); - cy.get("@dsName").then(($dsName) => { - dsName = $dsName; - }); - }); - - it("1. Creating SELECT query - binarytype + Bug 14493", () => { - query = `CREATE table binarytype (serialid SERIAL primary key, imagename TEXT, existingImage bytea, newImage bytea);`; - dataSources.CreateQueryAfterDSSaved(query, "createTable"); - dataSources.RunQuery(); - - //Creating SELECT query - binarytype + Bug 14493 - query = `SELECT binarytype.serialid, binarytype.imagename, encode(binarytype.existingimage, 'escape') as "OldImage", encode(binarytype.newimage, 'escape') as "NewImage" from public."binarytype";`; - dataSources.createQueryWithDatasourceSchemaTemplate( - dsName, - "public.binarytype", - "Select", - ); - dataSources.RunQuery(); - agHelper - .GetText(dataSources._noRecordFound) - .then(($noRecMsg) => expect($noRecMsg).to.eq("No data records to show")); - dataSources.EnterQuery(query); - agHelper.RenameWithInPane("selectRecords"); - }); - - it("2. Creating all queries- binarytype", () => { - //Other queries - query = `INSERT INTO public."binarytype" ("imagename", "existingimage", "newimage") VALUES ('{{Insertimagename.text}}', '{{Insertimage.files[0].data}}', '{{Insertimage.files[0].data}}');`; - dataSources.CreateQueryFromOverlay(dsName, query, "insertRecord"); - dataSources.SetQueryTimeout(30000); - - query = `UPDATE public."binarytype" SET "imagename" ='{{Updatename.text}}', "existingimage" = '{{Table1.selectedRow.OldImage}}', "newimage" = '{{Updateimage.files[0].data}}' WHERE serialid = {{Table1.selectedRow.serialid}};`; - dataSources.CreateQueryFromOverlay(dsName, query, "updateRecord"); - dataSources.SetQueryTimeout(30000); - - query = `DELETE FROM public."binarytype" WHERE serialId = {{Table1.selectedRow.serialid}}`; - dataSources.CreateQueryFromOverlay(dsName, query, "deleteRecord"); - dataSources.SetQueryTimeout(30000); - - query = `DELETE FROM public."binarytype"`; - dataSources.CreateQueryFromOverlay(dsName, query, "deleteAllRecords"); - dataSources.SetQueryTimeout(30000); - - query = `DROP table public."binarytype"`; - dataSources.CreateQueryFromOverlay(dsName, query, "dropTable"); - dataSources.SetQueryTimeout(30000); - - EditorNavigation.SelectEntityByName("Page1", EntityType.Page); - deployMode.DeployApp(); - table.WaitForTableEmpty(); //asserting table is empty before inserting! - }); - - it("3. Inserting another record - binarytype", () => { - imageNameToUpload = "Datatypes/Georgia.jpeg"; - - agHelper.ClickButton("Run InsertQuery"); - agHelper.AssertElementVisibility(locators._modal); - - agHelper.ClickButton("Select New Image"); - agHelper.UploadFile(imageNameToUpload); - - agHelper.ClickButton("Insert"); - agHelper.AssertElementAbsence(locators._toastMsg); //Assert that Insert did not fail - agHelper.AssertElementVisibility(locators._buttonByText("Run InsertQuery")); - agHelper.AssertElementAbsence(locators._btnSpinner, 20000); //for the update row to appear at last - table.WaitUntilTableLoad(); - const rowIndex = 0; - table.ReadTableRowColumnData(rowIndex, 0).then(($cellData) => { - expect($cellData).to.eq("1"); //asserting serial column is inserting fine in sequence - }); - table.ReadTableRowColumnData(rowIndex, 1, "v1", 200).then(($cellData) => { - expect($cellData).to.eq("Georgia.jpeg"); +describe( + "Binary Datatype tests", + { tags: ["@tag.Datasource", "@tag.Git", "@tag.AccessControl"] }, + function () { + let dsName: any, query: string, imageNameToUpload: string; + + before("Create DS, Importing App & setting theme", () => { + agHelper.AddDsl("Datatypes/BinaryDTdsl"); + appSettings.OpenPaneAndChangeThemeColors(7, -9); + dataSources.CreateDataSource("Postgres"); + cy.get("@dsName").then(($dsName) => { + dsName = $dsName; + }); }); - table.AssertTableRowImageColumnIsLoaded(rowIndex, 2).then(($oldimage) => { - table.AssertTableRowImageColumnIsLoaded(rowIndex, 3).then(($newimage) => { - expect($oldimage).to.eq($newimage); + + it("1. Creating SELECT query - binarytype + Bug 14493", () => { + query = `CREATE table binarytype (serialid SERIAL primary key, imagename TEXT, existingImage bytea, newImage bytea);`; + dataSources.CreateQueryAfterDSSaved(query, "createTable"); + dataSources.RunQuery(); + + //Creating SELECT query - binarytype + Bug 14493 + query = `SELECT binarytype.serialid, binarytype.imagename, encode(binarytype.existingimage, 'escape') as "OldImage", encode(binarytype.newimage, 'escape') as "NewImage" from public."binarytype";`; + dataSources.createQueryWithDatasourceSchemaTemplate( + dsName, + "public.binarytype", + "Select", + ); + dataSources.RunQuery(); + agHelper + .GetText(dataSources._noRecordFound) + .then(($noRecMsg) => + expect($noRecMsg).to.eq("No data records to show"), + ); + dataSources.EnterQuery(query); + agHelper.RenameWithInPane("selectRecords"); + }); + + it("2. Creating all queries- binarytype", () => { + //Other queries + query = `INSERT INTO public."binarytype" ("imagename", "existingimage", "newimage") VALUES ('{{Insertimagename.text}}', '{{Insertimage.files[0].data}}', '{{Insertimage.files[0].data}}');`; + dataSources.CreateQueryFromOverlay(dsName, query, "insertRecord"); + dataSources.SetQueryTimeout(30000); + + query = `UPDATE public."binarytype" SET "imagename" ='{{Updatename.text}}', "existingimage" = '{{Table1.selectedRow.OldImage}}', "newimage" = '{{Updateimage.files[0].data}}' WHERE serialid = {{Table1.selectedRow.serialid}};`; + dataSources.CreateQueryFromOverlay(dsName, query, "updateRecord"); + dataSources.SetQueryTimeout(30000); + + query = `DELETE FROM public."binarytype" WHERE serialId = {{Table1.selectedRow.serialid}}`; + dataSources.CreateQueryFromOverlay(dsName, query, "deleteRecord"); + dataSources.SetQueryTimeout(30000); + + query = `DELETE FROM public."binarytype"`; + dataSources.CreateQueryFromOverlay(dsName, query, "deleteAllRecords"); + dataSources.SetQueryTimeout(30000); + + query = `DROP table public."binarytype"`; + dataSources.CreateQueryFromOverlay(dsName, query, "dropTable"); + dataSources.SetQueryTimeout(30000); + + EditorNavigation.SelectEntityByName("Page1", EntityType.Page); + deployMode.DeployApp(); + table.WaitForTableEmpty(); //asserting table is empty before inserting! + }); + + it("3. Inserting another record - binarytype", () => { + imageNameToUpload = "Datatypes/Georgia.jpeg"; + + agHelper.ClickButton("Run InsertQuery"); + agHelper.AssertElementVisibility(locators._modal); + + agHelper.ClickButton("Select New Image"); + agHelper.UploadFile(imageNameToUpload); + + agHelper.ClickButton("Insert"); + agHelper.AssertElementAbsence(locators._toastMsg); //Assert that Insert did not fail + agHelper.AssertElementVisibility( + locators._buttonByText("Run InsertQuery"), + ); + agHelper.AssertElementAbsence(locators._btnSpinner, 20000); //for the update row to appear at last + table.WaitUntilTableLoad(); + const rowIndex = 0; + table.ReadTableRowColumnData(rowIndex, 0).then(($cellData) => { + expect($cellData).to.eq("1"); //asserting serial column is inserting fine in sequence + }); + table.ReadTableRowColumnData(rowIndex, 1, "v1", 200).then(($cellData) => { + expect($cellData).to.eq("Georgia.jpeg"); + }); + table.AssertTableRowImageColumnIsLoaded(rowIndex, 2).then(($oldimage) => { + table + .AssertTableRowImageColumnIsLoaded(rowIndex, 3) + .then(($newimage) => { + expect($oldimage).to.eq($newimage); + }); }); }); - }); - it("4. Inserting another record - binarytype", () => { - imageNameToUpload = "Datatypes/Maine.jpeg"; + it("4. Inserting another record - binarytype", () => { + imageNameToUpload = "Datatypes/Maine.jpeg"; - agHelper.ClickButton("Run InsertQuery"); - agHelper.AssertElementVisibility(locators._modal); + agHelper.ClickButton("Run InsertQuery"); + agHelper.AssertElementVisibility(locators._modal); - agHelper.ClickButton("Select New Image"); - agHelper.UploadFile(imageNameToUpload); + agHelper.ClickButton("Select New Image"); + agHelper.UploadFile(imageNameToUpload); - agHelper.ClickButton("Insert"); - agHelper.AssertElementAbsence(locators._toastMsg); //Assert that Insert did not fail - agHelper.AssertElementVisibility(locators._buttonByText("Run InsertQuery")); - agHelper.AssertElementAbsence(locators._btnSpinner, 20000); //for the update row to appear at last - table.WaitUntilTableLoad(); - const rowIndex = 1; - table.ReadTableRowColumnData(rowIndex, 0).then(($cellData) => { - expect($cellData).to.eq("2"); //asserting serial column is inserting fine in sequence - }); - table.ReadTableRowColumnData(rowIndex, 1, "v1", 200).then(($cellData) => { - expect($cellData).to.eq("Maine.jpeg"); - }); - table.AssertTableRowImageColumnIsLoaded(rowIndex, 2).then(($oldimage) => { - table.AssertTableRowImageColumnIsLoaded(rowIndex, 3).then(($newimage) => { - expect($oldimage).to.eq($newimage); + agHelper.ClickButton("Insert"); + agHelper.AssertElementAbsence(locators._toastMsg); //Assert that Insert did not fail + agHelper.AssertElementVisibility( + locators._buttonByText("Run InsertQuery"), + ); + agHelper.AssertElementAbsence(locators._btnSpinner, 20000); //for the update row to appear at last + table.WaitUntilTableLoad(); + const rowIndex = 1; + table.ReadTableRowColumnData(rowIndex, 0).then(($cellData) => { + expect($cellData).to.eq("2"); //asserting serial column is inserting fine in sequence }); - }); - }); - - it("5. Updating record - binarytype", () => { - imageNameToUpload = "Datatypes/NewJersey.jpeg"; - - table.SelectTableRow(1); - agHelper.ClickButton("Run UpdateQuery"); - agHelper.AssertElementVisibility(locators._modal); - - agHelper.ClickButton("Select update image"); - agHelper.UploadFile(imageNameToUpload); - - agHelper.ClickButton("Update"); - agHelper.AssertElementAbsence(locators._toastMsg); //Assert that Update did not fail - agHelper.AssertElementVisibility(locators._buttonByText("Run UpdateQuery")); - agHelper.AssertElementAbsence(locators._btnSpinner, 20000); //for the update row to appear at last - table.WaitUntilTableLoad(); - const rowIndex = 1; - table.ReadTableRowColumnData(rowIndex, 0, "v1", 2000).then(($cellData) => { - expect($cellData).to.eq("2"); //asserting serial column is inserting fine in sequence - }); - table.ReadTableRowColumnData(rowIndex, 1, "v1", 200).then(($cellData) => { - expect($cellData).to.eq("NewJersey.jpeg"); - }); - table.AssertTableRowImageColumnIsLoaded(rowIndex, 2).then(($oldimage) => { - table.AssertTableRowImageColumnIsLoaded(rowIndex, 3).then(($newimage) => { - expect($oldimage).to.not.eq($newimage); + table.ReadTableRowColumnData(rowIndex, 1, "v1", 200).then(($cellData) => { + expect($cellData).to.eq("Maine.jpeg"); + }); + table.AssertTableRowImageColumnIsLoaded(rowIndex, 2).then(($oldimage) => { + table + .AssertTableRowImageColumnIsLoaded(rowIndex, 3) + .then(($newimage) => { + expect($oldimage).to.eq($newimage); + }); }); }); - }); - - it("6. Deleting records - binarytype", () => { - table.WaitUntilTableLoad(); - table.SelectTableRow(1); - agHelper.ClickButton("DeleteQuery", 1); - assertHelper.AssertNetworkStatus("@postExecute", 200); - assertHelper.AssertNetworkStatus("@postExecute", 200); - agHelper.WaitUntilEleDisappear(locators._btnSpinner); //Allowing time for delete to be success - table.ReadTableRowColumnData(0, 0).then(($cellData) => { - expect($cellData).to.eq("1"); + + it("5. Updating record - binarytype", () => { + imageNameToUpload = "Datatypes/NewJersey.jpeg"; + + table.SelectTableRow(1); + agHelper.ClickButton("Run UpdateQuery"); + agHelper.AssertElementVisibility(locators._modal); + + agHelper.ClickButton("Select update image"); + agHelper.UploadFile(imageNameToUpload); + + agHelper.ClickButton("Update"); + agHelper.AssertElementAbsence(locators._toastMsg); //Assert that Update did not fail + agHelper.AssertElementVisibility( + locators._buttonByText("Run UpdateQuery"), + ); + agHelper.AssertElementAbsence(locators._btnSpinner, 20000); //for the update row to appear at last + table.WaitUntilTableLoad(); + const rowIndex = 1; + table + .ReadTableRowColumnData(rowIndex, 0, "v1", 2000) + .then(($cellData) => { + expect($cellData).to.eq("2"); //asserting serial column is inserting fine in sequence + }); + table.ReadTableRowColumnData(rowIndex, 1, "v1", 200).then(($cellData) => { + expect($cellData).to.eq("NewJersey.jpeg"); + }); + table.AssertTableRowImageColumnIsLoaded(rowIndex, 2).then(($oldimage) => { + table + .AssertTableRowImageColumnIsLoaded(rowIndex, 3) + .then(($newimage) => { + expect($oldimage).to.not.eq($newimage); + }); + }); }); - //Deleting all records from .table - agHelper.GetNClick(locators._deleteIcon); - agHelper.AssertElementVisibility(locators._buttonByText("Run InsertQuery")); - table.WaitForTableEmpty(); - }); + it("6. Deleting records - binarytype", () => { + table.WaitUntilTableLoad(); + table.SelectTableRow(1); + agHelper.ClickButton("DeleteQuery", 1); + assertHelper.AssertNetworkStatus("@postExecute", 200); + assertHelper.AssertNetworkStatus("@postExecute", 200); + agHelper.WaitUntilEleDisappear(locators._btnSpinner); //Allowing time for delete to be success + table.ReadTableRowColumnData(0, 0).then(($cellData) => { + expect($cellData).to.eq("1"); + }); + + //Deleting all records from .table + agHelper.GetNClick(locators._deleteIcon); + agHelper.AssertElementVisibility( + locators._buttonByText("Run InsertQuery"), + ); + table.WaitForTableEmpty(); + }); - it("7. Inserting another record (to check serial column) - binarytype", () => { - imageNameToUpload = "Datatypes/Massachusetts.jpeg"; + it("7. Inserting another record (to check serial column) - binarytype", () => { + imageNameToUpload = "Datatypes/Massachusetts.jpeg"; - agHelper.ClickButton("Run InsertQuery"); - agHelper.AssertElementVisibility(locators._modal); + agHelper.ClickButton("Run InsertQuery"); + agHelper.AssertElementVisibility(locators._modal); - //agHelper.EnterInputText("Imagename", "Massachusetts"); - agHelper.ClickButton("Select New Image"); - agHelper.UploadFile(imageNameToUpload); + //agHelper.EnterInputText("Imagename", "Massachusetts"); + agHelper.ClickButton("Select New Image"); + agHelper.UploadFile(imageNameToUpload); - agHelper.ClickButton("Insert"); - agHelper.AssertElementAbsence(locators._toastMsg); //Assert that Insert did not fail - agHelper.AssertElementVisibility(locators._buttonByText("Run InsertQuery")); - table.WaitUntilTableLoad(); - table.ReadTableRowColumnData(0, 0, "v1", 2000).then(($cellData) => { - expect($cellData).to.eq("3"); //asserting serial column is inserting fine in sequence - }); - table.ReadTableRowColumnData(0, 1, "v1", 200).then(($cellData) => { - expect($cellData).to.eq("Massachusetts.jpeg"); - }); - table.AssertTableRowImageColumnIsLoaded(0, 2).then(($oldimage) => { - table.AssertTableRowImageColumnIsLoaded(0, 3).then(($newimage) => { - expect($oldimage).to.eq($newimage); + agHelper.ClickButton("Insert"); + agHelper.AssertElementAbsence(locators._toastMsg); //Assert that Insert did not fail + agHelper.AssertElementVisibility( + locators._buttonByText("Run InsertQuery"), + ); + table.WaitUntilTableLoad(); + table.ReadTableRowColumnData(0, 0, "v1", 2000).then(($cellData) => { + expect($cellData).to.eq("3"); //asserting serial column is inserting fine in sequence + }); + table.ReadTableRowColumnData(0, 1, "v1", 200).then(($cellData) => { + expect($cellData).to.eq("Massachusetts.jpeg"); + }); + table.AssertTableRowImageColumnIsLoaded(0, 2).then(($oldimage) => { + table.AssertTableRowImageColumnIsLoaded(0, 3).then(($newimage) => { + expect($oldimage).to.eq($newimage); + }); }); - }); - }); - - it("8. Validating Binary (bytea) - escape, hex, base64 functions", () => { - deployMode.NavigateBacktoEditor(); - table.WaitUntilTableLoad(); - PageLeftPane.switchSegment(PagePaneSegment.Queries); - //Validating zero octet - query = `select encode('\\000'::bytea, 'hex') as "zero octet Hex", encode('\\000'::bytea, 'escape') as "zero octet Escape";`; - dataSources.CreateQueryForDS(dsName, query, "verifyBinaryFunctions"); - dataSources.RunQuery(); - dataSources.AssertQueryResponseHeaders([ - "zero octet Hex", - "zero octet Escape", - ]); - dataSources.ReadQueryTableResponse(0).then(($cellData) => { - expect($cellData).to.eq("00"); - }); - dataSources.ReadQueryTableResponse(1).then(($cellData) => { - expect($cellData).to.eq(`\\000`); }); - //Validating single quote - query = `select encode(''''::bytea, 'escape') as "single quote Escape1", encode('\\047'::bytea, 'escape') as "single quote Escape2", encode(''''::bytea, 'hex') as "single quote Hex1", encode('\\047'::bytea, 'hex') as "single quote Hex2", encode(''''::bytea, 'base64') as "single quote Base64";`; - dataSources.EnterQuery(query); - dataSources.RunQuery(); - dataSources.AssertQueryResponseHeaders([ - "single quote Escape1", - "single quote Escape2", - "single quote Hex1", - "single quote Hex2", - "single quote Base64", - ]); - dataSources.ReadQueryTableResponse(0).then(($cellData) => { - expect($cellData).to.eq("'"); - }); - dataSources.ReadQueryTableResponse(1).then(($cellData) => { - expect($cellData).to.eq("'"); - }); - dataSources.ReadQueryTableResponse(2).then(($cellData) => { - expect($cellData).to.eq("27"); - }); - dataSources.ReadQueryTableResponse(3).then(($cellData) => { - expect($cellData).to.eq("27"); - }); - dataSources.ReadQueryTableResponse(4).then(($cellData) => { - expect($cellData).to.eq("Jw=="); - }); - }); - - it("9. Validating Binary (bytea) - escape, hex, base64 functions, conts", () => { - //Validating backslash - query = `select encode('\\\\'::bytea, 'escape') as "backslash Escape1", encode('\\134'::bytea, 'escape') as "backslash Escape2", encode('\\\\'::bytea, 'hex') as "backslash Hex1", encode('\\134'::bytea, 'hex') as "backslash Hex2", encode('\\\\'::bytea, 'base64') as "backslash Base64";`; - dataSources.EnterQuery(query); - dataSources.RunQuery(); - dataSources.AssertQueryResponseHeaders([ - "backslash Escape1", - "backslash Escape2", - "backslash Hex1", - "backslash Hex2", - "backslash Base64", - ]); - dataSources.ReadQueryTableResponse(0).then(($cellData) => { - expect($cellData).to.eq("\\\\"); - }); - dataSources.ReadQueryTableResponse(1).then(($cellData) => { - expect($cellData).to.eq("\\\\"); - }); - dataSources.ReadQueryTableResponse(2).then(($cellData) => { - expect($cellData).to.eq("5c"); - }); - dataSources.ReadQueryTableResponse(3).then(($cellData) => { - expect($cellData).to.eq("5c"); - }); - dataSources.ReadQueryTableResponse(4).then(($cellData) => { - expect($cellData).to.eq("XA=="); - }); + it("8. Validating Binary (bytea) - escape, hex, base64 functions", () => { + deployMode.NavigateBacktoEditor(); + table.WaitUntilTableLoad(); + PageLeftPane.switchSegment(PagePaneSegment.Queries); + //Validating zero octet + query = `select encode('\\000'::bytea, 'hex') as "zero octet Hex", encode('\\000'::bytea, 'escape') as "zero octet Escape";`; + dataSources.CreateQueryForDS(dsName, query, "verifyBinaryFunctions"); + dataSources.RunQuery(); + dataSources.AssertQueryResponseHeaders([ + "zero octet Hex", + "zero octet Escape", + ]); + dataSources.ReadQueryTableResponse(0).then(($cellData) => { + expect($cellData).to.eq("00"); + }); + dataSources.ReadQueryTableResponse(1).then(($cellData) => { + expect($cellData).to.eq(`\\000`); + }); - //Validating random string - query = `select encode('abc \\153\\154\\155 \\052\\251\\124'::bytea::bytea, 'escape') as "string bytea_output Escape", encode('abc \\153\\154\\155 \\052\\251\\124'::bytea::bytea, 'hex') as "string bytea_output Hex", encode('abc \\153\\154\\155 \\052\\251\\124'::bytea::bytea, 'base64') as "string bytea_output Base64";`; - dataSources.EnterQuery(query); - dataSources.RunQuery(); - dataSources.AssertQueryResponseHeaders([ - "string bytea_output Escape", - "string bytea_output Hex", - "string bytea_output Base64", - ]); - dataSources.ReadQueryTableResponse(0).then(($cellData) => { - expect($cellData).to.eq(`abc klm *\\251T`); - }); - dataSources.ReadQueryTableResponse(1).then(($cellData) => { - expect($cellData).to.eq("616263206b6c6d202aa954"); - }); - dataSources.ReadQueryTableResponse(2).then(($cellData) => { - expect($cellData).to.eq("YWJjIGtsbSAqqVQ="); + //Validating single quote + query = `select encode(''''::bytea, 'escape') as "single quote Escape1", encode('\\047'::bytea, 'escape') as "single quote Escape2", encode(''''::bytea, 'hex') as "single quote Hex1", encode('\\047'::bytea, 'hex') as "single quote Hex2", encode(''''::bytea, 'base64') as "single quote Base64";`; + dataSources.EnterQuery(query); + dataSources.RunQuery(); + dataSources.AssertQueryResponseHeaders([ + "single quote Escape1", + "single quote Escape2", + "single quote Hex1", + "single quote Hex2", + "single quote Base64", + ]); + dataSources.ReadQueryTableResponse(0).then(($cellData) => { + expect($cellData).to.eq("'"); + }); + dataSources.ReadQueryTableResponse(1).then(($cellData) => { + expect($cellData).to.eq("'"); + }); + dataSources.ReadQueryTableResponse(2).then(($cellData) => { + expect($cellData).to.eq("27"); + }); + dataSources.ReadQueryTableResponse(3).then(($cellData) => { + expect($cellData).to.eq("27"); + }); + dataSources.ReadQueryTableResponse(4).then(($cellData) => { + expect($cellData).to.eq("Jw=="); + }); }); - //Validating text value1 - query = `select encode(E'123abc456', 'escape') as "Escape1", encode(E'123abc456', 'hex') as "Hex1", encode('abc456', 'escape') as "Escape2", encode('abc456', 'hex') as "Hex2", encode(E'123\\\\000456'::bytea, 'escape') as "Escape3", encode(E'123\\\\000456'::bytea, 'hex') as "Hex3";`; - dataSources.EnterQuery(query); - dataSources.RunQuery(); - dataSources.AssertQueryResponseHeaders([ - "Escape1", - "Hex1", - "Escape2", - "Hex2", - "Escape3", - "Hex3", - ]); - dataSources.ReadQueryTableResponse(0).then(($cellData) => { - expect($cellData).to.eq("123abc456"); - }); - dataSources.ReadQueryTableResponse(1).then(($cellData) => { - expect($cellData).to.eq("313233616263343536"); - }); - dataSources.ReadQueryTableResponse(2).then(($cellData) => { - expect($cellData).to.eq("abc456"); - }); - dataSources.ReadQueryTableResponse(3).then(($cellData) => { - expect($cellData).to.eq("616263343536"); - }); - dataSources.ReadQueryTableResponse(4).then(($cellData) => { - expect($cellData).to.eq(`123\\000456`); - }); - dataSources.ReadQueryTableResponse(5).then(($cellData) => { - expect($cellData).to.eq("31323300343536"); - }); + it("9. Validating Binary (bytea) - escape, hex, base64 functions, conts", () => { + //Validating backslash + query = `select encode('\\\\'::bytea, 'escape') as "backslash Escape1", encode('\\134'::bytea, 'escape') as "backslash Escape2", encode('\\\\'::bytea, 'hex') as "backslash Hex1", encode('\\134'::bytea, 'hex') as "backslash Hex2", encode('\\\\'::bytea, 'base64') as "backslash Base64";`; + dataSources.EnterQuery(query); + dataSources.RunQuery(); + dataSources.AssertQueryResponseHeaders([ + "backslash Escape1", + "backslash Escape2", + "backslash Hex1", + "backslash Hex2", + "backslash Base64", + ]); + dataSources.ReadQueryTableResponse(0).then(($cellData) => { + expect($cellData).to.eq("\\\\"); + }); + dataSources.ReadQueryTableResponse(1).then(($cellData) => { + expect($cellData).to.eq("\\\\"); + }); + dataSources.ReadQueryTableResponse(2).then(($cellData) => { + expect($cellData).to.eq("5c"); + }); + dataSources.ReadQueryTableResponse(3).then(($cellData) => { + expect($cellData).to.eq("5c"); + }); + dataSources.ReadQueryTableResponse(4).then(($cellData) => { + expect($cellData).to.eq("XA=="); + }); - agHelper.ActionContextMenuWithInPane({ - action: "Delete", - entityType: entityItems.Query, - }); - AppSidebar.navigate(AppSidebarButton.Editor); - }); - // after( - // "Validate Drop of the Newly Created - binarytype - Table & Verify Deletion of all created queries", - // () => { - // //Drop table - // deployMode.NavigateBacktoEditor(); - // entityExplorer.ExpandCollapseEntity("Queries/JS"); - // entityExplorer.SelectEntityByName("dropTable"); - // dataSources.RunQuery(); - // dataSources.ReadQueryTableResponse(0).then(($cellData) => { - // expect($cellData).to.eq("0"); //Success response for dropped table! - // }); - // entityExplorer.ExpandCollapseEntity("Queries/JS", false); - // entityExplorer.ExpandCollapseEntity("Datasources"); - // entityExplorer.ExpandCollapseEntity(dsName); - // entityExplorer.ActionContextMenuByEntityName(dsName, "Refresh"); - // agHelper.AssertElementAbsence( - // entityExplorer._entityNameInExplorer("public.binarytype"), - // ); - - // //Delete all queries - // dataSources.DeleteDatasourceFromWithinDS(dsName, 409); //Since all queries exists - // entityExplorer.ExpandCollapseEntity("Queries/JS"); - // entityExplorer.DeleteAllQueriesForDB(dsName); - - // //Delete DS - // deployMode.DeployApp(); - // deployMode.NavigateBacktoEditor(); - // entityExplorer.ExpandCollapseEntity("Queries/JS"); - // dataSources.DeleteDatasourceFromWithinDS(dsName, 200); - // }, - // ); -}); + //Validating random string + query = `select encode('abc \\153\\154\\155 \\052\\251\\124'::bytea::bytea, 'escape') as "string bytea_output Escape", encode('abc \\153\\154\\155 \\052\\251\\124'::bytea::bytea, 'hex') as "string bytea_output Hex", encode('abc \\153\\154\\155 \\052\\251\\124'::bytea::bytea, 'base64') as "string bytea_output Base64";`; + dataSources.EnterQuery(query); + dataSources.RunQuery(); + dataSources.AssertQueryResponseHeaders([ + "string bytea_output Escape", + "string bytea_output Hex", + "string bytea_output Base64", + ]); + dataSources.ReadQueryTableResponse(0).then(($cellData) => { + expect($cellData).to.eq(`abc klm *\\251T`); + }); + dataSources.ReadQueryTableResponse(1).then(($cellData) => { + expect($cellData).to.eq("616263206b6c6d202aa954"); + }); + dataSources.ReadQueryTableResponse(2).then(($cellData) => { + expect($cellData).to.eq("YWJjIGtsbSAqqVQ="); + }); + + //Validating text value1 + query = `select encode(E'123abc456', 'escape') as "Escape1", encode(E'123abc456', 'hex') as "Hex1", encode('abc456', 'escape') as "Escape2", encode('abc456', 'hex') as "Hex2", encode(E'123\\\\000456'::bytea, 'escape') as "Escape3", encode(E'123\\\\000456'::bytea, 'hex') as "Hex3";`; + dataSources.EnterQuery(query); + dataSources.RunQuery(); + dataSources.AssertQueryResponseHeaders([ + "Escape1", + "Hex1", + "Escape2", + "Hex2", + "Escape3", + "Hex3", + ]); + dataSources.ReadQueryTableResponse(0).then(($cellData) => { + expect($cellData).to.eq("123abc456"); + }); + dataSources.ReadQueryTableResponse(1).then(($cellData) => { + expect($cellData).to.eq("313233616263343536"); + }); + dataSources.ReadQueryTableResponse(2).then(($cellData) => { + expect($cellData).to.eq("abc456"); + }); + dataSources.ReadQueryTableResponse(3).then(($cellData) => { + expect($cellData).to.eq("616263343536"); + }); + dataSources.ReadQueryTableResponse(4).then(($cellData) => { + expect($cellData).to.eq(`123\\000456`); + }); + dataSources.ReadQueryTableResponse(5).then(($cellData) => { + expect($cellData).to.eq("31323300343536"); + }); + + agHelper.ActionContextMenuWithInPane({ + action: "Delete", + entityType: entityItems.Query, + }); + AppSidebar.navigate(AppSidebarButton.Editor); + }); + // after( + // "Validate Drop of the Newly Created - binarytype - Table & Verify Deletion of all created queries", + // () => { + // //Drop table + // deployMode.NavigateBacktoEditor(); + // entityExplorer.ExpandCollapseEntity("Queries/JS"); + // entityExplorer.SelectEntityByName("dropTable"); + // dataSources.RunQuery(); + // dataSources.ReadQueryTableResponse(0).then(($cellData) => { + // expect($cellData).to.eq("0"); //Success response for dropped table! + // }); + // entityExplorer.ExpandCollapseEntity("Queries/JS", false); + // entityExplorer.ExpandCollapseEntity("Datasources"); + // entityExplorer.ExpandCollapseEntity(dsName); + // entityExplorer.ActionContextMenuByEntityName(dsName, "Refresh"); + // agHelper.AssertElementAbsence( + // entityExplorer._entityNameInExplorer("public.binarytype"), + // ); + + // //Delete all queries + // dataSources.DeleteDatasourceFromWithinDS(dsName, 409); //Since all queries exists + // entityExplorer.ExpandCollapseEntity("Queries/JS"); + // entityExplorer.DeleteAllQueriesForDB(dsName); + + // //Delete DS + // deployMode.DeployApp(); + // deployMode.NavigateBacktoEditor(); + // entityExplorer.ExpandCollapseEntity("Queries/JS"); + // dataSources.DeleteDatasourceFromWithinDS(dsName, 200); + // }, + // ); + }, +); diff --git a/app/client/cypress/e2e/Regression/ServerSide/Postgres_DataTypes/BooleanEnum_Spec.ts b/app/client/cypress/e2e/Regression/ServerSide/Postgres_DataTypes/BooleanEnum_Spec.ts index fc0f5f1c7ae1..ed587c29a7ce 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/Postgres_DataTypes/BooleanEnum_Spec.ts +++ b/app/client/cypress/e2e/Regression/ServerSide/Postgres_DataTypes/BooleanEnum_Spec.ts @@ -17,7 +17,7 @@ import EditorNavigation, { describe( "Boolean & Enum Datatype tests", - { tags: ["@tag.Datasource"] }, + { tags: ["@tag.Datasource", "@tag.Git", "@tag.AccessControl"] }, function () { let dsName: any, query: string; diff --git a/app/client/cypress/e2e/Regression/ServerSide/Postgres_DataTypes/Character_Spec.ts b/app/client/cypress/e2e/Regression/ServerSide/Postgres_DataTypes/Character_Spec.ts index 5f4cc6862d06..a8ed6a0d73ff 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/Postgres_DataTypes/Character_Spec.ts +++ b/app/client/cypress/e2e/Regression/ServerSide/Postgres_DataTypes/Character_Spec.ts @@ -17,7 +17,7 @@ import EditorNavigation, { describe( "Character Datatype tests", - { tags: ["@tag.Datasource"] }, + { tags: ["@tag.Datasource", "@tag.Git", "@tag.AccessControl"] }, function () { let dsName: any, query: string; diff --git a/app/client/cypress/e2e/Regression/ServerSide/Postgres_DataTypes/DateTime_Spec.ts b/app/client/cypress/e2e/Regression/ServerSide/Postgres_DataTypes/DateTime_Spec.ts index c0ad3c9fb1cb..d63bcee9d3c3 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/Postgres_DataTypes/DateTime_Spec.ts +++ b/app/client/cypress/e2e/Regression/ServerSide/Postgres_DataTypes/DateTime_Spec.ts @@ -16,325 +16,353 @@ import EditorNavigation, { EntityType, } from "../../../../support/Pages/EditorNavigation"; -describe("DateTime Datatype tests", { tags: ["@tag.Datasource"] }, function () { - let dsName: any, query: string; +describe( + "DateTime Datatype tests", + { tags: ["@tag.Datasource", "@tag.Git", "@tag.AccessControl"] }, + function () { + let dsName: any, query: string; - before("Create Postgress DS", () => { - agHelper.AddDsl("Datatypes/DateTimeDTdsl"); - appSettings.OpenPaneAndChangeThemeColors(22, 32); - dataSources.CreateDataSource("Postgres"); - cy.get("@dsName").then(($dsName) => { - dsName = $dsName; + before("Create Postgress DS", () => { + agHelper.AddDsl("Datatypes/DateTimeDTdsl"); + appSettings.OpenPaneAndChangeThemeColors(22, 32); + dataSources.CreateDataSource("Postgres"); + cy.get("@dsName").then(($dsName) => { + dsName = $dsName; + }); }); - }); - it("1. Creating table - datetimetypes", () => { - query = `CREATE TABLE datetimeTypes (serialId serial primary key, ts TIMESTAMP not null DEFAULT NOW(), + it("1. Creating table - datetimetypes", () => { + query = `CREATE TABLE datetimeTypes (serialId serial primary key, ts TIMESTAMP not null DEFAULT NOW(), tstz TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP, dater date NOT NULL, timer time NOT NULL, timertz time with time zone not null default now(), intervaler interval not null);`; - dataSources.CreateQueryForDS(dsName, query, "createTable"); - agHelper.FocusElement(locators._codeMirrorTextArea); - dataSources.RunQuery(); - }); + dataSources.CreateQueryForDS(dsName, query, "createTable"); + agHelper.FocusElement(locators._codeMirrorTextArea); + dataSources.RunQuery(); + }); - it("2. Creating SELECT query - datetimetypes + Bug 14493", () => { - query = `SELECT *, TO_CHAR(datetimeT.dater , 'dd.mm.yyyy') as "dd.mm.yyyy", + it("2. Creating SELECT query - datetimetypes + Bug 14493", () => { + query = `SELECT *, TO_CHAR(datetimeT.dater , 'dd.mm.yyyy') as "dd.mm.yyyy", TO_CHAR (datetimeT.ts, 'MM/DD/YYYY HH12:MI:SS AM') as "MM/DD/YYYY", TO_CHAR (datetimeT.ts, 'YYYY')||' / ' || TO_CHAR (datetimeT.dater, 'YYY') as "YYYY/YYY", TO_CHAR (datetimeT.ts, 'MONTH') ||' / ' || TO_CHAR(datetimeT.dater, 'Month') as "MONTH/Month", TO_CHAR (datetimeT.dater, 'D') ||' / ' || TO_CHAR(datetimeT.dater, 'day') as "Day of the wentityExplorer.k/WentityExplorer.kday", TO_CHAR (datetimeT.dater, 'W') as "WentityExplorer.k of Month" FROM public."datetimetypes" as datetimeT;`; - dataSources.createQueryWithDatasourceSchemaTemplate( - dsName, - "public.datetimetypes", - "Select", - ); - dataSources.RunQuery(); - agHelper - .GetText(dataSources._noRecordFound) - .then(($noRecMsg) => expect($noRecMsg).to.eq("No data records to show")); - dataSources.EnterQuery(query); - agHelper.RenameWithInPane("selectRecords"); - }); + dataSources.createQueryWithDatasourceSchemaTemplate( + dsName, + "public.datetimetypes", + "Select", + ); + dataSources.RunQuery(); + agHelper + .GetText(dataSources._noRecordFound) + .then(($noRecMsg) => + expect($noRecMsg).to.eq("No data records to show"), + ); + dataSources.EnterQuery(query); + agHelper.RenameWithInPane("selectRecords"); + }); - it("3. Creating all queries - datetimetypes", () => { - query = `INSERT INTO public."datetimetypes" (ts, tstz, dater, timer, intervaler) + it("3. Creating all queries - datetimetypes", () => { + query = `INSERT INTO public."datetimetypes" (ts, tstz, dater, timer, intervaler) VALUES('{{Insertts.text}}', '{{Inserttstz.text}}', '{{Insertdater.text}}', '{{Inserttimer.text}}', '{{Insertintervaler.text}}');`; - dataSources.createQueryWithDatasourceSchemaTemplate( - dsName, - "public.datetimetypes", - "Insert", - ); - dataSources.EnterQuery(query); - agHelper.RenameWithInPane("insertRecord"); - dataSources.ToggleUsePreparedStatement(false); + dataSources.createQueryWithDatasourceSchemaTemplate( + dsName, + "public.datetimetypes", + "Insert", + ); + dataSources.EnterQuery(query); + agHelper.RenameWithInPane("insertRecord"); + dataSources.ToggleUsePreparedStatement(false); - query = `UPDATE public."datetimetypes" SET + query = `UPDATE public."datetimetypes" SET "ts" = '{{Updatets.text}}', "tstz" = '{{Updatetstz.text}}', "dater" = '{{Updatedater.text}}', "timer" = '{{Updatetimer.text}}', "intervaler" = '{{Updateintervaler.text}}' WHERE serialid = {{Table1.selectedRow.serialid}};`; - dataSources.createQueryWithDatasourceSchemaTemplate( - dsName, - "public.datetimetypes", - "Update", - ); - dataSources.EnterQuery(query); - agHelper.RenameWithInPane("updateRecord"); - dataSources.ToggleUsePreparedStatement(false); + dataSources.createQueryWithDatasourceSchemaTemplate( + dsName, + "public.datetimetypes", + "Update", + ); + dataSources.EnterQuery(query); + agHelper.RenameWithInPane("updateRecord"); + dataSources.ToggleUsePreparedStatement(false); - query = `DELETE FROM public."datetimetypes"`; - dataSources.createQueryWithDatasourceSchemaTemplate( - dsName, - "public.datetimetypes", - "Delete", - ); - dataSources.EnterQuery(query); - agHelper.RenameWithInPane("deleteAllRecords"); + query = `DELETE FROM public."datetimetypes"`; + dataSources.createQueryWithDatasourceSchemaTemplate( + dsName, + "public.datetimetypes", + "Delete", + ); + dataSources.EnterQuery(query); + agHelper.RenameWithInPane("deleteAllRecords"); - query = `drop table public."datetimetypes"`; - dataSources.createQueryWithDatasourceSchemaTemplate( - dsName, - "public.datetimetypes", - "Delete", - ); - dataSources.EnterQuery(query); - agHelper.RenameWithInPane("dropTable"); + query = `drop table public."datetimetypes"`; + dataSources.createQueryWithDatasourceSchemaTemplate( + dsName, + "public.datetimetypes", + "Delete", + ); + dataSources.EnterQuery(query); + agHelper.RenameWithInPane("dropTable"); - query = `DELETE FROM public."datetimetypes" + query = `DELETE FROM public."datetimetypes" WHERE serialId = {{Table1.selectedRow.serialid}};`; - dataSources.createQueryWithDatasourceSchemaTemplate( - dsName, - "public.datetimetypes", - "Delete", - ); - dataSources.EnterQuery(query); - agHelper.RenameWithInPane("deleteRecord"); - }); + dataSources.createQueryWithDatasourceSchemaTemplate( + dsName, + "public.datetimetypes", + "Delete", + ); + dataSources.EnterQuery(query); + agHelper.RenameWithInPane("deleteRecord"); + }); - it("4. Validating interval methods", () => { - query = `SELECT + it("4. Validating interval methods", () => { + query = `SELECT justify_interval(interval '1 year - 1 hour'), justify_days(INTERVAL '30 days'), justify_hours(INTERVAL '24 hours'), EXTRACT (MINUTE FROM INTERVAL '5 hours 21 minutes');`; - dataSources.createQueryWithDatasourceSchemaTemplate( - dsName, - "public.datetimetypes", - "Select", - ); - dataSources.EnterQuery(query); - agHelper.RenameWithInPane("intervalRecords"); - dataSources.RunQuery(); - dataSources.ReadQueryTableResponse(0).then(($cellData) => { - expect($cellData).to.eq( - "0 years 11 mons 29 days 23 hours 0 mins 0.0 secs", + dataSources.createQueryWithDatasourceSchemaTemplate( + dsName, + "public.datetimetypes", + "Select", ); + dataSources.EnterQuery(query); + agHelper.RenameWithInPane("intervalRecords"); + dataSources.RunQuery(); + dataSources.ReadQueryTableResponse(0).then(($cellData) => { + expect($cellData).to.eq( + "0 years 11 mons 29 days 23 hours 0 mins 0.0 secs", + ); + }); + dataSources.ReadQueryTableResponse(1).then(($cellData) => { + expect($cellData).to.eq( + "0 years 1 mons 0 days 0 hours 0 mins 0.0 secs", + ); + }); + dataSources.ReadQueryTableResponse(2).then(($cellData) => { + expect($cellData).to.eq( + "0 years 0 mons 1 days 0 hours 0 mins 0.0 secs", + ); + }); + dataSources.ReadQueryTableResponse(3).then(($cellData) => { + expect($cellData).to.eq("21"); + }); + agHelper.ActionContextMenuWithInPane({ + action: "Delete", + entityType: entityItems.Query, + }); + AppSidebar.navigate(AppSidebarButton.Editor); }); - dataSources.ReadQueryTableResponse(1).then(($cellData) => { - expect($cellData).to.eq("0 years 1 mons 0 days 0 hours 0 mins 0.0 secs"); - }); - dataSources.ReadQueryTableResponse(2).then(($cellData) => { - expect($cellData).to.eq("0 years 0 mons 1 days 0 hours 0 mins 0.0 secs"); - }); - dataSources.ReadQueryTableResponse(3).then(($cellData) => { - expect($cellData).to.eq("21"); - }); - agHelper.ActionContextMenuWithInPane({ - action: "Delete", - entityType: entityItems.Query, - }); - AppSidebar.navigate(AppSidebarButton.Editor); - }); - it("5. Inserting record - datetimetypes", () => { - EditorNavigation.SelectEntityByName("Page1", EntityType.Page); - deployMode.DeployApp(); - table.WaitForTableEmpty(); //asserting table is empty before inserting! - agHelper.ClickButton("Run InsertQuery"); - agHelper.AssertElementVisibility(locators._modal); + it("5. Inserting record - datetimetypes", () => { + EditorNavigation.SelectEntityByName("Page1", EntityType.Page); + deployMode.DeployApp(); + table.WaitForTableEmpty(); //asserting table is empty before inserting! + agHelper.ClickButton("Run InsertQuery"); + agHelper.AssertElementVisibility(locators._modal); - agHelper.EnterInputText("Ts", "2016-06-22 19:10:25-07"); - agHelper.EnterInputText("Tstz", "2016-06-22 19:10:25-07"); - agHelper.EnterInputText("Dater", "January 19, 1989"); - agHelper.EnterInputText("Timer", "04:05 PM"); - agHelper.EnterInputText("Intervaler", "P6Y5M4DT3H2M1S"); + agHelper.EnterInputText("Ts", "2016-06-22 19:10:25-07"); + agHelper.EnterInputText("Tstz", "2016-06-22 19:10:25-07"); + agHelper.EnterInputText("Dater", "January 19, 1989"); + agHelper.EnterInputText("Timer", "04:05 PM"); + agHelper.EnterInputText("Intervaler", "P6Y5M4DT3H2M1S"); - agHelper.ClickButton("Insert"); - agHelper.AssertElementVisibility(locators._buttonByText("Run InsertQuery")); - table.ReadTableRowColumnData(0, 0, "v1", 2000).then(($cellData) => { - expect($cellData).to.eq("1"); //asserting serial column is inserting fine in sequence - }); - table.ReadTableRowColumnData(0, 1, "v1", 200).then(($ts) => { - table.ReadTableRowColumnData(0, 2, "v1", 200).then(($tstz) => { - expect($ts).to.not.eq($tstz); //ts & tstz not equal since tstz is time zone applied + agHelper.ClickButton("Insert"); + agHelper.AssertElementVisibility( + locators._buttonByText("Run InsertQuery"), + ); + table.ReadTableRowColumnData(0, 0, "v1", 2000).then(($cellData) => { + expect($cellData).to.eq("1"); //asserting serial column is inserting fine in sequence }); + table.ReadTableRowColumnData(0, 1, "v1", 200).then(($ts) => { + table.ReadTableRowColumnData(0, 2, "v1", 200).then(($tstz) => { + expect($ts).to.not.eq($tstz); //ts & tstz not equal since tstz is time zone applied + }); + }); + table.ReadTableRowColumnData(0, 3, "v1", 200).then(($cellData) => { + expect($cellData).to.eq("1989-01-19"); //date format! + }); + table.ReadTableRowColumnData(0, 4, "v1", 200).then(($cellData) => { + expect($cellData).to.eq("16:05:00"); //time format + }); + table.ReadTableRowColumnData(0, 6, "v1", 200).then(($cellData) => { + expect($cellData).to.eq( + "6 years 5 mons 4 days 3 hours 2 mins 1.0 secs", + ); //Interval format! + }); + table.ReadTableRowColumnData(0, 7).then(($cellData) => { + expect($cellData).to.eq("19.01.1989"); + }); + agHelper + .GetText(table._showPageItemsCount) + .then(($count) => expect($count).contain("1")); }); - table.ReadTableRowColumnData(0, 3, "v1", 200).then(($cellData) => { - expect($cellData).to.eq("1989-01-19"); //date format! - }); - table.ReadTableRowColumnData(0, 4, "v1", 200).then(($cellData) => { - expect($cellData).to.eq("16:05:00"); //time format - }); - table.ReadTableRowColumnData(0, 6, "v1", 200).then(($cellData) => { - expect($cellData).to.eq("6 years 5 mons 4 days 3 hours 2 mins 1.0 secs"); //Interval format! - }); - table.ReadTableRowColumnData(0, 7).then(($cellData) => { - expect($cellData).to.eq("19.01.1989"); - }); - agHelper - .GetText(table._showPageItemsCount) - .then(($count) => expect($count).contain("1")); - }); - it("6. Inserting another format of record - datetimetypes", () => { - agHelper.ClickButton("Run InsertQuery"); - agHelper.AssertElementVisibility(locators._modal); + it("6. Inserting another format of record - datetimetypes", () => { + agHelper.ClickButton("Run InsertQuery"); + agHelper.AssertElementVisibility(locators._modal); - agHelper.EnterInputText("Ts", "2020-10-05 14:01:10-08"); - agHelper.EnterInputText("Tstz", "2020-10-05 14:01:10-08"); - agHelper.EnterInputText("Dater", "20451229"); - agHelper.EnterInputText("Timer", "04:05 AM"); - agHelper.EnterInputText("Intervaler", "3 4:05:06"); + agHelper.EnterInputText("Ts", "2020-10-05 14:01:10-08"); + agHelper.EnterInputText("Tstz", "2020-10-05 14:01:10-08"); + agHelper.EnterInputText("Dater", "20451229"); + agHelper.EnterInputText("Timer", "04:05 AM"); + agHelper.EnterInputText("Intervaler", "3 4:05:06"); - agHelper.ClickButton("Insert"); - agHelper.AssertElementVisibility(locators._buttonByText("Run InsertQuery")); + agHelper.ClickButton("Insert"); + agHelper.AssertElementVisibility( + locators._buttonByText("Run InsertQuery"), + ); - table.ReadTableRowColumnData(1, 0, "v1", 2000).then(($cellData) => { - expect($cellData).to.eq("2"); //asserting serial column is inserting fine in sequence - }); - table.ReadTableRowColumnData(1, 1, "v1", 200).then(($ts) => { - table.ReadTableRowColumnData(1, 2, "v1", 200).then(($tstz) => { - expect($ts).to.not.eq($tstz); //ts & tstz not equal since tstz is time zone applied + table.ReadTableRowColumnData(1, 0, "v1", 2000).then(($cellData) => { + expect($cellData).to.eq("2"); //asserting serial column is inserting fine in sequence }); + table.ReadTableRowColumnData(1, 1, "v1", 200).then(($ts) => { + table.ReadTableRowColumnData(1, 2, "v1", 200).then(($tstz) => { + expect($ts).to.not.eq($tstz); //ts & tstz not equal since tstz is time zone applied + }); + }); + table.ReadTableRowColumnData(1, 3, "v1", 200).then(($cellData) => { + expect($cellData).to.eq("2045-12-29"); + }); + table.ReadTableRowColumnData(1, 4, "v1", 200).then(($cellData) => { + expect($cellData).to.eq("04:05:00"); + }); + table.ReadTableRowColumnData(1, 6, "v1", 200).then(($cellData) => { + expect($cellData).to.eq( + "0 years 0 mons 3 days 4 hours 5 mins 6.0 secs", + ); + }); + table.ReadTableRowColumnData(1, 7, "v1", 200).then(($cellData) => { + expect($cellData).to.eq("29.12.2045"); + }); + agHelper + .GetText(table._showPageItemsCount) + .then(($count) => expect($count).contain("2")); }); - table.ReadTableRowColumnData(1, 3, "v1", 200).then(($cellData) => { - expect($cellData).to.eq("2045-12-29"); - }); - table.ReadTableRowColumnData(1, 4, "v1", 200).then(($cellData) => { - expect($cellData).to.eq("04:05:00"); - }); - table.ReadTableRowColumnData(1, 6, "v1", 200).then(($cellData) => { - expect($cellData).to.eq("0 years 0 mons 3 days 4 hours 5 mins 6.0 secs"); - }); - table.ReadTableRowColumnData(1, 7, "v1", 200).then(($cellData) => { - expect($cellData).to.eq("29.12.2045"); - }); - agHelper - .GetText(table._showPageItemsCount) - .then(($count) => expect($count).contain("2")); - }); - it("7. Updating record (emtying some field) - datetimetypes", () => { - table.SelectTableRow(1); - agHelper.ClickButton("Run UpdateQuery"); - agHelper.AssertElementVisibility(locators._modal); + it("7. Updating record (emtying some field) - datetimetypes", () => { + table.SelectTableRow(1); + agHelper.ClickButton("Run UpdateQuery"); + agHelper.AssertElementVisibility(locators._modal); - agHelper.EnterInputText("Ts", "2019-07-01", true); - agHelper.EnterInputText("Tstz", "2019-07-01 00:00:00+11", true); - agHelper.EnterInputText("Dater", "17-Mar-2014", true); - agHelper.EnterInputText("Timer", "04:05:06.789", true); - agHelper.EnterInputText("Intervaler", "P0001-03-02T06:04:05", true); + agHelper.EnterInputText("Ts", "2019-07-01", true); + agHelper.EnterInputText("Tstz", "2019-07-01 00:00:00+11", true); + agHelper.EnterInputText("Dater", "17-Mar-2014", true); + agHelper.EnterInputText("Timer", "04:05:06.789", true); + agHelper.EnterInputText("Intervaler", "P0001-03-02T06:04:05", true); - agHelper.ClickButton("Update"); - agHelper.AssertElementVisibility(locators._buttonByText("Run UpdateQuery")); - table.ReadTableRowColumnData(1, 0, "v1", 2000).then(($cellData) => { - expect($cellData).to.eq("2"); //asserting serial column is same - }); - table.ReadTableRowColumnData(1, 1, "v1", 200).then(($ts) => { - table.ReadTableRowColumnData(1, 2, "v1", 200).then(($tstz) => { - expect($ts).to.not.eq($tstz); + agHelper.ClickButton("Update"); + agHelper.AssertElementVisibility( + locators._buttonByText("Run UpdateQuery"), + ); + table.ReadTableRowColumnData(1, 0, "v1", 2000).then(($cellData) => { + expect($cellData).to.eq("2"); //asserting serial column is same }); + table.ReadTableRowColumnData(1, 1, "v1", 200).then(($ts) => { + table.ReadTableRowColumnData(1, 2, "v1", 200).then(($tstz) => { + expect($ts).to.not.eq($tstz); + }); + }); + table.ReadTableRowColumnData(1, 3, "v1", 200).then(($cellData) => { + expect($cellData).to.eq("2014-03-17"); + }); + table.ReadTableRowColumnData(1, 4, "v1", 200).then(($cellData) => { + expect($cellData).to.eq("04:05:06.789"); + }); + table.ReadTableRowColumnData(1, 6, "v1", 200).then(($cellData) => { + expect($cellData).to.eq( + "1 years 3 mons 2 days 6 hours 4 mins 5.0 secs", + ); + }); + table.ReadTableRowColumnData(1, 7, "v1", 200).then(($cellData) => { + expect($cellData).to.eq("17.03.2014"); + }); + agHelper + .GetText(table._showPageItemsCount) + .then(($count) => expect($count).contain("2")); }); - table.ReadTableRowColumnData(1, 3, "v1", 200).then(($cellData) => { - expect($cellData).to.eq("2014-03-17"); - }); - table.ReadTableRowColumnData(1, 4, "v1", 200).then(($cellData) => { - expect($cellData).to.eq("04:05:06.789"); - }); - table.ReadTableRowColumnData(1, 6, "v1", 200).then(($cellData) => { - expect($cellData).to.eq("1 years 3 mons 2 days 6 hours 4 mins 5.0 secs"); - }); - table.ReadTableRowColumnData(1, 7, "v1", 200).then(($cellData) => { - expect($cellData).to.eq("17.03.2014"); - }); - agHelper - .GetText(table._showPageItemsCount) - .then(($count) => expect($count).contain("2")); - }); - it("8. Deleting records - datetimetypes", () => { - agHelper.ClickButton("DeleteQuery", 1); - assertHelper.AssertNetworkStatus("@postExecute", 200); - assertHelper.AssertNetworkStatus("@postExecute", 200); - agHelper.Sleep(2500); //Allwowing time for delete to be success - agHelper - .GetText(table._showPageItemsCount) - .then(($count) => expect($count).contain("1")); //asserting 2nd record is deleted - }); + it("8. Deleting records - datetimetypes", () => { + agHelper.ClickButton("DeleteQuery", 1); + assertHelper.AssertNetworkStatus("@postExecute", 200); + assertHelper.AssertNetworkStatus("@postExecute", 200); + agHelper.Sleep(2500); //Allwowing time for delete to be success + agHelper + .GetText(table._showPageItemsCount) + .then(($count) => expect($count).contain("1")); //asserting 2nd record is deleted + }); - it("9. Inserting another record (+ve record - to check serial column) - datetimetypes", () => { - agHelper.ClickButton("Run InsertQuery"); - agHelper.AssertElementVisibility(locators._modal); + it("9. Inserting another record (+ve record - to check serial column) - datetimetypes", () => { + agHelper.ClickButton("Run InsertQuery"); + agHelper.AssertElementVisibility(locators._modal); - agHelper.EnterInputText("Ts", "February 8 04:05:06 1999"); - agHelper.EnterInputText("Tstz", "February 10 04:05:06 1999 PST"); - agHelper.EnterInputText("Dater", "J2451187"); // 20451229 - agHelper.EnterInputText("Timer", "181416"); - agHelper.EnterInputText("Intervaler", "1-2"); + agHelper.EnterInputText("Ts", "February 8 04:05:06 1999"); + agHelper.EnterInputText("Tstz", "February 10 04:05:06 1999 PST"); + agHelper.EnterInputText("Dater", "J2451187"); // 20451229 + agHelper.EnterInputText("Timer", "181416"); + agHelper.EnterInputText("Intervaler", "1-2"); - agHelper.ClickButton("Insert"); - agHelper.AssertElementVisibility(locators._buttonByText("Run InsertQuery")); + agHelper.ClickButton("Insert"); + agHelper.AssertElementVisibility( + locators._buttonByText("Run InsertQuery"), + ); - table.ReadTableRowColumnData(1, 0, "v1", 2000).then(($cellData) => { - expect($cellData).to.eq("3"); //asserting serial column is inserting fine in sequence - }); - table.ReadTableRowColumnData(1, 1, "v1", 200).then(($ts) => { - table.ReadTableRowColumnData(1, 2, "v1", 200).then(($tstz) => { - expect($ts).to.not.eq($tstz); //ts & tstz not equal since tstz is time zone applied + table.ReadTableRowColumnData(1, 0, "v1", 2000).then(($cellData) => { + expect($cellData).to.eq("3"); //asserting serial column is inserting fine in sequence }); + table.ReadTableRowColumnData(1, 1, "v1", 200).then(($ts) => { + table.ReadTableRowColumnData(1, 2, "v1", 200).then(($tstz) => { + expect($ts).to.not.eq($tstz); //ts & tstz not equal since tstz is time zone applied + }); + }); + table.ReadTableRowColumnData(1, 3, "v1", 200).then(($cellData) => { + expect($cellData).to.eq("1999-01-08"); + }); + table.ReadTableRowColumnData(1, 4, "v1", 200).then(($cellData) => { + expect($cellData).to.eq("18:14:16"); + }); + table.ReadTableRowColumnData(1, 6, "v1", 200).then(($cellData) => { + expect($cellData).to.eq( + "1 years 2 mons 0 days 0 hours 0 mins 0.0 secs", + ); + }); + table.ReadTableRowColumnData(1, 7, "v1", 200).then(($cellData) => { + expect($cellData).to.eq("08.01.1999"); + }); + agHelper + .GetText(table._showPageItemsCount) + .then(($count) => expect($count).contain("2")); }); - table.ReadTableRowColumnData(1, 3, "v1", 200).then(($cellData) => { - expect($cellData).to.eq("1999-01-08"); - }); - table.ReadTableRowColumnData(1, 4, "v1", 200).then(($cellData) => { - expect($cellData).to.eq("18:14:16"); - }); - table.ReadTableRowColumnData(1, 6, "v1", 200).then(($cellData) => { - expect($cellData).to.eq("1 years 2 mons 0 days 0 hours 0 mins 0.0 secs"); - }); - table.ReadTableRowColumnData(1, 7, "v1", 200).then(($cellData) => { - expect($cellData).to.eq("08.01.1999"); - }); - agHelper - .GetText(table._showPageItemsCount) - .then(($count) => expect($count).contain("2")); - }); - it("10. Deleting all records from table - datetimetypes", () => { - agHelper.GetNClick(locators._deleteIcon); - agHelper.AssertElementVisibility(locators._buttonByText("Run InsertQuery")); - agHelper.Sleep(2000); - table.WaitForTableEmpty(); - }); + it("10. Deleting all records from table - datetimetypes", () => { + agHelper.GetNClick(locators._deleteIcon); + agHelper.AssertElementVisibility( + locators._buttonByText("Run InsertQuery"), + ); + agHelper.Sleep(2000); + table.WaitForTableEmpty(); + }); - it("11. Validate Drop of the Newly Created - datetimetypes - Table from Postgres datasource", () => { - deployMode.NavigateBacktoEditor(); - EditorNavigation.SelectEntityByName("dropTable", EntityType.Query); - dataSources.RunQuery(); - dataSources.ReadQueryTableResponse(0).then(($cellData) => { - expect($cellData).to.eq("0"); //Success response for dropped table! + it("11. Validate Drop of the Newly Created - datetimetypes - Table from Postgres datasource", () => { + deployMode.NavigateBacktoEditor(); + EditorNavigation.SelectEntityByName("dropTable", EntityType.Query); + dataSources.RunQuery(); + dataSources.ReadQueryTableResponse(0).then(($cellData) => { + expect($cellData).to.eq("0"); //Success response for dropped table! + }); + dataSources.AssertTableInVirtuosoList( + dsName, + "public.datetimetypes", + false, + ); }); - dataSources.AssertTableInVirtuosoList( - dsName, - "public.datetimetypes", - false, - ); - }); - it("12. Verify Deletion of the datasource after all created queries are deleted", () => { - dataSources.DeleteDatasourceFromWithinDS(dsName, 409); //Since all queries exists - entityExplorer.DeleteAllQueriesForDB(dsName); - deployMode.DeployApp(); - deployMode.NavigateBacktoEditor(); - dataSources.DeleteDatasourceFromWithinDS(dsName, 200); //ProductLines, EmployentityExplorer.s pages are still using this ds - }); -}); + it("12. Verify Deletion of the datasource after all created queries are deleted", () => { + dataSources.DeleteDatasourceFromWithinDS(dsName, 409); //Since all queries exists + entityExplorer.DeleteAllQueriesForDB(dsName); + deployMode.DeployApp(); + deployMode.NavigateBacktoEditor(); + dataSources.DeleteDatasourceFromWithinDS(dsName, 200); //ProductLines, EmployentityExplorer.s pages are still using this ds + }); + }, +); diff --git a/app/client/cypress/e2e/Regression/ServerSide/Postgres_DataTypes/Json_Spec.ts b/app/client/cypress/e2e/Regression/ServerSide/Postgres_DataTypes/Json_Spec.ts index 01a6a7ba2edd..03371dcfb95e 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/Postgres_DataTypes/Json_Spec.ts +++ b/app/client/cypress/e2e/Regression/ServerSide/Postgres_DataTypes/Json_Spec.ts @@ -18,7 +18,7 @@ import { featureFlagIntercept } from "../../../../support/Objects/FeatureFlags"; describe( "Json & JsonB Datatype tests", - { tags: ["@tag.Datasource"] }, + { tags: ["@tag.Datasource", "@tag.Git", "@tag.AccessControl"] }, function () { let dsName: any, query: string; diff --git a/app/client/cypress/e2e/Regression/ServerSide/Postgres_DataTypes/Numeric_Spec.ts b/app/client/cypress/e2e/Regression/ServerSide/Postgres_DataTypes/Numeric_Spec.ts index d28ef7683d50..db11106b543c 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/Postgres_DataTypes/Numeric_Spec.ts +++ b/app/client/cypress/e2e/Regression/ServerSide/Postgres_DataTypes/Numeric_Spec.ts @@ -12,300 +12,328 @@ import EditorNavigation, { EntityType, } from "../../../../support/Pages/EditorNavigation"; -describe("Numeric Datatype tests", { tags: ["@tag.Datasource"] }, function () { - let dsName: any, query: string; +describe( + "Numeric Datatype tests", + { tags: ["@tag.Datasource", "@tag.Git", "@tag.AccessControl"] }, + function () { + let dsName: any, query: string; - before("Create Postgress DS, set Theme", () => { - agHelper.AddDsl("Datatypes/NumericDTdsl"); + before("Create Postgress DS, set Theme", () => { + agHelper.AddDsl("Datatypes/NumericDTdsl"); - appSettings.OpenPaneAndChangeTheme("Moon"); - dataSources.CreateDataSource("Postgres"); - cy.get("@dsName").then(($dsName) => { - dsName = $dsName; + appSettings.OpenPaneAndChangeTheme("Moon"); + dataSources.CreateDataSource("Postgres"); + cy.get("@dsName").then(($dsName) => { + dsName = $dsName; + }); }); - }); - it("1. Creating table - numerictypes", () => { - query = `create table numerictypes (serialId SERIAL not null primary key, bigintId bigint not null, decimalId decimal not null, numericId numeric not null)`; - dataSources.CreateQueryForDS(dsName, query, "createTable"); - agHelper.FocusElement(locators._codeMirrorTextArea); - dataSources.RunQuery(); - }); + it("1. Creating table - numerictypes", () => { + query = `create table numerictypes (serialId SERIAL not null primary key, bigintId bigint not null, decimalId decimal not null, numericId numeric not null)`; + dataSources.CreateQueryForDS(dsName, query, "createTable"); + agHelper.FocusElement(locators._codeMirrorTextArea); + dataSources.RunQuery(); + }); - it("2. Creating SELECT query - numerictypes + Bug 14493", () => { - dataSources.createQueryWithDatasourceSchemaTemplate( - dsName, - "public.numerictypes", - "Select", - ); - dataSources.RunQuery(); - agHelper - .GetText(dataSources._noRecordFound) - .then(($noRecMsg) => expect($noRecMsg).to.eq("No data records to show")); - agHelper.RenameWithInPane("selectRecords"); - }); + it("2. Creating SELECT query - numerictypes + Bug 14493", () => { + dataSources.createQueryWithDatasourceSchemaTemplate( + dsName, + "public.numerictypes", + "Select", + ); + dataSources.RunQuery(); + agHelper + .GetText(dataSources._noRecordFound) + .then(($noRecMsg) => + expect($noRecMsg).to.eq("No data records to show"), + ); + agHelper.RenameWithInPane("selectRecords"); + }); - it("3. Creating all queries - numerictypes", () => { - query = `INSERT INTO public."numerictypes" ("bigintid", "decimalid", "numericid") + it("3. Creating all queries - numerictypes", () => { + query = `INSERT INTO public."numerictypes" ("bigintid", "decimalid", "numericid") VALUES ({{Insertbigint.text}}, {{Insertdecimal.text}}, {{Insertnumeric.text}})`; - dataSources.createQueryWithDatasourceSchemaTemplate( - dsName, - "public.numerictypes", - "Insert", - ); - dataSources.EnterQuery(query); - agHelper.RenameWithInPane("insertRecord"); + dataSources.createQueryWithDatasourceSchemaTemplate( + dsName, + "public.numerictypes", + "Insert", + ); + dataSources.EnterQuery(query); + agHelper.RenameWithInPane("insertRecord"); - query = `UPDATE public."numerictypes" SET + query = `UPDATE public."numerictypes" SET "bigintid" = {{Updatebigint.text}}, "decimalid" = {{Updatedecimal.text}}, "numericid" = {{Updatenumeric.text}} WHERE serialid = {{Table1.selectedRow.serialid}};`; - dataSources.createQueryWithDatasourceSchemaTemplate( - dsName, - "public.numerictypes", - "Update", - ); - dataSources.EnterQuery(query); - agHelper.RenameWithInPane("updateRecord"); + dataSources.createQueryWithDatasourceSchemaTemplate( + dsName, + "public.numerictypes", + "Update", + ); + dataSources.EnterQuery(query); + agHelper.RenameWithInPane("updateRecord"); - query = `DELETE FROM public."numerictypes"`; - dataSources.createQueryWithDatasourceSchemaTemplate( - dsName, - "public.numerictypes", - "Delete", - ); - dataSources.EnterQuery(query); - agHelper.RenameWithInPane("deleteAllRecords"); + query = `DELETE FROM public."numerictypes"`; + dataSources.createQueryWithDatasourceSchemaTemplate( + dsName, + "public.numerictypes", + "Delete", + ); + dataSources.EnterQuery(query); + agHelper.RenameWithInPane("deleteAllRecords"); - query = `drop table public."numerictypes"`; - dataSources.createQueryWithDatasourceSchemaTemplate( - dsName, - "public.numerictypes", - "Delete", - ); - dataSources.EnterQuery(query); - agHelper.RenameWithInPane("dropTable"); + query = `drop table public."numerictypes"`; + dataSources.createQueryWithDatasourceSchemaTemplate( + dsName, + "public.numerictypes", + "Delete", + ); + dataSources.EnterQuery(query); + agHelper.RenameWithInPane("dropTable"); - query = `DELETE FROM public."numerictypes" + query = `DELETE FROM public."numerictypes" WHERE serialId ={{Table1.selectedRow.serialid}}`; - dataSources.createQueryWithDatasourceSchemaTemplate( - dsName, - "public.numerictypes", - "Delete", - ); - dataSources.EnterQuery(query); - agHelper.RenameWithInPane("deleteRecord"); - }); - - it("4. Inserting record (+ve limit) - numerictypes + Bug 14516", () => { - EditorNavigation.SelectEntityByName("Page1", EntityType.Page); - deployMode.DeployApp(); - table.WaitForTableEmpty(); //asserting table is empty before inserting! - agHelper.ClickButton("Run InsertQuery"); - agHelper.AssertElementVisibility(locators._modal); - agHelper.EnterInputText("Bigintid", "922337203685477"); //9223372036854775807 - agHelper.EnterInputText("Decimalid", "865456.987654567"); - agHelper.EnterInputText("Numericid", "2147483647.2147484"); //2147483647.2147483647 - agHelper.ClickButton("Insert"); - agHelper.AssertElementVisibility(locators._buttonByText("Run InsertQuery")); - table.ReadTableRowColumnData(0, 0, "v1", 2000).then(($cellData) => { - expect($cellData).to.eq("1"); //asserting serial column is inserting fine in sequence - }); - table.ReadTableRowColumnData(0, 1, "v1", 200).then(($cellData) => { - expect($cellData).to.eq("922337203685477"); + dataSources.createQueryWithDatasourceSchemaTemplate( + dsName, + "public.numerictypes", + "Delete", + ); + dataSources.EnterQuery(query); + agHelper.RenameWithInPane("deleteRecord"); }); - table.ReadTableRowColumnData(0, 2, "v1", 200).then(($cellData) => { - expect($cellData).to.eq("865456.987654567"); - }); - table.ReadTableRowColumnData(0, 3, "v1", 200).then(($cellData) => { - expect($cellData).to.eq("2147483647.2147484"); - }); - }); - it("5. Inserting record (-ve limit) - numerictypes + Bug 14516", () => { - agHelper.ClickButton("Run InsertQuery"); - agHelper.AssertElementVisibility(locators._modal); - agHelper.EnterInputText("Bigintid", "-922337203685477"); //-9223372036854775808 - agHelper.EnterInputText("Decimalid", "232143455655456.34"); //232143455655456.3434456565 - agHelper.EnterInputText("Numericid", "9877700000.143423"); //9877700000.14342340008876 - agHelper.ClickButton("Insert"); - agHelper.AssertElementVisibility(locators._buttonByText("Run InsertQuery")); - table.ReadTableRowColumnData(1, 0, "v1", 2000).then(($cellData) => { - expect($cellData).to.eq("2"); //asserting serial column is inserting fine in sequence - }); - table.ReadTableRowColumnData(1, 1, "v1", 200).then(($cellData) => { - expect($cellData).to.eq("-922337203685477"); //-9223372036854775808 + it("4. Inserting record (+ve limit) - numerictypes + Bug 14516", () => { + EditorNavigation.SelectEntityByName("Page1", EntityType.Page); + deployMode.DeployApp(); + table.WaitForTableEmpty(); //asserting table is empty before inserting! + agHelper.ClickButton("Run InsertQuery"); + agHelper.AssertElementVisibility(locators._modal); + agHelper.EnterInputText("Bigintid", "922337203685477"); //9223372036854775807 + agHelper.EnterInputText("Decimalid", "865456.987654567"); + agHelper.EnterInputText("Numericid", "2147483647.2147484"); //2147483647.2147483647 + agHelper.ClickButton("Insert"); + agHelper.AssertElementVisibility( + locators._buttonByText("Run InsertQuery"), + ); + table.ReadTableRowColumnData(0, 0, "v1", 2000).then(($cellData) => { + expect($cellData).to.eq("1"); //asserting serial column is inserting fine in sequence + }); + table.ReadTableRowColumnData(0, 1, "v1", 200).then(($cellData) => { + expect($cellData).to.eq("922337203685477"); + }); + table.ReadTableRowColumnData(0, 2, "v1", 200).then(($cellData) => { + expect($cellData).to.eq("865456.987654567"); + }); + table.ReadTableRowColumnData(0, 3, "v1", 200).then(($cellData) => { + expect($cellData).to.eq("2147483647.2147484"); + }); }); - table.ReadTableRowColumnData(1, 2, "v1", 200).then(($cellData) => { - expect($cellData).to.eq("232143455655456.34"); - }); - table.ReadTableRowColumnData(1, 3, "v1", 200).then(($cellData) => { - expect($cellData).to.eq("9877700000.143423"); - }); - }); - it("6. Inserting another record (+ve record) - numerictypes", () => { - agHelper.ClickButton("Run InsertQuery"); - agHelper.AssertElementVisibility(locators._modal); - agHelper.EnterInputText("Bigintid", "12233720368547758"); - agHelper.EnterInputText("Decimalid", "877675655441232.1"); //877675655441232.00998765 , 877675655441232.111 - agHelper.EnterInputText("Numericid", "86542300099.1"); //86542300099.1000099999876 - agHelper.ClickButton("Insert"); - agHelper.AssertElementVisibility(locators._buttonByText("Run InsertQuery")); - table.ReadTableRowColumnData(2, 0, "v1", 2000).then(($cellData) => { - expect($cellData).to.eq("3"); //asserting serial column is inserting fine in sequence - }); - table.ReadTableRowColumnData(2, 1, "v1", 200).then(($cellData) => { - expect($cellData).to.eq("12233720368547758"); - }); - table.ReadTableRowColumnData(2, 2, "v1", 200).then(($cellData) => { - expect($cellData).to.eq("877675655441232.1"); + it("5. Inserting record (-ve limit) - numerictypes + Bug 14516", () => { + agHelper.ClickButton("Run InsertQuery"); + agHelper.AssertElementVisibility(locators._modal); + agHelper.EnterInputText("Bigintid", "-922337203685477"); //-9223372036854775808 + agHelper.EnterInputText("Decimalid", "232143455655456.34"); //232143455655456.3434456565 + agHelper.EnterInputText("Numericid", "9877700000.143423"); //9877700000.14342340008876 + agHelper.ClickButton("Insert"); + agHelper.AssertElementVisibility( + locators._buttonByText("Run InsertQuery"), + ); + table.ReadTableRowColumnData(1, 0, "v1", 2000).then(($cellData) => { + expect($cellData).to.eq("2"); //asserting serial column is inserting fine in sequence + }); + table.ReadTableRowColumnData(1, 1, "v1", 200).then(($cellData) => { + expect($cellData).to.eq("-922337203685477"); //-9223372036854775808 + }); + table.ReadTableRowColumnData(1, 2, "v1", 200).then(($cellData) => { + expect($cellData).to.eq("232143455655456.34"); + }); + table.ReadTableRowColumnData(1, 3, "v1", 200).then(($cellData) => { + expect($cellData).to.eq("9877700000.143423"); + }); }); - table.ReadTableRowColumnData(2, 3, "v1", 200).then(($cellData) => { - expect($cellData).to.eq("86542300099.1"); - }); - }); - it("7. Updating record (permissible value) - numerictypes", () => { - table.SelectTableRow(2); - agHelper.ClickButton("Run UpdateQuery"); - agHelper.AssertElementVisibility(locators._modal); - agHelper.EnterInputText("Bigintid", "11233720368547758", true); - agHelper.EnterInputText("Decimalid", "777675655441232.1", true); //777675655441232.00998765 , 777675655441232.111 - agHelper.EnterInputText("Numericid", "76542300099.10988", true); //76542300099.109876788 - agHelper.ClickButton("Update"); - agHelper.AssertElementVisibility(locators._buttonByText("Run UpdateQuery")); - table.ReadTableRowColumnData(2, 0, "v1", 2000).then(($cellData) => { - expect($cellData).to.eq("3"); //asserting serial column is inserting fine in sequence - }); - table.ReadTableRowColumnData(2, 1, "v1", 200).then(($cellData) => { - expect($cellData).to.eq("11233720368547758"); - }); - table.ReadTableRowColumnData(2, 2, "v1", 200).then(($cellData) => { - expect($cellData).to.eq("777675655441232.1"); + it("6. Inserting another record (+ve record) - numerictypes", () => { + agHelper.ClickButton("Run InsertQuery"); + agHelper.AssertElementVisibility(locators._modal); + agHelper.EnterInputText("Bigintid", "12233720368547758"); + agHelper.EnterInputText("Decimalid", "877675655441232.1"); //877675655441232.00998765 , 877675655441232.111 + agHelper.EnterInputText("Numericid", "86542300099.1"); //86542300099.1000099999876 + agHelper.ClickButton("Insert"); + agHelper.AssertElementVisibility( + locators._buttonByText("Run InsertQuery"), + ); + table.ReadTableRowColumnData(2, 0, "v1", 2000).then(($cellData) => { + expect($cellData).to.eq("3"); //asserting serial column is inserting fine in sequence + }); + table.ReadTableRowColumnData(2, 1, "v1", 200).then(($cellData) => { + expect($cellData).to.eq("12233720368547758"); + }); + table.ReadTableRowColumnData(2, 2, "v1", 200).then(($cellData) => { + expect($cellData).to.eq("877675655441232.1"); + }); + table.ReadTableRowColumnData(2, 3, "v1", 200).then(($cellData) => { + expect($cellData).to.eq("86542300099.1"); + }); }); - table.ReadTableRowColumnData(2, 3, "v1", 200).then(($cellData) => { - expect($cellData).to.eq("76542300099.10988"); - }); - }); - it("8. Deleting records - numerictypes", () => { - table.SelectTableRow(1); - agHelper.ClickButton("DeleteQuery", 1); - assertHelper.AssertNetworkStatus("@postExecute", 200); - assertHelper.AssertNetworkStatus("@postExecute", 200); - agHelper.Sleep(2500); //Allwowing time for delete to be success - table.ReadTableRowColumnData(1, 0, "v1", 2000).then(($cellData) => { - expect($cellData).not.to.eq("2"); //asserting 2nd record is deleted - }); - table.ReadTableRowColumnData(1, 0, "v1", 200).then(($cellData) => { - expect($cellData).to.eq("3"); + it("7. Updating record (permissible value) - numerictypes", () => { + table.SelectTableRow(2); + agHelper.ClickButton("Run UpdateQuery"); + agHelper.AssertElementVisibility(locators._modal); + agHelper.EnterInputText("Bigintid", "11233720368547758", true); + agHelper.EnterInputText("Decimalid", "777675655441232.1", true); //777675655441232.00998765 , 777675655441232.111 + agHelper.EnterInputText("Numericid", "76542300099.10988", true); //76542300099.109876788 + agHelper.ClickButton("Update"); + agHelper.AssertElementVisibility( + locators._buttonByText("Run UpdateQuery"), + ); + table.ReadTableRowColumnData(2, 0, "v1", 2000).then(($cellData) => { + expect($cellData).to.eq("3"); //asserting serial column is inserting fine in sequence + }); + table.ReadTableRowColumnData(2, 1, "v1", 200).then(($cellData) => { + expect($cellData).to.eq("11233720368547758"); + }); + table.ReadTableRowColumnData(2, 2, "v1", 200).then(($cellData) => { + expect($cellData).to.eq("777675655441232.1"); + }); + table.ReadTableRowColumnData(2, 3, "v1", 200).then(($cellData) => { + expect($cellData).to.eq("76542300099.10988"); + }); }); - }); - it("9. Updating record again - numerictypes", () => { - table.SelectTableRow(1); - agHelper.ClickButton("Run UpdateQuery"); - agHelper.AssertElementVisibility(locators._modal); - agHelper.EnterInputText("Bigintid", "11133720368547700", true); - agHelper.EnterInputText("Decimalid", "777575655441232.1", true); //777575655441232.716716716716 , 777575655441232.1115 - agHelper.EnterInputText("Numericid", "66542300099.00088", true); //66542300099.0008767675 - agHelper.ClickButton("Update"); - agHelper.AssertElementVisibility(locators._buttonByText("Run UpdateQuery")); - table.ReadTableRowColumnData(1, 0, "v1", 2000).then(($cellData) => { - expect($cellData).to.eq("3"); //asserting serial column is inserting fine in sequence - }); - table.ReadTableRowColumnData(1, 1, "v1", 200).then(($cellData) => { - expect($cellData).to.eq("11133720368547700"); - }); - table.ReadTableRowColumnData(1, 2, "v1", 200).then(($cellData) => { - expect($cellData).to.eq("777575655441232.1"); + it("8. Deleting records - numerictypes", () => { + table.SelectTableRow(1); + agHelper.ClickButton("DeleteQuery", 1); + assertHelper.AssertNetworkStatus("@postExecute", 200); + assertHelper.AssertNetworkStatus("@postExecute", 200); + agHelper.Sleep(2500); //Allwowing time for delete to be success + table.ReadTableRowColumnData(1, 0, "v1", 2000).then(($cellData) => { + expect($cellData).not.to.eq("2"); //asserting 2nd record is deleted + }); + table.ReadTableRowColumnData(1, 0, "v1", 200).then(($cellData) => { + expect($cellData).to.eq("3"); + }); }); - table.ReadTableRowColumnData(1, 3, "v1", 200).then(($cellData) => { - expect($cellData).to.eq("66542300099.00088"); - }); - }); - it("10. Inserting another record (+ve record - to check serial column) - numerictypes", () => { - agHelper.ClickButton("Run InsertQuery"); - agHelper.AssertElementVisibility(locators._modal); - agHelper.EnterInputText("Bigintid", "11111720368547700"); - agHelper.EnterInputText("Decimalid", "8765456.987654345"); //8765456.98765434567 - agHelper.EnterInputText("Numericid", "87654356.98765436"); // 87654356.987654356 - agHelper.ClickButton("Insert"); - agHelper.AssertElementVisibility(locators._buttonByText("Run InsertQuery")); - table.ReadTableRowColumnData(2, 0, "v1", 2000).then(($cellData) => { - expect($cellData).to.eq("4"); //asserting serial column is inserting fine in sequence - }); - table.ReadTableRowColumnData(2, 1, "v1", 200).then(($cellData) => { - expect($cellData).to.eq("11111720368547700"); - }); - table.ReadTableRowColumnData(2, 2, "v1", 200).then(($cellData) => { - expect($cellData).to.eq("8765456.987654345"); + it("9. Updating record again - numerictypes", () => { + table.SelectTableRow(1); + agHelper.ClickButton("Run UpdateQuery"); + agHelper.AssertElementVisibility(locators._modal); + agHelper.EnterInputText("Bigintid", "11133720368547700", true); + agHelper.EnterInputText("Decimalid", "777575655441232.1", true); //777575655441232.716716716716 , 777575655441232.1115 + agHelper.EnterInputText("Numericid", "66542300099.00088", true); //66542300099.0008767675 + agHelper.ClickButton("Update"); + agHelper.AssertElementVisibility( + locators._buttonByText("Run UpdateQuery"), + ); + table.ReadTableRowColumnData(1, 0, "v1", 2000).then(($cellData) => { + expect($cellData).to.eq("3"); //asserting serial column is inserting fine in sequence + }); + table.ReadTableRowColumnData(1, 1, "v1", 200).then(($cellData) => { + expect($cellData).to.eq("11133720368547700"); + }); + table.ReadTableRowColumnData(1, 2, "v1", 200).then(($cellData) => { + expect($cellData).to.eq("777575655441232.1"); + }); + table.ReadTableRowColumnData(1, 3, "v1", 200).then(($cellData) => { + expect($cellData).to.eq("66542300099.00088"); + }); }); - table.ReadTableRowColumnData(2, 3, "v1", 200).then(($cellData) => { - expect($cellData).to.eq("87654356.98765436"); - }); - }); - it("11. Deleting records - numerictypes", () => { - table.SelectTableRow(1); - agHelper.ClickButton("DeleteQuery", 1); - agHelper.Sleep(3000); //for CI to finish delete - agHelper.AssertElementVisibility(locators._buttonByText("Run InsertQuery")); - table.ReadTableRowColumnData(1, 0, "v1", 2000).then(($cellData) => { - expect($cellData).not.to.eq("3"); //asserting 3rd record is deleted - }); - table.ReadTableRowColumnData(1, 0, "v1", 2000).then(($cellData) => { - expect($cellData).to.eq("4"); + it("10. Inserting another record (+ve record - to check serial column) - numerictypes", () => { + agHelper.ClickButton("Run InsertQuery"); + agHelper.AssertElementVisibility(locators._modal); + agHelper.EnterInputText("Bigintid", "11111720368547700"); + agHelper.EnterInputText("Decimalid", "8765456.987654345"); //8765456.98765434567 + agHelper.EnterInputText("Numericid", "87654356.98765436"); // 87654356.987654356 + agHelper.ClickButton("Insert"); + agHelper.AssertElementVisibility( + locators._buttonByText("Run InsertQuery"), + ); + table.ReadTableRowColumnData(2, 0, "v1", 2000).then(($cellData) => { + expect($cellData).to.eq("4"); //asserting serial column is inserting fine in sequence + }); + table.ReadTableRowColumnData(2, 1, "v1", 200).then(($cellData) => { + expect($cellData).to.eq("11111720368547700"); + }); + table.ReadTableRowColumnData(2, 2, "v1", 200).then(($cellData) => { + expect($cellData).to.eq("8765456.987654345"); + }); + table.ReadTableRowColumnData(2, 3, "v1", 200).then(($cellData) => { + expect($cellData).to.eq("87654356.98765436"); + }); }); - }); - - it("12. Deleting all records from table - numerictypes", () => { - agHelper.GetNClick(locators._deleteIcon); - agHelper.AssertElementVisibility(locators._buttonByText("Run InsertQuery")); - agHelper.Sleep(2000); - table.WaitForTableEmpty(); - }); - it("13. Inserting record (+ve record - to check serial column) - numerictypes", () => { - agHelper.ClickButton("Run InsertQuery"); - agHelper.AssertElementVisibility(locators._modal); - agHelper.EnterInputText("Bigintid", "11111720368547700"); - agHelper.EnterInputText("Decimalid", "8765456.987654345"); - agHelper.EnterInputText("Numericid", "87654356.98765436"); // 87654356.9876543567 - agHelper.ClickButton("Insert"); - agHelper.AssertElementVisibility(locators._buttonByText("Run InsertQuery")); - table.ReadTableRowColumnData(0, 0, "v1", 2000).then(($cellData) => { - expect($cellData).to.eq("5"); //asserting serial column is inserting fine in sequence + it("11. Deleting records - numerictypes", () => { + table.SelectTableRow(1); + agHelper.ClickButton("DeleteQuery", 1); + agHelper.Sleep(3000); //for CI to finish delete + agHelper.AssertElementVisibility( + locators._buttonByText("Run InsertQuery"), + ); + table.ReadTableRowColumnData(1, 0, "v1", 2000).then(($cellData) => { + expect($cellData).not.to.eq("3"); //asserting 3rd record is deleted + }); + table.ReadTableRowColumnData(1, 0, "v1", 2000).then(($cellData) => { + expect($cellData).to.eq("4"); + }); }); - table.ReadTableRowColumnData(0, 1, "v1", 200).then(($cellData) => { - expect($cellData).to.eq("11111720368547700"); - }); - table.ReadTableRowColumnData(0, 2, "v1", 200).then(($cellData) => { - expect($cellData).to.eq("8765456.987654345"); + + it("12. Deleting all records from table - numerictypes", () => { + agHelper.GetNClick(locators._deleteIcon); + agHelper.AssertElementVisibility( + locators._buttonByText("Run InsertQuery"), + ); + agHelper.Sleep(2000); + table.WaitForTableEmpty(); }); - table.ReadTableRowColumnData(0, 3, "v1", 200).then(($cellData) => { - expect($cellData).to.eq("87654356.98765436"); + + it("13. Inserting record (+ve record - to check serial column) - numerictypes", () => { + agHelper.ClickButton("Run InsertQuery"); + agHelper.AssertElementVisibility(locators._modal); + agHelper.EnterInputText("Bigintid", "11111720368547700"); + agHelper.EnterInputText("Decimalid", "8765456.987654345"); + agHelper.EnterInputText("Numericid", "87654356.98765436"); // 87654356.9876543567 + agHelper.ClickButton("Insert"); + agHelper.AssertElementVisibility( + locators._buttonByText("Run InsertQuery"), + ); + table.ReadTableRowColumnData(0, 0, "v1", 2000).then(($cellData) => { + expect($cellData).to.eq("5"); //asserting serial column is inserting fine in sequence + }); + table.ReadTableRowColumnData(0, 1, "v1", 200).then(($cellData) => { + expect($cellData).to.eq("11111720368547700"); + }); + table.ReadTableRowColumnData(0, 2, "v1", 200).then(($cellData) => { + expect($cellData).to.eq("8765456.987654345"); + }); + table.ReadTableRowColumnData(0, 3, "v1", 200).then(($cellData) => { + expect($cellData).to.eq("87654356.98765436"); + }); }); - }); - it("14. Validate Drop of the Newly Created - numerictypes - Table from Postgres datasource", () => { - deployMode.NavigateBacktoEditor(); - EditorNavigation.SelectEntityByName("dropTable", EntityType.Query); - dataSources.RunQuery(); - dataSources.ReadQueryTableResponse(0).then(($cellData) => { - expect($cellData).to.eq("0"); //Success response for dropped table! + it("14. Validate Drop of the Newly Created - numerictypes - Table from Postgres datasource", () => { + deployMode.NavigateBacktoEditor(); + EditorNavigation.SelectEntityByName("dropTable", EntityType.Query); + dataSources.RunQuery(); + dataSources.ReadQueryTableResponse(0).then(($cellData) => { + expect($cellData).to.eq("0"); //Success response for dropped table! + }); + dataSources.AssertTableInVirtuosoList( + dsName, + "public.numerictypes", + false, + ); }); - dataSources.AssertTableInVirtuosoList(dsName, "public.numerictypes", false); - }); - it("15. Verify Deletion of the datasource after all created queries are deleted", () => { - dataSources.DeleteDatasourceFromWithinDS(dsName, 409); //Since all queries exists - entityExplorer.DeleteAllQueriesForDB(dsName); - deployMode.DeployApp(); - deployMode.NavigateBacktoEditor(); - dataSources.DeleteDatasourceFromWithinDS(dsName, 200); //ProductLines, Employees pages are still using this ds - }); -}); + it("15. Verify Deletion of the datasource after all created queries are deleted", () => { + dataSources.DeleteDatasourceFromWithinDS(dsName, 409); //Since all queries exists + entityExplorer.DeleteAllQueriesForDB(dsName); + deployMode.DeployApp(); + deployMode.NavigateBacktoEditor(); + dataSources.DeleteDatasourceFromWithinDS(dsName, 200); //ProductLines, Employees pages are still using this ds + }); + }, +); diff --git a/app/client/cypress/e2e/Regression/ServerSide/Postgres_DataTypes/UUID_Spec.ts b/app/client/cypress/e2e/Regression/ServerSide/Postgres_DataTypes/UUID_Spec.ts index b910774ba8ce..d63fde861a2d 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/Postgres_DataTypes/UUID_Spec.ts +++ b/app/client/cypress/e2e/Regression/ServerSide/Postgres_DataTypes/UUID_Spec.ts @@ -19,371 +19,395 @@ import EditorNavigation, { } from "../../../../support/Pages/EditorNavigation"; import { featureFlagIntercept } from "../../../../support/Objects/FeatureFlags"; -describe("UUID Datatype tests", { tags: ["@tag.Datasource"] }, function () { - let dsName: any, query: string, imageNameToUpload: string; +describe( + "UUID Datatype tests", + { tags: ["@tag.Datasource", "@tag.Git", "@tag.AccessControl"] }, + function () { + let dsName: any, query: string, imageNameToUpload: string; + + before("Importing App & setting theme", () => { + dataSources.CreateDataSource("Postgres"); + cy.get("@dsName").then(($dsName) => { + dsName = $dsName; + }); + AppSidebar.navigate(AppSidebarButton.Editor); + agHelper.AddDsl("Datatypes/UUIDDTdsl"); - before("Importing App & setting theme", () => { - dataSources.CreateDataSource("Postgres"); - cy.get("@dsName").then(($dsName) => { - dsName = $dsName; + appSettings.OpenPaneAndChangeTheme("Earth"); }); - AppSidebar.navigate(AppSidebarButton.Editor); - agHelper.AddDsl("Datatypes/UUIDDTdsl"); - - appSettings.OpenPaneAndChangeTheme("Earth"); - }); - it("1. Creating supporting api's for generating random UUID's", () => { - cy.fixture("datasources").then((datasourceFormData) => { - apiPage.CreateAndFillApi(datasourceFormData.uuid1Api, "version1"); - apiPage.CreateAndFillApi(datasourceFormData.uuid4Api, "version4"); - apiPage.CreateAndFillApi(datasourceFormData.nillApi, "nill"); - }); - }); - - it("2. Creating table query - uuidtype", () => { - query = `CREATE table uuidtype (serialid SERIAL primary key, v1 uuid, v4 uuid, nil uuid);`; - dataSources.CreateQueryForDS(dsName, query, "createTable"); - dataSources.RunQuery(); - }); - - it("3. Creating SELECT query - uuidtype + Bug 14493", () => { - dataSources.createQueryWithDatasourceSchemaTemplate( - dsName, - "public.uuidtype", - "Select", - ); - dataSources.RunQuery(); - agHelper - .GetText(dataSources._noRecordFound) - .then(($noRecMsg) => expect($noRecMsg).to.eq("No data records to show")); - agHelper.RenameWithInPane("selectRecords"); - }); - - it("4. Creating all queries - uuidtype", () => { - query = `INSERT INTO public."uuidtype" ("v1", "v4", "nil") VALUES ('{{version1.data}}', '{{version4.data}}', '{{nill.data}}');`; - entityExplorer.CreateNewDsQuery(dsName); - dataSources.EnterQuery(query); - agHelper.RenameWithInPane("insertRecord"); - - query = `UPDATE public."uuidtype" SET "v1" ='{{version1.data ? version1.data : Table1.selectedRow.v1}}', "v4" ='{{version4.data ? version4.data : Table1.selectedRow.v4}}', "nil" ='{{nill.data ? nill.data : Table1.selectedRow.nil}}' WHERE serialid = {{Table1.selectedRow.serialid}};`; - entityExplorer.CreateNewDsQuery(dsName); - dataSources.EnterQuery(query); - agHelper.RenameWithInPane("updateRecord"); - - query = `DELETE FROM public."uuidtype"`; - entityExplorer.CreateNewDsQuery(dsName); - dataSources.EnterQuery(query); - agHelper.RenameWithInPane("deleteAllRecords"); - - query = `drop table public."uuidtype"`; - entityExplorer.CreateNewDsQuery(dsName); - dataSources.EnterQuery(query); - agHelper.RenameWithInPane("dropTable"); - - query = `DELETE FROM public."uuidtype" WHERE serialId = {{Table1.selectedRow.serialid}}`; - entityExplorer.CreateNewDsQuery(dsName); - dataSources.EnterQuery(query); - agHelper.RenameWithInPane("deleteRecord"); - }); - - it("5. Inserting record - uuidtype", () => { - EditorNavigation.SelectEntityByName("Page1", EntityType.Page); - deployMode.DeployApp(); - table.WaitForTableEmpty(); //asserting table is empty before inserting! - agHelper.ClickButton("Run InsertQuery"); - agHelper.AssertElementVisibility(locators._modal); - - agHelper.ClickButton("Generate UUID's"); - agHelper.AssertContains("All UUIDs generated & available"); - agHelper.ClickButton("Insert"); - agHelper.AssertElementAbsence(locators._specificToast("failed to execute")); //Assert that Insert did not fail - agHelper.AssertElementVisibility(locators._buttonByText("Run InsertQuery")); - table.WaitUntilTableLoad(); - table.ReadTableRowColumnData(0, 0).then(($cellData) => { - expect($cellData).to.eq("1"); //asserting serial column is inserting fine in sequence - }); - table.ReadTableRowColumnData(0, 1, "v1", 200).then(($v1) => { - expect($v1).not.empty; - }); - table.ReadTableRowColumnData(0, 2, "v1", 200).then(($v4) => { - expect($v4).not.empty; - }); - table.ReadTableRowColumnData(0, 3, "v1", 200).then(($nil) => { - expect($nil).not.empty; - }); - }); - - it("6. Inserting another record - uuidtype", () => { - agHelper.WaitUntilAllToastsDisappear(); - agHelper.ClickButton("Run InsertQuery"); - agHelper.AssertElementVisibility(locators._modal); - - agHelper.ClickButton("Generate UUID's"); - agHelper.AssertContains("All UUIDs generated & available"); - - agHelper.ClickButton("Insert"); - agHelper.AssertElementAbsence(locators._specificToast("failed to execute")); //Assert that Insert did not fail - agHelper.AssertElementVisibility(locators._buttonByText("Run InsertQuery")); - table.WaitUntilTableLoad(); - table.ReadTableRowColumnData(1, 0).then(($cellData) => { - expect($cellData).to.eq("2"); //asserting serial column is inserting fine in sequence - }); - table.ReadTableRowColumnData(1, 1, "v1", 200).then(($v1) => { - expect($v1).not.empty; - }); - table.ReadTableRowColumnData(1, 2, "v1", 200).then(($v4) => { - expect($v4).not.empty; - }); - table.ReadTableRowColumnData(1, 3, "v1", 200).then(($nil) => { - expect($nil).not.empty; + it("1. Creating supporting api's for generating random UUID's", () => { + cy.fixture("datasources").then((datasourceFormData) => { + apiPage.CreateAndFillApi(datasourceFormData.uuid1Api, "version1"); + apiPage.CreateAndFillApi(datasourceFormData.uuid4Api, "version4"); + apiPage.CreateAndFillApi(datasourceFormData.nillApi, "nill"); + }); }); - }); - - it("7. Inserting another record - uuidtype", () => { - agHelper.WaitUntilAllToastsDisappear(); - agHelper.ClickButton("Run InsertQuery"); - agHelper.AssertElementVisibility(locators._modal); - - agHelper.ClickButton("Generate UUID's"); - agHelper.AssertContains("All UUIDs generated & available"); - - agHelper.ClickButton("Insert"); - agHelper.AssertElementAbsence(locators._specificToast("failed to execute")); //Assert that Insert did not fail - agHelper.AssertElementVisibility(locators._buttonByText("Run InsertQuery")); - table.WaitUntilTableLoad(); - table.ReadTableRowColumnData(2, 0).then(($cellData) => { - expect($cellData).to.eq("3"); //asserting serial column is inserting fine in sequence + + it("2. Creating table query - uuidtype", () => { + query = `CREATE table uuidtype (serialid SERIAL primary key, v1 uuid, v4 uuid, nil uuid);`; + dataSources.CreateQueryForDS(dsName, query, "createTable"); + dataSources.RunQuery(); }); - table.ReadTableRowColumnData(2, 1, "v1", 200).then(($v1) => { - expect($v1).not.empty; + + it("3. Creating SELECT query - uuidtype + Bug 14493", () => { + dataSources.createQueryWithDatasourceSchemaTemplate( + dsName, + "public.uuidtype", + "Select", + ); + dataSources.RunQuery(); + agHelper + .GetText(dataSources._noRecordFound) + .then(($noRecMsg) => + expect($noRecMsg).to.eq("No data records to show"), + ); + agHelper.RenameWithInPane("selectRecords"); + }); + + it("4. Creating all queries - uuidtype", () => { + query = `INSERT INTO public."uuidtype" ("v1", "v4", "nil") VALUES ('{{version1.data}}', '{{version4.data}}', '{{nill.data}}');`; + entityExplorer.CreateNewDsQuery(dsName); + dataSources.EnterQuery(query); + agHelper.RenameWithInPane("insertRecord"); + + query = `UPDATE public."uuidtype" SET "v1" ='{{version1.data ? version1.data : Table1.selectedRow.v1}}', "v4" ='{{version4.data ? version4.data : Table1.selectedRow.v4}}', "nil" ='{{nill.data ? nill.data : Table1.selectedRow.nil}}' WHERE serialid = {{Table1.selectedRow.serialid}};`; + entityExplorer.CreateNewDsQuery(dsName); + dataSources.EnterQuery(query); + agHelper.RenameWithInPane("updateRecord"); + + query = `DELETE FROM public."uuidtype"`; + entityExplorer.CreateNewDsQuery(dsName); + dataSources.EnterQuery(query); + agHelper.RenameWithInPane("deleteAllRecords"); + + query = `drop table public."uuidtype"`; + entityExplorer.CreateNewDsQuery(dsName); + dataSources.EnterQuery(query); + agHelper.RenameWithInPane("dropTable"); + + query = `DELETE FROM public."uuidtype" WHERE serialId = {{Table1.selectedRow.serialid}}`; + entityExplorer.CreateNewDsQuery(dsName); + dataSources.EnterQuery(query); + agHelper.RenameWithInPane("deleteRecord"); + }); + + it("5. Inserting record - uuidtype", () => { + EditorNavigation.SelectEntityByName("Page1", EntityType.Page); + deployMode.DeployApp(); + table.WaitForTableEmpty(); //asserting table is empty before inserting! + agHelper.ClickButton("Run InsertQuery"); + agHelper.AssertElementVisibility(locators._modal); + + agHelper.ClickButton("Generate UUID's"); + agHelper.AssertContains("All UUIDs generated & available"); + agHelper.ClickButton("Insert"); + agHelper.AssertElementAbsence( + locators._specificToast("failed to execute"), + ); //Assert that Insert did not fail + agHelper.AssertElementVisibility( + locators._buttonByText("Run InsertQuery"), + ); + table.WaitUntilTableLoad(); + table.ReadTableRowColumnData(0, 0).then(($cellData) => { + expect($cellData).to.eq("1"); //asserting serial column is inserting fine in sequence + }); + table.ReadTableRowColumnData(0, 1, "v1", 200).then(($v1) => { + expect($v1).not.empty; + }); + table.ReadTableRowColumnData(0, 2, "v1", 200).then(($v4) => { + expect($v4).not.empty; + }); + table.ReadTableRowColumnData(0, 3, "v1", 200).then(($nil) => { + expect($nil).not.empty; + }); }); - table.ReadTableRowColumnData(2, 2, "v1", 200).then(($v4) => { - expect($v4).not.empty; + + it("6. Inserting another record - uuidtype", () => { + agHelper.WaitUntilAllToastsDisappear(); + agHelper.ClickButton("Run InsertQuery"); + agHelper.AssertElementVisibility(locators._modal); + + agHelper.ClickButton("Generate UUID's"); + agHelper.AssertContains("All UUIDs generated & available"); + + agHelper.ClickButton("Insert"); + agHelper.AssertElementAbsence( + locators._specificToast("failed to execute"), + ); //Assert that Insert did not fail + agHelper.AssertElementVisibility( + locators._buttonByText("Run InsertQuery"), + ); + table.WaitUntilTableLoad(); + table.ReadTableRowColumnData(1, 0).then(($cellData) => { + expect($cellData).to.eq("2"); //asserting serial column is inserting fine in sequence + }); + table.ReadTableRowColumnData(1, 1, "v1", 200).then(($v1) => { + expect($v1).not.empty; + }); + table.ReadTableRowColumnData(1, 2, "v1", 200).then(($v4) => { + expect($v4).not.empty; + }); + table.ReadTableRowColumnData(1, 3, "v1", 200).then(($nil) => { + expect($nil).not.empty; + }); }); - table.ReadTableRowColumnData(2, 3, "v1", 200).then(($nil) => { - expect($nil).not.empty; + + it("7. Inserting another record - uuidtype", () => { + agHelper.WaitUntilAllToastsDisappear(); + agHelper.ClickButton("Run InsertQuery"); + agHelper.AssertElementVisibility(locators._modal); + + agHelper.ClickButton("Generate UUID's"); + agHelper.AssertContains("All UUIDs generated & available"); + + agHelper.ClickButton("Insert"); + agHelper.AssertElementAbsence( + locators._specificToast("failed to execute"), + ); //Assert that Insert did not fail + agHelper.AssertElementVisibility( + locators._buttonByText("Run InsertQuery"), + ); + table.WaitUntilTableLoad(); + table.ReadTableRowColumnData(2, 0).then(($cellData) => { + expect($cellData).to.eq("3"); //asserting serial column is inserting fine in sequence + }); + table.ReadTableRowColumnData(2, 1, "v1", 200).then(($v1) => { + expect($v1).not.empty; + }); + table.ReadTableRowColumnData(2, 2, "v1", 200).then(($v4) => { + expect($v4).not.empty; + }); + table.ReadTableRowColumnData(2, 3, "v1", 200).then(($nil) => { + expect($nil).not.empty; + }); }); - }); - - it("8. Updating record - uuidtype - updating only v1", () => { - table.SelectTableRow(2); //As Table Selected row has issues due to fast selction - agHelper.Sleep(2000); //for table selection to be captured - - table.ReadTableRowColumnData(2, 1, "v1", 200).then(($oldV1) => { - table.ReadTableRowColumnData(2, 2, "v1", 200).then(($oldV4) => { - agHelper.ClickButton("Run UpdateQuery"); - agHelper.AssertElementVisibility(locators._modal); - - agHelper.ClickButton("Generate new v1"); - agHelper.AssertContains("New V1 UUID available!"); - - agHelper.ClickButton("Update"); - agHelper.AssertElementAbsence( - locators._specificToast("failed to execute"), - ); //Assert that Insert did not fail - agHelper.AssertElementVisibility( - locators._buttonByText("Run UpdateQuery"), - ); - table.WaitUntilTableLoad(); - agHelper.Sleep(5000); //some more time for rows to rearrange for CI flakyness! - table.ReadTableRowColumnData(2, 0).then(($cellData) => { - expect($cellData).to.eq("3"); //asserting serial column is inserting fine in sequence - }); - table.ReadTableRowColumnData(2, 1, "v1", 200).then(($newV1) => { - expect($oldV1).to.not.eq($newV1); //making sure new v1 is updated - }); - table.ReadTableRowColumnData(2, 2, "v1", 200).then(($newV4) => { - expect($oldV4).to.eq($newV4); //making sure new v4 is not updated + + it("8. Updating record - uuidtype - updating only v1", () => { + table.SelectTableRow(2); //As Table Selected row has issues due to fast selction + agHelper.Sleep(2000); //for table selection to be captured + + table.ReadTableRowColumnData(2, 1, "v1", 200).then(($oldV1) => { + table.ReadTableRowColumnData(2, 2, "v1", 200).then(($oldV4) => { + agHelper.ClickButton("Run UpdateQuery"); + agHelper.AssertElementVisibility(locators._modal); + + agHelper.ClickButton("Generate new v1"); + agHelper.AssertContains("New V1 UUID available!"); + + agHelper.ClickButton("Update"); + agHelper.AssertElementAbsence( + locators._specificToast("failed to execute"), + ); //Assert that Insert did not fail + agHelper.AssertElementVisibility( + locators._buttonByText("Run UpdateQuery"), + ); + table.WaitUntilTableLoad(); + agHelper.Sleep(5000); //some more time for rows to rearrange for CI flakyness! + table.ReadTableRowColumnData(2, 0).then(($cellData) => { + expect($cellData).to.eq("3"); //asserting serial column is inserting fine in sequence + }); + table.ReadTableRowColumnData(2, 1, "v1", 200).then(($newV1) => { + expect($oldV1).to.not.eq($newV1); //making sure new v1 is updated + }); + table.ReadTableRowColumnData(2, 2, "v1", 200).then(($newV4) => { + expect($oldV4).to.eq($newV4); //making sure new v4 is not updated + }); }); }); }); - }); - - it("9. Updating record - uuidtype - updating v4 ", () => { - //table.SelectTableRow(2); //As Table Selected row has issues due to fast selction - table.ReadTableRowColumnData(2, 1, "v1", 200).then(($oldV1) => { - table.ReadTableRowColumnData(2, 2, "v1", 200).then(($oldV4) => { - //table.ReadTableRowColumnData(2, 3, "v1", 200).then(($oldguid) => { - agHelper.ClickButton("Run UpdateQuery"); - agHelper.AssertElementVisibility(locators._modal); - - agHelper.ClickButton("Generate new v4"); - agHelper.AssertContains("New V4 UUID available!"); - - agHelper.ClickButton("Update"); - agHelper.AssertElementAbsence( - locators._specificToast("failed to execute"), - ); //Assert that Insert did not fail - agHelper.AssertElementVisibility( - locators._buttonByText("Run UpdateQuery"), - ); - table.WaitUntilTableLoad(); - table.ReadTableRowColumnData(2, 0).then(($cellData) => { - expect($cellData).to.eq("3"); //asserting serial column is inserting fine in sequence - }); - table.ReadTableRowColumnData(2, 1, "v1", 200).then(($newV1) => { - expect($oldV1).to.eq($newV1); //making sure v1 is same - }); - table.ReadTableRowColumnData(2, 2, "v1", 200).then(($newV4) => { - expect($oldV4).to.not.eq($newV4); //making sure new v4 is updated - }); - /*table.ReadTableRowColumnData(2, 3, "v1", 200).then(($newguid) => { + + it("9. Updating record - uuidtype - updating v4 ", () => { + //table.SelectTableRow(2); //As Table Selected row has issues due to fast selction + table.ReadTableRowColumnData(2, 1, "v1", 200).then(($oldV1) => { + table.ReadTableRowColumnData(2, 2, "v1", 200).then(($oldV4) => { + //table.ReadTableRowColumnData(2, 3, "v1", 200).then(($oldguid) => { + agHelper.ClickButton("Run UpdateQuery"); + agHelper.AssertElementVisibility(locators._modal); + + agHelper.ClickButton("Generate new v4"); + agHelper.AssertContains("New V4 UUID available!"); + + agHelper.ClickButton("Update"); + agHelper.AssertElementAbsence( + locators._specificToast("failed to execute"), + ); //Assert that Insert did not fail + agHelper.AssertElementVisibility( + locators._buttonByText("Run UpdateQuery"), + ); + table.WaitUntilTableLoad(); + table.ReadTableRowColumnData(2, 0).then(($cellData) => { + expect($cellData).to.eq("3"); //asserting serial column is inserting fine in sequence + }); + table.ReadTableRowColumnData(2, 1, "v1", 200).then(($newV1) => { + expect($oldV1).to.eq($newV1); //making sure v1 is same + }); + table.ReadTableRowColumnData(2, 2, "v1", 200).then(($newV4) => { + expect($oldV4).to.not.eq($newV4); //making sure new v4 is updated + }); + /*table.ReadTableRowColumnData(2, 3, "v1", 200).then(($newguid) => { expect($oldguid).to.not.eq($newguid); //making sure new guid is updated }); */ + }); }); }); - }); - - it("10. Validating UUID functions", () => { - deployMode.NavigateBacktoEditor(); - table.WaitUntilTableLoad(); - PageLeftPane.switchSegment(PagePaneSegment.Queries); - //Validating use of extention - query = `CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; CREATE EXTENSION IF NOT EXISTS "pgcrypto"`; - dataSources.CreateQueryForDS(dsName, query, "verifyUUIDFunctions"); - dataSources.RunQueryNVerifyResponseViews(1); - dataSources.AssertQueryResponseHeaders(["affectedRows"]); - dataSources.ReadQueryTableResponse(0).then(($cellData) => { - expect($cellData).to.eq("0"); - }); - agHelper.Sleep(2000); // Above entensions settling time - - //Validating generation of new uuid via the extension package - query = `SELECT uuid_generate_v1() as v1, uuid_generate_v4() as v4, gen_random_uuid() as cryptov4, uuid_in(overlay(overlay(md5(random()::text || ':' || random()::text) placing '4' from 13) placing to_hex(floor(random()*(11-8+1) + 8)::int)::text from 17)::cstring) as form_uuid1, uuid_in(md5(random()::text || random()::text)::cstring) as form_uuid2;`; - dataSources.EnterQuery(query); - dataSources.RunQuery(); - dataSources.AssertQueryResponseHeaders([ - "v1", - "v4", - "cryptov4", - "form_uuid1", - "form_uuid2", - ]); - dataSources.ReadQueryTableResponse(0).then(($cellData) => { - expect($cellData).not.to.be.empty; - }); - dataSources.ReadQueryTableResponse(1).then(($cellData) => { - expect($cellData).not.to.be.empty; - }); - dataSources.ReadQueryTableResponse(2).then(($cellData) => { - expect($cellData).not.to.be.empty; - }); - dataSources.ReadQueryTableResponse(3).then(($cellData) => { - expect($cellData).not.to.be.empty; - }); - dataSources.ReadQueryTableResponse(4).then(($cellData) => { - expect($cellData).not.to.be.empty; - }); + it("10. Validating UUID functions", () => { + deployMode.NavigateBacktoEditor(); + table.WaitUntilTableLoad(); + PageLeftPane.switchSegment(PagePaneSegment.Queries); + //Validating use of extention + query = `CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; CREATE EXTENSION IF NOT EXISTS "pgcrypto"`; + dataSources.CreateQueryForDS(dsName, query, "verifyUUIDFunctions"); + dataSources.RunQueryNVerifyResponseViews(1); + dataSources.AssertQueryResponseHeaders(["affectedRows"]); + dataSources.ReadQueryTableResponse(0).then(($cellData) => { + expect($cellData).to.eq("0"); + }); - //Validating Addition of new column taking default value form package method - query = `ALTER TABLE uuidtype ADD COLUMN newUUID uuid DEFAULT uuid_generate_v4();`; - dataSources.EnterQuery(query); - dataSources.RunQueryNVerifyResponseViews(1); - dataSources.AssertQueryResponseHeaders(["affectedRows"]); - dataSources.ReadQueryTableResponse(0).then(($cellData) => { - expect($cellData).to.eq("0"); - }); - deployMode.DeployApp(); - table.WaitUntilTableLoad(); - deployMode.NavigateBacktoEditor(); - table.WaitUntilTableLoad(); - EditorNavigation.SelectEntityByName( - "verifyUUIDFunctions", - EntityType.Query, - ); - - //Validating altering the new column default value to generate id from pgcrypto package - query = `ALTER TABLE uuidtype ALTER COLUMN newUUID SET DEFAULT gen_random_uuid();`; - dataSources.EnterQuery(query); - dataSources.RunQueryNVerifyResponseViews(1); - dataSources.AssertQueryResponseHeaders(["affectedRows"]); - dataSources.ReadQueryTableResponse(0).then(($cellData) => { - expect($cellData).to.eq("0"); - }); - deployMode.DeployApp(); - table.WaitUntilTableLoad(); - - deployMode.NavigateBacktoEditor(); - table.WaitUntilTableLoad(); - EditorNavigation.SelectEntityByName( - "verifyUUIDFunctions", - EntityType.Query, - ); - agHelper.ActionContextMenuWithInPane({ - action: "Delete", - entityType: entityItems.Query, - }); - AppSidebar.navigate(AppSidebarButton.Editor); - }); - - it("11. Deleting records - uuidtype", () => { - EditorNavigation.SelectEntityByName("Page1", EntityType.Page); - deployMode.DeployApp(); - table.WaitUntilTableLoad(); - table.SelectTableRow(1); - agHelper.ClickButton("DeleteQuery", 1); - assertHelper.AssertNetworkStatus("@postExecute", 200); - assertHelper.AssertNetworkStatus("@postExecute", 200); - table.ReadTableRowColumnData(1, 0).then(($cellData) => { - expect($cellData).not.to.eq("2"); //asserting 2nd record is deleted - }); - }); - - it("12. Deleting all records from table - uuidtype", () => { - agHelper.GetNClick(locators._deleteIcon); - agHelper.AssertElementVisibility(locators._buttonByText("Run InsertQuery")); - agHelper.Sleep(2000); - table.WaitForTableEmpty(); - }); - - it("13. Inserting another record (to check serial column & new default column added) - uuidtype", () => { - agHelper.ClickButton("Run InsertQuery"); - agHelper.AssertElementVisibility(locators._modal); - - agHelper.ClickButton("Generate UUID's"); - agHelper.AssertContains("All UUIDs generated & available"); - - agHelper.ClickButton("Insert"); - agHelper.AssertElementAbsence(locators._specificToast("failed to execute")); //Assert that Insert did not fail - agHelper.AssertElementVisibility(locators._buttonByText("Run InsertQuery")); - table.WaitUntilTableLoad(); - table.ReadTableRowColumnData(0, 0).then(($cellData) => { - expect($cellData).to.eq("4"); //asserting serial column is inserting fine in sequence - }); - table.ReadTableRowColumnData(0, 1, "v1", 200).then(($v1) => { - expect($v1).not.empty; + agHelper.Sleep(2000); // Above entensions settling time + + //Validating generation of new uuid via the extension package + query = `SELECT uuid_generate_v1() as v1, uuid_generate_v4() as v4, gen_random_uuid() as cryptov4, uuid_in(overlay(overlay(md5(random()::text || ':' || random()::text) placing '4' from 13) placing to_hex(floor(random()*(11-8+1) + 8)::int)::text from 17)::cstring) as form_uuid1, uuid_in(md5(random()::text || random()::text)::cstring) as form_uuid2;`; + dataSources.EnterQuery(query); + dataSources.RunQuery(); + dataSources.AssertQueryResponseHeaders([ + "v1", + "v4", + "cryptov4", + "form_uuid1", + "form_uuid2", + ]); + dataSources.ReadQueryTableResponse(0).then(($cellData) => { + expect($cellData).not.to.be.empty; + }); + dataSources.ReadQueryTableResponse(1).then(($cellData) => { + expect($cellData).not.to.be.empty; + }); + dataSources.ReadQueryTableResponse(2).then(($cellData) => { + expect($cellData).not.to.be.empty; + }); + dataSources.ReadQueryTableResponse(3).then(($cellData) => { + expect($cellData).not.to.be.empty; + }); + dataSources.ReadQueryTableResponse(4).then(($cellData) => { + expect($cellData).not.to.be.empty; + }); + + //Validating Addition of new column taking default value form package method + query = `ALTER TABLE uuidtype ADD COLUMN newUUID uuid DEFAULT uuid_generate_v4();`; + dataSources.EnterQuery(query); + dataSources.RunQueryNVerifyResponseViews(1); + dataSources.AssertQueryResponseHeaders(["affectedRows"]); + dataSources.ReadQueryTableResponse(0).then(($cellData) => { + expect($cellData).to.eq("0"); + }); + deployMode.DeployApp(); + table.WaitUntilTableLoad(); + deployMode.NavigateBacktoEditor(); + table.WaitUntilTableLoad(); + EditorNavigation.SelectEntityByName( + "verifyUUIDFunctions", + EntityType.Query, + ); + + //Validating altering the new column default value to generate id from pgcrypto package + query = `ALTER TABLE uuidtype ALTER COLUMN newUUID SET DEFAULT gen_random_uuid();`; + dataSources.EnterQuery(query); + dataSources.RunQueryNVerifyResponseViews(1); + dataSources.AssertQueryResponseHeaders(["affectedRows"]); + dataSources.ReadQueryTableResponse(0).then(($cellData) => { + expect($cellData).to.eq("0"); + }); + deployMode.DeployApp(); + table.WaitUntilTableLoad(); + + deployMode.NavigateBacktoEditor(); + table.WaitUntilTableLoad(); + EditorNavigation.SelectEntityByName( + "verifyUUIDFunctions", + EntityType.Query, + ); + agHelper.ActionContextMenuWithInPane({ + action: "Delete", + entityType: entityItems.Query, + }); + AppSidebar.navigate(AppSidebarButton.Editor); + }); + + it("11. Deleting records - uuidtype", () => { + EditorNavigation.SelectEntityByName("Page1", EntityType.Page); + deployMode.DeployApp(); + table.WaitUntilTableLoad(); + table.SelectTableRow(1); + agHelper.ClickButton("DeleteQuery", 1); + assertHelper.AssertNetworkStatus("@postExecute", 200); + assertHelper.AssertNetworkStatus("@postExecute", 200); + table.ReadTableRowColumnData(1, 0).then(($cellData) => { + expect($cellData).not.to.eq("2"); //asserting 2nd record is deleted + }); }); - table.ReadTableRowColumnData(0, 2, "v1", 200).then(($v4) => { - expect($v4).not.empty; + + it("12. Deleting all records from table - uuidtype", () => { + agHelper.GetNClick(locators._deleteIcon); + agHelper.AssertElementVisibility( + locators._buttonByText("Run InsertQuery"), + ); + agHelper.Sleep(2000); + table.WaitForTableEmpty(); + }); + + it("13. Inserting another record (to check serial column & new default column added) - uuidtype", () => { + agHelper.ClickButton("Run InsertQuery"); + agHelper.AssertElementVisibility(locators._modal); + + agHelper.ClickButton("Generate UUID's"); + agHelper.AssertContains("All UUIDs generated & available"); + + agHelper.ClickButton("Insert"); + agHelper.AssertElementAbsence( + locators._specificToast("failed to execute"), + ); //Assert that Insert did not fail + agHelper.AssertElementVisibility( + locators._buttonByText("Run InsertQuery"), + ); + table.WaitUntilTableLoad(); + table.ReadTableRowColumnData(0, 0).then(($cellData) => { + expect($cellData).to.eq("4"); //asserting serial column is inserting fine in sequence + }); + table.ReadTableRowColumnData(0, 1, "v1", 200).then(($v1) => { + expect($v1).not.empty; + }); + table.ReadTableRowColumnData(0, 2, "v1", 200).then(($v4) => { + expect($v4).not.empty; + }); + table.ReadTableRowColumnData(0, 3, "v1", 200).then(($nil) => { + expect($nil).not.empty; + }); + table.ReadTableRowColumnData(0, 4, "v1", 200).then(($newGenUUID) => { + expect($newGenUUID).not.empty; + }); }); - table.ReadTableRowColumnData(0, 3, "v1", 200).then(($nil) => { - expect($nil).not.empty; + + it("14. Validate Drop of the Newly Created - uuidtype - Table from Postgres datasource", () => { + deployMode.NavigateBacktoEditor(); + EditorNavigation.SelectEntityByName("dropTable", EntityType.Query); + dataSources.RunQuery(); + dataSources.ReadQueryTableResponse(0).then(($cellData) => { + expect($cellData).to.eq("0"); //Success response for dropped table! + }); + dataSources.AssertTableInVirtuosoList(dsName, "public.uuidtype", false); }); - table.ReadTableRowColumnData(0, 4, "v1", 200).then(($newGenUUID) => { - expect($newGenUUID).not.empty; + + it("15. Verify Deletion of all created queries", () => { + dataSources.DeleteDatasourceFromWithinDS(dsName, 409); //Since all queries exists + entityExplorer.DeleteAllQueriesForDB(dsName); }); - }); - - it("14. Validate Drop of the Newly Created - uuidtype - Table from Postgres datasource", () => { - deployMode.NavigateBacktoEditor(); - EditorNavigation.SelectEntityByName("dropTable", EntityType.Query); - dataSources.RunQuery(); - dataSources.ReadQueryTableResponse(0).then(($cellData) => { - expect($cellData).to.eq("0"); //Success response for dropped table! + + it("16. Verify Deletion of datasource", () => { + deployMode.DeployApp(); + deployMode.NavigateBacktoEditor(); + dataSources.DeleteDatasourceFromWithinDS(dsName, 200); }); - dataSources.AssertTableInVirtuosoList(dsName, "public.uuidtype", false); - }); - - it("15. Verify Deletion of all created queries", () => { - dataSources.DeleteDatasourceFromWithinDS(dsName, 409); //Since all queries exists - entityExplorer.DeleteAllQueriesForDB(dsName); - }); - - it("16. Verify Deletion of datasource", () => { - deployMode.DeployApp(); - deployMode.NavigateBacktoEditor(); - dataSources.DeleteDatasourceFromWithinDS(dsName, 200); - }); -}); + }, +); diff --git a/app/client/cypress/e2e/Regression/ServerSide/QueryPane/AddWidgetTableAndBind_spec.js b/app/client/cypress/e2e/Regression/ServerSide/QueryPane/AddWidgetTableAndBind_spec.js index cd7fc2c74086..ff85dae304f3 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/QueryPane/AddWidgetTableAndBind_spec.js +++ b/app/client/cypress/e2e/Regression/ServerSide/QueryPane/AddWidgetTableAndBind_spec.js @@ -16,7 +16,7 @@ import { Widgets } from "../../../../support/Pages/DataSources"; describe( "Addwidget from Query and bind with other widgets", - { tags: ["@tag.Datasource"] }, + { tags: ["@tag.Datasource", "@tag.Git", "@tag.AccessControl"] }, function () { before(() => { agHelper.AddDsl("inputdsl"); diff --git a/app/client/cypress/e2e/Regression/ServerSide/QueryPane/AddWidget_spec.js b/app/client/cypress/e2e/Regression/ServerSide/QueryPane/AddWidget_spec.js index 5fae39d4fe6d..94870a8fe237 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/QueryPane/AddWidget_spec.js +++ b/app/client/cypress/e2e/Regression/ServerSide/QueryPane/AddWidget_spec.js @@ -8,7 +8,7 @@ let datasourceName; describe( "Add widget - Postgress DataSource", - { tags: ["@tag.Datasource"] }, + { tags: ["@tag.Datasource", "@tag.Git", "@tag.AccessControl"] }, function () { beforeEach(() => { dataSources.StartDataSourceRoutes(); diff --git a/app/client/cypress/e2e/Regression/ServerSide/QueryPane/DSDocs_Spec.ts b/app/client/cypress/e2e/Regression/ServerSide/QueryPane/DSDocs_Spec.ts index 35f56c3530b5..96ea6018a64c 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/QueryPane/DSDocs_Spec.ts +++ b/app/client/cypress/e2e/Regression/ServerSide/QueryPane/DSDocs_Spec.ts @@ -12,7 +12,7 @@ let dsName: any; describe( "Check datasource doc links", - { tags: ["@tag.Datasource"] }, + { tags: ["@tag.Datasource", "@tag.Git", "@tag.AccessControl"] }, function () { it("1. Verify Postgres documentation opens", function () { CreateDummyDSNSave(DataSourceKVP["Postgres"]); diff --git a/app/client/cypress/e2e/Regression/ServerSide/QueryPane/EmptyDataSource_spec.js b/app/client/cypress/e2e/Regression/ServerSide/QueryPane/EmptyDataSource_spec.js index 5f24c8213b29..ae3dd19742be 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/QueryPane/EmptyDataSource_spec.js +++ b/app/client/cypress/e2e/Regression/ServerSide/QueryPane/EmptyDataSource_spec.js @@ -6,7 +6,7 @@ import { describe( "Create a query with a empty datasource, run, save the query", - { tags: ["@tag.Datasource"] }, + { tags: ["@tag.Datasource", "@tag.Git", "@tag.AccessControl"] }, function () { beforeEach(() => { dataSources.StartDataSourceRoutes(); diff --git a/app/client/cypress/e2e/Regression/ServerSide/QueryPane/EvaluatedValuePopUp_spec.ts b/app/client/cypress/e2e/Regression/ServerSide/QueryPane/EvaluatedValuePopUp_spec.ts index 34393e2e9ca8..f81c3ca2e8fd 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/QueryPane/EvaluatedValuePopUp_spec.ts +++ b/app/client/cypress/e2e/Regression/ServerSide/QueryPane/EvaluatedValuePopUp_spec.ts @@ -3,7 +3,7 @@ import formControls from "../../../../locators/FormControl.json"; describe( "Ensures evaluated popup is viewable when dynamic bindings are present and draggable", - { tags: ["@tag.Datasource"] }, + { tags: ["@tag.Datasource", "@tag.Git", "@tag.AccessControl"] }, function () { it("shows evaluated pop up is visible and draggable", () => { _.dataSources.CreateDataSource("Mongo", true, true); diff --git a/app/client/cypress/e2e/Regression/ServerSide/QueryPane/GoogleSheets_spec.ts b/app/client/cypress/e2e/Regression/ServerSide/QueryPane/GoogleSheets_spec.ts index 792f633cd865..0c81622a800e 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/QueryPane/GoogleSheets_spec.ts +++ b/app/client/cypress/e2e/Regression/ServerSide/QueryPane/GoogleSheets_spec.ts @@ -11,7 +11,15 @@ import { describe( "Google Sheets datasource row objects placeholder", - { tags: ["@tag.GSheet", "@tag.Datasource", "@tag.excludeForAirgap"] }, + { + tags: [ + "@tag.GSheet", + "@tag.Datasource", + "@tag.excludeForAirgap", + "@tag.Git", + "@tag.AccessControl", + ], + }, function () { let pluginName = "Google Sheets"; diff --git a/app/client/cypress/e2e/Regression/ServerSide/QueryPane/Mongo1_spec.ts b/app/client/cypress/e2e/Regression/ServerSide/QueryPane/Mongo1_spec.ts index d6f16abe1e23..5ed89ec798df 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/QueryPane/Mongo1_spec.ts +++ b/app/client/cypress/e2e/Regression/ServerSide/QueryPane/Mongo1_spec.ts @@ -21,7 +21,9 @@ let dsName: any; describe( "Validate Mongo Query Pane Validations", - { tags: ["@tag.Datasource", "@tag.Sanity"] }, + { + tags: ["@tag.Datasource", "@tag.Sanity", "@tag.Git", "@tag.AccessControl"], + }, () => { before(() => { //dataSources.StartDataSourceRoutes(); //already started in index.js beforeeach diff --git a/app/client/cypress/e2e/Regression/ServerSide/QueryPane/QueryPane_MySQL_Spec.ts b/app/client/cypress/e2e/Regression/ServerSide/QueryPane/QueryPane_MySQL_Spec.ts index bf1b9606359e..248acdf30ad2 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/QueryPane/QueryPane_MySQL_Spec.ts +++ b/app/client/cypress/e2e/Regression/ServerSide/QueryPane/QueryPane_MySQL_Spec.ts @@ -14,7 +14,7 @@ import EditorNavigation, { describe( "Validate MySQL query UI flows - Bug 14054", - { tags: ["@tag.Datasource"] }, + { tags: ["@tag.Datasource", "@tag.Git", "@tag.AccessControl"] }, () => { let dsName: any; diff --git a/app/client/cypress/e2e/Regression/ServerSide/QueryPane/QueryPane_Postgres_Spec.js b/app/client/cypress/e2e/Regression/ServerSide/QueryPane/QueryPane_Postgres_Spec.js index 04d1f567c37f..f42ef1527359 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/QueryPane/QueryPane_Postgres_Spec.js +++ b/app/client/cypress/e2e/Regression/ServerSide/QueryPane/QueryPane_Postgres_Spec.js @@ -20,7 +20,7 @@ let datasourceName; describe( "Validate CRUD queries for Postgres along with UI flow verifications", - { tags: ["@tag.Datasource"] }, + { tags: ["@tag.Datasource", "@tag.Git", "@tag.AccessControl"] }, function () { // afterEach(function() { // if (this.currentTest.state === "failed") { diff --git a/app/client/cypress/e2e/Regression/ServerSide/QueryPane/Querypane_Mongo_Spec.js b/app/client/cypress/e2e/Regression/ServerSide/QueryPane/Querypane_Mongo_Spec.js index 8a5f313c449f..b3764037d926 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/QueryPane/Querypane_Mongo_Spec.js +++ b/app/client/cypress/e2e/Regression/ServerSide/QueryPane/Querypane_Mongo_Spec.js @@ -22,7 +22,9 @@ let datasourceName; describe( "Validate Mongo query commands", - { tags: ["@tag.Datasource", "@tag.Sanity"] }, + { + tags: ["@tag.Datasource", "@tag.Sanity", "@tag.Git", "@tag.AccessControl"], + }, function () { // afterEach(function() { // if (this.currentTest.state === "failed") { diff --git a/app/client/cypress/e2e/Regression/ServerSide/QueryPane/S3_1_spec.js b/app/client/cypress/e2e/Regression/ServerSide/QueryPane/S3_1_spec.js index f3a4aa0f1949..339eb14bb812 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/QueryPane/S3_1_spec.js +++ b/app/client/cypress/e2e/Regression/ServerSide/QueryPane/S3_1_spec.js @@ -16,7 +16,7 @@ let datasourceName; describe( "Validate CRUD queries for Amazon S3 along with UI flow verifications", - { tags: ["@tag.Datasource"] }, + { tags: ["@tag.Datasource", "@tag.Git", "@tag.AccessControl"] }, function () { let fileName; diff --git a/app/client/cypress/e2e/Regression/ServerSide/QueryPane/S3_2_spec.ts b/app/client/cypress/e2e/Regression/ServerSide/QueryPane/S3_2_spec.ts index 310b1cfdbc6d..d93c201197ba 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/QueryPane/S3_2_spec.ts +++ b/app/client/cypress/e2e/Regression/ServerSide/QueryPane/S3_2_spec.ts @@ -21,7 +21,7 @@ import EditorNavigation, { describe( "Validate CRUD queries for Amazon S3 along with UI flow verifications", - { tags: ["@tag.Datasource"] }, + { tags: ["@tag.Datasource", "@tag.Git", "@tag.AccessControl"] }, function () { let bucketName = "assets-test--appsmith", uid: any, diff --git a/app/client/cypress/e2e/Regression/ServerSide/QueryPane/SwitchDatasource_spec.js b/app/client/cypress/e2e/Regression/ServerSide/QueryPane/SwitchDatasource_spec.js index 1165a9b6f9a3..720a31dd23ef 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/QueryPane/SwitchDatasource_spec.js +++ b/app/client/cypress/e2e/Regression/ServerSide/QueryPane/SwitchDatasource_spec.js @@ -1,44 +1,50 @@ import { dataSources, agHelper } from "../../../../support/Objects/ObjectsCore"; -describe("Switch datasource", { tags: ["@tag.Datasource"] }, function () { - let dsName_1, dsName_2, MongoDB; - beforeEach(() => { - dataSources.StartDataSourceRoutes(); - }); +describe.skip( + "Switch datasource", + { tags: ["@tag.Datasource", "@tag.Git", "@tag.AccessControl"] }, + function () { + let dsName_1, dsName_2, MongoDB; + beforeEach(() => { + dataSources.StartDataSourceRoutes(); + }); - it("1. Create postgres datasource", function () { - dataSources.CreateDataSource("Postgres"); - cy.get("@dsName").then(($dsName) => { - dsName_1 = $dsName; + it("1. Create postgres datasource", function () { + dataSources.CreateDataSource("Postgres"); + cy.get("@dsName").then(($dsName) => { + dsName_1 = $dsName; + }); }); - }); - it("2. Create another postgres datasource", function () { - dataSources.CreateDataSource("Postgres"); - cy.get("@dsName").then(($dsName) => { - dsName_2 = $dsName; + it("2. Create another postgres datasource", function () { + dataSources.CreateDataSource("Postgres"); + cy.get("@dsName").then(($dsName) => { + dsName_2 = $dsName; + }); }); - }); - it("3. Create mongo datasource", function () { - dataSources.CreateDataSource("Mongo"); - cy.get("@dsName").then(($dsName) => { - MongoDB = $dsName; + it("3. Create mongo datasource", function () { + dataSources.CreateDataSource("Mongo"); + cy.get("@dsName").then(($dsName) => { + MongoDB = $dsName; + }); }); - }); - it("4. By switching datasources execute a query with both the datasources", function () { - dataSources.CreateQueryForDS(dsName_1); - agHelper.GetNClick(".rc-select-show-arrow"); - cy.contains(".rc-select-item-option-content", dsName_2).click().wait(1000); - cy.runQuery(); - // Confirm mongo datasource is not present in the switch datasources dropdown - agHelper.GetNClick(".rc-select-show-arrow"); - cy.get(".rc-select-item-option-content").should("not.have", MongoDB); - }); + it("4. By switching datasources execute a query with both the datasources", function () { + dataSources.CreateQueryForDS(dsName_1); + agHelper.GetNClick(".rc-select-show-arrow"); + cy.contains(".rc-select-item-option-content", dsName_2) + .click() + .wait(1000); + cy.runQuery(); + // Confirm mongo datasource is not present in the switch datasources dropdown + agHelper.GetNClick(".rc-select-show-arrow"); + cy.get(".rc-select-item-option-content").should("not.have", MongoDB); + }); - after(() => { - dataSources.DeleteQuery("Query1"); - cy.deleteDatasource(MongoDB); - cy.deleteDatasource(dsName_1); - cy.deleteDatasource(dsName_2); - }); -}); + after(() => { + dataSources.DeleteQuery("Query1"); + cy.deleteDatasource(MongoDB); + cy.deleteDatasource(dsName_1); + cy.deleteDatasource(dsName_2); + }); + }, +); diff --git a/app/client/cypress/e2e/Sanity/Datasources/Airtable_Basic_Spec.ts b/app/client/cypress/e2e/Sanity/Datasources/Airtable_Basic_Spec.ts index 189c7153eaaa..534a68a8345f 100644 --- a/app/client/cypress/e2e/Sanity/Datasources/Airtable_Basic_Spec.ts +++ b/app/client/cypress/e2e/Sanity/Datasources/Airtable_Basic_Spec.ts @@ -17,7 +17,15 @@ import EditorNavigation, { let dsName: any, jsonSpecies: any, offset: any, insertedRecordId: any; describe( "Validate Airtable Ds", - { tags: ["@tag.Datasource", "@tag.Sanity", "@tag.excludeForAirgap"] }, + { + tags: [ + "@tag.Datasource", + "@tag.Sanity", + "@tag.excludeForAirgap", + "@tag.Git", + "@tag.AccessControl", + ], + }, () => { before("Create a new Airtable DS", () => { dataSources.CreateDataSource("Airtable", true, false); diff --git a/app/client/cypress/e2e/Sanity/Datasources/ArangoDataSourceStub_spec.js b/app/client/cypress/e2e/Sanity/Datasources/ArangoDataSourceStub_spec.js index a87849fdd30c..7dfa7ff1396c 100644 --- a/app/client/cypress/e2e/Sanity/Datasources/ArangoDataSourceStub_spec.js +++ b/app/client/cypress/e2e/Sanity/Datasources/ArangoDataSourceStub_spec.js @@ -2,7 +2,9 @@ import { agHelper, dataSources } from "../../../support/Objects/ObjectsCore"; describe( "Arango datasource test cases", - { tags: ["@tag.Datasource", "@tag.Sanity"] }, + { + tags: ["@tag.Datasource", "@tag.Sanity", "@tag.Git", "@tag.AccessControl"], + }, function () { it("1. Create, test, save then delete a Arango datasource", function () { dataSources.NavigateToDSCreateNew(); diff --git a/app/client/cypress/e2e/Sanity/Datasources/Arango_Basic_Spec.ts b/app/client/cypress/e2e/Sanity/Datasources/Arango_Basic_Spec.ts index ffe98530a9ae..cbf69cdf90b9 100644 --- a/app/client/cypress/e2e/Sanity/Datasources/Arango_Basic_Spec.ts +++ b/app/client/cypress/e2e/Sanity/Datasources/Arango_Basic_Spec.ts @@ -22,7 +22,14 @@ import EditorNavigation, { if (CURRENT_REPO == REPO.CE) { describe( "Validate Arango & CURL Import Datasources", - { tags: ["@tag.Datasource", "@tag.Sanity"] }, + { + tags: [ + "@tag.Datasource", + "@tag.Sanity", + "@tag.Git", + "@tag.AccessControl", + ], + }, () => { let dsName: any, collectionName = "countries_places_to_visit", diff --git a/app/client/cypress/e2e/Sanity/Datasources/AuthenticatedApiDatasource_spec.js b/app/client/cypress/e2e/Sanity/Datasources/AuthenticatedApiDatasource_spec.js index 5a1d92342448..40ab6eb34765 100644 --- a/app/client/cypress/e2e/Sanity/Datasources/AuthenticatedApiDatasource_spec.js +++ b/app/client/cypress/e2e/Sanity/Datasources/AuthenticatedApiDatasource_spec.js @@ -7,7 +7,9 @@ import { agHelper, dataSources } from "../../../support/Objects/ObjectsCore"; describe( "Authenticated API Datasource", - { tags: ["@tag.Datasource", "@tag.Sanity"] }, + { + tags: ["@tag.Datasource", "@tag.Sanity", "@tag.Git", "@tag.AccessControl"], + }, function () { const URL = datasourceFormData["authenticatedApiUrl"]; const headers = "Headers"; diff --git a/app/client/cypress/e2e/Sanity/Datasources/AuthenticatedApiWithOAuth_spec.ts b/app/client/cypress/e2e/Sanity/Datasources/AuthenticatedApiWithOAuth_spec.ts index 9926565e0c19..390bf2889910 100644 --- a/app/client/cypress/e2e/Sanity/Datasources/AuthenticatedApiWithOAuth_spec.ts +++ b/app/client/cypress/e2e/Sanity/Datasources/AuthenticatedApiWithOAuth_spec.ts @@ -7,7 +7,9 @@ import { describe( "Authentiacted Api with OAuth 2.O authorization code test cases", - { tags: ["@tag.Datasource", "@tag.Sanity"] }, + { + tags: ["@tag.Datasource", "@tag.Sanity", "@tag.Git", "@tag.AccessControl"], + }, function () { it("1. Create & Save an Authenticated API with OAuth 2.O authorization code", function () { // Create OAuth client diff --git a/app/client/cypress/e2e/Sanity/Datasources/DSAutosaveImprovements_spec.ts b/app/client/cypress/e2e/Sanity/Datasources/DSAutosaveImprovements_spec.ts index fe4a189b30f1..a1bb173a62b2 100644 --- a/app/client/cypress/e2e/Sanity/Datasources/DSAutosaveImprovements_spec.ts +++ b/app/client/cypress/e2e/Sanity/Datasources/DSAutosaveImprovements_spec.ts @@ -11,7 +11,9 @@ let dsName: any; describe( "Datasource Autosave Improvements Tests", - { tags: ["@tag.Datasource", "@tag.Sanity"] }, + { + tags: ["@tag.Datasource", "@tag.Sanity", "@tag.Git", "@tag.AccessControl"], + }, function () { it("1. Test to verify that when datasource is discarded, no datasource can be seen in active list", () => { dataSources.NavigateToDSCreateNew(); diff --git a/app/client/cypress/e2e/Sanity/Datasources/DatasourceForm_spec.js b/app/client/cypress/e2e/Sanity/Datasources/DatasourceForm_spec.js index 33265c28b320..706edb756f15 100644 --- a/app/client/cypress/e2e/Sanity/Datasources/DatasourceForm_spec.js +++ b/app/client/cypress/e2e/Sanity/Datasources/DatasourceForm_spec.js @@ -14,7 +14,9 @@ import { describe( "Datasource form related tests", - { tags: ["@tag.Datasource", "@tag.Sanity"] }, + { + tags: ["@tag.Datasource", "@tag.Sanity", "@tag.Git", "@tag.AccessControl"], + }, function () { it("1. Check whether the number of key value pairs is equal to number of delete buttons", function () { apiPage.CreateAndFillApi(testdata.baseUrl + testdata.methods); diff --git a/app/client/cypress/e2e/Sanity/Datasources/ElasticSearchDatasource_spec.js b/app/client/cypress/e2e/Sanity/Datasources/ElasticSearchDatasource_spec.js index 151311f95952..5177fa44788d 100644 --- a/app/client/cypress/e2e/Sanity/Datasources/ElasticSearchDatasource_spec.js +++ b/app/client/cypress/e2e/Sanity/Datasources/ElasticSearchDatasource_spec.js @@ -6,7 +6,9 @@ let elasticSearchName; describe( "Elastic search datasource tests", - { tags: ["@tag.Datasource", "@tag.Sanity"] }, + { + tags: ["@tag.Datasource", "@tag.Sanity", "@tag.Git", "@tag.AccessControl"], + }, function () { beforeEach(() => { dataSources.StartDataSourceRoutes(); diff --git a/app/client/cypress/e2e/Sanity/Datasources/GraphQL_spec.ts b/app/client/cypress/e2e/Sanity/Datasources/GraphQL_spec.ts index 22f5f17454cd..33dd9ba475ab 100644 --- a/app/client/cypress/e2e/Sanity/Datasources/GraphQL_spec.ts +++ b/app/client/cypress/e2e/Sanity/Datasources/GraphQL_spec.ts @@ -48,7 +48,9 @@ const GRAPHQL_LIMIT_DATA = [ describe( "GraphQL Datasource Implementation", - { tags: ["@tag.Datasource", "@tag.Sanity"] }, + { + tags: ["@tag.Datasource", "@tag.Sanity", "@tag.Git", "@tag.AccessControl"], + }, function () { before(() => { agHelper.GenerateUUID(); diff --git a/app/client/cypress/e2e/Sanity/Datasources/MockDBs_Spec.ts b/app/client/cypress/e2e/Sanity/Datasources/MockDBs_Spec.ts index 33f132d7aa93..b1cd5d459fcf 100644 --- a/app/client/cypress/e2e/Sanity/Datasources/MockDBs_Spec.ts +++ b/app/client/cypress/e2e/Sanity/Datasources/MockDBs_Spec.ts @@ -17,7 +17,14 @@ import PageList from "../../../support/Pages/PageList"; describe( "Validate Mock Query Active Ds querying & count", - { tags: ["@tag.Datasource", "@tag.excludeForAirgap"] }, + { + tags: [ + "@tag.Datasource", + "@tag.excludeForAirgap", + "@tag.Git", + "@tag.AccessControl", + ], + }, () => { it("1. Create Query from Mock Postgres DB & verify active queries count", () => { PageList.AddNewPage(); diff --git a/app/client/cypress/e2e/Sanity/Datasources/MongoDatasourceURI_spec.ts b/app/client/cypress/e2e/Sanity/Datasources/MongoDatasourceURI_spec.ts index 356d71264c6f..cf5836077056 100644 --- a/app/client/cypress/e2e/Sanity/Datasources/MongoDatasourceURI_spec.ts +++ b/app/client/cypress/e2e/Sanity/Datasources/MongoDatasourceURI_spec.ts @@ -10,7 +10,9 @@ let dsName: any; // https://github.com/appsmithorg/TestEventDriver/issues/40 describe( "Create, test, save then delete a mongo datasource using URI", - { tags: ["@tag.Datasource", "@tag.Sanity"] }, + { + tags: ["@tag.Datasource", "@tag.Sanity", "@tag.Git", "@tag.AccessControl"], + }, function () { it("1. Create, test, save then delete a mongo datasource using URI without username and password - #24897 ", function () { dataSources.NavigateToDSCreateNew(); diff --git a/app/client/cypress/e2e/Sanity/Datasources/MsSQLDataSourceStub_spec.js b/app/client/cypress/e2e/Sanity/Datasources/MsSQLDataSourceStub_spec.js index 6eb064d9e117..f67224b5ca9b 100644 --- a/app/client/cypress/e2e/Sanity/Datasources/MsSQLDataSourceStub_spec.js +++ b/app/client/cypress/e2e/Sanity/Datasources/MsSQLDataSourceStub_spec.js @@ -3,7 +3,9 @@ import { dataSources } from "../../../support/Objects/ObjectsCore"; describe( "MsSQL datasource test cases", - { tags: ["@tag.Datasource", "@tag.Sanity"] }, + { + tags: ["@tag.Datasource", "@tag.Sanity", "@tag.Git", "@tag.AccessControl"], + }, function () { let datasourceName; diff --git a/app/client/cypress/e2e/Sanity/Datasources/MsSQL_Basic_Spec.ts b/app/client/cypress/e2e/Sanity/Datasources/MsSQL_Basic_Spec.ts index 9f97d88433a2..1b595f35bb32 100644 --- a/app/client/cypress/e2e/Sanity/Datasources/MsSQL_Basic_Spec.ts +++ b/app/client/cypress/e2e/Sanity/Datasources/MsSQL_Basic_Spec.ts @@ -23,7 +23,9 @@ const oneClickBinding = new OneClickBinding(); describe( "Validate MsSQL connection & basic querying with UI flows", - { tags: ["@tag.Datasource", "@tag.Sanity"] }, + { + tags: ["@tag.Datasource", "@tag.Sanity", "@tag.Git", "@tag.AccessControl"], + }, () => { let dsName: any, query: string, @@ -83,16 +85,16 @@ describe( ,rating NUMERIC(3,1) ,votes INTEGER ); - INSERT INTO Simpsons(episode_id,season,episode,number_in_series,title,summary,air_date,episode_image,rating,votes) VALUES ('S1-E1',1,1,1,'Simpsons Roasting on an Open Fire','The family is forced to spend all of their savings to get Bart''s new tattoo removed, and with no money for Christmas, Homer is forced to become a store Santa.','1989-12-17','https://m.media-amazon.com/images/M/MV5BZjJjMzMwOTctODk5ZC00NWM4LTgyNjAtNjNmN2I1OTc5OTAyXkEyXkFqcGdeQXVyNTAyODkwOQ@@._V1_UY126_UX224_ALjpg',8.1,5499); - INSERT INTO Simpsons(episode_id,season,episode,number_in_series,title,summary,air_date,episode_image,rating,votes) VALUES ('S1-E2',1,2,2,'Bart the Genius','Bart ends up at a school for gifted children after cheating on an IQ test.','1990-01-14','https://m.media-amazon.com/images/M/MV5BOTA0MTk3ZjktZGFhMi00ODcxLTlkYzgtZTJiMTQ5Y2I4MzhiXkEyXkFqcGdeQXVyNTAyODkwOQ@@._V1_UY126_UX224_ALjpg',7.8,3456); - INSERT INTO Simpsons(episode_id,season,episode,number_in_series,title,summary,air_date,episode_image,rating,votes) VALUES ('S1-E3',1,3,3,'Homer''s Odyssey','After losing his job, Homer contemplates ending it all, until he discovers a new life path as a safety advocate.','1990-01-21','https://m.media-amazon.com/images/M/MV5BMzQ3M2M1YjQtNTkzNS00MDlhLWFiY2QtOWJiODZhNGJlZWMxXkEyXkFqcGdeQXVyNTAyODkwOQ@@._V1_UY126_UX224_ALjpg',7.4,3034); - INSERT INTO Simpsons(episode_id,season,episode,number_in_series,title,summary,air_date,episode_image,rating,votes) VALUES ('S1-E4',1,4,4,'There''s No Disgrace Like Home','After being embarrassed by the rest of the family at a company picnic, Homer becomes obsessed with improving their behavior towards each other.','1990-01-28','https://m.media-amazon.com/images/M/MV5BOTZmNmE1NDUtMmRhOC00ZTYyLTkzMTEtOTM5YTgwMTc5YmMxXkEyXkFqcGdeQXVyNTAyODkwOQ@@._V1_UY126_UX224_ALjpg',7.7,2978); - INSERT INTO Simpsons(episode_id,season,episode,number_in_series,title,summary,air_date,episode_image,rating,votes) VALUES ('S1-E5',1,5,5,'Bart the General','After being beaten up by Nelson Muntz one too many times, Bart turns to Grampa for help, and soon leads a rebellion against the school bully.','1990-02-04','https://m.media-amazon.com/images/M/MV5BMzk4ZDU2OTMtZjM0NC00ZWIyLWFmNmQtMjcyZGQ1OWE0ZWMyXkEyXkFqcGdeQXVyNTAyODkwOQ@@._V1_UY126_UX224_ALjpg',8.0,3023); - INSERT INTO Simpsons(episode_id,season,episode,number_in_series,title,summary,air_date,episode_image,rating,votes) VALUES ('S1-E6',1,6,6,'Moaning Lisa','A depressed Lisa''s spirit is lifted when she meets a jazz-man, Bleeding Gums Murphy.','1990-02-11','https://m.media-amazon.com/images/M/MV5BODI3ZmEzMmEtNjE2MS00MjMyLWI0MmEtMTdhMWE4YzUwMzkwXkEyXkFqcGdeQXVyNTAyODkwOQ@@._V1_UY126_UX224_ALjpg',7.6,2903); - INSERT INTO Simpsons(episode_id,season,episode,number_in_series,title,summary,air_date,episode_image,rating,votes) VALUES ('S1-E7',1,7,7,'The Call of the Simpsons','Homer takes the family camping, but it soon becomes a misadventure when they lose their equipment and Homer is mistaken for Bigfoot.','1990-02-18','https://m.media-amazon.com/images/M/MV5BOTkxMzY3Y2QtMWMyMC00NDllLTkyMTctZTY4MDFjZGExYTc1XkEyXkFqcGdeQXVyNTAyODkwOQ@@._V1_UY126_UX224_ALjpg',7.8,2807); - INSERT INTO Simpsons(episode_id,season,episode,number_in_series,title,summary,air_date,episode_image,rating,votes) VALUES ('S1-E8',1,8,8,'The Telltale Head','Bart gets more than he bargained for when he saws the head off a statue of the town''s founder.','1990-02-25','https://m.media-amazon.com/images/M/MV5BMzhhNTM3ZDYtYWQ3OS00NDU2LTk4MGEtOGZmMWUwODlmMjQyXkEyXkFqcGdeQXVyNTAyODkwOQ@@._V1_UY126_UX224_ALjpg',7.7,2733); - INSERT INTO Simpsons(episode_id,season,episode,number_in_series,title,summary,air_date,episode_image,rating,votes) VALUES ('S1-E9',1,9,9,'Life on the Fast Lane','Marge contemplates an affair with a handsome bowling instructor.','1990-03-18','https://m.media-amazon.com/images/M/MV5BNzcxYWExZWYtMzY1MC00YjhlLWFmZmUtOTQ3ODZhZTUwN2EzXkEyXkFqcGdeQXVyNTAyODkwOQ@@._V1_UY126_UX224_ALjpg',7.5,2716); - INSERT INTO Simpsons(episode_id,season,episode,number_in_series,title,summary,air_date,episode_image,rating,votes) VALUES ('S1-E10',1,10,10,'Homer''s Night Out','After a photograph of Homer canoodling with an exotic dancer is distributed throughout Springfield, he finds himself kicked out of the house by Marge.','1990-03-25','https://m.media-amazon.com/images/M/MV5BMTQ4NzU0MjY1OF5BMl5BanBnXkFtZTgwNTE4NTQ2MjE@._V1_UX224_CR0,0,224,126_ALjpg',7.3,2624);`; + INSERT INTO Simpsons(episode_id,season,episode,number_in_series,title,summary,air_date,episode_image,rating,votes) VALUES ('S1-E1',1,1,1,'Simpsons Roasting on an Open Fire','The family is forced to spend all of their savings to get Bart''s new tattoo removed, and with no money for Christmas, Homer is forced to become a store Santa.','1989-12-17','https://appsmith.com/images/M/MV5BZjJjMzMwOTctODk5ZC00NWM4LTgyNjAtNjNmN2I1OTc5OTAyXkEyXkFqcGdeQXVyNTAyODkwOQ@@._V1_UY126_UX224_ALjpg',8.1,5499); + INSERT INTO Simpsons(episode_id,season,episode,number_in_series,title,summary,air_date,episode_image,rating,votes) VALUES ('S1-E2',1,2,2,'Bart the Genius','Bart ends up at a school for gifted children after cheating on an IQ test.','1990-01-14','https://appsmith.com/images/M/MV5BOTA0MTk3ZjktZGFhMi00ODcxLTlkYzgtZTJiMTQ5Y2I4MzhiXkEyXkFqcGdeQXVyNTAyODkwOQ@@._V1_UY126_UX224_ALjpg',7.8,3456); + INSERT INTO Simpsons(episode_id,season,episode,number_in_series,title,summary,air_date,episode_image,rating,votes) VALUES ('S1-E3',1,3,3,'Homer''s Odyssey','After losing his job, Homer contemplates ending it all, until he discovers a new life path as a safety advocate.','1990-01-21','https://appsmith.com/images/M/MV5BMzQ3M2M1YjQtNTkzNS00MDlhLWFiY2QtOWJiODZhNGJlZWMxXkEyXkFqcGdeQXVyNTAyODkwOQ@@._V1_UY126_UX224_ALjpg',7.4,3034); + INSERT INTO Simpsons(episode_id,season,episode,number_in_series,title,summary,air_date,episode_image,rating,votes) VALUES ('S1-E4',1,4,4,'There''s No Disgrace Like Home','After being embarrassed by the rest of the family at a company picnic, Homer becomes obsessed with improving their behavior towards each other.','1990-01-28','https://appsmith.com/images/M/MV5BOTZmNmE1NDUtMmRhOC00ZTYyLTkzMTEtOTM5YTgwMTc5YmMxXkEyXkFqcGdeQXVyNTAyODkwOQ@@._V1_UY126_UX224_ALjpg',7.7,2978); + INSERT INTO Simpsons(episode_id,season,episode,number_in_series,title,summary,air_date,episode_image,rating,votes) VALUES ('S1-E5',1,5,5,'Bart the General','After being beaten up by Nelson Muntz one too many times, Bart turns to Grampa for help, and soon leads a rebellion against the school bully.','1990-02-04','https://appsmith.com/images/M/MV5BMzk4ZDU2OTMtZjM0NC00ZWIyLWFmNmQtMjcyZGQ1OWE0ZWMyXkEyXkFqcGdeQXVyNTAyODkwOQ@@._V1_UY126_UX224_ALjpg',8.0,3023); + INSERT INTO Simpsons(episode_id,season,episode,number_in_series,title,summary,air_date,episode_image,rating,votes) VALUES ('S1-E6',1,6,6,'Moaning Lisa','A depressed Lisa''s spirit is lifted when she meets a jazz-man, Bleeding Gums Murphy.','1990-02-11','https://appsmith.com/images/M/MV5BODI3ZmEzMmEtNjE2MS00MjMyLWI0MmEtMTdhMWE4YzUwMzkwXkEyXkFqcGdeQXVyNTAyODkwOQ@@._V1_UY126_UX224_ALjpg',7.6,2903); + INSERT INTO Simpsons(episode_id,season,episode,number_in_series,title,summary,air_date,episode_image,rating,votes) VALUES ('S1-E7',1,7,7,'The Call of the Simpsons','Homer takes the family camping, but it soon becomes a misadventure when they lose their equipment and Homer is mistaken for Bigfoot.','1990-02-18','https://appsmith.com/images/M/MV5BOTkxMzY3Y2QtMWMyMC00NDllLTkyMTctZTY4MDFjZGExYTc1XkEyXkFqcGdeQXVyNTAyODkwOQ@@._V1_UY126_UX224_ALjpg',7.8,2807); + INSERT INTO Simpsons(episode_id,season,episode,number_in_series,title,summary,air_date,episode_image,rating,votes) VALUES ('S1-E8',1,8,8,'The Telltale Head','Bart gets more than he bargained for when he saws the head off a statue of the town''s founder.','1990-02-25','https://appsmith.com/images/M/MV5BMzhhNTM3ZDYtYWQ3OS00NDU2LTk4MGEtOGZmMWUwODlmMjQyXkEyXkFqcGdeQXVyNTAyODkwOQ@@._V1_UY126_UX224_ALjpg',7.7,2733); + INSERT INTO Simpsons(episode_id,season,episode,number_in_series,title,summary,air_date,episode_image,rating,votes) VALUES ('S1-E9',1,9,9,'Life on the Fast Lane','Marge contemplates an affair with a handsome bowling instructor.','1990-03-18','https://appsmith.com/images/M/MV5BNzcxYWExZWYtMzY1MC00YjhlLWFmZmUtOTQ3ODZhZTUwN2EzXkEyXkFqcGdeQXVyNTAyODkwOQ@@._V1_UY126_UX224_ALjpg',7.5,2716); + INSERT INTO Simpsons(episode_id,season,episode,number_in_series,title,summary,air_date,episode_image,rating,votes) VALUES ('S1-E10',1,10,10,'Homer''s Night Out','After a photograph of Homer canoodling with an exotic dancer is distributed throughout Springfield, he finds himself kicked out of the house by Marge.','1990-03-25','https://appsmith.com/images/M/MV5BMTQ4NzU0MjY1OF5BMl5BanBnXkFtZTgwNTE4NTQ2MjE@._V1_UX224_CR0,0,224,126_ALjpg',7.3,2624);`; dataSources.EnterQuery(query); dataSources.RunQuery(); }); diff --git a/app/client/cypress/e2e/Sanity/Datasources/MySQLDataSourceStub_spec.js b/app/client/cypress/e2e/Sanity/Datasources/MySQLDataSourceStub_spec.js index ba90846b0796..2db2c9c9628c 100644 --- a/app/client/cypress/e2e/Sanity/Datasources/MySQLDataSourceStub_spec.js +++ b/app/client/cypress/e2e/Sanity/Datasources/MySQLDataSourceStub_spec.js @@ -3,7 +3,9 @@ import { agHelper, dataSources } from "../../../support/Objects/ObjectsCore"; describe( "MySQL datasource test cases", - { tags: ["@tag.Datasource", "@tag.Sanity"] }, + { + tags: ["@tag.Datasource", "@tag.Sanity", "@tag.Git", "@tag.AccessControl"], + }, function () { let datasourceName; it("1. Create, test, save then delete a MySQL datasource", function () { diff --git a/app/client/cypress/e2e/Sanity/Datasources/MySQLNoiseTest_spec.js b/app/client/cypress/e2e/Sanity/Datasources/MySQLNoiseTest_spec.js index ecbc34e02481..bd4acb0b9e5d 100644 --- a/app/client/cypress/e2e/Sanity/Datasources/MySQLNoiseTest_spec.js +++ b/app/client/cypress/e2e/Sanity/Datasources/MySQLNoiseTest_spec.js @@ -13,7 +13,9 @@ const commonlocators = require("../../../locators/commonlocators.json"); describe( "MySQL noise test", - { tags: ["@tag.Datasource", "@tag.Sanity"] }, + { + tags: ["@tag.Datasource", "@tag.Sanity", "@tag.Git", "@tag.AccessControl"], + }, function () { let datasourceName; diff --git a/app/client/cypress/e2e/Sanity/Datasources/MySQL_spec.js b/app/client/cypress/e2e/Sanity/Datasources/MySQL_spec.js index 97e59863018c..ab266b339ea6 100644 --- a/app/client/cypress/e2e/Sanity/Datasources/MySQL_spec.js +++ b/app/client/cypress/e2e/Sanity/Datasources/MySQL_spec.js @@ -5,7 +5,9 @@ let datasourceName; describe( "MySQL datasource test cases", - { tags: ["@tag.Datasource", "@tag.Sanity"] }, + { + tags: ["@tag.Datasource", "@tag.Sanity", "@tag.Git", "@tag.AccessControl"], + }, function () { beforeEach(() => { dataSources.StartDataSourceRoutes(); diff --git a/app/client/cypress/e2e/Sanity/Datasources/Port_Number_Placeholder_Spec.ts b/app/client/cypress/e2e/Sanity/Datasources/Port_Number_Placeholder_Spec.ts index 5d996f35e8b3..39bbc8d7b6c5 100644 --- a/app/client/cypress/e2e/Sanity/Datasources/Port_Number_Placeholder_Spec.ts +++ b/app/client/cypress/e2e/Sanity/Datasources/Port_Number_Placeholder_Spec.ts @@ -2,7 +2,9 @@ import { agHelper, dataSources } from "../../../support/Objects/ObjectsCore"; describe( "Test placeholder value for port number for all datasources - tests #24960", - { tags: ["@tag.Datasource", "@tag.Sanity"] }, + { + tags: ["@tag.Datasource", "@tag.Sanity", "@tag.Git", "@tag.AccessControl"], + }, () => { it("1. Test datasource port number placeholder", () => { // MsSQL diff --git a/app/client/cypress/e2e/Sanity/Datasources/RedshiftDataSourceStub_spec.js b/app/client/cypress/e2e/Sanity/Datasources/RedshiftDataSourceStub_spec.js index 2febce52d1f2..80cfcb996c05 100644 --- a/app/client/cypress/e2e/Sanity/Datasources/RedshiftDataSourceStub_spec.js +++ b/app/client/cypress/e2e/Sanity/Datasources/RedshiftDataSourceStub_spec.js @@ -5,7 +5,9 @@ import { ObjectsRegistry } from "../../../support/Objects/Registry"; describe( "Redshift datasource test cases", - { tags: ["@tag.Datasource", "@tag.Sanity"] }, + { + tags: ["@tag.Datasource", "@tag.Sanity", "@tag.Git", "@tag.AccessControl"], + }, function () { beforeEach(() => { dataSources.StartDataSourceRoutes(); diff --git a/app/client/cypress/e2e/Sanity/Datasources/RestApiDatasource_spec.js b/app/client/cypress/e2e/Sanity/Datasources/RestApiDatasource_spec.js index b91b22b68178..41224748eaac 100644 --- a/app/client/cypress/e2e/Sanity/Datasources/RestApiDatasource_spec.js +++ b/app/client/cypress/e2e/Sanity/Datasources/RestApiDatasource_spec.js @@ -7,7 +7,9 @@ import { describe( "Create a rest datasource", - { tags: ["@tag.Datasource", "@tag.Sanity"] }, + { + tags: ["@tag.Datasource", "@tag.Sanity", "@tag.Git", "@tag.AccessControl"], + }, function () { it("1. Create a rest datasource + Bug 14566", function () { apiPage.CreateAndFillApi(testdata.baseUrl + testdata.methods); diff --git a/app/client/cypress/e2e/Sanity/Datasources/RestApiOAuth2Validation_spec.ts b/app/client/cypress/e2e/Sanity/Datasources/RestApiOAuth2Validation_spec.ts index e9c83ab4b16b..9b52a88bcf97 100644 --- a/app/client/cypress/e2e/Sanity/Datasources/RestApiOAuth2Validation_spec.ts +++ b/app/client/cypress/e2e/Sanity/Datasources/RestApiOAuth2Validation_spec.ts @@ -10,7 +10,9 @@ import { describe( "Datasource form OAuth2 client credentials related tests", - { tags: ["@tag.Datasource", "@tag.Sanity"] }, + { + tags: ["@tag.Datasource", "@tag.Sanity", "@tag.Git", "@tag.AccessControl"], + }, function () { let clientId, clientSecret; diff --git a/app/client/cypress/e2e/Sanity/Datasources/SMTPDatasource_spec.js b/app/client/cypress/e2e/Sanity/Datasources/SMTPDatasource_spec.js index e6da42b6a93f..4274883a09a4 100644 --- a/app/client/cypress/e2e/Sanity/Datasources/SMTPDatasource_spec.js +++ b/app/client/cypress/e2e/Sanity/Datasources/SMTPDatasource_spec.js @@ -6,7 +6,9 @@ import { agHelper, dataSources } from "../../../support/Objects/ObjectsCore"; describe( "SMTP datasource test cases using ted", - { tags: ["@tag.Datasource", "@tag.Sanity"] }, + { + tags: ["@tag.Datasource", "@tag.Sanity", "@tag.Git", "@tag.AccessControl"], + }, function () { let SMTPDatasourceName; beforeEach(() => { diff --git a/app/client/cypress/e2e/Sanity/Datasources/Styles_spec.js b/app/client/cypress/e2e/Sanity/Datasources/Styles_spec.js index 2f3dfa6649a9..c98c1b3dc1f3 100644 --- a/app/client/cypress/e2e/Sanity/Datasources/Styles_spec.js +++ b/app/client/cypress/e2e/Sanity/Datasources/Styles_spec.js @@ -3,7 +3,15 @@ import { agHelper, dataSources } from "../../../support/Objects/ObjectsCore"; let dsName; describe( "Validate Datasource Panel Styles", - { tags: ["@tag.Datasource", "@tag.Sanity", "@tag.excludeForAirgap"] }, + { + tags: [ + "@tag.Datasource", + "@tag.Sanity", + "@tag.excludeForAirgap", + "@tag.Git", + "@tag.AccessControl", + ], + }, function () { const backgroundColorGray700 = "rgb(76, 86, 100)"; const backgroundColorGray1 = "rgb(241, 245, 249)"; diff --git a/app/client/cypress/e2e/Smoke/Apps/ReconnectDatasource_spec.js b/app/client/cypress/e2e/Smoke/Apps/ReconnectDatasource_spec.js index eec5e901dbea..e8a3d6c0183e 100644 --- a/app/client/cypress/e2e/Smoke/Apps/ReconnectDatasource_spec.js +++ b/app/client/cypress/e2e/Smoke/Apps/ReconnectDatasource_spec.js @@ -7,7 +7,9 @@ import { describe( "Reconnect Datasource Modal validation while importing application", - { tags: ["@tag.Datasource", "@tag.Sanity"] }, + { + tags: ["@tag.Datasource", "@tag.Sanity", "@tag.Git", "@tag.AccessControl"], + }, function () { let workspaceId; let appid; diff --git a/app/client/cypress/e2e/Smoke/GenerateCRUD/Generate_Crud_New_Page_spec.ts b/app/client/cypress/e2e/Smoke/GenerateCRUD/Generate_Crud_New_Page_spec.ts index a361763aa9be..6385c02be792 100644 --- a/app/client/cypress/e2e/Smoke/GenerateCRUD/Generate_Crud_New_Page_spec.ts +++ b/app/client/cypress/e2e/Smoke/GenerateCRUD/Generate_Crud_New_Page_spec.ts @@ -3,7 +3,9 @@ import PageList from "../../../support/Pages/PageList"; describe( "Validate generate CRUD operation by creating a datasource from generate CRUD form", - { tags: ["@tag.Datasource", "@tag.Sanity"] }, + { + tags: ["@tag.Datasource", "@tag.Sanity", "@tag.Git", "@tag.AccessControl"], + }, () => { it( "1. Generated CRUD app should work when there are no entities in the page & when there are entities in the current page", diff --git a/app/client/cypress/fixtures/TestDataSet1.json b/app/client/cypress/fixtures/TestDataSet1.json index cb390bc6c805..9032f9db78e2 100644 --- a/app/client/cypress/fixtures/TestDataSet1.json +++ b/app/client/cypress/fixtures/TestDataSet1.json @@ -441,19 +441,19 @@ ], "TableURLColumnType": [ { - "image": "https://wallpaperaccess.com/full/1376499.jpg", + "image": "https://docs.appsmith.com/img/cube-logo_S50__hLNq.jpeg", "userName": "Michael Lawson" }, { - "image": "https://wallpaperaccess.com/full/1688623.jpg", + "image": "https://docs.appsmith.com/img/Appsmith-Login-Screen-Shows-SAML.jpg", "userName": "Lindsay Ferguson" }, { - "image": "https://wallpaperaccess.com/full/2117775.jpg", + "image": "https://docs.appsmith.com/img/zapier-logo_odZ9wZQ3vY.jpeg", "userName": "Byron Fields" }, { - "image": "https://wallpaperaccess.com/full/812632.jpg", + "image": "https://docs.appsmith.com/img/replyto-logo_6yaZHFIeU.jpeg", "userName": "Toby William" } ], diff --git a/app/client/cypress/fixtures/datasources.json b/app/client/cypress/fixtures/datasources.json index e9a76ef161d0..040f7503a697 100644 --- a/app/client/cypress/fixtures/datasources.json +++ b/app/client/cypress/fixtures/datasources.json @@ -83,7 +83,7 @@ "mockDatabaseUsername": "fakeapi", "mockDatabasePassword": "LimitedAccess123#", "readonly": "readonly", - "authenticatedApiUrl": "https://fakeapi.com", + "authenticatedApiUrl": "http://host.docker.internal:5001", "GraphqlApiUrl_TED": "http://host.docker.internal:4200/graphql", "GITEA_API_BASE_TED": "localhost", diff --git a/app/client/cypress/fixtures/gitImport.json b/app/client/cypress/fixtures/gitImport.json index 1e09e17ba447..0e23e769600a 100644 --- a/app/client/cypress/fixtures/gitImport.json +++ b/app/client/cypress/fixtures/gitImport.json @@ -743,7 +743,7 @@ "userPermissions": [], "name": "DEFAULT_REST_DATASOURCE", "pluginId": "restapi-plugin", - "datasourceConfiguration": { "url": "hhttp://host.docker.internal:5001/v1/mock-api" }, + "datasourceConfiguration": { "url": "http://host.docker.internal:5001/v1/mock-api" }, "invalids": [], "messages": [], "isValid": true, diff --git a/app/client/cypress/fixtures/modalWidgetTestApp.json b/app/client/cypress/fixtures/modalWidgetTestApp.json index 93186b6d0f2b..3b2f53cf18c4 100644 --- a/app/client/cypress/fixtures/modalWidgetTestApp.json +++ b/app/client/cypress/fixtures/modalWidgetTestApp.json @@ -510,7 +510,7 @@ "leftColumn": 0.0, "defaultImage": "https://assets.appsmith.com/widgets/default.png", "key": "an3dz32jnz", - "image": "https://jpeg.org/images/jpegsystems-home.jpg", + "image": "https://community.appsmith.com/sites/default/files/styles/small_thumbnail/public/2024-03/aws-logo.jpg", "isDeprecated": false, "rightColumn": 16.0, "objectFit": "cover", @@ -1075,7 +1075,7 @@ "imageShape": "RECTANGLE", "leftColumn": 32.0, "dynamicBindingPathList": [{ "key": "borderRadius" }], - "defaultImage": "https://mir-s3-cdn-cf.behance.net/project_modules/max_1200/5eeea355389655.59822ff824b72.gif", + "defaultImage": "https://docs.appsmith.com/img/multi-update-sql.gif", "key": "an3dz32jnz", "image": "", "isDeprecated": false, @@ -4225,7 +4225,7 @@ "leftColumn": 0.0, "defaultImage": "https://assets.appsmith.com/widgets/default.png", "key": "an3dz32jnz", - "image": "https://jpeg.org/images/jpegsystems-home.jpg", + "image": "https://community.appsmith.com/sites/default/files/styles/small_thumbnail/public/2024-03/aws-logo.jpg", "isDeprecated": false, "rightColumn": 16.0, "objectFit": "cover", @@ -4790,7 +4790,7 @@ "imageShape": "RECTANGLE", "leftColumn": 32.0, "dynamicBindingPathList": [{ "key": "borderRadius" }], - "defaultImage": "https://mir-s3-cdn-cf.behance.net/project_modules/max_1200/5eeea355389655.59822ff824b72.gif", + "defaultImage": "https://docs.appsmith.com/img/multi-update-sql.gif", "key": "an3dz32jnz", "image": "", "isDeprecated": false, diff --git a/app/client/cypress/fixtures/onPageLoadActionsDsl.json b/app/client/cypress/fixtures/onPageLoadActionsDsl.json index fce6d97f48ae..a79f4df7075f 100644 --- a/app/client/cypress/fixtures/onPageLoadActionsDsl.json +++ b/app/client/cypress/fixtures/onPageLoadActionsDsl.json @@ -34,7 +34,7 @@ "imageShape": "RECTANGLE", "leftColumn": 8, "dynamicBindingPathList": [], - "defaultImage": "http://host.docker.internal:4200/clouddefaultImage.png", + "defaultImage": "https://www.appsmith.com/favicon.png", "key": "nyx7m0wdr7", "image": "", "rightColumn": 54, @@ -122,7 +122,7 @@ "imageShape": "RECTANGLE", "leftColumn": 8, "dynamicBindingPathList": [], - "defaultImage": "http://host.docker.internal:4200/clouddefaultImage.png", + "defaultImage": "https://www.appsmith.com/favicon.png", "key": "agtoehwrk0", "image": "", "rightColumn": 27, diff --git a/app/client/cypress/fixtures/uiBindnewDsl.json b/app/client/cypress/fixtures/uiBindnewDsl.json new file mode 100644 index 000000000000..6d45729acce7 --- /dev/null +++ b/app/client/cypress/fixtures/uiBindnewDsl.json @@ -0,0 +1,540 @@ +{ + "dsl": { + "widgetName": "MainContainer", + "backgroundColor": "none", + "rightColumn": 4896, + "snapColumns": 64, + "detachFromLayout": true, + "widgetId": "0", + "topRow": 0, + "bottomRow": 600, + "containerStyle": "none", + "snapRows": 124, + "parentRowSpace": 1, + "type": "CANVAS_WIDGET", + "canExtend": true, + "version": 90, + "minHeight": 1292, + "parentColumnSpace": 1, + "dynamicBindingPathList": [], + "leftColumn": 0, + "children": [ + { + "boxShadow": "none", + "widgetName": "Container1", + "topRow": 0, + "bottomRow": 60, + "parentRowSpace": 38, + "type": "CONTAINER_WIDGET", + "parentColumnSpace": 75.25, + "dynamicBindingPathList": [], + "leftColumn": 0, + "children": [ + { + "labelTextSize": "0.875rem", + "boxShadow": "none", + "backgroundColor": "#FFFFFF", + "widgetName": "utncsu66ty", + "rightColumn": 2408, + "orientation": "VERTICAL", + "snapColumns": 16, + "detachFromLayout": true, + "widgetId": "acizsl94my", + "containerStyle": "none", + "topRow": 0, + "bottomRow": 380, + "parentRowSpace": 1, + "isVisible": true, + "type": "CANVAS_WIDGET", + "canExtend": false, + "version": 1, + "isLoading": false, + "parentColumnSpace": 1, + "leftColumn": 0, + "dynamicBindingPathList": [], + "borderRadius": "0px", + "children": [ + { + "boxShadow": "none", + "widgetName": "Text5", + "topRow": 28, + "bottomRow": 32, + "parentRowSpace": 38, + "type": "TEXT_WIDGET", + "parentColumnSpace": 62.484375, + "overflow": "NONE", + "fontFamily": "System Default", + "dynamicTriggerPathList": [], + "leftColumn": 16, + "dynamicBindingPathList": [ + { + "key": "text" + } + ], + "text": "{{DatePicker1.selectedDate}}", + "labelTextSize": "0.875rem", + "rightColumn": 32, + "textAlign": "LEFT", + "dynamicHeight": "FIXED", + "widgetId": "t7c7i4gv0f", + "isVisible": true, + "fontStyle": "BOLD", + "version": 1, + "textColor": "#231F20", + "parentId": "acizsl94my", + "isLoading": false, + "borderRadius": "0px", + "maxDynamicHeight": 9000, + "fontSize": "0.875rem", + "minDynamicHeight": 4 + }, + { + "needsErrorInfo": false, + "boxShadow": "none", + "mobileBottomRow": 12, + "widgetName": "DatePicker1", + "minDate": "1920-12-31T18:30:00.000Z", + "dateFormat": "YYYY-MM-DD HH:mm", + "topRow": 5, + "bottomRow": 12, + "shortcuts": false, + "parentRowSpace": 10, + "labelWidth": 5, + "type": "DATE_PICKER_WIDGET2", + "mobileRightColumn": 30, + "animateLoading": true, + "parentColumnSpace": 7.26171875, + "leftColumn": 10, + "dynamicBindingPathList": [ + { + "key": "accentColor" + }, + { + "key": "borderRadius" + } + ], + "labelPosition": "Top", + "isDisabled": false, + "key": "frcocd42ul", + "labelTextSize": "0.875rem", + "isRequired": false, + "defaultDate": "2024-10-24T07:39:07.659Z", + "rightColumn": 30, + "dynamicHeight": "FIXED", + "widgetId": "pwo88q4udx", + "accentColor": "{{appsmith.theme.colors.primaryColor}}", + "minWidth": 450, + "isVisible": true, + "datePickerType": "DATE_PICKER", + "label": "Label", + "version": 2, + "parentId": "acizsl94my", + "labelAlignment": "left", + "renderMode": "CANVAS", + "isLoading": false, + "mobileTopRow": 5, + "timePrecision": "minute", + "responsiveBehavior": "fill", + "borderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}", + "mobileLeftColumn": 10, + "maxDynamicHeight": 9000, + "firstDayOfWeek": 0, + "closeOnSelection": true, + "maxDate": "2121-12-31T18:29:00.000Z", + "minDynamicHeight": 4 + }, + { + "needsErrorInfo": false, + "boxShadow": "none", + "mobileBottomRow": 22, + "widgetName": "DatePicker2", + "minDate": "1920-12-31T18:30:00.000Z", + "dateFormat": "YYYY-MM-DD HH:mm", + "topRow": 14, + "bottomRow": 21, + "shortcuts": false, + "parentRowSpace": 10, + "labelWidth": 5, + "type": "DATE_PICKER_WIDGET2", + "mobileRightColumn": 29, + "animateLoading": true, + "parentColumnSpace": 7.26171875, + "leftColumn": 10, + "dynamicBindingPathList": [ + { + "key": "accentColor" + }, + { + "key": "borderRadius" + } + ], + "labelPosition": "Top", + "isDisabled": false, + "key": "frcocd42ul", + "labelTextSize": "0.875rem", + "isRequired": false, + "defaultDate": "2024-10-24T07:39:07.659Z", + "rightColumn": 30, + "dynamicHeight": "FIXED", + "widgetId": "gwcu42z6yn", + "accentColor": "{{appsmith.theme.colors.primaryColor}}", + "minWidth": 450, + "isVisible": true, + "datePickerType": "DATE_PICKER", + "label": "Label", + "version": 2, + "parentId": "acizsl94my", + "labelAlignment": "left", + "renderMode": "CANVAS", + "isLoading": false, + "mobileTopRow": 15, + "timePrecision": "minute", + "responsiveBehavior": "fill", + "borderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}", + "mobileLeftColumn": 9, + "maxDynamicHeight": 9000, + "firstDayOfWeek": 0, + "closeOnSelection": true, + "maxDate": "2121-12-31T18:29:00.000Z", + "minDynamicHeight": 4 + } + ] + } + ], + "labelTextSize": "0.875rem", + "backgroundColor": "#FFFFFF", + "rightColumn": 56, + "orientation": "VERTICAL", + "snapColumns": 16, + "dynamicHeight": "FIXED", + "widgetId": "mp429a7dl3", + "containerStyle": "card", + "isVisible": true, + "version": 1, + "isLoading": false, + "borderRadius": "0px", + "maxDynamicHeight": 9000, + "minDynamicHeight": 4 + }, + { + "boxShadow": "none", + "widgetName": "Modal1", + "topRow": 0, + "bottomRow": 0, + "parentRowSpace": 1, + "type": "MODAL_WIDGET", + "shouldScrollContents": true, + "parentColumnSpace": 1, + "leftColumn": 0, + "dynamicBindingPathList": [], + "children": [ + { + "boxShadow": "none", + "widgetName": "Canvas1", + "topRow": 0, + "bottomRow": 240, + "parentRowSpace": 1, + "canExtend": true, + "type": "CANVAS_WIDGET", + "shouldScrollContents": false, + "minHeight": 0, + "parentColumnSpace": 1, + "leftColumn": 0, + "dynamicBindingPathList": [], + "children": [ + { + "labelTextSize": "0.875rem", + "isRequired": false, + "boxShadow": "none", + "widgetName": "Icon1", + "rightColumn": 64, + "onClick": "{{closeModal(Modal1.name)}}", + "iconName": "cross", + "buttonColor": "#2E3D49", + "widgetId": "t3sjfihdb1", + "topRow": 0, + "bottomRow": 4, + "isVisible": true, + "type": "ICON_BUTTON_WIDGET", + "version": 1, + "parentId": "cwamdbv44c", + "isLoading": false, + "leftColumn": 60, + "dynamicBindingPathList": [], + "borderRadius": "0px", + "buttonVariant": "TERTIARY", + "iconSize": 24 + }, + { + "boxShadow": "none", + "widgetName": "Text4", + "dynamicPropertyPathList": [ + { + "key": "fontSize" + } + ], + "topRow": 0, + "bottomRow": 4, + "type": "TEXT_WIDGET", + "overflow": "NONE", + "fontFamily": "System Default", + "leftColumn": 0, + "dynamicBindingPathList": [], + "text": "Modal Title", + "labelTextSize": "0.875rem", + "rightColumn": 60, + "dynamicHeight": "FIXED", + "widgetId": "x893ud3zjh", + "isVisible": true, + "fontStyle": "BOLD", + "version": 1, + "textColor": "#231F20", + "parentId": "cwamdbv44c", + "isLoading": false, + "borderRadius": "0px", + "maxDynamicHeight": 9000, + "fontSize": "1.5rem", + "minDynamicHeight": 4 + }, + { + "labelTextSize": "0.875rem", + "boxShadow": "none", + "widgetName": "Button2", + "rightColumn": 52, + "isDefaultClickDisabled": true, + "buttonColor": "#03B365", + "widgetId": "q9snwskqan", + "topRow": 16, + "bottomRow": 20, + "isVisible": true, + "type": "BUTTON_WIDGET", + "version": 1, + "recaptchaType": "V3", + "parentId": "cwamdbv44c", + "isLoading": false, + "leftColumn": 40, + "dynamicBindingPathList": [], + "borderRadius": "0px", + "buttonVariant": "PRIMARY", + "text": "Cancel", + "isDisabled": false + }, + { + "labelTextSize": "0.875rem", + "boxShadow": "none", + "widgetName": "Button3", + "rightColumn": 64, + "isDefaultClickDisabled": true, + "buttonColor": "#03B365", + "widgetId": "tufuj2kdpz", + "topRow": 16, + "bottomRow": 20, + "isVisible": true, + "type": "BUTTON_WIDGET", + "version": 1, + "recaptchaType": "V3", + "parentId": "cwamdbv44c", + "isLoading": false, + "leftColumn": 52, + "dynamicBindingPathList": [], + "borderRadius": "0px", + "buttonVariant": "PRIMARY", + "text": "Confirm", + "isDisabled": false + } + ], + "isDisabled": false, + "labelTextSize": "0.875rem", + "rightColumn": 0, + "detachFromLayout": true, + "widgetId": "cwamdbv44c", + "isVisible": true, + "version": 1, + "parentId": "bx9a2jg08o", + "blueprint": { + "view": [ + { + "type": "ICON_WIDGET", + "position": { + "left": 15, + "top": 0 + }, + "size": { + "rows": 1, + "cols": 1 + }, + "props": { + "iconName": "cross", + "iconSize": 24, + "color": "#040627" + } + }, + { + "type": "TEXT_WIDGET", + "position": { + "left": 0, + "top": 0 + }, + "size": { + "rows": 1, + "cols": 15 + }, + "props": { + "text": "Modal Title", + "textStyle": "HEADING" + } + }, + { + "type": "BUTTON_WIDGET", + "position": { + "left": 10, + "top": 4 + }, + "size": { + "rows": 1, + "cols": 3 + }, + "props": { + "text": "Cancel", + "buttonStyle": "SECONDARY_BUTTON" + } + }, + { + "type": "BUTTON_WIDGET", + "position": { + "left": 13, + "top": 4 + }, + "size": { + "rows": 1, + "cols": 3 + }, + "props": { + "text": "Confirm", + "buttonStyle": "PRIMARY_BUTTON" + } + } + ], + "operations": [ + { + "type": "MODIFY_PROPS" + } + ] + }, + "isLoading": false, + "borderRadius": "0px" + } + ], + "height": 240, + "labelTextSize": "0.875rem", + "rightColumn": 0, + "detachFromLayout": true, + "dynamicHeight": "FIXED", + "widgetId": "bx9a2jg08o", + "isVisible": false, + "canOutsideClickClose": true, + "canEscapeKeyClose": true, + "version": 2, + "parentId": "0", + "blueprint": { + "view": [ + { + "type": "CANVAS_WIDGET", + "position": { + "left": 0, + "top": 0 + }, + "props": { + "detachFromLayout": true, + "canExtend": true, + "isVisible": true, + "isDisabled": false, + "shouldScrollContents": false, + "children": [], + "blueprint": { + "view": [ + { + "type": "ICON_WIDGET", + "position": { + "left": 15, + "top": 0 + }, + "size": { + "rows": 1, + "cols": 1 + }, + "props": { + "iconName": "cross", + "iconSize": 24, + "color": "#040627" + } + }, + { + "type": "TEXT_WIDGET", + "position": { + "left": 0, + "top": 0 + }, + "size": { + "rows": 1, + "cols": 15 + }, + "props": { + "text": "Modal Title", + "textStyle": "HEADING" + } + }, + { + "type": "BUTTON_WIDGET", + "position": { + "left": 10, + "top": 4 + }, + "size": { + "rows": 1, + "cols": 3 + }, + "props": { + "text": "Cancel", + "buttonStyle": "SECONDARY_BUTTON" + } + }, + { + "type": "BUTTON_WIDGET", + "position": { + "left": 13, + "top": 4 + }, + "size": { + "rows": 1, + "cols": 3 + }, + "props": { + "text": "Confirm", + "buttonStyle": "PRIMARY_BUTTON" + } + } + ], + "operations": [ + { + "type": "MODIFY_PROPS" + } + ] + } + } + } + ] + }, + "isLoading": false, + "borderRadius": "0px", + "maxDynamicHeight": 9000, + "width": 456, + "minDynamicHeight": 4 + } + ] + }, + "layoutOnLoadActions": [], + "layoutOnLoadActionErrors": [], + "actionUpdates": [], + "messages": [] +} diff --git a/app/client/cypress/limited-tests.txt b/app/client/cypress/limited-tests.txt index 31c0c0253fef..aa00835ffb0e 100644 --- a/app/client/cypress/limited-tests.txt +++ b/app/client/cypress/limited-tests.txt @@ -1,6 +1,5 @@ # To run only limited tests - give the spec names in below format: cypress/e2e/Regression/ClientSide/Templates/Fork_Template_spec.js - # For running all specs - uncomment below: #cypress/e2e/**/**/* diff --git a/app/client/cypress/locators/FormWidgets.json b/app/client/cypress/locators/FormWidgets.json index db603de7b8c0..43462381c2da 100644 --- a/app/client/cypress/locators/FormWidgets.json +++ b/app/client/cypress/locators/FormWidgets.json @@ -78,5 +78,6 @@ "minDateTextArea" : ".t--property-control-mindate .CodeMirror textarea", "minDateInput" : ".t--property-control-mindate .ads-v2-input__input-section-input", "datePickerInput": ".t--widget-datepickerwidget2 .bp3-input", - "dayPickerNextButton": ".DayPicker-NavButton--next" + "dayPickerNextButton": ".DayPicker-NavButton--next", + "dayPickerToday": ".ads-v2-datepicker__calender-today" } diff --git a/app/client/cypress/locators/OneClickBindingLocator.ts b/app/client/cypress/locators/OneClickBindingLocator.ts index 1d291b4e0478..0902374a4d46 100644 --- a/app/client/cypress/locators/OneClickBindingLocator.ts +++ b/app/client/cypress/locators/OneClickBindingLocator.ts @@ -1,33 +1,33 @@ export default { - connectData: '[data-testId="t--one-click-binding-connect-data"]', + connectData: '[data-testid="t--one-click-binding-connect-data"]', datasourceDropdownSelector: - "[data-testId='t--one-click-binding-datasource-selector']", + "[data-testid='t--one-click-binding-datasource-selector']", datasourceDropdownOptionSelector: (query: string) => - `[data-testId="t--one-click-binding-datasource-trigger"]:contains(${query})`, + `[data-testid="t--one-click-binding-datasource-trigger"]:contains(${query})`, dropdownOptionSelector: (query: string) => - `[data-testId="t--one-click-binding-datasource-trigger"]:contains(${query})`, + `[data-testid="t--one-click-binding-datasource-trigger"]:contains(${query})`, datasourceQueryBindHeaderSelector: - "[data-testId='t--one-click-binding-datasource-selector--bind-to-query']", + "[data-testid='t--one-click-binding-datasource-selector--bind-to-query']", datasourceGenerateAQuerySelector: - "[data-testId='t--one-click-binding-datasource-selector--generate-a-query']", + "[data-testid='t--one-click-binding-datasource-selector--generate-a-query']", datasourceOtherActionsSelector: - "[data-testId='t--one-click-binding-datasource-selector--other-actions']", + "[data-testid='t--one-click-binding-datasource-selector--other-actions']", datasourceQuerySelector: (query?: string) => - `[data-testId='t--one-click-binding-datasource-selector--query']${ + `[data-testid='t--one-click-binding-datasource-selector--query']${ query ? `:contains(${query})` : "" }`, datasourceSelector: (datasource?: string) => - `[data-testId="t--one-click-binding-datasource-selector--datasource"]${ + `[data-testid="t--one-click-binding-datasource-selector--datasource"]${ datasource ? `:contains(${datasource})` : "" }`, otherActionSelector: (action?: string) => - `[data-testId='t--one-click-binding-datasource-selector--other-action']${ + `[data-testid='t--one-click-binding-datasource-selector--other-action']${ action ? `:contains(${action})` : "" }`, tableOrSpreadsheetDropdown: '[data-testid="t--one-click-binding-table-selector"] .rc-select-selector', tableOrSpreadsheetDropdownOption: (table?: string) => - `//div[@data-testId='t--one-click-binding-table-selector--table']//div[text()='${table}']`, + `//div[@data-testid='t--one-click-binding-table-selector--table']//div[text()='${table}']`, tableOrSpreadsheetSelectedOption: (table?: string) => `[data-testid="t--one-click-binding-table-selector"] .rc-select-selection-item${ table ? `:contains(${table})` : "" @@ -35,24 +35,24 @@ export default { validTableRowData: '.t--widget-tablewidgetv2 [role="rowgroup"] [role="button"]', tableError: (error: string) => - `[data-testId="t--one-click-binding-table-selector--error"]:contains(${error})`, - dateInput: `[data-testId="datepicker-container"] input`, + `[data-testid="t--one-click-binding-table-selector--error"]:contains(${error})`, + dateInput: `[data-testid="datepicker-container"] input`, dayViewFromDate: ".DayPicker-Day", - loadMore: "[data-testId='t--one-click-binding-datasource--load-more']", - datasourceSearch: `[data-testId="t--one-click-binding-datasource--search"]`, + loadMore: "[data-testid='t--one-click-binding-datasource--load-more']", + datasourceSearch: `[data-testid="t--one-click-binding-datasource--search"]`, searchableColumn: - '[data-testId="t--one-click-binding-column-searchableColumn"]', - formType: '[data-testId="t--one-click-binding-column-formType"]', - defaultValues: '[data-testId="t--one-click-binding-column-defaultValues"]', - dataIdentifier: '[data-testId="t--one-click-binding-column-dataIdentifier"]', - label: '[data-testId="t--one-click-binding-column-label"]', - value: '[data-testId="t--one-click-binding-column-value"]', + '[data-testid="t--one-click-binding-column-searchableColumn"]', + formType: '[data-testid="t--one-click-binding-column-formType"]', + defaultValues: '[data-testid="t--one-click-binding-column-defaultValues"]', + dataIdentifier: '[data-testid="t--one-click-binding-column-dataIdentifier"]', + label: '[data-testid="t--one-click-binding-column-label"]', + value: '[data-testid="t--one-click-binding-column-value"]', columnDropdownOption: (column: string, value?: string) => - `[data-testId='t--one-click-binding-column-${column}--column']${ + `[data-testid='t--one-click-binding-column-${column}--column']${ value ? `:contains(${value})` : "" }`, columnSelectedOption: (column: string, value?: string) => - `[data-testId="t--one-click-binding-column-${column}"] .rc-select-selection-item${ + `[data-testid="t--one-click-binding-column-${column}"] .rc-select-selection-item${ value ? `:contains(${value})` : "" }`, columnSelectorModalTrigger: '[data-testid="t--edit-fields-button"]', diff --git a/app/client/cypress/locators/Widgets.json b/app/client/cypress/locators/Widgets.json index 92b161d141b2..4dcb4ce330bf 100644 --- a/app/client/cypress/locators/Widgets.json +++ b/app/client/cypress/locators/Widgets.json @@ -234,5 +234,7 @@ "propertyPaneSaveButton": ".t--property-pane-section-collapse-savebutton", "firstEditInput":"[data-colindex=0][data-rowindex=0] .t--inlined-cell-editor input.bp3-input", "cellControlSwitch" : ".t--property-control-cellwrapping .ads-v2-switch", - "propertyControlLabel" : ".t--property-control-label" + "propertyControlLabel" : ".t--property-control-label", + "todayText": "span:contains('Today')", + "dayPickerToday": ".DayPicker-Day--today" } diff --git a/app/client/cypress/locators/commonlocators.json b/app/client/cypress/locators/commonlocators.json index 9fe519e15adb..fdac92e3af4e 100644 --- a/app/client/cypress/locators/commonlocators.json +++ b/app/client/cypress/locators/commonlocators.json @@ -164,7 +164,7 @@ "labelSectionTxt": ".CodeMirror-code .cm-variable", "lintError": ".CodeMirror-lint-mark-error", "debugger": ".t--debugger-count", - "errorTab": "[data-testid=t--tab-ERROR]", + "errorTab": "[data-testid=t--tab-ERROR_TAB]", "debugErrorMsg": "[data-testid=t--debugger-log-message]", "tableButtonVariant": ".t--property-control-buttonvariant", "debuggerLabel": "span.debugger-label", diff --git a/app/client/cypress/support/ApiCommands.js b/app/client/cypress/support/ApiCommands.js index 9c24c425d32a..d0d52ec712b9 100644 --- a/app/client/cypress/support/ApiCommands.js +++ b/app/client/cypress/support/ApiCommands.js @@ -94,7 +94,7 @@ Cypress.Commands.add( } cy.get(".string-value").contains(baseurl.concat(path)); cy.get(".string-value").contains(verb); - cy.get("[data-testid=t--tab-response]").first().click({ force: true }); + cy.get("[data-testid=t--tab-RESPONSE_TAB]").first().click({ force: true }); }, ); diff --git a/app/client/cypress/support/Objects/CommonLocators.ts b/app/client/cypress/support/Objects/CommonLocators.ts index 9bcf7c1cfece..2200d6eb1815 100644 --- a/app/client/cypress/support/Objects/CommonLocators.ts +++ b/app/client/cypress/support/Objects/CommonLocators.ts @@ -89,8 +89,8 @@ export class CommonLocators { _createNew = ".t--add-item"; _uploadFiles = "div.uppy-Dashboard-AddFiles input"; _uploadBtn = "button.uppy-StatusBar-actionBtn--upload"; - _errorTab = "[data-testid=t--tab-ERROR]"; - _responseTab = "[data-testid=t--tab-response]"; + _errorTab = "[data-testid=t--tab-ERROR_TAB]"; + _responseTab = "[data-testid=t--tab-RESPONSE_TAB]"; _modal = ".t--modal-widget"; _closeModal = "button:contains('Close')"; _entityProperties = (entityNameinLeftSidebar: string) => @@ -316,12 +316,12 @@ export class CommonLocators { `.uppy-Informer p:contains('${msg}')`; _fileUploadAddMore = ".uppy-DashboardContent-addMore"; _buttonText = ".bp3-button-text"; - _richText_TitleBlock = "[data-mce-name='blocks']"; - _richText_Heading = "[aria-label='Heading 1']"; + _richText_TitleBlock = "[aria-label='Block Paragraph']"; + _richText_Heading = "[title='Heading 1']"; _richText_Label_Text = ".tox-tbtn__select-label"; - _richText_Text_Color = - '[data-mce-name="forecolor"] .tox-split-button__chevron'; - _richText_color = (value: string) => `[data-mce-name="${value}"]`; + _richText_Text_Color = (color: string) => + `[aria-label="Text color ${color}"] .tox-split-button__chevron`; + _richText_color = (value: string) => `[title="${value}"]`; _richText_line = "#tinymce p span"; _treeSelectedContent = ".rc-tree-select-selection-item-content"; _switcherIcon = ".switcher-icon"; @@ -341,4 +341,5 @@ export class CommonLocators { _saveDatasource = `[data-testid='t--store-as-datasource']`; _propertyCollapseBody = ".bp3-collapse-body"; _propertyCollapse = ".bp3-collapse"; + _widgetBorder = ".t--draggable-tabswidget div div div"; } diff --git a/app/client/cypress/support/Objects/DataManager.ts b/app/client/cypress/support/Objects/DataManager.ts index a54e1162eb30..c4a27a021fb2 100644 --- a/app/client/cypress/support/Objects/DataManager.ts +++ b/app/client/cypress/support/Objects/DataManager.ts @@ -97,15 +97,12 @@ export class DataManager { firestore_projectID: "appsmith-22e8b", firestore_serviceaccountkey: Cypress.env("FIRESTORE_PRIVATE_KEY"), - restapi_url: "https://my-json-server.typicode.com/typicode/demo/posts", - connection_type: "Replica set", - mockHostAddress: "fake_api.cvuydmurdlas.us-east-1.rds.amazonaws.com", mockDatabaseName: "fakeapi", mockDatabaseUsername: "fakeapi", mockDatabasePassword: "LimitedAccess123#", readonly: "readonly", - authenticatedApiUrl: "https://fakeapi.com", + authenticatedApiUrl: "http://host.docker.internal:5001", GraphqlApiUrl_TED: "http://host.docker.internal:4200/graphql", @@ -192,15 +189,12 @@ export class DataManager { firestore_projectID: "appsmith-dummy", firestore_serviceaccountkey: "dummy_service_creds_key", - restapi_url: "https://my-json-server.typicode.com/typicode/demo/posts", - connection_type: "Replica set", - mockHostAddress: "fake_api.cvuydmurdlas.us-east-1.rds.amazonaws.com", mockDatabaseName: "fakeapi", mockDatabaseUsername: "fakeapi", mockDatabasePassword: "LimitedAccess123#", readonly: "readonly", - authenticatedApiUrl: "https://fakeapi.com", + authenticatedApiUrl: "http://host.docker.internal:5001", GraphqlApiUrl_TED: "http://host.docker.internal:4200/graphql", diff --git a/app/client/cypress/support/Objects/FeatureFlags.ts b/app/client/cypress/support/Objects/FeatureFlags.ts index c7f4b58bdf65..7fdc78d1d580 100644 --- a/app/client/cypress/support/Objects/FeatureFlags.ts +++ b/app/client/cypress/support/Objects/FeatureFlags.ts @@ -4,7 +4,6 @@ import produce from "immer"; const defaultFlags = { release_side_by_side_ide_enabled: true, - ab_learnability_discoverability_collapse_all_except_data_enabled: false, // remove this flag from here when it's removed from code rollout_remove_feature_walkthrough_enabled: false, // remove this flag from here when it's removed from code }; diff --git a/app/client/cypress/support/Pages/AggregateHelper.ts b/app/client/cypress/support/Pages/AggregateHelper.ts index 82fe2481fbdd..ad5965191c25 100644 --- a/app/client/cypress/support/Pages/AggregateHelper.ts +++ b/app/client/cypress/support/Pages/AggregateHelper.ts @@ -1191,11 +1191,12 @@ export class AggregateHelper { public ActionContextMenuSubItem({ force = false, - index = 0, subAction, toastToValidate = "", }: SubActionParams) { - this.GetNClick(this.locator._contextMenuItem(subAction), index, force); + cy.xpath(this.locator._contextMenuItem(subAction)).trigger("click", { + force: force, + }); this.Sleep(500); toastToValidate && this.AssertContains(toastToValidate); } diff --git a/app/client/cypress/support/Pages/ApiPage.ts b/app/client/cypress/support/Pages/ApiPage.ts index bb394a58287f..57b7d33abbb7 100644 --- a/app/client/cypress/support/Pages/ApiPage.ts +++ b/app/client/cypress/support/Pages/ApiPage.ts @@ -82,7 +82,7 @@ export class ApiPage { private _paginationTypeLabels = ".t--apiFormPaginationType label"; _saveAsDS = ".t--store-as-datasource"; _responseStatus = ".t--response-status-code"; - public _responseTabHeader = "[data-testid=t--tab-headers]"; + public _responseTabHeader = "[data-testid=t--tab-HEADERS_TAB]"; public _headersTabContent = ".t--headers-tab"; public _autoGeneratedHeaderInfoIcon = (key: string) => `.t--auto-generated-${key}-info`; diff --git a/app/client/cypress/support/Pages/DataSources.ts b/app/client/cypress/support/Pages/DataSources.ts index 35777482759a..b56ad7792f35 100644 --- a/app/client/cypress/support/Pages/DataSources.ts +++ b/app/client/cypress/support/Pages/DataSources.ts @@ -194,15 +194,15 @@ export class DataSources { _globalSearchInput = ".t--global-search-input"; _gsScopeDropdown = "[data-testid^='datasourceStorages.'][data-testid$='.datasourceConfiguration.authentication.scopeString']"; - _gsScopeOptions = ".ads-v2-select__dropdown .rc-select-item-option"; + _gsScopeOptions = ".ads-v2-radio-group"; _queryTimeout = "//input[@name='actionConfiguration.timeoutInMillisecond']"; _getStructureReq = "/api/v1/datasources/*/structure?ignoreCache=true"; _editDatasourceFromActiveTab = (dsName: string) => ".t--datasource-name:contains('" + dsName + "')"; _mandatoryMark = "//span[text()='*']"; _deleteDSHostPort = ".t--delete-field"; - _dsTabSchema = "[data-testid='t--tab-schema']"; - private _pageSelectionMenu = "[data-testId='t--page-selection']"; + _dsTabSchema = "[data-testid='t--tab-SCHEMA_TAB']"; + private _pageSelectionMenu = "[data-testid='t--page-selection']"; private _pageSelectMenuItem = ".ads-v2-menu__menu-item"; @@ -295,7 +295,7 @@ export class DataSources { _imgFireStoreLogo = "//img[contains(@src, 'firestore.svg')]"; _dsVirtuosoElement = `div .t--schema-virtuoso-container`; private _dsVirtuosoList = `[data-test-id="virtuoso-item-list"]`; - private _dsSchemaContainer = `[data-testId="datasource-schema-container"]`; + private _dsSchemaContainer = `[data-testid="datasource-schema-container"]`; private _dsVirtuosoElementTable = (targetTableName: string) => `${this._dsSchemaEntityItem}[data-testid='t--entity-item-${targetTableName}']`; private _dsPageTabListItem = (buttonText: string) => @@ -325,9 +325,7 @@ export class DataSources { datasourceName, ); this.agHelper.GetNClick(this._selectTableDropdown, 0, true); - cy.get( - `div[role="listbox"] p[kind="span"]:contains("${tableName}")`, - ).click(); + cy.get(`div[role="listbox"] p:contains("${tableName}")`).click(); this.agHelper.GetNClick(this._generatePageBtn); this.assertHelper.AssertNetworkStatus("@replaceLayoutWithCRUDPage", 201); this.agHelper.ClickButton("Got it"); @@ -1854,7 +1852,7 @@ export class DataSources { cy.intercept("GET", "/api/v1/datasources/*/structure?ignoreCache=*").as( `getDatasourceStructureUpdated_${ds_entity_name}`, ); - cy.get("[data-testid=t--tab-schema]").first().click({ force: true }); + cy.get("[data-testid=t--tab-SCHEMA_TAB]").first().click({ force: true }); this.RefreshDatasourceSchema(); this.assertHelper .WaitForNetworkCall(`@getDatasourceStructureUpdated_${ds_entity_name}`) diff --git a/app/client/cypress/support/Pages/GitSync.ts b/app/client/cypress/support/Pages/GitSync.ts index 1aa7589ba7c7..47f2e8cf70a1 100644 --- a/app/client/cypress/support/Pages/GitSync.ts +++ b/app/client/cypress/support/Pages/GitSync.ts @@ -453,4 +453,16 @@ export class GitSync { } this.CloseGitSyncModal(); } + + public AssertBranchName(branch: string) { + this.agHelper.AssertElementVisibility(this._branchButton); + this.agHelper.AssertContains(branch); + } + + public AssertBranchNameInUrl(branch: string) { + cy.location("search") + .then((searchParams) => new URLSearchParams(searchParams)) + .invoke("get", "branch") + .should("equal", branch); + } } diff --git a/app/client/cypress/support/Pages/JSEditor.ts b/app/client/cypress/support/Pages/JSEditor.ts index a8ed3d4fbac3..832c83048d97 100644 --- a/app/client/cypress/support/Pages/JSEditor.ts +++ b/app/client/cypress/support/Pages/JSEditor.ts @@ -113,6 +113,7 @@ export class JSEditor { ); //Checking JS object was created successfully this.assertHelper.AssertNetworkStatus("@createNewJSCollection", 201); + cy.get(this._jsObjName).click({ force: true }); this.agHelper.AssertElementVisibility(this._jsObjTxt); // Assert that the name of the JS Object is focused when newly created this.agHelper.PressEnter(); diff --git a/app/client/cypress/support/Pages/PropertyPane.ts b/app/client/cypress/support/Pages/PropertyPane.ts index daf36e185d6d..5a15ee560a0d 100644 --- a/app/client/cypress/support/Pages/PropertyPane.ts +++ b/app/client/cypress/support/Pages/PropertyPane.ts @@ -92,7 +92,7 @@ export class PropertyPane { "div.tab-view span:contains('" + type + "')"; _dropdownSelectType = ".t--open-dropdown-Select-type"; - _selectorViewLabel = '[data-testId="selector-view-label"]'; + _selectorViewLabel = '[data-testid="selector-view-label"]'; _textView = ".text-view"; _selectorView = ".selector-view"; _dropdownOptions = @@ -177,6 +177,7 @@ export class PropertyPane { _dataIcon = (icon: string) => `[data-icon="${icon}"]`; _iconDropdown = "[data-test-id='virtuoso-scroller']"; _dropdownControlError = "[data-testid='t---dropdown-control-error']"; + _borderColorCursor = ".t--property-control-bordercolor .bp3-input-group div"; public OpenJsonFormFieldSettings(fieldName: string) { this.agHelper.GetNClick(this._jsonFieldEdit(fieldName)); @@ -686,4 +687,20 @@ export class PropertyPane { .GetElement(this._propertyToggle(propertyName)) .should(state === "enabled" ? "be.checked" : "not.be.checked"); } + + public ExpandIfCollapsedSection(sectionName: string) { + cy.get(`.t--property-pane-section-collapse-${sectionName}`) + .scrollIntoView() + .then(($element) => { + cy.wrap($element) + .siblings(".bp3-collapse") + .then(($sibling) => { + const siblingHeight = $sibling.height(); // Get the height of the sibling element + + if (!siblingHeight) { + $element.click(); + } + }); + }); + } } diff --git a/app/client/cypress/support/Pages/Table.ts b/app/client/cypress/support/Pages/Table.ts index 45dd2132dedd..d1439a589271 100644 --- a/app/client/cypress/support/Pages/Table.ts +++ b/app/client/cypress/support/Pages/Table.ts @@ -854,38 +854,4 @@ export class Table { this.agHelper.GetHoverNClick(selector, 1, true); verify && cy.get(selector).eq(1).should("be.disabled"); } - - /** - * Helper function to get formatted date strings for tomorrow's date. - * - * @returns {Object} An object containing: - * - verbose format (e.g., "Sat Sep 21 2024") - * - ISO date format (e.g., "2024-09-21") - */ - public getFormattedTomorrowDates() { - // Create a new Date object for today - const tomorrow = new Date(); - - // Set the date to tomorrow by adding 1 to today's date - tomorrow.setDate(tomorrow.getDate() + 1); - - // Format tomorrow's date in verbose form (e.g., "Sat Sep 21 2024") - const verboseFormat = tomorrow - .toLocaleDateString("en-US", { - weekday: "short", - year: "numeric", - month: "short", - day: "2-digit", - }) - .replace(/,/g, ""); // Remove commas from the formatted string - - // Format tomorrow's date in ISO form (e.g., "2024-09-21") - const isoFormat = tomorrow.toISOString().split("T")[0]; // Extract the date part only - - // Return both formatted date strings as an object - return { - verboseFormat, - isoFormat, - }; - } } diff --git a/app/client/cypress/support/commands.js b/app/client/cypress/support/commands.js index eaf1a4c86ca7..4a6887766900 100644 --- a/app/client/cypress/support/commands.js +++ b/app/client/cypress/support/commands.js @@ -2,6 +2,7 @@ /* eslint-disable cypress/no-assigning-return-values */ /* This file is used to maintain comman methods across tests , refer other *.js files for adding common methods */ import { ANVIL_EDITOR_TEST } from "./Constants.js"; +import advancedFormat from "dayjs/plugin/advancedFormat"; import EditorNavigation, { EntityType, @@ -18,6 +19,7 @@ import { v4 as uuidv4 } from "uuid"; const dayjs = require("dayjs"); const loginPage = require("../locators/LoginPage.json"); import homePage from "../locators/HomePage"; +dayjs.extend(advancedFormat); const commonlocators = require("../locators/commonlocators.json"); const widgetsPage = require("../locators/Widgets.json"); @@ -524,10 +526,17 @@ Cypress.Commands.add("getDate", (date, dateFormate) => { return eDate; }); -Cypress.Commands.add("setDate", (date, dateFormate) => { - const expDate = dayjs().add(date, "days").format(dateFormate); - const sel = `.DayPicker-Day[aria-label=\"${expDate}\"]`; - cy.get(sel).click(); +Cypress.Commands.add("setDate", (date, dateFormate, ver = "v2") => { + if (ver == "v2") { + const expDate = dayjs().add(date, "days").format("dddd, MMMM D"); + cy.get(`.react-datepicker__day[aria-label^="Choose ${expDate}"]`) + .first() + .click(); + } else if (ver == "v1") { + const expDate = dayjs().add(date, "days").format(dateFormate); + const sel = `.DayPicker-Day[aria-label=\"${expDate}\"]`; + cy.get(sel).click(); + } }); Cypress.Commands.add("validateDisableWidget", (widgetCss, disableCss) => { @@ -928,9 +937,6 @@ Cypress.Commands.add("SignupFromAPI", (uname, pword) => { cy.request({ method: "POST", url: "api/v1/users", - headers: { - "content-type": "application/json", - }, followRedirect: false, form: true, body: { diff --git a/app/client/cypress/support/e2e.js b/app/client/cypress/support/e2e.js index 166329ed8e0c..a27600f20a20 100644 --- a/app/client/cypress/support/e2e.js +++ b/app/client/cypress/support/e2e.js @@ -141,8 +141,6 @@ before(function () { if (!Cypress.currentTest.titlePath[0].includes(WALKTHROUGH_TEST_PAGE)) { // Adding key FEATURE_WALKTHROUGH (which is used to check if the walkthrough is already shown to the user or not) for non walkthrough cypress tests (to not show walkthrough) addIndexedDBKey(FEATURE_WALKTHROUGH_INDEX_KEY, { - ab_ds_binding_enabled: true, - ab_ds_schema_enabled: true, binding_widget: true, }); } diff --git a/app/client/cypress/support/widgetCommands.js b/app/client/cypress/support/widgetCommands.js index fd0772748f6f..23d1d828f6a4 100644 --- a/app/client/cypress/support/widgetCommands.js +++ b/app/client/cypress/support/widgetCommands.js @@ -837,7 +837,7 @@ Cypress.Commands.add("selectWidgetForReset", (value) => { }); Cypress.Commands.add("SetDateToToday", () => { - cy.get(".react-datepicker .react-datepicker__day--today").click({ + cy.get("button:contains('Today')").click({ force: true, }); agHelper.AssertAutoSave(); diff --git a/app/client/jest.config.js b/app/client/jest.config.js index abe29d26d8d5..47dc492327d8 100644 --- a/app/client/jest.config.js +++ b/app/client/jest.config.js @@ -1,11 +1,15 @@ function parseConfig() { return ""; } + const LOG_LEVELS = ["debug", "error"]; const CONFIG_LOG_LEVEL_INDEX = 1; module.exports = { - setupFiles: ["jest-canvas-mock"], + setupFiles: [ + "jest-canvas-mock", + "/test/__mocks__/reactMarkdown.tsx", + ], roots: ["/src"], transform: { "^.+\\.(png|js|ts|tsx)$": "ts-jest", @@ -17,7 +21,7 @@ module.exports = { moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node", "css"], moduleDirectories: ["node_modules", "src", "test"], transformIgnorePatterns: [ - "/node_modules/(?!codemirror|konva|react-dnd|dnd-core|@babel|(@blueprintjs)|@github|lodash-es|@draft-js-plugins|react-documents|linkedom|assert-never|axios)", + "/node_modules/(?!codemirror|konva|react-dnd|dnd-core|@babel|(@blueprintjs)|@github|lodash-es|@draft-js-plugins|react-documents|linkedom|assert-never|axios|usehooks-ts|date-fns)", ], moduleNameMapper: { "\\.(css|less)$": "/test/__mocks__/styleMock.js", @@ -95,10 +99,17 @@ module.exports = { "__APPSMITH_NEW_RELIC_OTEL_EXPORTER_OTLP_ENDPOINT__", ), }, + observability: { + deploymentName: "jest-run", + serviceInstanceId: "appsmith-0", + }, fusioncharts: { licenseKey: parseConfig("__APPSMITH_FUSIONCHARTS_LICENSE_KEY__"), }, - enableMixpanel: parseConfig("__APPSMITH_SEGMENT_KEY__"), + mixpanel: { + enabled: parseConfig("__APPSMITH_SEGMENT_KEY__"), + apiKey: parseConfig("__APPSMITH_MIXPANEL_KEY__"), + }, algolia: { apiId: parseConfig("__APPSMITH_ALGOLIA_API_ID__"), apiKey: parseConfig("__APPSMITH_ALGOLIA_API_KEY__"), diff --git a/app/client/package.json b/app/client/package.json index 9ce6628afc77..9b822e0f11ae 100644 --- a/app/client/package.json +++ b/app/client/package.json @@ -72,6 +72,7 @@ "@mantine/hooks": "^5.10.1", "@newrelic/browser-agent": "^1.255.0", "@opentelemetry/api": "^1.9.0", + "@opentelemetry/auto-instrumentations-web": "^0.41.0", "@opentelemetry/context-zone": "1.25.1", "@opentelemetry/core": "^1.26.0", "@opentelemetry/exporter-metrics-otlp-http": "0.52.1", @@ -81,7 +82,7 @@ "@opentelemetry/sdk-metrics": "1.25.1", "@opentelemetry/sdk-trace-base": "1.25.1", "@opentelemetry/sdk-trace-web": "1.25.1", - "@opentelemetry/semantic-conventions": "1.25.1", + "@opentelemetry/semantic-conventions": "^1.27.0", "@react-spring/web": "^9.7.4", "@react-types/shared": "^3.23.0", "@redux-saga/core": "1.1.3", @@ -125,7 +126,7 @@ "cypress-log-to-output": "^1.1.2", "cypress-repeat-pro": "^1.0.1", "d3-geo": "^3.1.0", - "date-fns": "2.30.0", + "date-fns": "^4.1.0", "dayjs": "^1.10.6", "deep-diff": "^1.0.2", "downloadjs": "^1.4.7", @@ -156,11 +157,13 @@ "memoize-one": "^6.0.0", "micro-memoize": "^4.0.10", "microdiff": "^1.4.0", + "mixpanel-browser": "^2.55.1", "moment": "2.29.4", "moment-timezone": "^0.5.35", "nanoid": "^2.0.4", "node-forge": "^1.3.0", "object-hash": "^3.0.0", + "openai": "^4.64.0", "path-to-regexp": "^6.3.0", "popper.js": "^1.15.0", "prismjs": "^1.27.0", @@ -220,12 +223,13 @@ "tailwindcss": "^3.3.3", "tern": "^0.21.0", "tinycolor2": "^1.4.2", - "tinymce": "^7.3.0", + "tinymce": "6.8.3", "toposort": "^2.0.2", "tslib": "^2.3.1", "typescript": "^5.5.4", "unescape-js": "^1.1.4", "url-search-params-polyfill": "^8.0.0", + "usehooks-ts": "^3.1.0", "uuid": "^9.0.0", "validate-color": "^2.2.4", "web-vitals": "3.5.2", @@ -259,6 +263,7 @@ "@types/jest": "^27.4.1", "@types/jshint": "^2.12.0", "@types/lodash": "^4.14.120", + "@types/mixpanel-browser": "^2.50.1", "@types/moment-timezone": "^0.5.10", "@types/nanoid": "^2.0.0", "@types/node": "^10.12.18", @@ -316,6 +321,7 @@ "eslint-plugin-jest": "^27.4.2", "eslint-plugin-prettier": "^5.0.0", "eslint-plugin-react": "^7.33.2", + "eslint-plugin-react-compiler": "beta", "eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-react-perf": "^3.3.2", "eslint-plugin-sort-destructure-keys": "^1.5.0", diff --git a/app/client/packages/design-system/ads/src/Button/Button.styles.tsx b/app/client/packages/design-system/ads/src/Button/Button.styles.tsx index b5e58e42b28d..1fd71a2ca84f 100644 --- a/app/client/packages/design-system/ads/src/Button/Button.styles.tsx +++ b/app/client/packages/design-system/ads/src/Button/Button.styles.tsx @@ -29,6 +29,7 @@ const getSizes = (size: ButtonSizes, isIconButton?: boolean) => { ? "var(--ads-v2-spaces-2)" : "var(--ads-v2-spaces-2) var(--ads-v2-spaces-3)"}; --button-gap: var(--ads-v2-spaces-2); + --button-min-width: 60px; `, md: css` --button-font-weight: 600; @@ -37,6 +38,7 @@ const getSizes = (size: ButtonSizes, isIconButton?: boolean) => { ? "var(--ads-v2-spaces-3)" : "var(--ads-v2-spaces-3) var(--ads-v2-spaces-4)"}; --button-gap: var(--ads-v2-spaces-3); + --button-min-width: 80px; `, }; @@ -175,6 +177,8 @@ export const ButtonContent = styled.div<{ box-sizing: border-box; padding: var(--button-padding); border-radius: inherit; + min-width: ${({ isIconButton }) => + isIconButton ? "unset" : "var(--button-min-width)"}; & > .${ButtonContentChildrenClassName} { display: flex; diff --git a/app/client/packages/design-system/ads/src/Documentation/components/CodeBlock.tsx b/app/client/packages/design-system/ads/src/Documentation/components/CodeBlock.tsx index 320d52cda9bb..8672d0f3266b 100644 --- a/app/client/packages/design-system/ads/src/Documentation/components/CodeBlock.tsx +++ b/app/client/packages/design-system/ads/src/Documentation/components/CodeBlock.tsx @@ -16,7 +16,7 @@ function CodeBlock({ code }: CodeBlockProps) { }} > {code} - - + ), }; - -export const ContextualHelp: Story = { - args: { - label: "Label", - placeholder: "Contextual Help Text", - contextualHelp: "This is a contextual help text", - items: items, - }, -}; - -export const WithIcons: Story = { - args: { - label: "With icons", - items: itemsWithIcons, - }, -}; diff --git a/app/client/packages/design-system/widgets/src/components/ComboBox/stories/items.ts b/app/client/packages/design-system/widgets/src/components/ComboBox/stories/items.ts index 7319bf939cb0..3c465f7b8c59 100644 --- a/app/client/packages/design-system/widgets/src/components/ComboBox/stories/items.ts +++ b/app/client/packages/design-system/widgets/src/components/ComboBox/stories/items.ts @@ -1,6 +1,4 @@ -import type { ComboBoxItem } from "../src/types"; - -export const items: ComboBoxItem[] = [ +export const items = [ { id: 1, label: "Aerospace" }, { id: 2, @@ -15,7 +13,7 @@ export const items: ComboBoxItem[] = [ { id: 9, label: "Electrical" }, ]; -export const itemsWithIcons: ComboBoxItem[] = [ +export const itemsWithIcons = [ { id: 1, label: "Aerospace", icon: "galaxy" }, { id: 2, diff --git a/app/client/packages/design-system/widgets/src/components/ContextualHelp/src/ContextualHelp.tsx b/app/client/packages/design-system/widgets/src/components/ContextualHelp/src/ContextualHelp.tsx index bf78d5578b65..b079ad5e3e80 100644 --- a/app/client/packages/design-system/widgets/src/components/ContextualHelp/src/ContextualHelp.tsx +++ b/app/client/packages/design-system/widgets/src/components/ContextualHelp/src/ContextualHelp.tsx @@ -1,11 +1,13 @@ import React from "react"; -import { Tooltip } from "../../Tooltip"; -import { IconButton } from "../../IconButton"; +import { Tooltip, IconButton } from "@appsmith/wds"; + import type { ContextualProps } from "./types"; const _ContextualHelp = (props: ContextualProps) => { const { contextualHelp } = props; + if (!Boolean(contextualHelp)) return null; + return ( { - const { description, isInvalid } = props; - - if (!Boolean(description) || Boolean(isInvalid)) return null; - - return ( - - {description} - - ); -}; diff --git a/app/client/packages/design-system/widgets/src/components/FieldDescription/src/index.ts b/app/client/packages/design-system/widgets/src/components/FieldDescription/src/index.ts deleted file mode 100644 index 2c6b2d3578df..000000000000 --- a/app/client/packages/design-system/widgets/src/components/FieldDescription/src/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from "./FieldDescription"; -export type { FieldDescriptionProps } from "./types"; diff --git a/app/client/packages/design-system/widgets/src/components/FieldDescription/src/styles.module.css b/app/client/packages/design-system/widgets/src/components/FieldDescription/src/styles.module.css deleted file mode 100644 index 66f4818bdacb..000000000000 --- a/app/client/packages/design-system/widgets/src/components/FieldDescription/src/styles.module.css +++ /dev/null @@ -1,4 +0,0 @@ -.description { - margin-block-start: var(--inner-spacing-3); - color: var(--color-fg-neutral); -} diff --git a/app/client/packages/design-system/widgets/src/components/FieldDescription/src/types.ts b/app/client/packages/design-system/widgets/src/components/FieldDescription/src/types.ts deleted file mode 100644 index 733ea6b20b87..000000000000 --- a/app/client/packages/design-system/widgets/src/components/FieldDescription/src/types.ts +++ /dev/null @@ -1,6 +0,0 @@ -export interface FieldDescriptionProps { - /** The content to display as the description. */ - description?: string; - /** Whether the input value is invalid. */ - isInvalid?: boolean; -} diff --git a/app/client/packages/design-system/widgets/src/components/FieldError/src/FieldError.tsx b/app/client/packages/design-system/widgets/src/components/FieldError/src/FieldError.tsx index 6b62b21869e0..66548149eb01 100644 --- a/app/client/packages/design-system/widgets/src/components/FieldError/src/FieldError.tsx +++ b/app/client/packages/design-system/widgets/src/components/FieldError/src/FieldError.tsx @@ -1,18 +1,20 @@ import React from "react"; -import { getTypographyClassName } from "@appsmith/wds-theming"; -import clsx from "clsx"; -import { FieldError as HeadlessFieldError } from "react-aria-components"; +import { Text } from "@appsmith/wds"; +import { FieldError as AriaFieldError } from "react-aria-components"; + import styles from "./styles.module.css"; import type { FieldErrorProps } from "./types"; export const FieldError = (props: FieldErrorProps) => { - const { errorMessage } = props; + const { children } = props; + + if (!Boolean(children)) return null; return ( - - {errorMessage} - + + + {children} + + ); }; diff --git a/app/client/packages/design-system/widgets/src/components/FieldError/src/styles.module.css b/app/client/packages/design-system/widgets/src/components/FieldError/src/styles.module.css index bb2636b64de8..f94e20aaf971 100644 --- a/app/client/packages/design-system/widgets/src/components/FieldError/src/styles.module.css +++ b/app/client/packages/design-system/widgets/src/components/FieldError/src/styles.module.css @@ -1,4 +1,3 @@ .errorText { - margin-block-start: var(--inner-spacing-3); - color: var(--color-fg-negative); + margin-block-start: var(--inner-spacing-2); } diff --git a/app/client/packages/design-system/widgets/src/components/FieldError/src/types.ts b/app/client/packages/design-system/widgets/src/components/FieldError/src/types.ts index 67de97f9072a..8849a7b5b6d1 100644 --- a/app/client/packages/design-system/widgets/src/components/FieldError/src/types.ts +++ b/app/client/packages/design-system/widgets/src/components/FieldError/src/types.ts @@ -2,5 +2,5 @@ import type { ValidationResult } from "react-aria-components"; export interface FieldErrorProps { /** The content to display as the error message. */ - errorMessage?: string | ((validation: ValidationResult) => string); + children?: string | ((validation: ValidationResult) => string); } diff --git a/app/client/packages/design-system/widgets/src/components/FieldLabel/src/FieldLabel.tsx b/app/client/packages/design-system/widgets/src/components/FieldLabel/src/FieldLabel.tsx index 18ce87eee192..85126a123b94 100644 --- a/app/client/packages/design-system/widgets/src/components/FieldLabel/src/FieldLabel.tsx +++ b/app/client/packages/design-system/widgets/src/components/FieldLabel/src/FieldLabel.tsx @@ -1,36 +1,37 @@ import clsx from "clsx"; import React from "react"; -import { Text, ContextualHelp } from "@appsmith/wds"; -import { Label as HeadlessLabel } from "react-aria-components"; +import { ContextualHelp, Text } from "@appsmith/wds"; +import { Label as HeadlessLabel, Group } from "react-aria-components"; + import styles from "./styles.module.css"; import type { LabelProps } from "./types"; -export const FieldLabel = (props: LabelProps) => { - const { className, contextualHelp, isDisabled, isRequired, text, ...rest } = - props; +export function FieldLabel(props: LabelProps) { + const { children, contextualHelp, isDisabled, isRequired, ...rest } = props; - if (!Boolean(text) && !Boolean(contextualHelp)) return null; + if (!Boolean(children) && !Boolean(contextualHelp)) return null; return ( - - - {text} + + + {children} + {Boolean(isRequired) && ( * )} - - {Boolean(contextualHelp) && ( - - )} - + + + ); -}; +} diff --git a/app/client/packages/design-system/widgets/src/components/FieldLabel/src/styles.module.css b/app/client/packages/design-system/widgets/src/components/FieldLabel/src/styles.module.css index a41305e0ab9b..e286abff38ce 100644 --- a/app/client/packages/design-system/widgets/src/components/FieldLabel/src/styles.module.css +++ b/app/client/packages/design-system/widgets/src/components/FieldLabel/src/styles.module.css @@ -1,17 +1,23 @@ -.label { +.labelGroup { display: flex; align-items: center; + gap: var(--inner-spacing-1); height: var(--sizing-3); margin-block-end: var(--inner-spacing-3); - gap: var(--inner-spacing-1); +} + +.labelGroup[data-disabled] { + opacity: var(--opacity-disabled); +} - &[data-disabled="true"] { - cursor: not-allowed; - opacity: var(--opacity-disabled); - } +.label { + display: flex; + align-items: center; + height: fit-content; + max-width: 100%; + gap: var(--inner-spacing-1); } .necessityIndicator { color: var(--color-fg-negative); - margin-inline-start: var(--inner-spacing-1); } diff --git a/app/client/packages/design-system/widgets/src/components/FieldLabel/src/types.ts b/app/client/packages/design-system/widgets/src/components/FieldLabel/src/types.ts index 1d8f083b7367..10f6d021c0bf 100644 --- a/app/client/packages/design-system/widgets/src/components/FieldLabel/src/types.ts +++ b/app/client/packages/design-system/widgets/src/components/FieldLabel/src/types.ts @@ -1,8 +1,7 @@ -import type { LabelProps as HeadlessLabelProps } from "react-aria-components"; +import type { LabelProps as AriaLabelProps } from "react-aria-components"; -export interface LabelProps extends HeadlessLabelProps { - text?: string; - contextualHelp?: string; +export type LabelProps = AriaLabelProps & { + contextualHelp?: React.ReactNode; isRequired?: boolean; isDisabled?: boolean; -} +}; diff --git a/app/client/packages/design-system/widgets/src/components/FieldListPopover/src/FieldListPopover.tsx b/app/client/packages/design-system/widgets/src/components/FieldListPopover/src/FieldListPopover.tsx deleted file mode 100644 index d9d7921a8278..000000000000 --- a/app/client/packages/design-system/widgets/src/components/FieldListPopover/src/FieldListPopover.tsx +++ /dev/null @@ -1,36 +0,0 @@ -import React from "react"; -import clsx from "clsx"; -import { getTypographyClassName } from "@appsmith/wds-theming"; -import { listItemStyles, Popover, Icon } from "@appsmith/wds"; -import { ListBox, ListBoxItem } from "react-aria-components"; -import styles from "./styles.module.css"; -import type { FieldListPopoverProps } from "./types"; - -export const FieldListPopover = (props: FieldListPopoverProps) => { - const { items } = props; - - // place Popover in the root theme provider to get access to the CSS tokens - const root = document.body.querySelector( - "[data-theme-provider]", - ) as HTMLButtonElement; - - return ( - - - {(item) => ( - - {item.icon && } - {item.label} - - )} - - - ); -}; diff --git a/app/client/packages/design-system/widgets/src/components/FieldListPopover/src/index.ts b/app/client/packages/design-system/widgets/src/components/FieldListPopover/src/index.ts deleted file mode 100644 index be087d853eb9..000000000000 --- a/app/client/packages/design-system/widgets/src/components/FieldListPopover/src/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from "./FieldListPopover"; -export type { FieldListPopoverProps, FieldListPopoverItem } from "./types"; diff --git a/app/client/packages/design-system/widgets/src/components/FieldListPopover/src/styles.module.css b/app/client/packages/design-system/widgets/src/components/FieldListPopover/src/styles.module.css deleted file mode 100644 index 5d7dc5e49ab0..000000000000 --- a/app/client/packages/design-system/widgets/src/components/FieldListPopover/src/styles.module.css +++ /dev/null @@ -1,12 +0,0 @@ -.listBox { - min-inline-size: var(--trigger-width); - max-height: inherit; - overflow-y: auto; -} - -/** If at least one select item has an icon, we need to add extra padding for items that doesn't have an icon. */ -.listBox:has([data-icon]) [role="option"]:not(:has([data-icon])) { - padding-inline-start: calc( - var(--icon-size-4) + var(--inner-spacing-3) + var(--inner-spacing-2) - ); -} diff --git a/app/client/packages/design-system/widgets/src/components/FieldListPopover/src/types.ts b/app/client/packages/design-system/widgets/src/components/FieldListPopover/src/types.ts deleted file mode 100644 index 3c98ccf204a5..000000000000 --- a/app/client/packages/design-system/widgets/src/components/FieldListPopover/src/types.ts +++ /dev/null @@ -1,13 +0,0 @@ -import type { Key } from "@react-types/shared"; -import type { IconProps } from "@appsmith/wds"; - -export interface FieldListPopoverProps { - /** Item objects in the collection. */ - items: FieldListPopoverItem[]; -} - -export interface FieldListPopoverItem { - id: Key; - label: string; - icon?: IconProps["name"]; -} diff --git a/app/client/packages/design-system/headless/src/components/TextArea/index.ts b/app/client/packages/design-system/widgets/src/components/Input/index.ts similarity index 100% rename from app/client/packages/design-system/headless/src/components/TextArea/index.ts rename to app/client/packages/design-system/widgets/src/components/Input/index.ts diff --git a/app/client/packages/design-system/widgets/src/components/Input/src/Input.tsx b/app/client/packages/design-system/widgets/src/components/Input/src/Input.tsx new file mode 100644 index 000000000000..3472e2b53ac7 --- /dev/null +++ b/app/client/packages/design-system/widgets/src/components/Input/src/Input.tsx @@ -0,0 +1,65 @@ +import clsx from "clsx"; +import React, { forwardRef, useState } from "react"; +import { getTypographyClassName } from "@appsmith/wds-theming"; +import { IconButton, Spinner, type IconProps } from "@appsmith/wds"; +import { Group, Input as HeadlessInput } from "react-aria-components"; + +import styles from "./styles.module.css"; +import type { InputProps } from "./types"; + +function _Input(props: InputProps, ref: React.Ref) { + const { + defaultValue, + isLoading, + isReadOnly, + prefix, + size, + suffix: suffixProp, + type, + value, + ...rest + } = props; + const [showPassword, setShowPassword] = useState(false); + const togglePasswordVisibility = () => setShowPassword((prev) => !prev); + const isEmpty = !Boolean(value) && !Boolean(defaultValue); + + const suffix = (() => { + if (Boolean(isLoading)) return ; + + if (type === "password") { + const icon: IconProps["name"] = showPassword ? "eye-off" : "eye"; + + return ( + + ); + } + + return suffixProp; + })(); + + return ( + + + {Boolean(prefix) && {prefix}} + {Boolean(suffix) && {suffix}} + + ); +} + +export const Input = forwardRef(_Input); diff --git a/app/client/packages/design-system/widgets/src/components/Input/src/TextAreaInput.tsx b/app/client/packages/design-system/widgets/src/components/Input/src/TextAreaInput.tsx new file mode 100644 index 000000000000..13dab8294f58 --- /dev/null +++ b/app/client/packages/design-system/widgets/src/components/Input/src/TextAreaInput.tsx @@ -0,0 +1,51 @@ +import clsx from "clsx"; +import { Spinner } from "@appsmith/wds"; +import React, { forwardRef } from "react"; +import { getTypographyClassName } from "@appsmith/wds-theming"; +import { Group, TextArea as HeadlessTextArea } from "react-aria-components"; + +import styles from "./styles.module.css"; +import type { TextAreaInputProps } from "./types"; + +function _TextAreaInput( + props: TextAreaInputProps, + ref: React.Ref, +) { + const { + defaultValue, + isLoading, + isReadOnly, + prefix, + rows, + size, + suffix: suffixProp, + value, + ...rest + } = props; + const isEmpty = !Boolean(value) && !Boolean(defaultValue); + + const suffix = (() => { + if (Boolean(isLoading)) return ; + + return suffixProp; + })(); + + return ( + + + {Boolean(prefix) && {prefix}} + {Boolean(suffix) && {suffix}} + + ); +} + +export const TextAreaInput = forwardRef(_TextAreaInput); diff --git a/app/client/packages/design-system/widgets/src/components/Input/src/index.ts b/app/client/packages/design-system/widgets/src/components/Input/src/index.ts new file mode 100644 index 000000000000..c86287750969 --- /dev/null +++ b/app/client/packages/design-system/widgets/src/components/Input/src/index.ts @@ -0,0 +1,3 @@ +export * from "./Input"; +export * from "./TextAreaInput"; +export { default as textInputStyles } from "./styles.module.css"; diff --git a/app/client/packages/design-system/widgets/src/components/Input/src/styles.module.css b/app/client/packages/design-system/widgets/src/components/Input/src/styles.module.css new file mode 100644 index 000000000000..95c1532aedfb --- /dev/null +++ b/app/client/packages/design-system/widgets/src/components/Input/src/styles.module.css @@ -0,0 +1,242 @@ +.inputGroup { + position: relative; + display: flex; + align-items: center; + gap: var(--inner-spacing-1); + width: 100%; +} + +.input { + position: relative; + display: flex; + flex: 1; + align-items: center; + box-sizing: content-box; + max-inline-size: 100%; + padding-block: var(--inner-spacing-1); + padding-inline: var(--inner-spacing-2); + gap: var(--inner-spacing-1); + border: 0; + border-radius: var(--border-radius-elevation-3); + background-color: var(--color-bg-neutral-subtle); + box-shadow: inset 0 0 0 1px var(--color-bd-on-neutral-subtle); + isolation: isolate; +} + +.input:has(> [data-select-text]) { + block-size: var(--body-line-height); +} + +.input:is(textarea) { + block-size: auto; + min-block-size: var(--sizing-16); + align-items: flex-start; + resize: none; + font-family: inherit; +} + +.input:is(textarea)[rows="1"] { + min-block-size: initial; +} + +.input:autofill, +.input:autofill:hover, +.input:autofill:focus, +.input:autofill:active { + font-size: initial; + -webkit-text-fill-color: var(--color-fg); + -webkit-box-shadow: 0 0 0 40rem var(--color-bg-neutral-subtle) inset; +} + +/** + * ---------------------------------------------------------------------------- + * SUFFIX and PREFIX + * ---------------------------------------------------------------------------- + */ +.inputGroup :is([data-input-suffix], [data-input-prefix]) button { + border-radius: calc( + var(--border-radius-elevation-3) - var(--inner-spacing-1) + ); +} + +.inputGroup:has(> [data-input-prefix]) .input { + padding-left: var(--sizing-8); +} + +.inputGroup:has(> [data-input-prefix]) .input[data-size="large"] { + padding-left: var(--sizing-12); +} + +.inputGroup:has(> [data-input-prefix]) .input[data-size="small"] { + padding-left: var(--sizing-6); +} + +.inputGroup:has(> [data-input-prefix]) [data-input-prefix] { + left: var(--inner-spacing-1); + position: absolute; +} + +.inputGroup:has(> [data-input-suffix]) .input { + padding-right: var(--sizing-8); +} + +.inputGroup:has(> [data-input-suffix]) .input[data-size="large"] { + padding-right: var(--sizing-12); +} + +.inputGroup:has(> [data-input-suffix]) .input[data-size="small"] { + padding-right: var(--sizing-6); +} + +.inputGroup:has(> [data-input-suffix]) [data-input-suffix] { + right: var(--inner-spacing-1); + position: absolute; +} + +/* Note: the following calculations are done so that icon button in chat input is centered vertically */ +.inputGroup:has(.input[rows="1"]) [data-input-suffix] { + --icon-size: calc( + var(--body-line-height) + var(--body-margin-start) + var(--body-margin-end) + + var(--inner-spacing-3) * 2 + ); + --icon-offset: calc((var(--input-height) - var(--icon-size)) / 2); + + bottom: round(up, var(--icon-offset), 0.5px); + right: var(--icon-offset); +} + +.inputGroup:has(.input[rows="1"]) [data-input-prefix] { + --icon-size: calc( + var(--body-line-height) + var(--body-margin-start) + var(--body-margin-end) + + var(--inner-spacing-3) * 2 + ); + --icon-offset: calc((var(--input-height) - var(--icon-size)) / 2); + + bottom: var(--icon-offset); + left: var(--icon-offset); +} + +.inputGroup :is([data-input-suffix], [data-input-prefix]) { + display: flex; + justify-content: center; + align-items: center; +} + +/** + * ---------------------------------------------------------------------------- + * HOVERED + * ---------------------------------------------------------------------------- + */ +.inputGroup[data-hovered] + .input:not(:is([data-focused], [data-readonly], [data-disabled])) { + background-color: var(--color-bg-neutral-subtle-hover); + box-shadow: inset 0 0 0 1px var(--color-bd-on-neutral-subtle-hover); +} + +/** + * ---------------------------------------------------------------------------- + * READONLY + * ---------------------------------------------------------------------------- + */ +.input[data-readonly] { + background-color: transparent; + box-shadow: none; + padding-inline: 0; +} + +/** Reason for doing this is because for readonly inputs, we want focus state to be wider than the component width */ +.inputGroup:has(> .input[data-readonly][data-focus-visible])::before { + content: ""; + left: calc(-0.5 * var(--inner-spacing-1)); + width: calc(100% + var(--inner-spacing-1)); + height: 100%; + position: absolute; + box-shadow: 0 0 0 2px var(--color-bd-focus); + border-radius: var(--border-radius-elevation-3); +} + +/** + * ---------------------------------------------------------------------------- + * PLACEHOLDER + * ---------------------------------------------------------------------------- + */ +.input::placeholder { + color: var(--color-fg-neutral-subtle) !important; + opacity: 1; +} + +.input:placeholder-shown { + text-overflow: ellipsis; +} + +/** + * ---------------------------------------------------------------------------- + * DISABLED + * ---------------------------------------------------------------------------- + */ +.input[data-disabled], +.input[data-disabled] :is(input, textarea), +.input[data-disabled] label { + cursor: not-allowed; + box-shadow: none; +} + +/** + * ---------------------------------------------------------------------------- + * INVALID + * ---------------------------------------------------------------------------- + */ +.input[data-invalid] { + box-shadow: 0 0 0 1px var(--color-bd-negative); +} + +.inputGroup[data-hovered] + .input[data-invalid]:not( + :is([data-focused], [data-readonly], [data-disabled]) + ) { + box-shadow: 0 0 0 1px var(--color-bd-negative-hover); +} + +/** + * ---------------------------------------------------------------------------- + * FOCUSSED + * ---------------------------------------------------------------------------- + */ +.input[data-focused]:not([data-readonly]) { + background-color: transparent; + box-shadow: 0 0 0 2px var(--color-bd-focus); +} + +/** + * ---------------------------------------------------------------------------- + * SIZE + * ---------------------------------------------------------------------------- + */ +.input[data-size="small"] { + block-size: calc( + var(--body-line-height) + var(--body-margin-start) + var(--body-margin-end) + ); + padding-block: var(--inner-spacing-2); +} + +.input[data-size="large"] { + block-size: calc( + var(--body-line-height) + var(--body-margin-start) + var(--body-margin-end) + ); + padding-block: var(--inner-spacing-3); + padding-inline: var(--inner-spacing-3); +} + +/** + * ---------------------------------------------------------------------------- + * SELECT BUTTON's TEXT + * ---------------------------------------------------------------------------- + */ +.input [data-select-text] { + display: flex; + align-items: center; +} + +.input [data-select-text] [data-icon] { + margin-inline-end: var(--inner-spacing-1); +} diff --git a/app/client/packages/design-system/widgets/src/components/Input/src/types.ts b/app/client/packages/design-system/widgets/src/components/Input/src/types.ts new file mode 100644 index 000000000000..97ce876f1e6b --- /dev/null +++ b/app/client/packages/design-system/widgets/src/components/Input/src/types.ts @@ -0,0 +1,24 @@ +import type { SIZES } from "@appsmith/wds"; +import type { + InputProps as HeadlessInputProps, + TextAreaProps as HeadlessTextAreaProps, +} from "react-aria-components"; + +// Common properties for both Input and TextArea +interface CommonInputProps { + prefix?: React.ReactNode; + suffix?: React.ReactNode; + isLoading?: boolean; + isReadOnly?: boolean; + size?: Omit; +} + +export interface InputProps + extends Omit, + CommonInputProps {} + +export interface TextAreaInputProps + extends Omit, + CommonInputProps { + rows?: number; +} diff --git a/app/client/packages/design-system/widgets/src/components/Link/src/index.ts b/app/client/packages/design-system/widgets/src/components/Link/src/index.ts index 3b40a46d8b6b..f5a666c42dc2 100644 --- a/app/client/packages/design-system/widgets/src/components/Link/src/index.ts +++ b/app/client/packages/design-system/widgets/src/components/Link/src/index.ts @@ -1 +1,2 @@ export * from "./Link"; +export { default as linkStyles } from "./styles.module.css"; diff --git a/app/client/packages/design-system/widgets/src/components/Link/src/types.ts b/app/client/packages/design-system/widgets/src/components/Link/src/types.ts index cc335817b932..ba3d2fe5c1da 100644 --- a/app/client/packages/design-system/widgets/src/components/Link/src/types.ts +++ b/app/client/packages/design-system/widgets/src/components/Link/src/types.ts @@ -4,4 +4,15 @@ import type { TextProps } from "../../Text"; export interface LinkProps extends Omit, - Omit {} + Omit< + AriaLinkProps, + | "style" + | "className" + | "children" + | "isDisabled" + | "onBlur" + | "onFocus" + | "onKeyDown" + | "onKeyUp" + | "slot" + > {} diff --git a/app/client/packages/design-system/widgets/src/components/Link/stories/Link.stories.tsx b/app/client/packages/design-system/widgets/src/components/Link/stories/Link.stories.tsx index 11c72b849080..48a4be562673 100644 --- a/app/client/packages/design-system/widgets/src/components/Link/stories/Link.stories.tsx +++ b/app/client/packages/design-system/widgets/src/components/Link/stories/Link.stories.tsx @@ -21,7 +21,7 @@ export const Main: Story = { args: { target: "_blank", href: "https://appsmith.com", - children: "This is a link.", + children: "Appsmith.", }, }; diff --git a/app/client/packages/design-system/headless/src/components/TextInput/index.ts b/app/client/packages/design-system/widgets/src/components/ListBox/index.ts similarity index 100% rename from app/client/packages/design-system/headless/src/components/TextInput/index.ts rename to app/client/packages/design-system/widgets/src/components/ListBox/index.ts diff --git a/app/client/packages/design-system/widgets/src/components/ListBox/src/ListBox.tsx b/app/client/packages/design-system/widgets/src/components/ListBox/src/ListBox.tsx new file mode 100644 index 000000000000..75876ebaa68f --- /dev/null +++ b/app/client/packages/design-system/widgets/src/components/ListBox/src/ListBox.tsx @@ -0,0 +1,15 @@ +import React from "react"; +import styles from "./styles.module.css"; +import { ListBox as HeadlessListBox } from "react-aria-components"; + +import type { ListBoxProps } from "./types"; + +export function ListBox(props: ListBoxProps) { + const { children, ...rest } = props; + + return ( + + {children} + + ); +} diff --git a/app/client/packages/design-system/widgets/src/components/ListBox/src/index.ts b/app/client/packages/design-system/widgets/src/components/ListBox/src/index.ts new file mode 100644 index 000000000000..ae601b28db28 --- /dev/null +++ b/app/client/packages/design-system/widgets/src/components/ListBox/src/index.ts @@ -0,0 +1,2 @@ +export { ListBox } from "./ListBox"; +export { default as listStyles } from "./styles.module.css"; diff --git a/app/client/packages/design-system/widgets/src/components/ListBox/src/styles.module.css b/app/client/packages/design-system/widgets/src/components/ListBox/src/styles.module.css new file mode 100644 index 000000000000..b253d06f7e04 --- /dev/null +++ b/app/client/packages/design-system/widgets/src/components/ListBox/src/styles.module.css @@ -0,0 +1,5 @@ +.listBox { + min-inline-size: var(--trigger-width); + max-height: inherit; + overflow-y: auto; +} diff --git a/app/client/packages/design-system/widgets/src/components/ListBox/src/types.ts b/app/client/packages/design-system/widgets/src/components/ListBox/src/types.ts new file mode 100644 index 000000000000..ec7229b2aed9 --- /dev/null +++ b/app/client/packages/design-system/widgets/src/components/ListBox/src/types.ts @@ -0,0 +1,3 @@ +import type { ListBoxProps as AriaListBoxProps } from "react-aria-components"; + +export interface ListBoxProps extends AriaListBoxProps {} diff --git a/app/client/packages/design-system/headless/src/components/TextInputBase/index.ts b/app/client/packages/design-system/widgets/src/components/ListBoxItem/index.ts similarity index 100% rename from app/client/packages/design-system/headless/src/components/TextInputBase/index.ts rename to app/client/packages/design-system/widgets/src/components/ListBoxItem/index.ts diff --git a/app/client/packages/design-system/widgets/src/components/ListBoxItem/src/ListBoxItem.tsx b/app/client/packages/design-system/widgets/src/components/ListBoxItem/src/ListBoxItem.tsx new file mode 100644 index 000000000000..353f2444a92e --- /dev/null +++ b/app/client/packages/design-system/widgets/src/components/ListBoxItem/src/ListBoxItem.tsx @@ -0,0 +1,17 @@ +import React from "react"; +import { Icon, Text } from "@appsmith/wds"; +import { ListBoxItem as HeadlessListBoxItem } from "react-aria-components"; + +import styles from "./styles.module.css"; +import type { ListBoxItemProps } from "./types"; + +export function ListBoxItem(props: ListBoxItemProps) { + const { children, icon, ...rest } = props; + + return ( + + {icon && } + {children} + + ); +} diff --git a/app/client/packages/design-system/widgets/src/components/ListBoxItem/src/index.ts b/app/client/packages/design-system/widgets/src/components/ListBoxItem/src/index.ts new file mode 100644 index 000000000000..9554394e8f40 --- /dev/null +++ b/app/client/packages/design-system/widgets/src/components/ListBoxItem/src/index.ts @@ -0,0 +1,2 @@ +export { ListBoxItem } from "./ListBoxItem"; +export { default as listBoxItemStyles } from "./styles.module.css"; diff --git a/app/client/packages/design-system/widgets/src/components/ListBoxItem/src/styles.module.css b/app/client/packages/design-system/widgets/src/components/ListBoxItem/src/styles.module.css new file mode 100644 index 000000000000..f527b5ddff75 --- /dev/null +++ b/app/client/packages/design-system/widgets/src/components/ListBoxItem/src/styles.module.css @@ -0,0 +1,83 @@ +@import "../../../shared/colors/colors.module.css"; + +.listBoxItem { + display: flex; + align-items: center; + padding-inline: var(--inner-spacing-3); + block-size: var(--sizing-11); +} + +.listBoxItem:first-of-type { + border-top-left-radius: var(--border-radius-elevation-3); + border-top-right-radius: var(--border-radius-elevation-3); +} + +.listBoxItem:last-of-type { + border-bottom-left-radius: var(--border-radius-elevation-3); + border-bottom-right-radius: var(--border-radius-elevation-3); +} + +/** +* ---------------------------------------------------------------------------- +* ICON STYLES +*----------------------------------------------------------------------------- +*/ +.listBoxItem [data-icon] { + margin-inline-end: var(--inner-spacing-2); +} + +.listBoxItem [data-submenu-icon] { + margin-inline-end: 0; + margin-inline-start: auto; +} + +/** +* ---------------------------------------------------------------------------- +* HOVER AND ACTIVE STATES +*----------------------------------------------------------------------------- +*/ +.listBoxItem:not([data-disabled]) { + cursor: pointer; +} + +.listBoxItem[data-hovered] { + background-color: var(--color-bg-accent-subtle-hover); +} + +.listBoxItem[data-selected] { + background-color: var(--color-bg-accent-subtle-active); +} + +/** +* ---------------------------------------------------------------------------- +* DISABLED STATE +*----------------------------------------------------------------------------- +*/ +.listBoxItem[data-disabled] { + opacity: var(--opacity-disabled); + cursor: not-allowed; +} + +/** +* ---------------------------------------------------------------------------- +* FOCUS VISIBLE +*----------------------------------------------------------------------------- +*/ +.listBoxItem[data-focus-visible] { + box-shadow: inset 0 0 0 2px var(--color-bd-focus); +} + +/** +* ---------------------------------------------------------------------------- +* SEPARATOR +*----------------------------------------------------------------------------- +*/ +.separator { + border-top: var(--border-width-1) solid var(--color-bd); + padding: 0; +} + +/* making sure the first and last child are not displayed when they have the data-separator attribute */ +.separator:is(:first-child, :last-child) { + display: none; +} diff --git a/app/client/packages/design-system/widgets/src/components/ListBoxItem/src/types.ts b/app/client/packages/design-system/widgets/src/components/ListBoxItem/src/types.ts new file mode 100644 index 000000000000..613c3a88bbfb --- /dev/null +++ b/app/client/packages/design-system/widgets/src/components/ListBoxItem/src/types.ts @@ -0,0 +1,6 @@ +import type { ListBoxItemProps as AriaListBoxItemProps } from "react-aria-components"; +import type { IconProps } from "@appsmith/wds"; + +export interface ListBoxItemProps extends AriaListBoxItemProps { + icon?: IconProps["name"]; +} diff --git a/app/client/packages/design-system/widgets/src/components/FieldDescription/index.ts b/app/client/packages/design-system/widgets/src/components/Markdown/index.ts similarity index 100% rename from app/client/packages/design-system/widgets/src/components/FieldDescription/index.ts rename to app/client/packages/design-system/widgets/src/components/Markdown/index.ts diff --git a/app/client/packages/design-system/widgets/src/components/Markdown/src/Markdown.tsx b/app/client/packages/design-system/widgets/src/components/Markdown/src/Markdown.tsx new file mode 100644 index 000000000000..fa9b7710c188 --- /dev/null +++ b/app/client/packages/design-system/widgets/src/components/Markdown/src/Markdown.tsx @@ -0,0 +1,32 @@ +import React from "react"; +import { clsx } from "clsx"; +import remarkGfm from "remark-gfm"; +import ReactMarkdown from "react-markdown"; +import { getTypographyClassName } from "@appsmith/wds-theming"; + +import styles from "./styles.module.css"; +import { components } from "./components"; +import type { MarkdownProps } from "./types"; + +export const Markdown = (props: MarkdownProps) => { + const { children, className, options, ...rest } = props; + + return ( +
+ + {children} + +
+ ); +}; diff --git a/app/client/packages/design-system/widgets/src/components/Markdown/src/components.tsx b/app/client/packages/design-system/widgets/src/components/Markdown/src/components.tsx new file mode 100644 index 000000000000..e74321e4aa94 --- /dev/null +++ b/app/client/packages/design-system/widgets/src/components/Markdown/src/components.tsx @@ -0,0 +1,16 @@ +import type { Components } from "react-markdown"; + +import { a } from "./mdComponents/Link"; +import { code } from "./mdComponents/Code"; +import { h1, h2, h3, h4, h5, h6 } from "./mdComponents/Heading"; + +export const components: Components = { + a, + h1, + h2, + h3, + h4, + h5, + h6, + code, +}; diff --git a/app/client/packages/design-system/widgets/src/components/Markdown/src/index.ts b/app/client/packages/design-system/widgets/src/components/Markdown/src/index.ts new file mode 100644 index 000000000000..e58086caabf3 --- /dev/null +++ b/app/client/packages/design-system/widgets/src/components/Markdown/src/index.ts @@ -0,0 +1,2 @@ +export * from "./types"; +export * from "./Markdown"; diff --git a/app/client/packages/design-system/widgets/src/components/Markdown/src/mdComponents/Code.tsx b/app/client/packages/design-system/widgets/src/components/Markdown/src/mdComponents/Code.tsx new file mode 100644 index 000000000000..e4f4fb3c3775 --- /dev/null +++ b/app/client/packages/design-system/widgets/src/components/Markdown/src/mdComponents/Code.tsx @@ -0,0 +1,57 @@ +import type { ExtraProps } from "react-markdown"; +import { Button, Flex, Text } from "@appsmith/wds"; +import React, { useState, useCallback } from "react"; +import { useThemeContext } from "@appsmith/wds-theming"; +import { + atomOneDark as darkTheme, + atomOneLight as lightTheme, +} from "react-syntax-highlighter/dist/cjs/styles/hljs"; +import SyntaxHighlighter from "react-syntax-highlighter"; + +type CodeProps = React.ClassAttributes & + React.HTMLAttributes & + ExtraProps; + +export const Code = (props: CodeProps) => { + const { children, className } = props; + const match = /language-(\w+)/.exec(className ?? ""); + const theme = useThemeContext(); + const [copied, setCopied] = useState(false); + + const handleCopy = useCallback(() => { + navigator.clipboard.writeText(String(children)).then(() => { + setCopied(true); + setTimeout(() => setCopied(false), 2000); + }); + }, [children]); + + return match ? ( +
+ + {match[1]} + + + + {String(children).replace(/\n$/, "")} + +
+ ) : ( + {children} + ); +}; + +export { Code as code }; diff --git a/app/client/packages/design-system/widgets/src/components/Markdown/src/mdComponents/Heading.tsx b/app/client/packages/design-system/widgets/src/components/Markdown/src/mdComponents/Heading.tsx new file mode 100644 index 000000000000..55ff67d953cc --- /dev/null +++ b/app/client/packages/design-system/widgets/src/components/Markdown/src/mdComponents/Heading.tsx @@ -0,0 +1,38 @@ +import React from "react"; +import type { Ref } from "react"; +import type { ExtraProps } from "react-markdown"; +import { Text, type TextProps } from "@appsmith/wds"; + +type HeadingProps = React.ClassAttributes & + React.HTMLAttributes & + ExtraProps; + +const createHeading = ( + size: TextProps["size"], + level: 1 | 2 | 3 | 4 | 5 | 6, + fontWeight: TextProps["fontWeight"] = 700, +) => { + const HeadingComponent = ({ children, ref }: HeadingProps) => ( + } + size={size} + wordBreak="break-word" + > + {children} + + ); + + HeadingComponent.displayName = `Heading${level}`; + + return HeadingComponent; +}; + +export const h1 = createHeading("heading", 1); +export const h2 = createHeading("title", 2); +export const h3 = createHeading("subtitle", 3); +export const h4 = createHeading("body", 4); +export const h5 = createHeading("body", 5, 500); +export const h6 = createHeading("body", 6, 300); diff --git a/app/client/packages/design-system/widgets/src/components/Markdown/src/mdComponents/Link.tsx b/app/client/packages/design-system/widgets/src/components/Markdown/src/mdComponents/Link.tsx new file mode 100644 index 000000000000..b90e52e11014 --- /dev/null +++ b/app/client/packages/design-system/widgets/src/components/Markdown/src/mdComponents/Link.tsx @@ -0,0 +1,23 @@ +import React from "react"; +import { Link } from "@appsmith/wds"; +import type { ExtraProps } from "react-markdown"; + +type LinkProps = React.ClassAttributes & + React.AnchorHTMLAttributes & + ExtraProps; + +export const a = (props: LinkProps) => { + const { children, href } = props; + + return ( + + {children} + + ); +}; diff --git a/app/client/packages/design-system/widgets/src/components/Markdown/src/styles.module.css b/app/client/packages/design-system/widgets/src/components/Markdown/src/styles.module.css new file mode 100644 index 000000000000..6d83b09410cd --- /dev/null +++ b/app/client/packages/design-system/widgets/src/components/Markdown/src/styles.module.css @@ -0,0 +1,119 @@ +.markdown { + color: var(--color-fg); + + table { + border: var(--border-width-1) solid var(--color-bd); + border-collapse: separate; + border-radius: var(--border-radius-elevation-3); + border-spacing: 0px; + overflow: hidden; + } + + tr { + display: table-row; + vertical-align: inherit; + border-color: inherit; + } + + th, + td { + padding: var(--inner-spacing-1) var(--inner-spacing-2); + text-align: left; + vertical-align: top; + border-bottom: var(--border-width-1) solid var(--color-bd); + border-right: var(--border-width-1) solid var(--color-bd); + } + + :is(td, th):last-child { + border-right: none; + } + + th { + background-color: var(--color-bg-neutral-subtle); + } + + thead:last-child tr:last-child th, + tbody:last-child tr:last-child td { + border-bottom: none; + } + + /* Headings */ + [data-component="h1"] { + margin-top: var(--inner-spacing-7); + margin-bottom: var(--inner-spacing-4); + } + + [data-component="h2"] { + margin-top: var(--inner-spacing-6); + margin-bottom: var(--inner-spacing-3); + } + + [data-component="h3"] { + margin-top: var(--inner-spacing-5); + margin-bottom: var(--inner-spacing-3); + } + + [data-component="h4"] { + margin-top: var(--inner-spacing-4); + margin-bottom: var(--inner-spacing-2); + } + + [data-component="h5"] { + margin-top: var(--inner-spacing-3); + margin-bottom: var(--inner-spacing-2); + } + + [data-component="h6"] { + margin-top: var(--inner-spacing-2); + margin-bottom: var(--inner-spacing-1); + } + + /* Lists */ + :is(ul, ol) { + margin-top: var(--inner-spacing-2); + margin-bottom: var(--inner-spacing-3); + padding-left: 0; + list-style: initial; + } + + li { + margin-bottom: var(--inner-spacing-2); + margin-left: 1em; + position: relative; + list-style-type: auto; + } + + a { + display: inline-block; + } + + [data-component="code"] { + background-color: var(--color-bg-elevation-2); + border-radius: var(--border-radius-elevation-3); + outline: var(--border-width-1) solid var(--color-bg-neutral-subtle); + margin-bottom: var(--inner-spacing-2); + overflow: auto; + } + + code:not([class*="language-"]) { + padding-inline: var(--inner-spacing-1); + background: var(--color-bg-neutral-subtle); + color: var(--color-fg-negative); + border-radius: var(--border-radius-elevation-3); + word-break: break-word; + white-space: normal; + outline: var(--border-width-1) solid var(--color-bg-neutral-soft); + } + + pre { + margin-top: var(--inner-spacing-4); + margin-bottom: var(--inner-spacing-4); + } + + blockquote { + padding-left: var(--inner-spacing-3); + padding-right: var(--inner-spacing-3); + margin-left: 0; + border-left: var(--border-width-2) solid var(--color-bd-neutral); + } +} diff --git a/app/client/packages/design-system/widgets/src/components/Markdown/src/types.ts b/app/client/packages/design-system/widgets/src/components/Markdown/src/types.ts new file mode 100644 index 000000000000..ae16bf203b76 --- /dev/null +++ b/app/client/packages/design-system/widgets/src/components/Markdown/src/types.ts @@ -0,0 +1,10 @@ +import type { Options } from "react-markdown"; + +export interface MarkdownProps { + /** The markdown content to render */ + children: string; + /** Options for react-markdown */ + options?: Options; + /** Additional CSS classes to apply to the component */ + className?: string; +} diff --git a/app/client/packages/design-system/widgets/src/components/Markdown/stories/Markdown.stories.ts b/app/client/packages/design-system/widgets/src/components/Markdown/stories/Markdown.stories.ts new file mode 100644 index 000000000000..4f00c9834fb4 --- /dev/null +++ b/app/client/packages/design-system/widgets/src/components/Markdown/stories/Markdown.stories.ts @@ -0,0 +1,62 @@ +import { Markdown } from "@appsmith/wds"; +import type { Meta, StoryObj } from "@storybook/react"; + +const meta: Meta = { + title: "WDS/Widgets/Markdown", + component: Markdown, +}; + +export default meta; +type Story = StoryObj; + +export const Default: Story = { + args: { + children: `# Hello, Markdown! + +This is a \`paragraph\` with **bold** and *italic* text. + +## Code Example + +\`\`\`javascript +const greeting = "Hello, World!"; +console.log(greeting); +\`\`\` + +- List item 1 +- List item 2 +- List item 3 + - List item 3.1 + - List item 3.2 + - List item 3.3 + - List item 3.3.1 + - List item 3.3.2 + +1. List item 1 +2. List item 2 +3. List item 3 + +[Visit Appsmith](https://www.appsmith.com) + +# Heading 1 +## Heading 2 +### Heading 3 +#### Heading 4 +##### Heading 5 +###### Heading 6 + +## Table Example + +| Column 1 | Column 2 | Column 3 | +|----------|----------|----------| +| Row 1, Cell 1 | Row 1, Cell 2 | Row 1, Cell 3 | +| Row 2, Cell 1 | Row 2, Cell 2 | Row 2, Cell 3 | +| Row 3, Cell 1 | Row 3, Cell 2 | Row 3, Cell 3 | + +## Blockquote Example + +> This is a blockquote. +> +> It can span multiple lines. +`, + }, +}; diff --git a/app/client/packages/design-system/widgets/src/components/Menu/src/Menu.tsx b/app/client/packages/design-system/widgets/src/components/Menu/src/Menu.tsx index 830d838d02b5..223ed03d7c17 100644 --- a/app/client/packages/design-system/widgets/src/components/Menu/src/Menu.tsx +++ b/app/client/packages/design-system/widgets/src/components/Menu/src/Menu.tsx @@ -1,71 +1,28 @@ -import React from "react"; -import { Icon, listItemStyles, Popover, Text } from "@appsmith/wds"; -import { - Menu as HeadlessMenu, - MenuItem, - Separator, - SubmenuTrigger, -} from "react-aria-components"; -import styles from "./styles.module.css"; -import type { MenuProps, MenuItemProps } from "./types"; -import type { Key } from "@react-types/shared"; +import React, { createContext, useContext } from "react"; +import { listStyles, Popover } from "@appsmith/wds"; +import { Menu as HeadlessMenu } from "react-aria-components"; + +import type { MenuProps } from "./types"; + +const MenuNestingContext = createContext(0); export const Menu = (props: MenuProps) => { - const { hasSubmenu = false } = props; - // place Popover in the root theme provider to get access to the CSS tokens + const { children } = props; const root = document.body.querySelector( "[data-theme-provider]", ) as HTMLButtonElement; - return ( - // We should put only parent Popover in the root, if we put the child ones, then Menu will work incorrectly - - - {(item) => renderFunc(item, props)} - - - ); -}; - -const renderFunc = (item: MenuItemProps, props: MenuProps) => { - const { childItems, icon, id, isDisabled, isSeparator = false, label } = item; - - const isItemDisabled = () => - Boolean((props.disabledKeys as Key[])?.includes(id)) || isDisabled; - - if (childItems != null) - return ( - - - {icon && } - - {label} - - - - - {(item) => renderFunc(item, props)} - - - ); - - if (isSeparator) - return ; + const nestingLevel = useContext(MenuNestingContext); + const isRootMenu = nestingLevel === 0; return ( - - {icon && } - - {label} - - + + {/* Only the parent Popover should be placed in the root. Placing child popoves in root would cause the menu to function incorrectly */} + + + {children} + + + ); }; diff --git a/app/client/packages/design-system/widgets/src/components/Menu/src/index.ts b/app/client/packages/design-system/widgets/src/components/Menu/src/index.ts index 6fd1d55a3c6e..8c312410b43e 100644 --- a/app/client/packages/design-system/widgets/src/components/Menu/src/index.ts +++ b/app/client/packages/design-system/widgets/src/components/Menu/src/index.ts @@ -1,3 +1,3 @@ export * from "./Menu"; -export { MenuTrigger } from "react-aria-components"; export * from "./types"; +export { MenuTrigger, SubmenuTrigger } from "react-aria-components"; diff --git a/app/client/packages/design-system/widgets/src/components/Menu/src/types.ts b/app/client/packages/design-system/widgets/src/components/Menu/src/types.ts index 057600671d37..4c7b10e72f2d 100644 --- a/app/client/packages/design-system/widgets/src/components/Menu/src/types.ts +++ b/app/client/packages/design-system/widgets/src/components/Menu/src/types.ts @@ -1,31 +1,7 @@ -import type { - MenuProps as HeadlessMenuProps, - MenuItemProps as HeadlessMenuItemProps, -} from "react-aria-components"; -import type { Key } from "@react-types/shared"; -import type { IconProps } from "../../Icon"; +import type { MenuProps as AriaMenuProps } from "react-aria-components"; export interface MenuProps extends Omit< - HeadlessMenuProps, + AriaMenuProps, "slot" | "selectionMode" | "selectedKeys" - > { - /** - * Whether the item has a submenu. - */ - hasSubmenu?: boolean; -} - -export interface MenuItem { - id: Key; - label?: string; - icon?: IconProps["name"]; - isDisabled?: boolean; - isSeparator?: boolean; - childItems?: Iterable; - hasSubmenu?: boolean; -} - -export interface MenuItemProps - extends Omit, - MenuItem {} + > {} diff --git a/app/client/packages/design-system/widgets/src/components/Menu/stories/Menu.stories.tsx b/app/client/packages/design-system/widgets/src/components/Menu/stories/Menu.stories.tsx index 4c741b9c6c9a..1e635bc377be 100644 --- a/app/client/packages/design-system/widgets/src/components/Menu/stories/Menu.stories.tsx +++ b/app/client/packages/design-system/widgets/src/components/Menu/stories/Menu.stories.tsx @@ -1,7 +1,12 @@ import React from "react"; -import { Button, Menu, MenuTrigger } from "@appsmith/wds"; +import { + Button, + Menu, + MenuTrigger, + MenuItem, + SubmenuTrigger, +} from "@appsmith/wds"; import type { Meta, StoryObj } from "@storybook/react"; -import { menuItems, submenusItems, submenusItemsWithIcons } from "./menuData"; /** * A menu displays a list of actions or options that a user can choose. @@ -17,14 +22,24 @@ export default meta; type Story = StoryObj; export const Main: Story = { - render: (args) => ( + render: () => ( - alert(`Selected key: ${key}`)} - {...args} - /> + + Item 1 + Item 2 + Item 3 + Item 4 + + Submenu + + Submenu Item 1 + Submenu Item 2 + Submenu Item 3 + Submenu Item 4 + + + ), }; @@ -33,20 +48,38 @@ export const Submenus: Story = { render: () => ( - + + Item 1 + Item 2 + + Submenu 1 + + Submenu 1 Item 1 + Submenu 1 Item 2 + + Submenu 2 + + Submenu 2 Item 1 + Submenu 2 Item 2 + + + + + ), }; -/** - * The items can be disabled by passing `disabledKeys` or `isDisabled` in the item configuration. - */ - export const DisabledItems: Story = { render: () => ( - + + Enabled Item + Disabled Item 1 + Disabled Item 2 + Enabled Item + ), }; @@ -55,7 +88,12 @@ export const WithIcons: Story = { render: () => ( - + + Home + Files + Settings + Help + ), }; diff --git a/app/client/packages/design-system/widgets/src/components/Menu/stories/menuData.ts b/app/client/packages/design-system/widgets/src/components/Menu/stories/menuData.ts index 1ed8598cd4b3..b15083cbfa82 100644 --- a/app/client/packages/design-system/widgets/src/components/Menu/stories/menuData.ts +++ b/app/client/packages/design-system/widgets/src/components/Menu/stories/menuData.ts @@ -1,6 +1,4 @@ -import type { MenuItem } from "../src"; - -export const menuItems: MenuItem[] = [ +export const menuItems = [ { id: 1, label: "Aerospace" }, { id: 2, label: "Mechanical" }, { id: 3, label: "Civil" }, @@ -12,7 +10,7 @@ export const menuItems: MenuItem[] = [ { id: 9, label: "Electrical" }, ]; -export const submenusItems: MenuItem[] = [ +export const submenusItems = [ { id: 1, label: "Level 1-1" }, { id: 2, @@ -37,7 +35,7 @@ export const submenusItems: MenuItem[] = [ { id: 8, label: "Level 1-8" }, ]; -export const submenusItemsWithIcons: MenuItem[] = [ +export const submenusItemsWithIcons = [ { id: 1, label: "Level 1-1", icon: "galaxy" }, { id: 2, diff --git a/app/client/packages/design-system/widgets/src/components/FieldListPopover/index.ts b/app/client/packages/design-system/widgets/src/components/MenuItem/index.ts similarity index 100% rename from app/client/packages/design-system/widgets/src/components/FieldListPopover/index.ts rename to app/client/packages/design-system/widgets/src/components/MenuItem/index.ts diff --git a/app/client/packages/design-system/widgets/src/components/MenuItem/src/MenuItem.tsx b/app/client/packages/design-system/widgets/src/components/MenuItem/src/MenuItem.tsx new file mode 100644 index 000000000000..edd690856695 --- /dev/null +++ b/app/client/packages/design-system/widgets/src/components/MenuItem/src/MenuItem.tsx @@ -0,0 +1,26 @@ +import React from "react"; +import { + composeRenderProps, + MenuItem as HeadlessMenuItem, +} from "react-aria-components"; +import { Icon, Text, listBoxItemStyles } from "@appsmith/wds"; + +import type { MenuItemProps } from "./types"; + +export function MenuItem(props: MenuItemProps) { + const { children, icon, ...rest } = props; + + return ( + + {composeRenderProps(children, (children, { hasSubmenu }) => ( + <> + {icon && } + {children} + {Boolean(hasSubmenu) && ( + + )} + + ))} + + ); +} diff --git a/app/client/packages/design-system/widgets/src/components/MenuItem/src/index.ts b/app/client/packages/design-system/widgets/src/components/MenuItem/src/index.ts new file mode 100644 index 000000000000..4ab04ea84cd9 --- /dev/null +++ b/app/client/packages/design-system/widgets/src/components/MenuItem/src/index.ts @@ -0,0 +1 @@ +export { MenuItem } from "./MenuItem"; diff --git a/app/client/packages/design-system/widgets/src/components/MenuItem/src/types.ts b/app/client/packages/design-system/widgets/src/components/MenuItem/src/types.ts new file mode 100644 index 000000000000..0d52e93be02c --- /dev/null +++ b/app/client/packages/design-system/widgets/src/components/MenuItem/src/types.ts @@ -0,0 +1,7 @@ +import type { IconProps } from "@appsmith/wds"; +import type { MenuItemProps as AriaMenuItemProps } from "react-aria-components"; + +export interface MenuItemProps extends AriaMenuItemProps { + icon?: IconProps["name"]; + isSubMenuItem?: boolean; +} diff --git a/app/client/packages/design-system/widgets/src/components/Modal/src/Modal.tsx b/app/client/packages/design-system/widgets/src/components/Modal/src/Modal.tsx index 46226b8d962c..fc3764d1dc9b 100644 --- a/app/client/packages/design-system/widgets/src/components/Modal/src/Modal.tsx +++ b/app/client/packages/design-system/widgets/src/components/Modal/src/Modal.tsx @@ -1,14 +1,16 @@ +import clsx from "clsx"; import React from "react"; import { Popover, PopoverModalContent } from "@appsmith/wds-headless"; -import styles from "./styles.module.css"; + import type { ModalProps } from "./types"; -import clsx from "clsx"; +import styles from "./styles.module.css"; export const Modal = (props: ModalProps) => { const { children, - dataAttributes = {}, overlayClassName, + overlayProps = {}, + size = "medium", triggerRef, ...rest } = props; @@ -17,7 +19,8 @@ export const Modal = (props: ModalProps) => { // don't forget to change the transition-duration CSS as well {children} diff --git a/app/client/packages/design-system/widgets/src/components/Modal/src/index.ts b/app/client/packages/design-system/widgets/src/components/Modal/src/index.ts index 8f811e192d44..d92e4cafc9c6 100644 --- a/app/client/packages/design-system/widgets/src/components/Modal/src/index.ts +++ b/app/client/packages/design-system/widgets/src/components/Modal/src/index.ts @@ -3,3 +3,4 @@ export * from "./ModalHeader"; export * from "./ModalFooter"; export * from "./ModalBody"; export * from "./ModalContent"; +export * from "./types"; diff --git a/app/client/packages/design-system/widgets/src/components/Modal/src/types.ts b/app/client/packages/design-system/widgets/src/components/Modal/src/types.ts index ac0629904be3..df2b3fe57291 100644 --- a/app/client/packages/design-system/widgets/src/components/Modal/src/types.ts +++ b/app/client/packages/design-system/widgets/src/components/Modal/src/types.ts @@ -3,6 +3,7 @@ import type { PopoverProps, } from "@appsmith/wds-headless"; import type { ReactNode } from "react"; +import type { SIZES } from "@appsmith/wds"; export interface ModalProps extends Pick< @@ -15,9 +16,14 @@ export interface ModalProps | "dismissClickOutside" >, Pick { - dataAttributes?: Record; + /** size of the modal + * @default medium + */ + size?: Omit; /** The children of the component. */ children: ReactNode; + /** Additional props to be passed to the overlay */ + overlayProps?: Record; } export interface ModalContentProps { diff --git a/app/client/packages/design-system/widgets/src/components/Modal/stories/ModalExamples.tsx b/app/client/packages/design-system/widgets/src/components/Modal/stories/ModalExamples.tsx index 9a4f72f0c974..79f5189c57b0 100644 --- a/app/client/packages/design-system/widgets/src/components/Modal/stories/ModalExamples.tsx +++ b/app/client/packages/design-system/widgets/src/components/Modal/stories/ModalExamples.tsx @@ -51,10 +51,10 @@ export const ModalExamples = () => { }} /> @@ -121,10 +121,10 @@ export const ModalExamples = () => { diff --git a/app/client/packages/design-system/widgets/src/components/Popover/src/Popover.tsx b/app/client/packages/design-system/widgets/src/components/Popover/src/Popover.tsx index d09ecdef0842..2eb2a15e2121 100644 --- a/app/client/packages/design-system/widgets/src/components/Popover/src/Popover.tsx +++ b/app/client/packages/design-system/widgets/src/components/Popover/src/Popover.tsx @@ -1,13 +1,14 @@ import React from "react"; +import type { PopoverProps } from "react-aria-components"; import { Popover as HeadlessPopover } from "react-aria-components"; + import styles from "./styles.module.css"; -import type { PopoverProps } from "react-aria-components"; export const Popover = (props: PopoverProps) => { const { children, ...rest } = props; return ( - + {children} ); diff --git a/app/client/packages/design-system/widgets/src/styles/index.ts b/app/client/packages/design-system/widgets/src/components/Radio/index.ts similarity index 100% rename from app/client/packages/design-system/widgets/src/styles/index.ts rename to app/client/packages/design-system/widgets/src/components/Radio/index.ts diff --git a/app/client/packages/design-system/widgets/src/components/Radio/src/Radio.tsx b/app/client/packages/design-system/widgets/src/components/Radio/src/Radio.tsx new file mode 100644 index 000000000000..e3dfd8668c8f --- /dev/null +++ b/app/client/packages/design-system/widgets/src/components/Radio/src/Radio.tsx @@ -0,0 +1,24 @@ +import { Text } from "@appsmith/wds"; +import React, { forwardRef } from "react"; +import type { ForwardedRef } from "react"; +import { Radio as AriaRadio } from "react-aria-components"; + +import styles from "./styles.module.css"; +import type { RadioProps } from "./types"; + +const _Radio = (props: RadioProps, ref: ForwardedRef) => { + const { children, labelPosition = "end", ...rest } = props; + + return ( + + {Boolean(children) && {children}} + + ); +}; + +export const Radio = forwardRef(_Radio); diff --git a/app/client/packages/design-system/widgets/src/components/Radio/src/index.ts b/app/client/packages/design-system/widgets/src/components/Radio/src/index.ts new file mode 100644 index 000000000000..867c7ecaa657 --- /dev/null +++ b/app/client/packages/design-system/widgets/src/components/Radio/src/index.ts @@ -0,0 +1,2 @@ +export { Radio } from "./Radio"; +export type { RadioProps } from "./types"; diff --git a/app/client/packages/design-system/widgets/src/components/RadioGroup/src/styles.module.css b/app/client/packages/design-system/widgets/src/components/Radio/src/styles.module.css similarity index 92% rename from app/client/packages/design-system/widgets/src/components/RadioGroup/src/styles.module.css rename to app/client/packages/design-system/widgets/src/components/Radio/src/styles.module.css index 4da345ac742d..0b1d214eb27c 100644 --- a/app/client/packages/design-system/widgets/src/components/RadioGroup/src/styles.module.css +++ b/app/client/packages/design-system/widgets/src/components/Radio/src/styles.module.css @@ -1,21 +1,3 @@ -.radioGroup { - display: flex; - flex-direction: column; - width: 100%; - - &[data-orientation="vertical"] { - align-items: start; - - .radio { - margin-inline-end: auto; - } - } - - &[data-disabled] { - cursor: not-allowed; - } -} - .radio { display: flex; align-items: center; diff --git a/app/client/packages/design-system/widgets/src/components/Radio/src/types.ts b/app/client/packages/design-system/widgets/src/components/Radio/src/types.ts new file mode 100644 index 000000000000..243ee62cf730 --- /dev/null +++ b/app/client/packages/design-system/widgets/src/components/Radio/src/types.ts @@ -0,0 +1,6 @@ +import type { POSITION } from "@appsmith/wds"; +import type { RadioProps as AriaRadioProps } from "react-aria-components"; + +export interface RadioProps extends AriaRadioProps { + labelPosition?: keyof typeof POSITION; +} diff --git a/app/client/packages/design-system/widgets/src/components/RadioGroup/chromatic/RadioGroup.chromatic.stories.tsx b/app/client/packages/design-system/widgets/src/components/RadioGroup/chromatic/RadioGroup.chromatic.stories.tsx index 685d5750ad30..2225cc3f1e01 100644 --- a/app/client/packages/design-system/widgets/src/components/RadioGroup/chromatic/RadioGroup.chromatic.stories.tsx +++ b/app/client/packages/design-system/widgets/src/components/RadioGroup/chromatic/RadioGroup.chromatic.stories.tsx @@ -1,6 +1,6 @@ import React from "react"; import type { Checkbox } from "@appsmith/wds"; -import { RadioGroup } from "@appsmith/wds"; +import { Radio, RadioGroup } from "@appsmith/wds"; import type { Meta, StoryObj } from "@storybook/react"; import { StoryGrid, DataAttrWrapper } from "@design-system/storybook"; @@ -22,12 +22,24 @@ export const LightMode: Story = { {states.map((state) => ( - + + {items.map(({ label, value }) => ( + + {label} + + ))} + ))} {states.map((state) => ( - + + {items.map(({ label, value }) => ( + + {label} + + ))} + ))} diff --git a/app/client/packages/design-system/widgets/src/components/RadioGroup/src/RadioGroup.tsx b/app/client/packages/design-system/widgets/src/components/RadioGroup/src/RadioGroup.tsx index a06bceee6c3d..de3da32c4e9b 100644 --- a/app/client/packages/design-system/widgets/src/components/RadioGroup/src/RadioGroup.tsx +++ b/app/client/packages/design-system/widgets/src/components/RadioGroup/src/RadioGroup.tsx @@ -1,14 +1,14 @@ +import type { ForwardedRef } from "react"; import React, { forwardRef, useRef } from "react"; -import { RadioGroup as HeadlessRadioGroup, Radio } from "react-aria-components"; import { - FieldLabel, - Flex, - Text, useGroupOrientation, + inputFieldStyles, + FieldLabel, FieldError, + toggleGroupStyles, } from "@appsmith/wds"; -import styles from "./styles.module.css"; -import type { ForwardedRef } from "react"; +import { RadioGroup as HeadlessRadioGroup, Group } from "react-aria-components"; + import type { RadioGroupProps } from "./types"; const _RadioGroup = ( @@ -16,11 +16,12 @@ const _RadioGroup = ( ref: ForwardedRef, ) => { const { + children, contextualHelp, errorMessage, isDisabled, + isReadOnly, isRequired, - items, label, ...rest } = props; @@ -32,31 +33,30 @@ const _RadioGroup = ( return ( - - + {label} + + )} + - {items.map(({ label, value, ...rest }, index) => ( - - {label} - - ))} - - + {children} + + {errorMessage} ); }; diff --git a/app/client/packages/design-system/widgets/src/components/RadioGroup/src/types.ts b/app/client/packages/design-system/widgets/src/components/RadioGroup/src/types.ts index dd2260c32ec0..7929aca5d62f 100644 --- a/app/client/packages/design-system/widgets/src/components/RadioGroup/src/types.ts +++ b/app/client/packages/design-system/widgets/src/components/RadioGroup/src/types.ts @@ -1,34 +1,13 @@ +import type { FieldProps, ORIENTATION } from "@appsmith/wds"; import type { RadioGroupProps as HeadlessRadioGroupProps } from "react-aria-components"; -import type { ORIENTATION } from "../../../shared"; -interface RadioGroupItemProps { - value: string; - label?: string; - isSelected?: boolean; - isDisabled?: boolean; - index?: number; -} - -export interface RadioGroupProps extends HeadlessRadioGroupProps { - /** - * A ContextualHelp element to place next to the label. - */ - contextualHelp?: string; - /** - * The content to display as the label. - */ - label?: string; - /** - * Radio that belong to this group. - */ - items: RadioGroupItemProps[]; +export interface RadioGroupProps extends HeadlessRadioGroupProps, FieldProps { /** - * The axis the checkboxes should align with. - * @default 'horizontal' + * The orientation of the radio group. */ orientation?: keyof typeof ORIENTATION; /** - * An error message for the field. + * children for the radio group */ - errorMessage?: string; + children?: React.ReactNode; } diff --git a/app/client/packages/design-system/widgets/src/components/RadioGroup/stories/RadioGroup.stories.tsx b/app/client/packages/design-system/widgets/src/components/RadioGroup/stories/RadioGroup.stories.tsx index 036110269402..e16fdfbc1874 100644 --- a/app/client/packages/design-system/widgets/src/components/RadioGroup/stories/RadioGroup.stories.tsx +++ b/app/client/packages/design-system/widgets/src/components/RadioGroup/stories/RadioGroup.stories.tsx @@ -1,70 +1,89 @@ import React from "react"; import type { Meta, StoryObj } from "@storybook/react"; -import { RadioGroup, Flex } from "@appsmith/wds"; +import { RadioGroup, Flex, Radio } from "@appsmith/wds"; + +const items = [ + { label: "Value 1", value: "value-1" }, + { label: "Value 2", value: "value-2" }, +]; -/** - * Radio group is a component that allows users to select one option from a set of options. - */ const meta: Meta = { - component: RadioGroup, title: "WDS/Widgets/RadioGroup", + component: RadioGroup, + tags: ["autodocs"], + args: { + defaultValue: "value-1", + children: items.map((item) => ( + + {item.label} + + )), + }, }; export default meta; type Story = StoryObj; -const items = [ - { label: "Value 1", value: "value-1" }, - { label: "Value 2", value: "value-2" }, -]; - export const Main: Story = { args: { - label: "Radio Group", - defaultValue: "value-1", - items: items, + label: "Label", + }, +}; + +export const WithLabel: Story = { + args: { + label: "Description", + }, +}; + +export const WithContextualHelp: Story = { + args: { + label: "Label", + contextualHelp: "Contextual help", }, - render: (args) => , }; -/** - * The component supports two label orientations `vertical` and `horizontal`. Default size is `horizontal`. - */ export const Orientation: Story = { - render: () => ( - - - - - ), + render: () => { + return ( + + + {items.map((item) => ( + + {item.label} + + ))} + + + {items.map((item) => ( + + {item.label} + + ))} + + + ); + }, }; export const Disabled: Story = { args: { - label: "Radio Group", - defaultValue: "value-1", isDisabled: true, - items: items, + label: "Disabled", }, - render: (args) => , }; export const Required: Story = { args: { - label: "Radio Group", - defaultValue: "value-1", isRequired: true, - items: items, + label: "Required", }, - render: (args) => , }; export const Invalid: Story = { args: { - label: "Radio Group", + errorMessage: "There is an error", + label: "Invalid", isInvalid: true, - errorMessage: "This is a error message", - items: items, }, - render: (args) => , }; diff --git a/app/client/packages/design-system/widgets/src/components/RadioGroup/tests/RadioGroup.test.tsx b/app/client/packages/design-system/widgets/src/components/RadioGroup/tests/RadioGroup.test.tsx index 6be7f2578795..cc5512573a9e 100644 --- a/app/client/packages/design-system/widgets/src/components/RadioGroup/tests/RadioGroup.test.tsx +++ b/app/client/packages/design-system/widgets/src/components/RadioGroup/tests/RadioGroup.test.tsx @@ -2,7 +2,7 @@ import React from "react"; import "@testing-library/jest-dom"; import userEvent from "@testing-library/user-event"; import { render, screen } from "@testing-library/react"; -import { RadioGroup } from "@appsmith/wds"; +import { Radio, RadioGroup } from "@appsmith/wds"; describe("@appsmith/wds/RadioGroup", () => { const items = [ @@ -12,7 +12,13 @@ describe("@appsmith/wds/RadioGroup", () => { it("should render the Radio group", async () => { const { container } = render( - , + + {items.map(({ label, value }) => ( + + {label} + + ))} + , ); expect(screen.getByText("Value 1")).toBeInTheDocument(); @@ -46,11 +52,13 @@ describe("@appsmith/wds/RadioGroup", () => { it("should support custom props", () => { render( - , + + {items.map(({ label, value }) => ( + + {label} + + ))} + , ); const radioGroup = screen.getByTestId("t--radio-group"); @@ -60,7 +68,13 @@ describe("@appsmith/wds/RadioGroup", () => { it("should render checked checkboxes when value is passed", () => { render( - , + + {items.map(({ label, value }) => ( + + {label} + + ))} + , ); const options = screen.getAllByRole("radio"); @@ -73,11 +87,13 @@ describe("@appsmith/wds/RadioGroup", () => { const onChangeSpy = jest.fn(); render( - , + + {items.map(({ label, value }) => ( + + {label} + + ))} + , ); const options = screen.getAllByRole("radio"); @@ -87,7 +103,15 @@ describe("@appsmith/wds/RadioGroup", () => { }); it("should be able to render disabled checkboxes", () => { - render(); + render( + + {items.map(({ label, value }) => ( + + {label} + + ))} + , + ); const options = screen.getAllByRole("radio"); diff --git a/app/client/packages/design-system/widgets/src/components/Select/src/Select.tsx b/app/client/packages/design-system/widgets/src/components/Select/src/Select.tsx index 092c31243454..0337fd709ad9 100644 --- a/app/client/packages/design-system/widgets/src/components/Select/src/Select.tsx +++ b/app/client/packages/design-system/widgets/src/components/Select/src/Select.tsx @@ -1,40 +1,36 @@ -import React, { useRef } from "react"; +import React from "react"; import { - FieldDescription, FieldError, - Icon, FieldLabel, - Spinner, - FieldListPopover, + ListBox, + inputFieldStyles, + Popover, } from "@appsmith/wds"; -import { getTypographyClassName } from "@appsmith/wds-theming"; -import clsx from "clsx"; -import { - Button, - Select as HeadlessSelect, - SelectValue, -} from "react-aria-components"; -import styles from "./styles.module.css"; +import { Select as HeadlessSelect } from "react-aria-components"; + import type { SelectProps } from "./types"; +import { SelectTrigger } from "./SelectTrigger"; export const Select = (props: SelectProps) => { const { + children, contextualHelp, - description, errorMessage, + isDisabled, isLoading, isRequired, - items, label, + placeholder, size = "medium", ...rest } = props; - const triggerRef = useRef(null); + const root = document.body.querySelector( + "[data-theme-provider]", + ) as HTMLButtonElement; return ( { <> + {label} + + - - - - + {errorMessage} + + {children} + )} diff --git a/app/client/packages/design-system/widgets/src/components/Select/src/SelectTrigger.tsx b/app/client/packages/design-system/widgets/src/components/Select/src/SelectTrigger.tsx new file mode 100644 index 000000000000..5fcd5ca50f4d --- /dev/null +++ b/app/client/packages/design-system/widgets/src/components/Select/src/SelectTrigger.tsx @@ -0,0 +1,41 @@ +import React from "react"; +import { Icon, Spinner, textInputStyles } from "@appsmith/wds"; +import { getTypographyClassName } from "@appsmith/wds-theming"; +import { Button, Group, SelectValue } from "react-aria-components"; + +import type { SelectProps } from "./types"; + +interface SelectTriggerProps { + size?: SelectProps["size"]; + isLoading?: boolean; + isInvalid?: boolean; + placeholder?: string; + isDisabled?: boolean; +} + +export const SelectTrigger: React.FC = (props) => { + const { isDisabled, isInvalid, isLoading, placeholder, size } = props; + + return ( + + + + {Boolean(isLoading) ? : } + + + ); +}; diff --git a/app/client/packages/design-system/widgets/src/components/Select/src/styles.module.css b/app/client/packages/design-system/widgets/src/components/Select/src/styles.module.css deleted file mode 100644 index f3d0aee824ba..000000000000 --- a/app/client/packages/design-system/widgets/src/components/Select/src/styles.module.css +++ /dev/null @@ -1,61 +0,0 @@ -.formField { - display: flex; - flex-direction: column; - width: 100%; -} - -.textField { - display: flex; - position: relative; - padding: 0; - height: var(--sizing-9); - border: none; - align-items: center; - border-radius: var(--border-radius-elevation-3); - background-color: var(--color-bg-neutral-subtle); - max-inline-size: 100%; - padding-inline-start: var(--inner-spacing-2); - padding-inline-end: calc(var(--inner-spacing-3) + var(--icon-size-4)); - padding-block: var(--inner-spacing-3); - box-shadow: inset 0 0 0 var(--border-width-1) - var(--color-bd-on-neutral-subtle); - cursor: pointer; -} - -.formField[data-invalid] .textField { - box-shadow: 0 0 0 var(--border-width-1) var(--color-bd-negative); -} - -.formField[data-size="small"] .textField { - padding-block: var(--inner-spacing-2); -} - -.textField[data-focus-visible] { - box-shadow: - 0 0 0 2px var(--color-bg), - 0 0 0 4px var(--color-bd-focus); -} - -.textField[data-hovered] { - background-color: var(--color-bg-neutral-subtle-hover); - box-shadow: inset 0 0 0 var(--border-width-1) - var(--color-bd-on-neutral-subtle-hover); -} - -.textField [data-icon] { - position: absolute; - right: var(--inner-spacing-1); -} - -.fieldValue { - text-align: left; - flex: 1; -} - -.fieldValue[data-placeholder] { - color: var(--color-fg-neutral-subtle); -} - -.fieldValue [data-icon] { - display: none; -} diff --git a/app/client/packages/design-system/widgets/src/components/Select/src/types.ts b/app/client/packages/design-system/widgets/src/components/Select/src/types.ts index 1d500e536657..d2d57a905713 100644 --- a/app/client/packages/design-system/widgets/src/components/Select/src/types.ts +++ b/app/client/packages/design-system/widgets/src/components/Select/src/types.ts @@ -1,26 +1,12 @@ -import type { - SelectProps as SpectrumSelectProps, - ValidationResult, -} from "react-aria-components"; -import type { SIZES, FieldListPopoverItem } from "@appsmith/wds"; +import type { SIZES, FieldProps } from "@appsmith/wds"; +import type { SelectProps as SpectrumSelectProps } from "react-aria-components"; export interface SelectProps - extends Omit, "slot"> { - /** Item objects in the collection. */ - items: FieldListPopoverItem[]; - /** The content to display as the label. */ - label?: string; - /** The content to display as the description. */ - description?: string; - /** The content to display as the error message. */ - errorMessage?: string | ((validation: ValidationResult) => string); + extends Omit, "slot">, + FieldProps { /** size of the select * * @default medium */ size?: Omit; - /** loading state for the input */ - isLoading?: boolean; - /** A ContextualHelp element to place next to the label. */ - contextualHelp?: string; } diff --git a/app/client/packages/design-system/widgets/src/components/Select/stories/Select.stories.tsx b/app/client/packages/design-system/widgets/src/components/Select/stories/Select.stories.tsx index a7b963f96042..84b1ae3e8742 100644 --- a/app/client/packages/design-system/widgets/src/components/Select/stories/Select.stories.tsx +++ b/app/client/packages/design-system/widgets/src/components/Select/stories/Select.stories.tsx @@ -1,6 +1,7 @@ import React from "react"; import type { Meta, StoryObj } from "@storybook/react"; -import { Select, Button, Flex, SIZES } from "@appsmith/wds"; +import { Select, Button, Flex, SIZES, ListBoxItem } from "@appsmith/wds"; + import { selectItems, selectItemsWithIcons } from "./selectData"; /** @@ -9,6 +10,13 @@ import { selectItems, selectItemsWithIcons } from "./selectData"; const meta: Meta = { component: Select, title: "WDS/Widgets/Select", + args: { + children: selectItems.map((item) => ( + + {item.label} + + )), + }, }; export default meta; @@ -16,13 +24,13 @@ type Story = StoryObj; export const Main: Story = { args: { - items: selectItems, + label: "Label", + children: selectItems.map((item) => ( + + {item.label} + + )), }, - render: (args) => ( - - + ))} ), @@ -49,7 +58,13 @@ export const Loading: Story = { args: { placeholder: "Loading", isLoading: true, - items: selectItems, + }, +}; + +export const Disabled: Story = { + args: { + placeholder: "Disabled", + isDisabled: true, }, }; @@ -63,9 +78,8 @@ export const Validation: Story = { >