diff --git a/.github/config.json b/.github/config.json index 4d757668a4..69e9dcf2ae 100644 --- a/.github/config.json +++ b/.github/config.json @@ -1 +1 @@ -{"runners":[{"versioning":{"source":"milestones","type":"SemVer"},"prereleaseName":"alpha","issue":{"labels":{"Team Managers Pod":{"conditions":[{"label":"Login / Signup","type":"hasLabel","value":true},{"label":"Settings","type":"hasLabel","value":true},{"label":"Git Version Control","type":"hasLabel","value":true},{"label":"Home Page","type":"hasLabel","value":true},{"label":"Import-Export-App","type":"hasLabel","value":true},{"label":"Team Managers Pod","type":"hasLabel","value":true},{"label":"Invite users","type":"hasLabel","value":true},{"label":"ACL","type":"hasLabel","value":true},{"label":"Realtime Commenting","type":"hasLabel","value":true},{"label":"SSO","type":"hasLabel","value":true},{"label":"Multi User Realtime","type":"hasLabel","value":true},{"label":"RBAC","type":"hasLabel","value":true},{"label":"advanced","type":"hasLabel","value":true},{"label":"advanced","type":"hasLabel","value":true},{"label":"advanced","type":"hasLabel","value":true}],"requires":1},"New Developers Pod":{"conditions":[{"label":"Fork App","type":"hasLabel","value":true},{"label":"Omnibar","type":"hasLabel","value":true},{"label":"Onboarding","type":"hasLabel","value":true},{"label":"Telemetry","type":"hasLabel","value":true},{"label":"Entity Explorer","type":"hasLabel","value":true},{"label":"Generate Page","type":"hasLabel","value":true},{"label":"IDE","type":"hasLabel","value":true},{"label":"In App Comms","type":"hasLabel","value":true},{"label":"New Developers Pod","type":"hasLabel","value":true},{"label":"Sniping Mode","type":"hasLabel","value":true},{"label":"Design System","type":"hasLabel","value":true},{"label":"Example Apps","type":"hasLabel","value":true},{"label":"i18n","type":"hasLabel","value":true},{"label":"Welcome Screen","type":"hasLabel","value":true},{"label":"Templates","type":"hasLabel","value":true}],"requires":1},"BE Coders Pod":{"conditions":[{"label":"Datasources","type":"hasLabel","value":true},{"label":"Firestore","type":"hasLabel","value":true},{"label":"Google Sheets","type":"hasLabel","value":true},{"label":"Mongo","type":"hasLabel","value":true},{"label":"MySQL","type":"hasLabel","value":true},{"label":"Redshift","type":"hasLabel","value":true},{"label":"UQI","type":"hasLabel","value":true},{"label":"Query Editor","type":"hasLabel","value":true},{"label":"API pane","type":"hasLabel","value":true},{"label":"snowflake","type":"hasLabel","value":true},{"label":"S3","type":"hasLabel","value":true},{"label":"BE Coders Pod","type":"hasLabel","value":true},{"label":"Redis","type":"hasLabel","value":true},{"label":"New Datasource","type":"hasLabel","value":true},{"label":"Query Execution","type":"hasLabel","value":true},{"label":"Postgres","type":"hasLabel","value":true},{"label":"REST API plugin","type":"hasLabel","value":true},{"label":"SAAS Plugins","type":"hasLabel","value":true},{"label":"UQI components","type":"hasLabel","value":true},{"label":"UQI validations","type":"hasLabel","value":true},{"label":"Action form","type":"hasLabel","value":true},{"label":"UQI migration","type":"hasLabel","value":true},{"label":"SQL","type":"hasLabel","value":true},{"label":"Query Templates","type":"hasLabel","value":true},{"label":"Plugin Development","type":"hasLabel","value":true},{"label":"GraphQL Plugin","type":"hasLabel","value":true},{"label":"ArangoDB","type":"hasLabel","value":true},{"label":"SmartJSONSubstitution","type":"hasLabel","value":true},{"label":"smartBSONsubstitution","type":"hasLabel","value":true},{"label":"Airtable","type":"hasLabel","value":true},{"label":"CURL","type":"hasLabel","value":true}],"requires":1},"FE Coders Pod":{"conditions":[{"label":"JS Linting & Errors","type":"hasLabel","value":true},{"label":"JS Editor","type":"hasLabel","value":true},{"label":"Debugger","type":"hasLabel","value":true},{"label":"JS","type":"hasLabel","value":true},{"label":"JS Snippets","type":"hasLabel","value":true},{"label":"Autocomplete","type":"hasLabel","value":true},{"label":"FE Coders Pod","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 Promises","type":"hasLabel","value":true},{"label":"OnPageLoad","type":"hasLabel","value":true},{"label":"Function execution","type":"hasLabel","value":true},{"label":"JS Refactoring","type":"hasLabel","value":true},{"label":"JS Usability","type":"hasLabel","value":true},{"label":"Code Refactoring","type":"hasLabel","value":true}],"requires":1},"App Viewers Pod":{"conditions":[{"label":"Button Widget","type":"hasLabel","value":true},{"label":"Chart Widget","type":"hasLabel","value":true},{"label":"Checkbox 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":"reallabel","type":"hasLabel","value":true},{"label":"New Widget","type":"hasLabel","value":true},{"label":"Switch widget","type":"hasLabel","value":true},{"label":"Widget Styling","type":"hasLabel","value":true},{"label":"Audio Widget","type":"hasLabel","value":true},{"label":"Icon Button Widget","type":"hasLabel","value":true},{"label":"Checkbox Group 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":"App Viewers Pod","type":"hasLabel","value":true},{"label":"App Navigation","type":"hasLabel","value":true},{"label":"View Mode","type":"hasLabel","value":true},{"label":"Embedding Apps","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":"App Theming","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}],"requires":1},"UI Builders Pod":{"conditions":[{"label":"Property Pane","type":"hasLabel","value":true},{"label":"Pages","type":"hasLabel","value":true},{"label":"UI Builders Pod","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":"Responsive Viewport","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":"dynamic height","type":"hasLabel","value":true},{"label":"Canvas / Grid","type":"hasLabel","value":true},{"label":"Canvas Zooms","type":"hasLabel","value":true}],"requires":1},"User Education Pod":{"conditions":[{"label":"Content","type":"hasLabel","value":true},{"label":"Documentation","type":"hasLabel","value":true}],"requires":1},"Platform Pod":{"conditions":[{"label":"Platform Pod","type":"hasLabel","value":true},{"label":"Team Managers Pod","type":"hasLabel","value":true},{"label":"New Developers Pod","type":"hasLabel","value":true}],"requires":1},"UI Building Pod":{"conditions":[{"label":"App Viewers Pod","type":"hasLabel","value":true},{"label":"UI Builders Pod","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}],"requires":1},"RBAC":{"conditions":[],"requires":1},"Action Pod":{"conditions":[],"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":"D2ACD2","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":"e2ca68","name":"QA","description":""},"Verified":{"color":"9bf416","name":"Verified","description":""},"Wont Fix":{"color":"ffffff","name":"Wont Fix","description":"This will not be worked on"},"MySQL":{"color":"B0F9F4","name":"MySQL","description":""},"Development":{"color":"9F8A02","name":"Development","description":""},"Help Wanted":{"color":"008672","name":"Help Wanted","description":"Extra attention is needed"},"Home Page":{"color":"9c0c8e","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"},"Settings":{"color":"f7ff60","name":"Settings","description":"organization, team & user settings"},"Fork App":{"color":"5369db","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":""},"community":{"color":"dded34","name":"community","description":"issues reported by community members"},"Needs Design":{"color":"bfd4f2","name":"Needs Design","description":"needs design or changes to design"},"UQI":{"color":"FB8E9C","name":"UQI","description":""},"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":""},"Onboarding":{"color":"d5794b","name":"Onboarding","description":"Issues related to onboarding new developers"},"Pages":{"color":"d7fd80","name":"Pages","description":"Issues related to configuring pages"},"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":"F1C2DF","name":"Firestore","description":"Issues related to the firestore Integration"},"New Widget":{"color":"be4cf2","name":"New Widget","description":"A request for a new widget"},"Performance":{"color":"d30e53","name":"Performance","description":"Page Load and evaluations"},"Modal Widget":{"color":"03846f","name":"Modal Widget","description":""},"UX Improvement":{"color":"f4a089","name":"UX Improvement","description":""},"S3":{"color":"c57928","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"},"JS Editor":{"color":"48b992","name":"JS Editor","description":"Issues related to JS Editor"},"Widget Styling":{"color":"37EA75","name":"Widget Styling","description":"all about widget styling"},"Calendar Widget":{"color":"8c6644","name":"Calendar Widget","description":""},"JS":{"color":"e46785","name":"JS","description":"Issues related to JS on the platform"},"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"},"App Viewers Pod":{"color":"cd8ef9","name":"App Viewers Pod","description":"This label assigns issues to the app viewers pod"},"Checkbox Widget":{"color":"074ac6","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":"d73a4a","name":"Bug","description":"Something isn't working"},"Widget Validation":{"color":"6990BC","name":"Widget Validation","description":"Issues related to widget property validation"},"Generate Page":{"color":"f14274","name":"Generate Page","description":"Issures related to page generation"},"File Picker Widget":{"color":"6ae4f2","name":"File Picker Widget","description":""},"snowflake":{"color":"47075c","name":"snowflake","description":"Issues related to the snowflake Integration"},"Automation":{"color":"CCAF60","name":"Automation","description":""},"hotfix":{"color":"BA3F1D","name":"hotfix","description":""},"Team Managers Pod":{"color":"bddb81","name":"Team Managers Pod","description":"Issues that team managers care about for the security and efficiency of their teams"},"API pane":{"color":"e417c7","name":"API pane","description":"API configuration section"},"Import-Export-App":{"color":"a7768a","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"},"ACL":{"color":"747224","name":"ACL","description":"User permissions and access controls"},"Telemetry":{"color":"bc70f9","name":"Telemetry","description":"Issues related to instrumenting appsmith"},"Radio Widget":{"color":"91ef15","name":"Radio Widget","description":""},"Omnibar":{"color":"10b5ce","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":""},"UI Building Pod":{"color":"e2ffb2","name":"UI Building Pod","description":""},"Task":{"color":"085630","name":"Task","description":"A simple Todo"},"Design System":{"color":"12b715","name":"Design System","description":"Design system"},"opera":{"color":"C63F5B","name":"opera","description":"Any issues identified on the opera browser"},"Login / Signup":{"color":"949fe0","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"},"Critical":{"color":"9b1b28","name":"Critical","description":"This issue needs immediate attention. Drop everything else"},"IDE":{"color":"61b2ee","name":"IDE","description":"Issues related to the IDE"},"Production":{"color":"b60205","name":"Production","description":""},"Dependencies":{"color":"0366d6","name":"Dependencies","description":"Pull requests that update a dependency file"},"Google Sheets":{"color":"51D86A","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":"fef2c0","name":"Mongo","description":"Issues related to Mongo DB plugin"},"Documentation":{"color":"a8dff7","name":"Documentation","description":"Improvements or additions to documentation"},"TestGap":{"color":"f28253","name":"TestGap","description":"Issues identified for test plan improvement"},"keyboard shortcut":{"color":"0688B6","name":"keyboard shortcut","description":""},"Git Version Control":{"color":"C4568E","name":"Git Version Control","description":"Issues related to version control"},"Reopen":{"color":"897548","name":"Reopen","description":""},"Redshift":{"color":"ABAEB5","name":"Redshift","description":"Issues related to the redshift integration"},"Date Picker Widget":{"color":"ef1ce1","name":"Date Picker Widget","description":""},"Entity Explorer":{"color":"a2e2f9","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},"Debugger":{"color":"e79062","name":"Debugger","description":"Issues related to the debugger"},"Quick effort":{"color":"95ED65","name":"Quick effort","description":"Something that'll take a few hours to build"},"Text Widget":{"color":"d130d1","name":"Text Widget","description":""},"Video Widget":{"color":"23dd4b","name":"Video Widget","description":""},"Datasources":{"color":"f285e1","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"},"Query Editor":{"color":"8887af","name":"Query Editor","description":"The section where a user can write DB queries."},"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"},"Platform Pod":{"color":"500B69","name":"Platform Pod","description":"All issues related to using the appsmith platform"},"UI Performance":{"color":"1799b0","name":"UI Performance","description":"Issues related to UI performance"},"UI Builders Pod":{"color":"517fba","name":"UI Builders Pod","description":"Issues that UI Builders face using appsmith"},"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"},"In App Comms":{"color":"9168f4","name":"In App Comms","description":"Issues around communication with appsmith instances"},"Chart Widget":{"color":"616ecc","name":"Chart Widget","description":""},"regression":{"color":"ffe5bc","name":"regression","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"},"SQL":{"name":"SQL","description":"Issues related to SQL Datasources","color":"a1633e"},"BE Coders Pod":{"color":"5d9848","name":"BE Coders Pod","description":"Issues related to users writing code to fetch and update data"},"FE Coders Pod":{"color":"a7effc","name":"FE Coders Pod","description":"Issues related to users writing javascript in appsmith"},"New Developers Pod":{"color":"6310da","name":"New Developers Pod","description":"Issues that new developers face while exploring the IDE"},"Sniping Mode":{"name":"Sniping Mode","description":"Issues related to sniping mode","color":"6310da"},"Redis":{"name":"Redis","description":"Issues related to Redis","color":"8b19cc"},"New Datasource":{"color":"9c0cf7","name":"New Datasource","description":"Requests for new datasources"},"Query Execution":{"color":"9c0cf7","name":"Query Execution","description":"Issues related to API / Query execution"},"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":"12b715"},"Responsive Viewport":{"color":"12b715","name":"Responsive Viewport","description":"Issues seen on different viewports like mobile"},"Widgets Pane":{"name":"Widgets Pane","description":"Issues related to the discovery and organisation of widgets","color":"ad5d78"},"Invite users":{"color":"1799b0","name":"Invite users","description":"Invite users flow and any associated actions"},"View Mode":{"color":"1799b0","name":"View Mode","description":"Issues related to the view mode"},"User Education Pod":{"name":"User Education Pod","description":"Issues related to user education","color":"1799b0"},"Content":{"name":"Content","description":"For content related topics i.e blogs, templates, videos","color":"a8dff7"},"Embedding Apps":{"name":"Embedding Apps","description":"Issues related to embedding","color":"849aff"},"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":"b68495"},"REST API plugin":{"name":"REST API plugin","description":"REST API plugin related issues","color":"9f538c"},"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":"ef9c9d"},"UQI components":{"name":"UQI components","description":"UQI specifically for components like sorting pagination and projection","color":"d7771f"},"UQI validations":{"name":"UQI validations","description":"validations for UQI datasources and action forms","color":"d7771f"},"Action form":{"name":"Action form","description":"Action forms for queries and API operations","color":"d7771f"},"UQI migration":{"name":"UQI migration","description":"migration of various datasources to uqi","color":"d7771f"},"JS Promises":{"name":"JS Promises","description":"Issues related to promises","color":"d7771f"},"OnPageLoad":{"name":"OnPageLoad","description":"OnPageLoad settings for JS functions","color":"63744e"},"Function execution":{"name":"Function execution","description":"JS function execution","color":"a302b0"},"JS Refactoring":{"name":"JS Refactoring","description":"cascading refactors to user JS due to user changes","color":"a302b0"},"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":"3897be"},"Query Templates":{"name":"Query Templates","description":"Issues related to query templates","color":"8f02d6"},"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"},"Plugin Development":{"name":"Plugin Development","description":"Issues related to plugin development","color":"5e9d7b"},"Reflow & Resize":{"name":"Reflow & Resize","description":"All issues related to reflow and resize experience","color":"748a13"},"App Theming":{"name":"App Theming","description":"Items that are related to the App level theming controls epic","color":"8bf430"},"SSO":{"name":"SSO","description":"Issues, requests and enhancements around Single sign-on.","color":"bf019b"},"Multi User Realtime":{"name":"Multi User Realtime","description":"Issues related to multiple users using or editing an application","color":"e7b6ce"},"Templates":{"name":"Templates","description":"Issues related to Templates","color":"c3b541"},"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":"afde1c"},"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":"c881a5"},"SmartJSONSubstitution":{"name":"SmartJSONSubstitution","description":"Issues related to Smart JSON substitution of mustache bindings","color":"76310e"},"smartBSONsubstitution":{"name":"smartBSONsubstitution","description":"","color":"76310e"},"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":"9accef"},"dynamic height":{"name":"dynamic height","description":"","color":"22a5df"},"RBAC":{"name":"RBAC","description":"Issues, requests and enhancements around RBAC.","color":"5cfd3d"},"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":"4b78b6"},"Canvas Zooms":{"name":"Canvas Zooms","description":"Issues related to zooming the canvas","color":"e6038e"},"advanced":{"name":"advanced","description":"Features that will be a part of our business edition","color":"a767ff"},"business":{"name":"business","description":"Features that will be a part of our business edition","color":"cd59eb"},"Action Pod":{"name":"Action Pod","description":"","color":"ee2e36"},"A-Force":{"name":"A-Force","description":"Issues raised by A-Force team","color":"e41bf0"},"Actions Pod":{"name":"Actions Pod","description":"","color":"e41bf0"},"AutomationGap1":{"color":"a5e07c","name":"AutomationGap1","description":"Issues that needs automated tests"}}} \ No newline at end of file +{"runners":[{"versioning":{"source":"milestones","type":"SemVer"},"prereleaseName":"alpha","issue":{"labels":{"Team Managers Pod":{"conditions":[{"label":"Login / Signup","type":"hasLabel","value":true},{"label":"Settings","type":"hasLabel","value":true},{"label":"Git Version Control","type":"hasLabel","value":true},{"label":"Home Page","type":"hasLabel","value":true},{"label":"Import-Export-App","type":"hasLabel","value":true},{"label":"Team Managers Pod","type":"hasLabel","value":true},{"label":"Invite users","type":"hasLabel","value":true},{"label":"ACL","type":"hasLabel","value":true},{"label":"Realtime Commenting","type":"hasLabel","value":true},{"label":"SSO","type":"hasLabel","value":true},{"label":"Multi User Realtime","type":"hasLabel","value":true},{"label":"RBAC","type":"hasLabel","value":true},{"label":"Business Edition","type":"hasLabel","value":true}],"requires":1},"New Developers Pod":{"conditions":[{"label":"Fork App","type":"hasLabel","value":true},{"label":"Omnibar","type":"hasLabel","value":true},{"label":"Onboarding","type":"hasLabel","value":true},{"label":"Telemetry","type":"hasLabel","value":true},{"label":"Entity Explorer","type":"hasLabel","value":true},{"label":"Generate Page","type":"hasLabel","value":true},{"label":"IDE","type":"hasLabel","value":true},{"label":"In App Comms","type":"hasLabel","value":true},{"label":"New Developers Pod","type":"hasLabel","value":true},{"label":"Sniping Mode","type":"hasLabel","value":true},{"label":"Design System","type":"hasLabel","value":true},{"label":"Example Apps","type":"hasLabel","value":true},{"label":"i18n","type":"hasLabel","value":true},{"label":"Welcome Screen","type":"hasLabel","value":true},{"label":"Templates","type":"hasLabel","value":true}],"requires":1},"BE Coders Pod":{"conditions":[{"label":"Datasources","type":"hasLabel","value":true},{"label":"Firestore","type":"hasLabel","value":true},{"label":"Google Sheets","type":"hasLabel","value":true},{"label":"Mongo","type":"hasLabel","value":true},{"label":"MySQL","type":"hasLabel","value":true},{"label":"Redshift","type":"hasLabel","value":true},{"label":"UQI","type":"hasLabel","value":true},{"label":"Query Editor","type":"hasLabel","value":true},{"label":"API pane","type":"hasLabel","value":true},{"label":"snowflake","type":"hasLabel","value":true},{"label":"S3","type":"hasLabel","value":true},{"label":"BE Coders Pod","type":"hasLabel","value":true},{"label":"Redis","type":"hasLabel","value":true},{"label":"New Datasource","type":"hasLabel","value":true},{"label":"Query Execution","type":"hasLabel","value":true},{"label":"Postgres","type":"hasLabel","value":true},{"label":"REST API plugin","type":"hasLabel","value":true},{"label":"SAAS Plugins","type":"hasLabel","value":true},{"label":"UQI components","type":"hasLabel","value":true},{"label":"UQI validations","type":"hasLabel","value":true},{"label":"Action form","type":"hasLabel","value":true},{"label":"UQI migration","type":"hasLabel","value":true},{"label":"SQL","type":"hasLabel","value":true},{"label":"Query Templates","type":"hasLabel","value":true},{"label":"Plugin Development","type":"hasLabel","value":true},{"label":"GraphQL Plugin","type":"hasLabel","value":true},{"label":"ArangoDB","type":"hasLabel","value":true},{"label":"SmartJSONSubstitution","type":"hasLabel","value":true},{"label":"smartBSONsubstitution","type":"hasLabel","value":true},{"label":"Airtable","type":"hasLabel","value":true},{"label":"CURL","type":"hasLabel","value":true}],"requires":1},"FE Coders Pod":{"conditions":[{"label":"JS Linting & Errors","type":"hasLabel","value":true},{"label":"JS Editor","type":"hasLabel","value":true},{"label":"Debugger","type":"hasLabel","value":true},{"label":"JS","type":"hasLabel","value":true},{"label":"JS Snippets","type":"hasLabel","value":true},{"label":"Autocomplete","type":"hasLabel","value":true},{"label":"FE Coders Pod","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 Promises","type":"hasLabel","value":true},{"label":"OnPageLoad","type":"hasLabel","value":true},{"label":"Function execution","type":"hasLabel","value":true},{"label":"JS Refactoring","type":"hasLabel","value":true},{"label":"JS Usability","type":"hasLabel","value":true},{"label":"Code Refactoring","type":"hasLabel","value":true},{"label":"storeValue","type":"hasLabel","value":true}],"requires":1},"App Viewers Pod":{"conditions":[{"label":"Button Widget","type":"hasLabel","value":true},{"label":"Chart Widget","type":"hasLabel","value":true},{"label":"Checkbox 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":"reallabel","type":"hasLabel","value":true},{"label":"New Widget","type":"hasLabel","value":true},{"label":"Switch widget","type":"hasLabel","value":true},{"label":"Widget Styling","type":"hasLabel","value":true},{"label":"Audio Widget","type":"hasLabel","value":true},{"label":"Icon Button Widget","type":"hasLabel","value":true},{"label":"Checkbox Group 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":"App Viewers Pod","type":"hasLabel","value":true},{"label":"App Navigation","type":"hasLabel","value":true},{"label":"View Mode","type":"hasLabel","value":true},{"label":"Embedding Apps","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":"App Theming","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}],"requires":1},"UI Builders Pod":{"conditions":[{"label":"Property Pane","type":"hasLabel","value":true},{"label":"Pages","type":"hasLabel","value":true},{"label":"UI Builders Pod","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":"Responsive Viewport","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":"dynamic height","type":"hasLabel","value":true},{"label":"Canvas / Grid","type":"hasLabel","value":true},{"label":"Canvas Zooms","type":"hasLabel","value":true}],"requires":1},"User Education Pod":{"conditions":[{"label":"Content","type":"hasLabel","value":true},{"label":"Documentation","type":"hasLabel","value":true}],"requires":1},"Platform Pod":{"conditions":[{"label":"Platform Pod","type":"hasLabel","value":true},{"label":"Team Managers Pod","type":"hasLabel","value":true},{"label":"New Developers Pod","type":"hasLabel","value":true}],"requires":1},"UI Building Pod":{"conditions":[{"label":"App Viewers Pod","type":"hasLabel","value":true},{"label":"UI Builders Pod","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}],"requires":1},"RBAC":{"conditions":[],"requires":1},"Action Pod":{"conditions":[],"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":"D2ACD2","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":"e2ca68","name":"QA","description":""},"Verified":{"color":"9bf416","name":"Verified","description":""},"Wont Fix":{"color":"ffffff","name":"Wont Fix","description":"This will not be worked on"},"MySQL":{"color":"B0F9F4","name":"MySQL","description":""},"Development":{"color":"9F8A02","name":"Development","description":""},"Help Wanted":{"color":"008672","name":"Help Wanted","description":"Extra attention is needed"},"Home Page":{"color":"9c0c8e","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"},"Settings":{"color":"f7ff60","name":"Settings","description":"organization, team & user settings"},"Fork App":{"color":"5369db","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":""},"community":{"color":"dded34","name":"community","description":"issues reported by community members"},"Needs Design":{"color":"bfd4f2","name":"Needs Design","description":"needs design or changes to design"},"UQI":{"color":"FB8E9C","name":"UQI","description":""},"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":""},"Onboarding":{"color":"d5794b","name":"Onboarding","description":"Issues related to onboarding new developers"},"Pages":{"color":"d7fd80","name":"Pages","description":"Issues related to configuring pages"},"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":"F1C2DF","name":"Firestore","description":"Issues related to the firestore Integration"},"New Widget":{"color":"be4cf2","name":"New Widget","description":"A request for a new widget"},"Performance":{"color":"d30e53","name":"Performance","description":"Page Load and evaluations"},"Modal Widget":{"color":"03846f","name":"Modal Widget","description":""},"UX Improvement":{"color":"f4a089","name":"UX Improvement","description":""},"S3":{"color":"c57928","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"},"JS Editor":{"color":"48b992","name":"JS Editor","description":"Issues related to JS Editor"},"Widget Styling":{"color":"37EA75","name":"Widget Styling","description":"all about widget styling"},"Calendar Widget":{"color":"8c6644","name":"Calendar Widget","description":""},"JS":{"color":"e46785","name":"JS","description":"Issues related to JS on the platform"},"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"},"App Viewers Pod":{"color":"cd8ef9","name":"App Viewers Pod","description":"This label assigns issues to the app viewers pod"},"Checkbox Widget":{"color":"074ac6","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":"d73a4a","name":"Bug","description":"Something isn't working"},"Widget Validation":{"color":"6990BC","name":"Widget Validation","description":"Issues related to widget property validation"},"Generate Page":{"color":"f14274","name":"Generate Page","description":"Issures related to page generation"},"File Picker Widget":{"color":"6ae4f2","name":"File Picker Widget","description":""},"snowflake":{"color":"47075c","name":"snowflake","description":"Issues related to the snowflake Integration"},"Automation":{"color":"CCAF60","name":"Automation","description":""},"hotfix":{"color":"BA3F1D","name":"hotfix","description":""},"Team Managers Pod":{"color":"bddb81","name":"Team Managers Pod","description":"Issues that team managers care about for the security and efficiency of their teams"},"API pane":{"color":"e417c7","name":"API pane","description":"API configuration section"},"Import-Export-App":{"color":"a7768a","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"},"ACL":{"color":"747224","name":"ACL","description":"User permissions and access controls"},"Telemetry":{"color":"bc70f9","name":"Telemetry","description":"Issues related to instrumenting appsmith"},"Radio Widget":{"color":"91ef15","name":"Radio Widget","description":""},"Omnibar":{"color":"10b5ce","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":""},"UI Building Pod":{"color":"e2ffb2","name":"UI Building Pod","description":""},"Task":{"color":"085630","name":"Task","description":"A simple Todo"},"Design System":{"color":"12b715","name":"Design System","description":"Design system"},"opera":{"color":"C63F5B","name":"opera","description":"Any issues identified on the opera browser"},"Login / Signup":{"color":"949fe0","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"},"Critical":{"color":"9b1b28","name":"Critical","description":"This issue needs immediate attention. Drop everything else"},"IDE":{"color":"61b2ee","name":"IDE","description":"Issues related to the IDE"},"Production":{"color":"b60205","name":"Production","description":""},"Dependencies":{"color":"0366d6","name":"Dependencies","description":"Pull requests that update a dependency file"},"Google Sheets":{"color":"51D86A","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":"fef2c0","name":"Mongo","description":"Issues related to Mongo DB plugin"},"Documentation":{"color":"a8dff7","name":"Documentation","description":"Improvements or additions to documentation"},"TestGap":{"color":"f28253","name":"TestGap","description":"Issues identified for test plan improvement"},"keyboard shortcut":{"color":"0688B6","name":"keyboard shortcut","description":""},"Git Version Control":{"color":"C4568E","name":"Git Version Control","description":"Issues related to version control"},"Reopen":{"color":"897548","name":"Reopen","description":""},"Redshift":{"color":"ABAEB5","name":"Redshift","description":"Issues related to the redshift integration"},"Date Picker Widget":{"color":"ef1ce1","name":"Date Picker Widget","description":""},"Entity Explorer":{"color":"a2e2f9","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},"Debugger":{"color":"e79062","name":"Debugger","description":"Issues related to the debugger"},"Quick effort":{"color":"95ED65","name":"Quick effort","description":"Something that'll take a few hours to build"},"Text Widget":{"color":"d130d1","name":"Text Widget","description":""},"Video Widget":{"color":"23dd4b","name":"Video Widget","description":""},"Datasources":{"color":"f285e1","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"},"Query Editor":{"color":"8887af","name":"Query Editor","description":"The section where a user can write DB queries."},"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"},"Platform Pod":{"color":"500B69","name":"Platform Pod","description":"All issues related to using the appsmith platform"},"UI Performance":{"color":"1799b0","name":"UI Performance","description":"Issues related to UI performance"},"UI Builders Pod":{"color":"517fba","name":"UI Builders Pod","description":"Issues that UI Builders face using appsmith"},"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"},"In App Comms":{"color":"9168f4","name":"In App Comms","description":"Issues around communication with appsmith instances"},"Chart Widget":{"color":"616ecc","name":"Chart Widget","description":""},"regression":{"color":"ffe5bc","name":"regression","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"},"SQL":{"name":"SQL","description":"Issues related to SQL Datasources","color":"a1633e"},"BE Coders Pod":{"color":"5d9848","name":"BE Coders Pod","description":"Issues related to users writing code to fetch and update data"},"FE Coders Pod":{"color":"a7effc","name":"FE Coders Pod","description":"Issues related to users writing javascript in appsmith"},"New Developers Pod":{"color":"6310da","name":"New Developers Pod","description":"Issues that new developers face while exploring the IDE"},"Sniping Mode":{"name":"Sniping Mode","description":"Issues related to sniping mode","color":"6310da"},"Redis":{"name":"Redis","description":"Issues related to Redis","color":"8b19cc"},"New Datasource":{"color":"9c0cf7","name":"New Datasource","description":"Requests for new datasources"},"Query Execution":{"color":"9c0cf7","name":"Query Execution","description":"Issues related to API / Query execution"},"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":"12b715"},"Responsive Viewport":{"color":"12b715","name":"Responsive Viewport","description":"Issues seen on different viewports like mobile"},"Widgets Pane":{"name":"Widgets Pane","description":"Issues related to the discovery and organisation of widgets","color":"ad5d78"},"Invite users":{"color":"1799b0","name":"Invite users","description":"Invite users flow and any associated actions"},"View Mode":{"color":"1799b0","name":"View Mode","description":"Issues related to the view mode"},"User Education Pod":{"name":"User Education Pod","description":"Issues related to user education","color":"1799b0"},"Content":{"name":"Content","description":"For content related topics i.e blogs, templates, videos","color":"a8dff7"},"Embedding Apps":{"name":"Embedding Apps","description":"Issues related to embedding","color":"849aff"},"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":"b68495"},"REST API plugin":{"name":"REST API plugin","description":"REST API plugin related issues","color":"9f538c"},"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":"ef9c9d"},"UQI components":{"name":"UQI components","description":"UQI specifically for components like sorting pagination and projection","color":"d7771f"},"UQI validations":{"name":"UQI validations","description":"validations for UQI datasources and action forms","color":"d7771f"},"Action form":{"name":"Action form","description":"Action forms for queries and API operations","color":"d7771f"},"UQI migration":{"name":"UQI migration","description":"migration of various datasources to uqi","color":"d7771f"},"JS Promises":{"name":"JS Promises","description":"Issues related to promises","color":"d7771f"},"OnPageLoad":{"name":"OnPageLoad","description":"OnPageLoad settings for JS functions","color":"63744e"},"Function execution":{"name":"Function execution","description":"JS function execution","color":"a302b0"},"JS Refactoring":{"name":"JS Refactoring","description":"cascading refactors to user JS due to user changes","color":"a302b0"},"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":"3897be"},"Query Templates":{"name":"Query Templates","description":"Issues related to query templates","color":"8f02d6"},"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"},"Plugin Development":{"name":"Plugin Development","description":"Issues related to plugin development","color":"5e9d7b"},"Reflow & Resize":{"name":"Reflow & Resize","description":"All issues related to reflow and resize experience","color":"748a13"},"App Theming":{"name":"App Theming","description":"Items that are related to the App level theming controls epic","color":"8bf430"},"SSO":{"name":"SSO","description":"Issues, requests and enhancements around Single sign-on.","color":"bf019b"},"Multi User Realtime":{"name":"Multi User Realtime","description":"Issues related to multiple users using or editing an application","color":"e7b6ce"},"Templates":{"name":"Templates","description":"Issues related to Templates","color":"c3b541"},"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":"afde1c"},"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":"c881a5"},"SmartJSONSubstitution":{"name":"SmartJSONSubstitution","description":"Issues related to Smart JSON substitution of mustache bindings","color":"76310e"},"smartBSONsubstitution":{"name":"smartBSONsubstitution","description":"","color":"76310e"},"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":"9accef"},"dynamic height":{"name":"dynamic height","description":"","color":"22a5df"},"RBAC":{"name":"RBAC","description":"Issues, requests and enhancements around RBAC.","color":"5cfd3d"},"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":"4b78b6"},"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"},"Actions Pod":{"name":"Actions Pod","description":"","color":"e41bf0"},"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"},"A-Force":{"name":"A-Force","description":"Issues raised by A-Force team","color":"919ed3"},"Business Edition":{"name":"Business Edition","description":"Features that will be a part of our business edition","color":"55184d"},"storeValue":{"name":"storeValue","description":"Issues related to the store value function","color":"5d3e66"},"Tests":{"name":"Tests","description":"test item","color":"1c6990"}}} \ No newline at end of file diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml index 306ae94d6f..25aafeb9ea 100644 --- a/.github/workflows/release-drafter.yml +++ b/.github/workflows/release-drafter.yml @@ -25,5 +25,6 @@ jobs: # (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml config-name: release-drafter-template.yml disable-autolabeler: true + commitish: master env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/app/client/cypress/fixtures/CharacterDTdsl.json b/app/client/cypress/fixtures/CharacterDTdsl.json new file mode 100644 index 0000000000..d67c81dc8a --- /dev/null +++ b/app/client/cypress/fixtures/CharacterDTdsl.json @@ -0,0 +1,1398 @@ +{ + "dsl": { + "widgetName": "MainContainer", + "backgroundColor": "none", + "rightColumn": 4896, + "snapColumns": 64, + "detachFromLayout": true, + "widgetId": "0", + "topRow": 0, + "bottomRow": 1320, + "containerStyle": "none", + "snapRows": 125, + "parentRowSpace": 1, + "type": "CANVAS_WIDGET", + "canExtend": true, + "version": 59, + "minHeight": 1292, + "dynamicTriggerPathList": [], + "parentColumnSpace": 1, + "dynamicBindingPathList": [], + "leftColumn": 0, + "children": [ + { + "boxShadow": "none", + "widgetName": "UpdateModal", + "isCanvas": true, + "displayName": "Modal", + "iconSVG": "/static/media/icon.4975978e.svg", + "topRow": 51, + "bottomRow": 75, + "parentRowSpace": 10, + "type": "MODAL_WIDGET", + "hideCard": false, + "shouldScrollContents": true, + "animateLoading": true, + "parentColumnSpace": 16.71875, + "leftColumn": 20, + "dynamicBindingPathList": [ + { + "key": "borderRadius" + } + ], + "children": [ + { + "boxShadow": "none", + "widgetName": "Canvas1Copy", + "displayName": "Canvas", + "topRow": 0, + "bottomRow": 540, + "parentRowSpace": 1, + "type": "CANVAS_WIDGET", + "canExtend": true, + "hideCard": true, + "shouldScrollContents": false, + "minHeight": 548, + "parentColumnSpace": 1, + "leftColumn": 0, + "dynamicBindingPathList": [ + { + "key": "borderRadius" + }, + { + "key": "accentColor" + } + ], + "children": [ + { + "boxShadow": "none", + "widgetName": "Updatelimited", + "displayName": "Input", + "iconSVG": "/static/media/icon.9f505595.svg", + "topRow": 23, + "bottomRow": 30, + "parentRowSpace": 10, + "labelWidth": 5, + "autoFocus": false, + "type": "INPUT_WIDGET_V2", + "hideCard": false, + "animateLoading": true, + "parentColumnSpace": 6.9375, + "dynamicTriggerPathList": [], + "resetOnSubmit": true, + "leftColumn": 2, + "dynamicBindingPathList": [ + { + "key": "accentColor" + }, + { + "key": "borderRadius" + }, + { + "key": "defaultText" + }, + { + "key": "label" + } + ], + "labelPosition": "Top", + "labelStyle": "", + "inputType": "TEXT", + "maxChars": "10", + "isDisabled": false, + "key": "x49qcvsllj", + "labelTextSize": "0.875rem", + "isRequired": false, + "isDeprecated": false, + "rightColumn": 62, + "widgetId": "mwe3ff4xg7", + "accentColor": "{{appsmith.theme.colors.primaryColor}}", + "isVisible": true, + "label": "{{Table1.columnOrder[3].toString().replace(/(?:^|\\s|[\"'([{])+\\S/g, match => match.toUpperCase());\n}}", + "version": 2, + "parentId": "sdc2iv8uiq", + "labelAlignment": "left", + "renderMode": "CANVAS", + "isLoading": false, + "borderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}", + "iconAlign": "left", + "defaultText": "{{Table1.selectedRow.Limited_4_}}" + }, + { + "boxShadow": "none", + "widgetName": "Updateasmany", + "displayName": "Input", + "iconSVG": "/static/media/icon.9f505595.svg", + "topRow": 15, + "bottomRow": 22, + "parentRowSpace": 10, + "labelWidth": 5, + "autoFocus": false, + "type": "INPUT_WIDGET_V2", + "hideCard": false, + "animateLoading": true, + "parentColumnSpace": 6.9375, + "dynamicTriggerPathList": [], + "resetOnSubmit": true, + "leftColumn": 2, + "dynamicBindingPathList": [ + { + "key": "accentColor" + }, + { + "key": "borderRadius" + }, + { + "key": "defaultText" + }, + { + "key": "label" + } + ], + "labelPosition": "Top", + "labelStyle": "", + "inputType": "TEXT", + "isDisabled": false, + "key": "x49qcvsllj", + "labelTextSize": "0.875rem", + "isRequired": false, + "isDeprecated": false, + "rightColumn": 62, + "widgetId": "el112yx9tb", + "accentColor": "{{appsmith.theme.colors.primaryColor}}", + "isVisible": true, + "label": "{{Table1.columnOrder[2].toString().replace(/(?:^|\\s|[\"'([{])+\\S/g, match => match.toUpperCase());\n}}", + "version": 2, + "parentId": "sdc2iv8uiq", + "labelAlignment": "left", + "renderMode": "CANVAS", + "isLoading": false, + "borderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}", + "iconAlign": "left", + "defaultText": "{{Table1.selectedRow.AsMany}}" + }, + { + "boxShadow": "none", + "widgetName": "IconButton1Copy", + "onClick": "{{closeModal('InsertModal')}}", + "buttonColor": "{{appsmith.theme.colors.primaryColor}}", + "displayName": "Icon Button", + "iconSVG": "/static/media/icon.1a0c634a.svg", + "topRow": 1, + "bottomRow": 5, + "type": "ICON_BUTTON_WIDGET", + "hideCard": false, + "animateLoading": true, + "leftColumn": 56, + "dynamicBindingPathList": [ + { + "key": "buttonColor" + }, + { + "key": "borderRadius" + } + ], + "iconSize": 24, + "isDisabled": false, + "key": "glch1esz5b", + "isDeprecated": false, + "rightColumn": 64, + "iconName": "cross", + "widgetId": "4fnws5ftg4", + "isVisible": true, + "version": 1, + "parentId": "sdc2iv8uiq", + "renderMode": "CANVAS", + "isLoading": false, + "borderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}", + "buttonVariant": "TERTIARY" + }, + { + "widgetName": "Text1Copy", + "displayName": "Text", + "iconSVG": "/static/media/icon.97c59b52.svg", + "topRow": 1, + "bottomRow": 7, + "type": "TEXT_WIDGET", + "hideCard": false, + "animateLoading": true, + "overflow": "NONE", + "fontFamily": "{{appsmith.theme.fontFamily.appFont}}", + "dynamicTriggerPathList": [], + "leftColumn": 1, + "dynamicBindingPathList": [ + { + "key": "fontFamily" + }, + { + "key": "borderRadius" + }, + { + "key": "text" + } + ], + "shouldTruncate": false, + "truncateButtonColor": "#FFC13D", + "text": "Update Data for SerialId # {{Table1.selectedRow.serialid}}", + "key": "orwoe8agwc", + "isDeprecated": false, + "rightColumn": 55, + "textAlign": "LEFT", + "widgetId": "3rncsabmka", + "isVisible": true, + "fontStyle": "BOLD", + "textColor": "#231F20", + "version": 1, + "parentId": "sdc2iv8uiq", + "renderMode": "CANVAS", + "isLoading": false, + "borderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}", + "fontSize": "1.5rem" + }, + { + "boxShadow": "none", + "widgetName": "Button5Copy", + "onClick": "{{closeModal('UpdateModal')}}", + "buttonColor": "{{appsmith.theme.colors.primaryColor}}", + "displayName": "Button", + "iconSVG": "/static/media/icon.cca02633.svg", + "topRow": 48, + "bottomRow": 52, + "type": "BUTTON_WIDGET", + "hideCard": false, + "animateLoading": true, + "leftColumn": 13, + "dynamicBindingPathList": [ + { + "key": "buttonColor" + }, + { + "key": "borderRadius" + } + ], + "text": "Close", + "isDisabled": false, + "key": "b7wg448vx0", + "isDeprecated": false, + "rightColumn": 29, + "isDefaultClickDisabled": true, + "widgetId": "kf5ait9qmq", + "buttonStyle": "PRIMARY", + "isVisible": true, + "recaptchaType": "V3", + "version": 1, + "parentId": "sdc2iv8uiq", + "renderMode": "CANVAS", + "isLoading": false, + "borderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}", + "buttonVariant": "SECONDARY", + "placement": "CENTER" + }, + { + "boxShadow": "none", + "widgetName": "runUpdateQuery", + "onClick": "{{updateRecord.run(() => {closeModal('UpdateModal'), () => {};\nselectRecords.run()\t\t\t\t\t\t\t\t\t\t\t\t })}}", + "buttonColor": "{{appsmith.theme.colors.primaryColor}}", + "dynamicPropertyPathList": [ + { + "key": "onClick" + } + ], + "displayName": "Button", + "iconSVG": "/static/media/icon.cca02633.svg", + "topRow": 48, + "bottomRow": 52, + "type": "BUTTON_WIDGET", + "hideCard": false, + "animateLoading": true, + "dynamicTriggerPathList": [ + { + "key": "onClick" + } + ], + "leftColumn": 33, + "dynamicBindingPathList": [ + { + "key": "buttonColor" + }, + { + "key": "borderRadius" + } + ], + "text": "Update", + "isDisabled": false, + "key": "b7wg448vx0", + "isDeprecated": false, + "rightColumn": 49, + "isDefaultClickDisabled": true, + "widgetId": "pb2y77v7wa", + "buttonStyle": "PRIMARY_BUTTON", + "isVisible": true, + "recaptchaType": "V3", + "version": 1, + "parentId": "sdc2iv8uiq", + "renderMode": "CANVAS", + "isLoading": false, + "borderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}", + "buttonVariant": "PRIMARY", + "placement": "CENTER" + }, + { + "boxShadow": "none", + "widgetName": "Updateone", + "displayName": "Input", + "iconSVG": "/static/media/icon.9f505595.svg", + "topRow": 7, + "bottomRow": 14, + "parentRowSpace": 10, + "labelWidth": 5, + "autoFocus": false, + "type": "INPUT_WIDGET_V2", + "hideCard": false, + "animateLoading": true, + "parentColumnSpace": 6.9375, + "dynamicTriggerPathList": [], + "resetOnSubmit": true, + "leftColumn": 2, + "dynamicBindingPathList": [ + { + "key": "accentColor" + }, + { + "key": "borderRadius" + }, + { + "key": "defaultText" + }, + { + "key": "label" + } + ], + "labelPosition": "Top", + "labelStyle": "", + "inputType": "TEXT", + "maxChars": "1", + "isDisabled": false, + "key": "x49qcvsllj", + "labelTextSize": "0.875rem", + "isRequired": false, + "isDeprecated": false, + "rightColumn": 62, + "widgetId": "b88g2hsnfh", + "accentColor": "{{appsmith.theme.colors.primaryColor}}", + "isVisible": true, + "label": "{{Table1.columnOrder[1].toString().replace(/(?:^|\\s|[\"'([{])+\\S/g, match => match.toUpperCase());\n}}", + "version": 2, + "parentId": "sdc2iv8uiq", + "labelAlignment": "left", + "renderMode": "CANVAS", + "isLoading": false, + "borderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}", + "iconAlign": "left", + "defaultText": "{{Table1.selectedRow.One_1_}}" + }, + { + "boxShadow": "none", + "widgetName": "Updateunlimited", + "displayName": "Input", + "iconSVG": "/static/media/icon.9f505595.svg", + "topRow": 31, + "bottomRow": 46, + "parentRowSpace": 10, + "labelWidth": 5, + "autoFocus": false, + "type": "INPUT_WIDGET_V2", + "hideCard": false, + "animateLoading": true, + "parentColumnSpace": 6.9375, + "dynamicTriggerPathList": [], + "resetOnSubmit": true, + "leftColumn": 2, + "dynamicBindingPathList": [ + { + "key": "accentColor" + }, + { + "key": "borderRadius" + }, + { + "key": "label" + } + ], + "labelPosition": "Top", + "labelStyle": "", + "inputType": "TEXT", + "isDisabled": false, + "key": "223t1cmc0w", + "labelTextSize": "0.875rem", + "isRequired": false, + "isDeprecated": false, + "rightColumn": 62, + "widgetId": "w5xz68ssw4", + "accentColor": "{{appsmith.theme.colors.primaryColor}}", + "isVisible": true, + "label": "{{Table1.columnOrder[4].toString().replace(/(?:^|\\s|[\"'([{])+\\S/g, match => match.toUpperCase());\n}}", + "version": 2, + "parentId": "sdc2iv8uiq", + "labelAlignment": "left", + "renderMode": "CANVAS", + "isLoading": false, + "borderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}", + "iconAlign": "left", + "defaultText": "" + } + ], + "isDisabled": false, + "key": "jcn9nfbcoh", + "isDeprecated": false, + "rightColumn": 401.25, + "detachFromLayout": true, + "widgetId": "sdc2iv8uiq", + "accentColor": "{{appsmith.theme.colors.primaryColor}}", + "isVisible": true, + "version": 1, + "parentId": "bl75l6vmtq", + "renderMode": "CANVAS", + "isLoading": false, + "borderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}" + } + ], + "key": "n6csxgy8za", + "height": 548, + "isDeprecated": false, + "rightColumn": 44, + "detachFromLayout": true, + "widgetId": "bl75l6vmtq", + "canOutsideClickClose": true, + "canEscapeKeyClose": true, + "version": 2, + "parentId": "0", + "renderMode": "CANVAS", + "isLoading": false, + "borderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}", + "width": 456 + }, + { + "boxShadow": "{{appsmith.theme.boxShadow.appBoxShadow}}", + "isVisibleDownload": true, + "iconSVG": "/static/media/icon.db8a9cbd.svg", + "topRow": 7, + "isSortable": true, + "type": "TABLE_WIDGET", + "animateLoading": true, + "dynamicBindingPathList": [ + { + "key": "accentColor" + }, + { + "key": "borderRadius" + }, + { + "key": "boxShadow" + }, + { + "key": "childStylesheet.button.buttonColor" + }, + { + "key": "childStylesheet.button.borderRadius" + }, + { + "key": "childStylesheet.menuButton.menuColor" + }, + { + "key": "childStylesheet.menuButton.borderRadius" + }, + { + "key": "childStylesheet.iconButton.buttonColor" + }, + { + "key": "childStylesheet.iconButton.borderRadius" + }, + { + "key": "tableData" + }, + { + "key": "derivedColumns.customColumn1.buttonColor" + }, + { + "key": "primaryColumns.customColumn1.buttonColor" + }, + { + "key": "derivedColumns.customColumn1.borderRadius" + }, + { + "key": "primaryColumns.customColumn1.borderRadius" + }, + { + "key": "derivedColumns.customColumn1.boxShadow" + }, + { + "key": "primaryColumns.customColumn1.boxShadow" + }, + { + "key": "derivedColumns.customColumn1.buttonLabel" + }, + { + "key": "primaryColumns.customColumn1.buttonLabel" + }, + { + "key": "primaryColumns.One_1_.computedValue" + }, + { + "key": "primaryColumns.AsMany.computedValue" + }, + { + "key": "primaryColumns.Limited_4_.computedValue" + }, + { + "key": "primaryColumns.Unlimited.computedValue" + }, + { + "key": "primaryColumns.serialid.computedValue" + }, + { + "key": "primaryColumns.AsMany_Len.computedValue" + }, + { + "key": "primaryColumns.Unlimited_Len.computedValue" + } + ], + "leftColumn": 4, + "delimiter": ",", + "accentColor": "{{appsmith.theme.colors.primaryColor}}", + "isVisibleFilters": true, + "isVisible": true, + "enableClientSideSearch": true, + "version": 3, + "totalRecordsCount": 0, + "isLoading": false, + "childStylesheet": { + "button": { + "buttonColor": "{{appsmith.theme.colors.primaryColor}}", + "borderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}", + "boxShadow": "none" + }, + "menuButton": { + "menuColor": "{{appsmith.theme.colors.primaryColor}}", + "borderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}", + "boxShadow": "none" + }, + "iconButton": { + "buttonColor": "{{appsmith.theme.colors.primaryColor}}", + "borderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}", + "boxShadow": "none" + } + }, + "borderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}", + "primaryColumnId": "serialid", + "columnSizeMap": { + "task": 245, + "step": 62, + "status": 75, + "serialid": 78, + "bigintid": 309, + "demimalid": 378, + "decimalid": 259, + "numericid": 270 + }, + "widgetName": "Table1", + "defaultPageSize": 0, + "columnOrder": [ + "serialid", + "One_1_", + "AsMany", + "Limited_4_", + "Unlimited", + "AsMany_Len", + "Unlimited_Len", + "customColumn1" + ], + "dynamicPropertyPathList": [], + "displayName": "Table", + "bottomRow": 50, + "parentRowSpace": 10, + "defaultSelectedRow": "0", + "hideCard": false, + "parentColumnSpace": 16.71875, + "dynamicTriggerPathList": [ + { + "key": "primaryColumns.customColumn1.onClick" + } + ], + "primaryColumns": { + "customColumn1": { + "index": 4, + "width": 150, + "id": "customColumn1", + "columnType": "button", + "enableFilter": true, + "enableSort": true, + "isVisible": true, + "isDisabled": false, + "isCellVisible": true, + "isDerived": true, + "label": "delete", + "computedValue": "", + "buttonStyle": "rgb(3, 179, 101)", + "labelColor": "#FFFFFF", + "buttonColor": "{{Table1.sanitizedTableData.map((currentRow) => ( appsmith.theme.colors.primaryColor))}}", + "borderRadius": "{{Table1.sanitizedTableData.map((currentRow) => ( appsmith.theme.borderRadius.appBorderRadius))}}", + "boxShadow": "{{Table1.sanitizedTableData.map((currentRow) => ( 'none'))}}", + "iconName": "", + "buttonLabel": "{{Table1.sanitizedTableData.map((currentRow) => ( 'DeleteQuery'))}}", + "onClick": "{{deleteRecord.run(() => selectRecords.run(), () => {})}}" + }, + "One_1_": { + "index": 1, + "width": 150, + "id": "One_1_", + "horizontalAlignment": "LEFT", + "verticalAlignment": "CENTER", + "columnType": "text", + "textColor": "", + "textSize": "0.875rem", + "enableFilter": true, + "enableSort": true, + "isVisible": true, + "isDisabled": false, + "isCellVisible": true, + "isDerived": false, + "label": "One_1_", + "computedValue": "{{Table1.sanitizedTableData.map((currentRow) => ( currentRow.One_1_))}}", + "cellBackground": "" + }, + "AsMany": { + "index": 2, + "width": 150, + "id": "AsMany", + "horizontalAlignment": "LEFT", + "verticalAlignment": "CENTER", + "columnType": "text", + "textColor": "", + "textSize": "0.875rem", + "enableFilter": true, + "enableSort": true, + "isVisible": true, + "isDisabled": false, + "isCellVisible": true, + "isDerived": false, + "label": "AsMany", + "computedValue": "{{Table1.sanitizedTableData.map((currentRow) => ( currentRow.AsMany))}}", + "cellBackground": "" + }, + "Limited_4_": { + "index": 3, + "width": 150, + "id": "Limited_4_", + "horizontalAlignment": "LEFT", + "verticalAlignment": "CENTER", + "columnType": "text", + "textColor": "", + "textSize": "0.875rem", + "enableFilter": true, + "enableSort": true, + "isVisible": true, + "isDisabled": false, + "isCellVisible": true, + "isDerived": false, + "label": "Limited_4_", + "computedValue": "{{Table1.sanitizedTableData.map((currentRow) => ( currentRow.Limited_4_))}}", + "cellBackground": "" + }, + "Unlimited": { + "index": 4, + "width": 150, + "id": "Unlimited", + "horizontalAlignment": "LEFT", + "verticalAlignment": "CENTER", + "columnType": "text", + "textColor": "", + "textSize": "0.875rem", + "enableFilter": true, + "enableSort": true, + "isVisible": true, + "isDisabled": false, + "isCellVisible": true, + "isDerived": false, + "label": "Unlimited", + "computedValue": "{{Table1.sanitizedTableData.map((currentRow) => ( currentRow.Unlimited))}}", + "cellBackground": "" + }, + "serialid": { + "index": 4, + "width": 150, + "id": "serialid", + "horizontalAlignment": "LEFT", + "verticalAlignment": "CENTER", + "columnType": "text", + "textColor": "", + "textSize": "0.875rem", + "enableFilter": true, + "enableSort": true, + "isVisible": true, + "isDisabled": false, + "isCellVisible": true, + "isDerived": false, + "label": "serialid", + "computedValue": "{{Table1.sanitizedTableData.map((currentRow) => ( currentRow.serialid))}}", + "cellBackground": "" + }, + "AsMany_Len": { + "index": 5, + "width": 150, + "id": "AsMany_Len", + "horizontalAlignment": "LEFT", + "verticalAlignment": "CENTER", + "columnType": "text", + "textColor": "", + "textSize": "0.875rem", + "enableFilter": true, + "enableSort": true, + "isVisible": true, + "isDisabled": false, + "isCellVisible": true, + "isDerived": false, + "label": "AsMany_Len", + "computedValue": "{{Table1.sanitizedTableData.map((currentRow) => ( currentRow.AsMany_Len))}}", + "cellBackground": "" + }, + "Unlimited_Len": { + "index": 6, + "width": 150, + "id": "Unlimited_Len", + "horizontalAlignment": "LEFT", + "verticalAlignment": "CENTER", + "columnType": "text", + "textColor": "", + "textSize": "0.875rem", + "enableFilter": true, + "enableSort": true, + "isVisible": true, + "isDisabled": false, + "isCellVisible": true, + "isDerived": false, + "label": "Unlimited_Len", + "computedValue": "{{Table1.sanitizedTableData.map((currentRow) => ( currentRow.Unlimited_Len))}}", + "cellBackground": "" + } + }, + "key": "8l8hit8gra", + "derivedColumns": { + "customColumn1": { + "index": 4, + "width": 150, + "id": "customColumn1", + "columnType": "button", + "enableFilter": true, + "enableSort": true, + "isVisible": true, + "isDisabled": false, + "isCellVisible": true, + "isDerived": true, + "label": "delete", + "computedValue": "", + "buttonStyle": "rgb(3, 179, 101)", + "labelColor": "#FFFFFF", + "buttonColor": "{{Table1.sanitizedTableData.map((currentRow) => ( appsmith.theme.colors.primaryColor))}}", + "borderRadius": "{{Table1.sanitizedTableData.map((currentRow) => ( appsmith.theme.borderRadius.appBorderRadius))}}", + "boxShadow": "{{Table1.sanitizedTableData.map((currentRow) => ( 'none'))}}", + "iconName": "", + "buttonLabel": "{{Table1.sanitizedTableData.map((currentRow) => ( 'DeleteQuery'))}}" + } + }, + "isDeprecated": false, + "rightColumn": 60, + "textSize": "0.875rem", + "widgetId": "w9mvbp1g2t", + "tableData": "{{selectRecords.data}}", + "label": "Data", + "searchKey": "", + "parentId": "0", + "renderMode": "CANVAS", + "horizontalAlignment": "LEFT", + "isVisibleSearch": true, + "isVisiblePagination": true, + "verticalAlignment": "CENTER" + }, + { + "boxShadow": "none", + "widgetName": "InsertButton", + "onClick": "{{showModal('InsertModal')}}", + "buttonColor": "{{appsmith.theme.colors.primaryColor}}", + "dynamicPropertyPathList": [ + { + "key": "onClick" + } + ], + "displayName": "Button", + "iconSVG": "/static/media/icon.cca02633.svg", + "topRow": 2, + "bottomRow": 6, + "parentRowSpace": 10, + "type": "BUTTON_WIDGET", + "hideCard": false, + "animateLoading": true, + "parentColumnSpace": 16.71875, + "dynamicTriggerPathList": [ + { + "key": "onClick" + } + ], + "leftColumn": 4, + "dynamicBindingPathList": [ + { + "key": "buttonColor" + }, + { + "key": "borderRadius" + } + ], + "text": "Run InsertQuery", + "isDisabled": false, + "key": "7va5q4amde", + "isDeprecated": false, + "rightColumn": 20, + "isDefaultClickDisabled": true, + "widgetId": "jr1y6sdur4", + "isVisible": true, + "recaptchaType": "V3", + "version": 1, + "parentId": "0", + "renderMode": "CANVAS", + "isLoading": false, + "borderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}", + "buttonVariant": "PRIMARY", + "placement": "CENTER" + }, + { + "boxShadow": "none", + "widgetName": "UpdateButton", + "onClick": "{{showModal('UpdateModal')}}", + "buttonColor": "{{appsmith.theme.colors.primaryColor}}", + "dynamicPropertyPathList": [], + "displayName": "Button", + "iconSVG": "/static/media/icon.cca02633.svg", + "topRow": 2, + "bottomRow": 6, + "parentRowSpace": 10, + "type": "BUTTON_WIDGET", + "hideCard": false, + "animateLoading": true, + "parentColumnSpace": 16.71875, + "dynamicTriggerPathList": [ + { + "key": "onClick" + } + ], + "leftColumn": 44, + "dynamicBindingPathList": [ + { + "key": "buttonColor" + }, + { + "key": "borderRadius" + } + ], + "text": "Run UpdateQuery", + "isDisabled": false, + "key": "7va5q4amde", + "isDeprecated": false, + "rightColumn": 60, + "isDefaultClickDisabled": true, + "widgetId": "3k4fg1zx8x", + "isVisible": true, + "recaptchaType": "V3", + "version": 1, + "parentId": "0", + "renderMode": "CANVAS", + "isLoading": false, + "borderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}", + "buttonVariant": "PRIMARY", + "placement": "CENTER" + }, + { + "boxShadow": "none", + "widgetName": "InsertModal", + "isCanvas": true, + "displayName": "Modal", + "iconSVG": "/static/media/icon.4975978e.svg", + "topRow": 22, + "bottomRow": 46, + "parentRowSpace": 10, + "type": "MODAL_WIDGET", + "hideCard": false, + "shouldScrollContents": true, + "animateLoading": true, + "parentColumnSpace": 16.71875, + "leftColumn": 20, + "dynamicBindingPathList": [ + { + "key": "borderRadius" + } + ], + "children": [ + { + "boxShadow": "none", + "widgetName": "Canvas1", + "displayName": "Canvas", + "topRow": 0, + "bottomRow": 540, + "parentRowSpace": 1, + "type": "CANVAS_WIDGET", + "canExtend": true, + "hideCard": true, + "shouldScrollContents": false, + "minHeight": 548, + "parentColumnSpace": 1, + "dynamicTriggerPathList": [], + "leftColumn": 0, + "dynamicBindingPathList": [ + { + "key": "borderRadius" + }, + { + "key": "accentColor" + } + ], + "children": [ + { + "boxShadow": "none", + "widgetName": "Insertlimited", + "displayName": "Input", + "iconSVG": "/static/media/icon.9f505595.svg", + "topRow": 23, + "bottomRow": 30, + "parentRowSpace": 10, + "labelWidth": 5, + "autoFocus": false, + "type": "INPUT_WIDGET_V2", + "hideCard": false, + "animateLoading": true, + "parentColumnSpace": 6.9375, + "dynamicTriggerPathList": [], + "resetOnSubmit": true, + "leftColumn": 2, + "dynamicBindingPathList": [ + { + "key": "accentColor" + }, + { + "key": "borderRadius" + }, + { + "key": "label" + } + ], + "labelPosition": "Top", + "labelStyle": "", + "inputType": "TEXT", + "maxChars": "10", + "isDisabled": false, + "key": "x49qcvsllj", + "labelTextSize": "0.875rem", + "isRequired": false, + "isDeprecated": false, + "rightColumn": 62, + "widgetId": "41k33kecwn", + "accentColor": "{{appsmith.theme.colors.primaryColor}}", + "isVisible": true, + "label": "{{Table1.columnOrder[3].toString().replace(/(?:^|\\s|[\"'([{])+\\S/g, match => match.toUpperCase());\n}}", + "version": 2, + "parentId": "6otxv391ns", + "labelAlignment": "left", + "renderMode": "CANVAS", + "isLoading": false, + "borderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}", + "iconAlign": "left", + "defaultText": "" + }, + { + "boxShadow": "none", + "widgetName": "Insertasmany", + "displayName": "Input", + "iconSVG": "/static/media/icon.9f505595.svg", + "topRow": 15, + "bottomRow": 22, + "parentRowSpace": 10, + "labelWidth": 5, + "autoFocus": false, + "type": "INPUT_WIDGET_V2", + "hideCard": false, + "animateLoading": true, + "parentColumnSpace": 6.9375, + "dynamicTriggerPathList": [], + "resetOnSubmit": true, + "leftColumn": 2, + "dynamicBindingPathList": [ + { + "key": "accentColor" + }, + { + "key": "borderRadius" + }, + { + "key": "label" + } + ], + "labelPosition": "Top", + "labelStyle": "", + "inputType": "TEXT", + "isDisabled": false, + "key": "x49qcvsllj", + "labelTextSize": "0.875rem", + "isRequired": false, + "isDeprecated": false, + "rightColumn": 62, + "widgetId": "uyzomn3bp6", + "accentColor": "{{appsmith.theme.colors.primaryColor}}", + "isVisible": true, + "label": "{{Table1.columnOrder[2].toString().replace(/(?:^|\\s|[\"'([{])+\\S/g, match => match.toUpperCase());\n}}", + "version": 2, + "parentId": "6otxv391ns", + "labelAlignment": "left", + "renderMode": "CANVAS", + "isLoading": false, + "borderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}", + "iconAlign": "left", + "defaultText": "" + }, + { + "boxShadow": "none", + "widgetName": "IconButton1", + "onClick": "{{closeModal('InsertModal')}}", + "buttonColor": "{{appsmith.theme.colors.primaryColor}}", + "displayName": "Icon Button", + "iconSVG": "/static/media/icon.1a0c634a.svg", + "topRow": 1, + "bottomRow": 5, + "type": "ICON_BUTTON_WIDGET", + "hideCard": false, + "animateLoading": true, + "leftColumn": 56, + "dynamicBindingPathList": [ + { + "key": "buttonColor" + }, + { + "key": "borderRadius" + } + ], + "iconSize": 24, + "isDisabled": false, + "key": "glch1esz5b", + "isDeprecated": false, + "rightColumn": 64, + "iconName": "cross", + "widgetId": "jqcrr1o8or", + "isVisible": true, + "version": 1, + "parentId": "6otxv391ns", + "renderMode": "CANVAS", + "isLoading": false, + "borderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}", + "buttonVariant": "TERTIARY" + }, + { + "widgetName": "Text1", + "displayName": "Text", + "iconSVG": "/static/media/icon.97c59b52.svg", + "topRow": 1, + "bottomRow": 5, + "type": "TEXT_WIDGET", + "hideCard": false, + "animateLoading": true, + "overflow": "NONE", + "fontFamily": "{{appsmith.theme.fontFamily.appFont}}", + "dynamicTriggerPathList": [], + "leftColumn": 1, + "dynamicBindingPathList": [ + { + "key": "fontFamily" + }, + { + "key": "borderRadius" + } + ], + "shouldTruncate": false, + "truncateButtonColor": "#FFC13D", + "text": "Insert Record", + "key": "orwoe8agwc", + "isDeprecated": false, + "rightColumn": 41, + "textAlign": "LEFT", + "widgetId": "achn17gfze", + "isVisible": true, + "fontStyle": "BOLD", + "textColor": "#231F20", + "version": 1, + "parentId": "6otxv391ns", + "renderMode": "CANVAS", + "isLoading": false, + "borderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}", + "fontSize": "1.5rem" + }, + { + "boxShadow": "none", + "widgetName": "Button5", + "onClick": "{{closeModal('InsertModal')}}", + "buttonColor": "{{appsmith.theme.colors.primaryColor}}", + "displayName": "Button", + "iconSVG": "/static/media/icon.cca02633.svg", + "topRow": 48, + "bottomRow": 52, + "type": "BUTTON_WIDGET", + "hideCard": false, + "animateLoading": true, + "leftColumn": 12, + "dynamicBindingPathList": [ + { + "key": "buttonColor" + }, + { + "key": "borderRadius" + } + ], + "text": "Close", + "isDisabled": false, + "key": "b7wg448vx0", + "isDeprecated": false, + "rightColumn": 28, + "isDefaultClickDisabled": true, + "widgetId": "0ym0mah4go", + "buttonStyle": "PRIMARY", + "isVisible": true, + "recaptchaType": "V3", + "version": 1, + "parentId": "6otxv391ns", + "renderMode": "CANVAS", + "isLoading": false, + "borderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}", + "buttonVariant": "SECONDARY", + "placement": "CENTER" + }, + { + "boxShadow": "none", + "widgetName": "runInsertQuery", + "onClick": "{{insertRecord.run(() => {\nselectRecords.run();\t\t\t\tresetWidget('InsertModal', true);\ncloseModal('InsertModal'), () => {};})}}", + "buttonColor": "{{appsmith.theme.colors.primaryColor}}", + "dynamicPropertyPathList": [ + { + "key": "onClick" + } + ], + "displayName": "Button", + "iconSVG": "/static/media/icon.cca02633.svg", + "topRow": 48, + "bottomRow": 52, + "type": "BUTTON_WIDGET", + "hideCard": false, + "animateLoading": true, + "dynamicTriggerPathList": [ + { + "key": "onClick" + } + ], + "leftColumn": 33, + "dynamicBindingPathList": [ + { + "key": "buttonColor" + }, + { + "key": "borderRadius" + } + ], + "text": "Insert", + "isDisabled": false, + "key": "b7wg448vx0", + "isDeprecated": false, + "rightColumn": 49, + "isDefaultClickDisabled": true, + "widgetId": "0trrzqxtbk", + "buttonStyle": "PRIMARY_BUTTON", + "isVisible": true, + "recaptchaType": "V3", + "version": 1, + "parentId": "6otxv391ns", + "renderMode": "CANVAS", + "isLoading": false, + "borderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}", + "buttonVariant": "PRIMARY", + "placement": "CENTER" + }, + { + "boxShadow": "none", + "widgetName": "Insertone", + "displayName": "Input", + "iconSVG": "/static/media/icon.9f505595.svg", + "topRow": 7, + "bottomRow": 14, + "parentRowSpace": 10, + "labelWidth": 5, + "autoFocus": false, + "type": "INPUT_WIDGET_V2", + "hideCard": false, + "animateLoading": true, + "parentColumnSpace": 6.9375, + "dynamicTriggerPathList": [], + "resetOnSubmit": true, + "leftColumn": 2, + "dynamicBindingPathList": [ + { + "key": "accentColor" + }, + { + "key": "borderRadius" + }, + { + "key": "label" + } + ], + "labelPosition": "Top", + "labelStyle": "", + "inputType": "TEXT", + "maxChars": "2", + "isDisabled": false, + "key": "x49qcvsllj", + "labelTextSize": "0.875rem", + "isRequired": false, + "isDeprecated": false, + "rightColumn": 62, + "widgetId": "ufngck5pv5", + "accentColor": "{{appsmith.theme.colors.primaryColor}}", + "isVisible": true, + "label": "{{Table1.columnOrder[1].toString().replace(/(?:^|\\s|[\"'([{])+\\S/g, match => match.toUpperCase());\n}}", + "version": 2, + "parentId": "6otxv391ns", + "labelAlignment": "left", + "renderMode": "CANVAS", + "isLoading": false, + "borderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}", + "iconAlign": "left", + "defaultText": "" + }, + { + "boxShadow": "none", + "widgetName": "Insertunlimited", + "displayName": "Input", + "iconSVG": "/static/media/icon.9f505595.svg", + "topRow": 31, + "bottomRow": 46, + "parentRowSpace": 10, + "labelWidth": 5, + "autoFocus": false, + "type": "INPUT_WIDGET_V2", + "hideCard": false, + "animateLoading": true, + "parentColumnSpace": 6.9375, + "dynamicTriggerPathList": [], + "resetOnSubmit": true, + "leftColumn": 2, + "dynamicBindingPathList": [ + { + "key": "accentColor" + }, + { + "key": "borderRadius" + }, + { + "key": "label" + } + ], + "labelPosition": "Top", + "labelStyle": "", + "inputType": "TEXT", + "isDisabled": false, + "key": "223t1cmc0w", + "labelTextSize": "0.875rem", + "isRequired": false, + "isDeprecated": false, + "rightColumn": 62, + "widgetId": "e78wpqgwlc", + "accentColor": "{{appsmith.theme.colors.primaryColor}}", + "isVisible": true, + "label": "{{Table1.columnOrder[4].toString().replace(/(?:^|\\s|[\"'([{])+\\S/g, match => match.toUpperCase());\n}}", + "version": 2, + "parentId": "6otxv391ns", + "labelAlignment": "left", + "renderMode": "CANVAS", + "isLoading": false, + "borderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}", + "iconAlign": "left", + "defaultText": "" + } + ], + "isDisabled": false, + "key": "jcn9nfbcoh", + "isDeprecated": false, + "rightColumn": 401.25, + "detachFromLayout": true, + "widgetId": "6otxv391ns", + "accentColor": "{{appsmith.theme.colors.primaryColor}}", + "isVisible": true, + "version": 1, + "parentId": "rhom101hjk", + "renderMode": "CANVAS", + "isLoading": false, + "borderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}" + } + ], + "key": "n6csxgy8za", + "height": 548, + "isDeprecated": false, + "rightColumn": 44, + "detachFromLayout": true, + "widgetId": "rhom101hjk", + "canOutsideClickClose": true, + "canEscapeKeyClose": true, + "version": 2, + "parentId": "0", + "renderMode": "CANVAS", + "isLoading": false, + "borderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}", + "width": 456 + }, + { + "boxShadow": "none", + "widgetName": "IconButton2", + "onClick": "{{deleteAllRecords.run(() => selectRecords.run(), () => {})}}", + "buttonColor": "{{appsmith.theme.colors.primaryColor}}", + "displayName": "Icon Button", + "iconSVG": "/static/media/icon.1a0c634a.svg", + "topRow": 2, + "bottomRow": 6, + "parentRowSpace": 10, + "type": "ICON_BUTTON_WIDGET", + "hideCard": false, + "animateLoading": true, + "parentColumnSpace": 16.71875, + "dynamicTriggerPathList": [ + { + "key": "onClick" + } + ], + "leftColumn": 30, + "dynamicBindingPathList": [ + { + "key": "buttonColor" + }, + { + "key": "borderRadius" + } + ], + "isDisabled": false, + "key": "8he4nv2fbs", + "isDeprecated": false, + "rightColumn": 34, + "iconName": "delete", + "widgetId": "30jhk2thdb", + "isVisible": true, + "version": 1, + "parentId": "0", + "renderMode": "CANVAS", + "isLoading": false, + "borderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}", + "buttonVariant": "PRIMARY" + } + ] + } +} diff --git a/app/client/cypress/fixtures/DateTimeDTdsl.json b/app/client/cypress/fixtures/DateTimeDTdsl.json new file mode 100644 index 0000000000..bf5db5a0ee --- /dev/null +++ b/app/client/cypress/fixtures/DateTimeDTdsl.json @@ -0,0 +1,1501 @@ +{ + "dsl": { + "widgetName": "MainContainer", + "backgroundColor": "none", + "rightColumn": 4896, + "snapColumns": 64, + "detachFromLayout": true, + "widgetId": "0", + "topRow": 0, + "bottomRow": 1320, + "containerStyle": "none", + "snapRows": 125, + "parentRowSpace": 1, + "type": "CANVAS_WIDGET", + "canExtend": true, + "version": 59, + "minHeight": 1292, + "dynamicTriggerPathList": [], + "parentColumnSpace": 1, + "dynamicBindingPathList": [], + "leftColumn": 0, + "children": [ + { + "boxShadow": "none", + "widgetName": "UpdateModal", + "isCanvas": true, + "displayName": "Modal", + "iconSVG": "/static/media/icon.4975978e.svg", + "topRow": 51, + "bottomRow": 75, + "parentRowSpace": 10, + "type": "MODAL_WIDGET", + "hideCard": false, + "shouldScrollContents": true, + "animateLoading": true, + "parentColumnSpace": 16.71875, + "leftColumn": 20, + "dynamicBindingPathList": [ + { + "key": "borderRadius" + } + ], + "children": [ + { + "boxShadow": "none", + "widgetName": "Canvas1Copy", + "displayName": "Canvas", + "topRow": 0, + "bottomRow": 540, + "parentRowSpace": 1, + "type": "CANVAS_WIDGET", + "canExtend": true, + "hideCard": true, + "shouldScrollContents": false, + "minHeight": 548, + "parentColumnSpace": 1, + "leftColumn": 0, + "dynamicBindingPathList": [ + { + "key": "borderRadius" + }, + { + "key": "accentColor" + } + ], + "children": [ + { + "boxShadow": "none", + "widgetName": "Updatedater", + "displayName": "Input", + "iconSVG": "/static/media/icon.9f505595.svg", + "topRow": 23, + "bottomRow": 30, + "parentRowSpace": 10, + "labelWidth": 5, + "autoFocus": false, + "type": "INPUT_WIDGET_V2", + "hideCard": false, + "animateLoading": true, + "parentColumnSpace": 6.9375, + "dynamicTriggerPathList": [], + "resetOnSubmit": true, + "leftColumn": 2, + "dynamicBindingPathList": [ + { + "key": "accentColor" + }, + { + "key": "borderRadius" + }, + { + "key": "defaultText" + }, + { + "key": "label" + } + ], + "labelPosition": "Top", + "labelStyle": "", + "inputType": "TEXT", + "isDisabled": false, + "key": "x49qcvsllj", + "labelTextSize": "0.875rem", + "isRequired": false, + "isDeprecated": false, + "rightColumn": 62, + "widgetId": "mwe3ff4xg7", + "accentColor": "{{appsmith.theme.colors.primaryColor}}", + "isVisible": true, + "label": "{{Table1.columnOrder[3].toString().replace(/(?:^|\\s|[\"'([{])+\\S/g, match => match.toUpperCase());\n}}", + "version": 2, + "parentId": "sdc2iv8uiq", + "labelAlignment": "left", + "renderMode": "CANVAS", + "isLoading": false, + "borderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}", + "iconAlign": "left", + "defaultText": "{{Table1.selectedRow.dater}}" + }, + { + "boxShadow": "none", + "widgetName": "Updatetstz", + "displayName": "Input", + "iconSVG": "/static/media/icon.9f505595.svg", + "topRow": 15, + "bottomRow": 22, + "parentRowSpace": 10, + "labelWidth": 5, + "autoFocus": false, + "type": "INPUT_WIDGET_V2", + "hideCard": false, + "animateLoading": true, + "parentColumnSpace": 6.9375, + "dynamicTriggerPathList": [], + "resetOnSubmit": true, + "leftColumn": 2, + "dynamicBindingPathList": [ + { + "key": "accentColor" + }, + { + "key": "borderRadius" + }, + { + "key": "defaultText" + }, + { + "key": "label" + } + ], + "labelPosition": "Top", + "labelStyle": "", + "inputType": "TEXT", + "isDisabled": false, + "key": "x49qcvsllj", + "labelTextSize": "0.875rem", + "isRequired": false, + "isDeprecated": false, + "rightColumn": 62, + "widgetId": "el112yx9tb", + "accentColor": "{{appsmith.theme.colors.primaryColor}}", + "isVisible": true, + "label": "{{Table1.columnOrder[2].toString().replace(/(?:^|\\s|[\"'([{])+\\S/g, match => match.toUpperCase());\n}}", + "version": 2, + "parentId": "sdc2iv8uiq", + "labelAlignment": "left", + "renderMode": "CANVAS", + "isLoading": false, + "borderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}", + "iconAlign": "left", + "defaultText": "{{Table1.selectedRow.tstz}}" + }, + { + "boxShadow": "none", + "widgetName": "IconButton1Copy", + "onClick": "{{closeModal('InsertModal')}}", + "buttonColor": "{{appsmith.theme.colors.primaryColor}}", + "displayName": "Icon Button", + "iconSVG": "/static/media/icon.1a0c634a.svg", + "topRow": 1, + "bottomRow": 5, + "type": "ICON_BUTTON_WIDGET", + "hideCard": false, + "animateLoading": true, + "leftColumn": 56, + "dynamicBindingPathList": [ + { + "key": "buttonColor" + }, + { + "key": "borderRadius" + } + ], + "iconSize": 24, + "isDisabled": false, + "key": "glch1esz5b", + "isDeprecated": false, + "rightColumn": 64, + "iconName": "cross", + "widgetId": "4fnws5ftg4", + "isVisible": true, + "version": 1, + "parentId": "sdc2iv8uiq", + "renderMode": "CANVAS", + "isLoading": false, + "borderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}", + "buttonVariant": "TERTIARY" + }, + { + "widgetName": "Text1Copy", + "displayName": "Text", + "iconSVG": "/static/media/icon.97c59b52.svg", + "topRow": 1, + "bottomRow": 7, + "type": "TEXT_WIDGET", + "hideCard": false, + "animateLoading": true, + "overflow": "NONE", + "fontFamily": "{{appsmith.theme.fontFamily.appFont}}", + "dynamicTriggerPathList": [], + "leftColumn": 1, + "dynamicBindingPathList": [ + { + "key": "fontFamily" + }, + { + "key": "borderRadius" + }, + { + "key": "text" + } + ], + "shouldTruncate": false, + "truncateButtonColor": "#FFC13D", + "text": "Update Data for SerialId # {{Table1.selectedRow.serialid}}", + "key": "orwoe8agwc", + "isDeprecated": false, + "rightColumn": 55, + "textAlign": "LEFT", + "widgetId": "3rncsabmka", + "isVisible": true, + "fontStyle": "BOLD", + "textColor": "#231F20", + "version": 1, + "parentId": "sdc2iv8uiq", + "renderMode": "CANVAS", + "isLoading": false, + "borderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}", + "fontSize": "1.5rem" + }, + { + "boxShadow": "none", + "widgetName": "Button5Copy", + "onClick": "{{closeModal('UpdateModal')}}", + "buttonColor": "{{appsmith.theme.colors.primaryColor}}", + "displayName": "Button", + "iconSVG": "/static/media/icon.cca02633.svg", + "topRow": 48, + "bottomRow": 52, + "type": "BUTTON_WIDGET", + "hideCard": false, + "animateLoading": true, + "leftColumn": 13, + "dynamicBindingPathList": [ + { + "key": "buttonColor" + }, + { + "key": "borderRadius" + } + ], + "text": "Close", + "isDisabled": false, + "key": "b7wg448vx0", + "isDeprecated": false, + "rightColumn": 29, + "isDefaultClickDisabled": true, + "widgetId": "kf5ait9qmq", + "buttonStyle": "PRIMARY", + "isVisible": true, + "recaptchaType": "V3", + "version": 1, + "parentId": "sdc2iv8uiq", + "renderMode": "CANVAS", + "isLoading": false, + "borderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}", + "buttonVariant": "SECONDARY", + "placement": "CENTER" + }, + { + "boxShadow": "none", + "widgetName": "runUpdateQuery", + "onClick": "{{updateRecord.run(() => {closeModal('UpdateModal'), () => {};\nselectRecords.run()\t\t\t\t\t\t\t\t\t\t\t\t })}}", + "buttonColor": "{{appsmith.theme.colors.primaryColor}}", + "dynamicPropertyPathList": [ + { + "key": "onClick" + } + ], + "displayName": "Button", + "iconSVG": "/static/media/icon.cca02633.svg", + "topRow": 48, + "bottomRow": 52, + "type": "BUTTON_WIDGET", + "hideCard": false, + "animateLoading": true, + "dynamicTriggerPathList": [ + { + "key": "onClick" + } + ], + "leftColumn": 33, + "dynamicBindingPathList": [ + { + "key": "buttonColor" + }, + { + "key": "borderRadius" + } + ], + "text": "Update", + "isDisabled": false, + "key": "b7wg448vx0", + "isDeprecated": false, + "rightColumn": 49, + "isDefaultClickDisabled": true, + "widgetId": "pb2y77v7wa", + "buttonStyle": "PRIMARY_BUTTON", + "isVisible": true, + "recaptchaType": "V3", + "version": 1, + "parentId": "sdc2iv8uiq", + "renderMode": "CANVAS", + "isLoading": false, + "borderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}", + "buttonVariant": "PRIMARY", + "placement": "CENTER" + }, + { + "boxShadow": "none", + "widgetName": "Updatets", + "displayName": "Input", + "iconSVG": "/static/media/icon.9f505595.svg", + "topRow": 7, + "bottomRow": 14, + "parentRowSpace": 10, + "labelWidth": 5, + "autoFocus": false, + "type": "INPUT_WIDGET_V2", + "hideCard": false, + "animateLoading": true, + "parentColumnSpace": 6.9375, + "dynamicTriggerPathList": [], + "resetOnSubmit": true, + "leftColumn": 2, + "dynamicBindingPathList": [ + { + "key": "accentColor" + }, + { + "key": "borderRadius" + }, + { + "key": "label" + }, + { + "key": "defaultText" + } + ], + "labelPosition": "Top", + "labelStyle": "", + "inputType": "TEXT", + "maxChars": "", + "isDisabled": false, + "key": "x49qcvsllj", + "labelTextSize": "0.875rem", + "isRequired": false, + "isDeprecated": false, + "rightColumn": 62, + "widgetId": "b88g2hsnfh", + "accentColor": "{{appsmith.theme.colors.primaryColor}}", + "isVisible": true, + "label": "{{Table1.columnOrder[1].toString().replace(/(?:^|\\s|[\"'([{])+\\S/g, match => match.toUpperCase());\n}}", + "version": 2, + "parentId": "sdc2iv8uiq", + "labelAlignment": "left", + "renderMode": "CANVAS", + "isLoading": false, + "borderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}", + "iconAlign": "left", + "defaultText": "{{Table1.selectedRow.ts}}" + }, + { + "boxShadow": "none", + "widgetName": "Updatetimer", + "displayName": "Input", + "iconSVG": "/static/media/icon.9f505595.svg", + "topRow": 31, + "bottomRow": 38, + "parentRowSpace": 10, + "labelWidth": 5, + "autoFocus": false, + "type": "INPUT_WIDGET_V2", + "hideCard": false, + "animateLoading": true, + "parentColumnSpace": 6.9375, + "dynamicTriggerPathList": [], + "resetOnSubmit": true, + "leftColumn": 2, + "dynamicBindingPathList": [ + { + "key": "accentColor" + }, + { + "key": "borderRadius" + }, + { + "key": "label" + }, + { + "key": "defaultText" + } + ], + "labelPosition": "Top", + "labelStyle": "", + "inputType": "TEXT", + "isDisabled": false, + "key": "223t1cmc0w", + "labelTextSize": "0.875rem", + "isRequired": false, + "isDeprecated": false, + "rightColumn": 62, + "widgetId": "w5xz68ssw4", + "accentColor": "{{appsmith.theme.colors.primaryColor}}", + "isVisible": true, + "label": "{{Table1.columnOrder[4].toString().replace(/(?:^|\\s|[\"'([{])+\\S/g, match => match.toUpperCase());\n}}", + "version": 2, + "parentId": "sdc2iv8uiq", + "labelAlignment": "left", + "renderMode": "CANVAS", + "isLoading": false, + "borderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}", + "iconAlign": "left", + "defaultText": "{{Table1.selectedRow.timer}}" + }, + { + "boxShadow": "none", + "widgetName": "Updateintervaler", + "displayName": "Input", + "iconSVG": "/static/media/icon.9f505595.svg", + "topRow": 39, + "bottomRow": 46, + "parentRowSpace": 10, + "labelWidth": 5, + "autoFocus": false, + "type": "INPUT_WIDGET_V2", + "hideCard": false, + "animateLoading": true, + "parentColumnSpace": 6.9375, + "dynamicTriggerPathList": [], + "resetOnSubmit": true, + "leftColumn": 2, + "dynamicBindingPathList": [ + { + "key": "accentColor" + }, + { + "key": "borderRadius" + }, + { + "key": "label" + }, + { + "key": "defaultText" + } + ], + "labelPosition": "Top", + "labelStyle": "", + "inputType": "TEXT", + "isDisabled": false, + "key": "yaancbar1j", + "labelTextSize": "0.875rem", + "isRequired": false, + "isDeprecated": false, + "rightColumn": 63, + "widgetId": "ea2wq5diya", + "accentColor": "{{appsmith.theme.colors.primaryColor}}", + "isVisible": true, + "label": "{{Table1.columnOrder[6].toString().replace(/(?:^|\\s|[\"'([{])+\\S/g, match => match.toUpperCase());\n}}", + "version": 2, + "parentId": "sdc2iv8uiq", + "labelAlignment": "left", + "renderMode": "CANVAS", + "isLoading": false, + "borderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}", + "iconAlign": "left", + "defaultText": "{{Table1.selectedRow.intervaler}}" + } + ], + "isDisabled": false, + "key": "jcn9nfbcoh", + "isDeprecated": false, + "rightColumn": 401.25, + "detachFromLayout": true, + "widgetId": "sdc2iv8uiq", + "accentColor": "{{appsmith.theme.colors.primaryColor}}", + "isVisible": true, + "version": 1, + "parentId": "bl75l6vmtq", + "renderMode": "CANVAS", + "isLoading": false, + "borderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}" + } + ], + "key": "n6csxgy8za", + "height": 548, + "isDeprecated": false, + "rightColumn": 44, + "detachFromLayout": true, + "widgetId": "bl75l6vmtq", + "canOutsideClickClose": true, + "canEscapeKeyClose": true, + "version": 2, + "parentId": "0", + "renderMode": "CANVAS", + "isLoading": false, + "borderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}", + "width": 456 + }, + { + "boxShadow": "{{appsmith.theme.boxShadow.appBoxShadow}}", + "isVisibleDownload": true, + "iconSVG": "/static/media/icon.db8a9cbd.svg", + "topRow": 7, + "isSortable": true, + "type": "TABLE_WIDGET", + "animateLoading": true, + "dynamicBindingPathList": [ + { + "key": "accentColor" + }, + { + "key": "borderRadius" + }, + { + "key": "boxShadow" + }, + { + "key": "childStylesheet.button.buttonColor" + }, + { + "key": "childStylesheet.button.borderRadius" + }, + { + "key": "childStylesheet.menuButton.menuColor" + }, + { + "key": "childStylesheet.menuButton.borderRadius" + }, + { + "key": "childStylesheet.iconButton.buttonColor" + }, + { + "key": "childStylesheet.iconButton.borderRadius" + }, + { + "key": "tableData" + }, + { + "key": "derivedColumns.customColumn1.buttonColor" + }, + { + "key": "primaryColumns.customColumn1.buttonColor" + }, + { + "key": "derivedColumns.customColumn1.borderRadius" + }, + { + "key": "primaryColumns.customColumn1.borderRadius" + }, + { + "key": "derivedColumns.customColumn1.boxShadow" + }, + { + "key": "primaryColumns.customColumn1.boxShadow" + }, + { + "key": "derivedColumns.customColumn1.buttonLabel" + }, + { + "key": "primaryColumns.customColumn1.buttonLabel" + }, + { + "key": "primaryColumns.serialid.computedValue" + }, + { + "key": "primaryColumns.ts.computedValue" + }, + { + "key": "primaryColumns.tstz.computedValue" + }, + { + "key": "primaryColumns.dater.computedValue" + }, + { + "key": "primaryColumns.timer.computedValue" + }, + { + "key": "primaryColumns.timertz.computedValue" + }, + { + "key": "primaryColumns.intervaler.computedValue" + } + ], + "leftColumn": 4, + "delimiter": ",", + "accentColor": "{{appsmith.theme.colors.primaryColor}}", + "isVisibleFilters": true, + "isVisible": true, + "enableClientSideSearch": true, + "version": 3, + "totalRecordsCount": 0, + "isLoading": false, + "childStylesheet": { + "button": { + "buttonColor": "{{appsmith.theme.colors.primaryColor}}", + "borderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}", + "boxShadow": "none" + }, + "menuButton": { + "menuColor": "{{appsmith.theme.colors.primaryColor}}", + "borderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}", + "boxShadow": "none" + }, + "iconButton": { + "buttonColor": "{{appsmith.theme.colors.primaryColor}}", + "borderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}", + "boxShadow": "none" + } + }, + "borderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}", + "primaryColumnId": "serialid", + "columnSizeMap": { + "task": 245, + "step": 62, + "status": 75, + "serialid": 78, + "bigintid": 309, + "demimalid": 378, + "decimalid": 259, + "numericid": 270 + }, + "widgetName": "Table1", + "defaultPageSize": 0, + "columnOrder": [ + "serialid", + "ts", + "tstz", + "dater", + "timer", + "timertz", + "intervaler", + "customColumn1" + ], + "dynamicPropertyPathList": [], + "displayName": "Table", + "bottomRow": 50, + "parentRowSpace": 10, + "defaultSelectedRow": "0", + "hideCard": false, + "parentColumnSpace": 16.71875, + "dynamicTriggerPathList": [ + { + "key": "primaryColumns.customColumn1.onClick" + } + ], + "primaryColumns": { + "customColumn1": { + "index": 4, + "width": 150, + "id": "customColumn1", + "columnType": "button", + "enableFilter": true, + "enableSort": true, + "isVisible": true, + "isDisabled": false, + "isCellVisible": true, + "isDerived": true, + "label": "delete", + "computedValue": "", + "buttonStyle": "rgb(3, 179, 101)", + "labelColor": "#FFFFFF", + "buttonColor": "{{Table1.sanitizedTableData.map((currentRow) => ( appsmith.theme.colors.primaryColor))}}", + "borderRadius": "{{Table1.sanitizedTableData.map((currentRow) => ( appsmith.theme.borderRadius.appBorderRadius))}}", + "boxShadow": "{{Table1.sanitizedTableData.map((currentRow) => ( 'none'))}}", + "iconName": "", + "buttonLabel": "{{Table1.sanitizedTableData.map((currentRow) => ( 'DeleteQuery'))}}", + "onClick": "{{deleteRecord.run(() => selectRecords.run(), () => {})}}" + }, + "serialid": { + "index": 4, + "width": 150, + "id": "serialid", + "horizontalAlignment": "LEFT", + "verticalAlignment": "CENTER", + "columnType": "text", + "textColor": "", + "textSize": "0.875rem", + "enableFilter": true, + "enableSort": true, + "isVisible": true, + "isDisabled": false, + "isCellVisible": true, + "isDerived": false, + "label": "serialid", + "computedValue": "{{Table1.sanitizedTableData.map((currentRow) => ( currentRow.serialid))}}", + "cellBackground": "" + }, + "ts": { + "index": 1, + "width": 150, + "id": "ts", + "horizontalAlignment": "LEFT", + "verticalAlignment": "CENTER", + "columnType": "text", + "textColor": "", + "textSize": "0.875rem", + "enableFilter": true, + "enableSort": true, + "isVisible": true, + "isDisabled": false, + "isCellVisible": true, + "isDerived": false, + "label": "ts", + "computedValue": "{{Table1.sanitizedTableData.map((currentRow) => ( currentRow.ts))}}", + "cellBackground": "" + }, + "tstz": { + "index": 2, + "width": 150, + "id": "tstz", + "horizontalAlignment": "LEFT", + "verticalAlignment": "CENTER", + "columnType": "text", + "textColor": "", + "textSize": "0.875rem", + "enableFilter": true, + "enableSort": true, + "isVisible": true, + "isDisabled": false, + "isCellVisible": true, + "isDerived": false, + "label": "tstz", + "computedValue": "{{Table1.sanitizedTableData.map((currentRow) => ( currentRow.tstz))}}", + "cellBackground": "" + }, + "dater": { + "index": 3, + "width": 150, + "id": "dater", + "horizontalAlignment": "LEFT", + "verticalAlignment": "CENTER", + "columnType": "text", + "textColor": "", + "textSize": "0.875rem", + "enableFilter": true, + "enableSort": true, + "isVisible": true, + "isDisabled": false, + "isCellVisible": true, + "isDerived": false, + "label": "dater", + "computedValue": "{{Table1.sanitizedTableData.map((currentRow) => ( currentRow.dater))}}", + "cellBackground": "" + }, + "timer": { + "index": 4, + "width": 150, + "id": "timer", + "horizontalAlignment": "LEFT", + "verticalAlignment": "CENTER", + "columnType": "text", + "textColor": "", + "textSize": "0.875rem", + "enableFilter": true, + "enableSort": true, + "isVisible": true, + "isDisabled": false, + "isCellVisible": true, + "isDerived": false, + "label": "timer", + "computedValue": "{{Table1.sanitizedTableData.map((currentRow) => ( currentRow.timer))}}", + "cellBackground": "" + }, + "timertz": { + "index": 5, + "width": 150, + "id": "timertz", + "horizontalAlignment": "LEFT", + "verticalAlignment": "CENTER", + "columnType": "text", + "textColor": "", + "textSize": "0.875rem", + "enableFilter": true, + "enableSort": true, + "isVisible": true, + "isDisabled": false, + "isCellVisible": true, + "isDerived": false, + "label": "timertz", + "computedValue": "{{Table1.sanitizedTableData.map((currentRow) => ( currentRow.timertz))}}", + "cellBackground": "" + }, + "intervaler": { + "index": 6, + "width": 150, + "id": "intervaler", + "horizontalAlignment": "LEFT", + "verticalAlignment": "CENTER", + "columnType": "text", + "textColor": "", + "textSize": "0.875rem", + "enableFilter": true, + "enableSort": true, + "isVisible": true, + "isDisabled": false, + "isCellVisible": true, + "isDerived": false, + "label": "intervaler", + "computedValue": "{{Table1.sanitizedTableData.map((currentRow) => ( currentRow.intervaler))}}", + "cellBackground": "" + } + }, + "key": "8l8hit8gra", + "derivedColumns": { + "customColumn1": { + "index": 4, + "width": 150, + "id": "customColumn1", + "columnType": "button", + "enableFilter": true, + "enableSort": true, + "isVisible": true, + "isDisabled": false, + "isCellVisible": true, + "isDerived": true, + "label": "delete", + "computedValue": "", + "buttonStyle": "rgb(3, 179, 101)", + "labelColor": "#FFFFFF", + "buttonColor": "{{Table1.sanitizedTableData.map((currentRow) => ( appsmith.theme.colors.primaryColor))}}", + "borderRadius": "{{Table1.sanitizedTableData.map((currentRow) => ( appsmith.theme.borderRadius.appBorderRadius))}}", + "boxShadow": "{{Table1.sanitizedTableData.map((currentRow) => ( 'none'))}}", + "iconName": "", + "buttonLabel": "{{Table1.sanitizedTableData.map((currentRow) => ( 'DeleteQuery'))}}" + } + }, + "isDeprecated": false, + "rightColumn": 60, + "textSize": "0.875rem", + "widgetId": "w9mvbp1g2t", + "tableData": "{{selectRecords.data}}", + "label": "Data", + "searchKey": "", + "parentId": "0", + "renderMode": "CANVAS", + "horizontalAlignment": "LEFT", + "isVisibleSearch": true, + "isVisiblePagination": true, + "verticalAlignment": "CENTER" + }, + { + "boxShadow": "none", + "widgetName": "InsertButton", + "onClick": "{{showModal('InsertModal')}}", + "buttonColor": "{{appsmith.theme.colors.primaryColor}}", + "dynamicPropertyPathList": [ + { + "key": "onClick" + } + ], + "displayName": "Button", + "iconSVG": "/static/media/icon.cca02633.svg", + "topRow": 2, + "bottomRow": 6, + "parentRowSpace": 10, + "type": "BUTTON_WIDGET", + "hideCard": false, + "animateLoading": true, + "parentColumnSpace": 16.71875, + "dynamicTriggerPathList": [ + { + "key": "onClick" + } + ], + "leftColumn": 4, + "dynamicBindingPathList": [ + { + "key": "buttonColor" + }, + { + "key": "borderRadius" + } + ], + "text": "Run InsertQuery", + "isDisabled": false, + "key": "7va5q4amde", + "isDeprecated": false, + "rightColumn": 20, + "isDefaultClickDisabled": true, + "widgetId": "jr1y6sdur4", + "isVisible": true, + "recaptchaType": "V3", + "version": 1, + "parentId": "0", + "renderMode": "CANVAS", + "isLoading": false, + "borderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}", + "buttonVariant": "PRIMARY", + "placement": "CENTER" + }, + { + "boxShadow": "none", + "widgetName": "UpdateButton", + "onClick": "{{showModal('UpdateModal')}}", + "buttonColor": "{{appsmith.theme.colors.primaryColor}}", + "dynamicPropertyPathList": [], + "displayName": "Button", + "iconSVG": "/static/media/icon.cca02633.svg", + "topRow": 2, + "bottomRow": 6, + "parentRowSpace": 10, + "type": "BUTTON_WIDGET", + "hideCard": false, + "animateLoading": true, + "parentColumnSpace": 16.71875, + "dynamicTriggerPathList": [ + { + "key": "onClick" + } + ], + "leftColumn": 44, + "dynamicBindingPathList": [ + { + "key": "buttonColor" + }, + { + "key": "borderRadius" + } + ], + "text": "Run UpdateQuery", + "isDisabled": false, + "key": "7va5q4amde", + "isDeprecated": false, + "rightColumn": 60, + "isDefaultClickDisabled": true, + "widgetId": "3k4fg1zx8x", + "isVisible": true, + "recaptchaType": "V3", + "version": 1, + "parentId": "0", + "renderMode": "CANVAS", + "isLoading": false, + "borderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}", + "buttonVariant": "PRIMARY", + "placement": "CENTER" + }, + { + "boxShadow": "none", + "widgetName": "InsertModal", + "isCanvas": true, + "displayName": "Modal", + "iconSVG": "/static/media/icon.4975978e.svg", + "topRow": 22, + "bottomRow": 46, + "parentRowSpace": 10, + "type": "MODAL_WIDGET", + "hideCard": false, + "shouldScrollContents": true, + "animateLoading": true, + "parentColumnSpace": 16.71875, + "leftColumn": 20, + "dynamicBindingPathList": [ + { + "key": "borderRadius" + } + ], + "children": [ + { + "boxShadow": "none", + "widgetName": "Canvas1", + "displayName": "Canvas", + "topRow": 0, + "bottomRow": 540, + "parentRowSpace": 1, + "type": "CANVAS_WIDGET", + "canExtend": true, + "hideCard": true, + "shouldScrollContents": false, + "minHeight": 548, + "parentColumnSpace": 1, + "dynamicTriggerPathList": [], + "leftColumn": 0, + "dynamicBindingPathList": [ + { + "key": "borderRadius" + }, + { + "key": "accentColor" + } + ], + "children": [ + { + "boxShadow": "none", + "widgetName": "Insertdater", + "displayName": "Input", + "iconSVG": "/static/media/icon.9f505595.svg", + "topRow": 23, + "bottomRow": 30, + "parentRowSpace": 10, + "labelWidth": 5, + "autoFocus": false, + "type": "INPUT_WIDGET_V2", + "hideCard": false, + "animateLoading": true, + "parentColumnSpace": 6.9375, + "dynamicTriggerPathList": [], + "resetOnSubmit": true, + "leftColumn": 2, + "dynamicBindingPathList": [ + { + "key": "accentColor" + }, + { + "key": "borderRadius" + }, + { + "key": "label" + } + ], + "labelPosition": "Top", + "labelStyle": "", + "inputType": "TEXT", + "isDisabled": false, + "key": "x49qcvsllj", + "labelTextSize": "0.875rem", + "isRequired": false, + "isDeprecated": false, + "rightColumn": 62, + "widgetId": "41k33kecwn", + "accentColor": "{{appsmith.theme.colors.primaryColor}}", + "isVisible": true, + "label": "{{Table1.columnOrder[3].toString().replace(/(?:^|\\s|[\"'([{])+\\S/g, match => match.toUpperCase());\n}}", + "version": 2, + "parentId": "6otxv391ns", + "labelAlignment": "left", + "renderMode": "CANVAS", + "isLoading": false, + "borderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}", + "iconAlign": "left", + "defaultText": "" + }, + { + "boxShadow": "none", + "widgetName": "Inserttstz", + "displayName": "Input", + "iconSVG": "/static/media/icon.9f505595.svg", + "topRow": 15, + "bottomRow": 22, + "parentRowSpace": 10, + "labelWidth": 5, + "autoFocus": false, + "type": "INPUT_WIDGET_V2", + "hideCard": false, + "animateLoading": true, + "parentColumnSpace": 6.9375, + "dynamicTriggerPathList": [], + "resetOnSubmit": true, + "leftColumn": 2, + "dynamicBindingPathList": [ + { + "key": "accentColor" + }, + { + "key": "borderRadius" + }, + { + "key": "label" + } + ], + "labelPosition": "Top", + "labelStyle": "", + "inputType": "TEXT", + "isDisabled": false, + "key": "x49qcvsllj", + "labelTextSize": "0.875rem", + "isRequired": false, + "isDeprecated": false, + "rightColumn": 62, + "widgetId": "uyzomn3bp6", + "accentColor": "{{appsmith.theme.colors.primaryColor}}", + "isVisible": true, + "label": "{{Table1.columnOrder[2].toString().replace(/(?:^|\\s|[\"'([{])+\\S/g, match => match.toUpperCase());\n}}", + "version": 2, + "parentId": "6otxv391ns", + "labelAlignment": "left", + "renderMode": "CANVAS", + "isLoading": false, + "borderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}", + "iconAlign": "left", + "defaultText": "" + }, + { + "boxShadow": "none", + "widgetName": "IconButton1", + "onClick": "{{closeModal('InsertModal')}}", + "buttonColor": "{{appsmith.theme.colors.primaryColor}}", + "displayName": "Icon Button", + "iconSVG": "/static/media/icon.1a0c634a.svg", + "topRow": 1, + "bottomRow": 5, + "type": "ICON_BUTTON_WIDGET", + "hideCard": false, + "animateLoading": true, + "leftColumn": 56, + "dynamicBindingPathList": [ + { + "key": "buttonColor" + }, + { + "key": "borderRadius" + } + ], + "iconSize": 24, + "isDisabled": false, + "key": "glch1esz5b", + "isDeprecated": false, + "rightColumn": 64, + "iconName": "cross", + "widgetId": "jqcrr1o8or", + "isVisible": true, + "version": 1, + "parentId": "6otxv391ns", + "renderMode": "CANVAS", + "isLoading": false, + "borderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}", + "buttonVariant": "TERTIARY" + }, + { + "widgetName": "Text1", + "displayName": "Text", + "iconSVG": "/static/media/icon.97c59b52.svg", + "topRow": 1, + "bottomRow": 5, + "type": "TEXT_WIDGET", + "hideCard": false, + "animateLoading": true, + "overflow": "NONE", + "fontFamily": "{{appsmith.theme.fontFamily.appFont}}", + "dynamicTriggerPathList": [], + "leftColumn": 1, + "dynamicBindingPathList": [ + { + "key": "fontFamily" + }, + { + "key": "borderRadius" + } + ], + "shouldTruncate": false, + "truncateButtonColor": "#FFC13D", + "text": "Insert Record", + "key": "orwoe8agwc", + "isDeprecated": false, + "rightColumn": 41, + "textAlign": "LEFT", + "widgetId": "achn17gfze", + "isVisible": true, + "fontStyle": "BOLD", + "textColor": "#231F20", + "version": 1, + "parentId": "6otxv391ns", + "renderMode": "CANVAS", + "isLoading": false, + "borderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}", + "fontSize": "1.5rem" + }, + { + "boxShadow": "none", + "widgetName": "Button5", + "onClick": "{{closeModal('InsertModal')}}", + "buttonColor": "{{appsmith.theme.colors.primaryColor}}", + "displayName": "Button", + "iconSVG": "/static/media/icon.cca02633.svg", + "topRow": 48, + "bottomRow": 52, + "type": "BUTTON_WIDGET", + "hideCard": false, + "animateLoading": true, + "leftColumn": 12, + "dynamicBindingPathList": [ + { + "key": "buttonColor" + }, + { + "key": "borderRadius" + } + ], + "text": "Close", + "isDisabled": false, + "key": "b7wg448vx0", + "isDeprecated": false, + "rightColumn": 28, + "isDefaultClickDisabled": true, + "widgetId": "0ym0mah4go", + "buttonStyle": "PRIMARY", + "isVisible": true, + "recaptchaType": "V3", + "version": 1, + "parentId": "6otxv391ns", + "renderMode": "CANVAS", + "isLoading": false, + "borderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}", + "buttonVariant": "SECONDARY", + "placement": "CENTER" + }, + { + "boxShadow": "none", + "widgetName": "runInsertQuery", + "onClick": "{{insertRecord.run(() => {\nselectRecords.run();\t\t\t\tresetWidget('InsertModal', true);\ncloseModal('InsertModal'), () => {};})}}", + "buttonColor": "{{appsmith.theme.colors.primaryColor}}", + "dynamicPropertyPathList": [ + { + "key": "onClick" + } + ], + "displayName": "Button", + "iconSVG": "/static/media/icon.cca02633.svg", + "topRow": 48, + "bottomRow": 52, + "type": "BUTTON_WIDGET", + "hideCard": false, + "animateLoading": true, + "dynamicTriggerPathList": [ + { + "key": "onClick" + } + ], + "leftColumn": 33, + "dynamicBindingPathList": [ + { + "key": "buttonColor" + }, + { + "key": "borderRadius" + } + ], + "text": "Insert", + "isDisabled": false, + "key": "b7wg448vx0", + "isDeprecated": false, + "rightColumn": 49, + "isDefaultClickDisabled": true, + "widgetId": "0trrzqxtbk", + "buttonStyle": "PRIMARY_BUTTON", + "isVisible": true, + "recaptchaType": "V3", + "version": 1, + "parentId": "6otxv391ns", + "renderMode": "CANVAS", + "isLoading": false, + "borderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}", + "buttonVariant": "PRIMARY", + "placement": "CENTER" + }, + { + "boxShadow": "none", + "widgetName": "Insertts", + "displayName": "Input", + "iconSVG": "/static/media/icon.9f505595.svg", + "topRow": 7, + "bottomRow": 14, + "parentRowSpace": 10, + "labelWidth": 5, + "autoFocus": false, + "type": "INPUT_WIDGET_V2", + "hideCard": false, + "animateLoading": true, + "parentColumnSpace": 6.9375, + "dynamicTriggerPathList": [], + "resetOnSubmit": true, + "leftColumn": 2, + "dynamicBindingPathList": [ + { + "key": "accentColor" + }, + { + "key": "borderRadius" + }, + { + "key": "label" + } + ], + "labelPosition": "Top", + "labelStyle": "", + "inputType": "TEXT", + "isDisabled": false, + "key": "x49qcvsllj", + "labelTextSize": "0.875rem", + "isRequired": false, + "isDeprecated": false, + "rightColumn": 62, + "widgetId": "ufngck5pv5", + "accentColor": "{{appsmith.theme.colors.primaryColor}}", + "isVisible": true, + "label": "{{Table1.columnOrder[1].toString().replace(/(?:^|\\s|[\"'([{])+\\S/g, match => match.toUpperCase());\n}}", + "version": 2, + "parentId": "6otxv391ns", + "labelAlignment": "left", + "renderMode": "CANVAS", + "isLoading": false, + "borderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}", + "iconAlign": "left", + "defaultText": "" + }, + { + "boxShadow": "none", + "widgetName": "Inserttimer", + "displayName": "Input", + "iconSVG": "/static/media/icon.9f505595.svg", + "topRow": 31, + "bottomRow": 38, + "parentRowSpace": 10, + "labelWidth": 5, + "autoFocus": false, + "type": "INPUT_WIDGET_V2", + "hideCard": false, + "animateLoading": true, + "parentColumnSpace": 6.9375, + "dynamicTriggerPathList": [], + "resetOnSubmit": true, + "leftColumn": 2, + "dynamicBindingPathList": [ + { + "key": "accentColor" + }, + { + "key": "borderRadius" + }, + { + "key": "label" + } + ], + "labelPosition": "Top", + "labelStyle": "", + "inputType": "TEXT", + "isDisabled": false, + "key": "223t1cmc0w", + "labelTextSize": "0.875rem", + "isRequired": false, + "isDeprecated": false, + "rightColumn": 62, + "widgetId": "e78wpqgwlc", + "accentColor": "{{appsmith.theme.colors.primaryColor}}", + "isVisible": true, + "label": "{{Table1.columnOrder[4].toString().replace(/(?:^|\\s|[\"'([{])+\\S/g, match => match.toUpperCase());\n}}", + "version": 2, + "parentId": "6otxv391ns", + "labelAlignment": "left", + "renderMode": "CANVAS", + "isLoading": false, + "borderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}", + "iconAlign": "left", + "defaultText": "" + }, + { + "boxShadow": "none", + "widgetName": "Insertintervaler", + "displayName": "Input", + "iconSVG": "/static/media/icon.9f505595.svg", + "topRow": 39, + "bottomRow": 46, + "parentRowSpace": 10, + "labelWidth": 5, + "autoFocus": false, + "type": "INPUT_WIDGET_V2", + "hideCard": false, + "animateLoading": true, + "parentColumnSpace": 6.9375, + "dynamicTriggerPathList": [], + "resetOnSubmit": true, + "leftColumn": 2, + "dynamicBindingPathList": [ + { + "key": "accentColor" + }, + { + "key": "borderRadius" + }, + { + "key": "label" + } + ], + "labelPosition": "Top", + "labelStyle": "", + "inputType": "TEXT", + "isDisabled": false, + "key": "yaancbar1j", + "labelTextSize": "0.875rem", + "isRequired": false, + "isDeprecated": false, + "rightColumn": 62, + "widgetId": "5isyqlm4q6", + "accentColor": "{{appsmith.theme.colors.primaryColor}}", + "isVisible": true, + "label": "{{Table1.columnOrder[6].toString().replace(/(?:^|\\s|[\"'([{])+\\S/g, match => match.toUpperCase());\n}}", + "version": 2, + "parentId": "6otxv391ns", + "labelAlignment": "left", + "renderMode": "CANVAS", + "isLoading": false, + "borderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}", + "iconAlign": "left", + "defaultText": "" + } + ], + "isDisabled": false, + "key": "jcn9nfbcoh", + "isDeprecated": false, + "rightColumn": 401.25, + "detachFromLayout": true, + "widgetId": "6otxv391ns", + "accentColor": "{{appsmith.theme.colors.primaryColor}}", + "isVisible": true, + "version": 1, + "parentId": "rhom101hjk", + "renderMode": "CANVAS", + "isLoading": false, + "borderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}" + } + ], + "key": "n6csxgy8za", + "height": 548, + "isDeprecated": false, + "rightColumn": 44, + "detachFromLayout": true, + "widgetId": "rhom101hjk", + "canOutsideClickClose": true, + "canEscapeKeyClose": true, + "version": 2, + "parentId": "0", + "renderMode": "CANVAS", + "isLoading": false, + "borderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}", + "width": 456 + }, + { + "boxShadow": "none", + "widgetName": "IconButton2", + "onClick": "{{deleteAllRecords.run(() => selectRecords.run(), () => {})}}", + "buttonColor": "{{appsmith.theme.colors.primaryColor}}", + "displayName": "Icon Button", + "iconSVG": "/static/media/icon.1a0c634a.svg", + "topRow": 2, + "bottomRow": 6, + "parentRowSpace": 10, + "type": "ICON_BUTTON_WIDGET", + "hideCard": false, + "animateLoading": true, + "parentColumnSpace": 16.71875, + "dynamicTriggerPathList": [ + { + "key": "onClick" + } + ], + "leftColumn": 30, + "dynamicBindingPathList": [ + { + "key": "buttonColor" + }, + { + "key": "borderRadius" + } + ], + "isDisabled": false, + "key": "8he4nv2fbs", + "isDeprecated": false, + "rightColumn": 34, + "iconName": "delete", + "widgetId": "30jhk2thdb", + "isVisible": true, + "version": 1, + "parentId": "0", + "renderMode": "CANVAS", + "isLoading": false, + "borderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}", + "buttonVariant": "PRIMARY" + } + ] + } +} diff --git a/app/client/cypress/fixtures/NumericDTdsl.json b/app/client/cypress/fixtures/NumericDTdsl.json new file mode 100644 index 0000000000..27a9b831e3 --- /dev/null +++ b/app/client/cypress/fixtures/NumericDTdsl.json @@ -0,0 +1,1218 @@ +{ + "dsl": { + "widgetName": "MainContainer", + "backgroundColor": "none", + "rightColumn": 4896, + "snapColumns": 64, + "detachFromLayout": true, + "widgetId": "0", + "topRow": 0, + "bottomRow": 1320, + "containerStyle": "none", + "snapRows": 125, + "parentRowSpace": 1, + "type": "CANVAS_WIDGET", + "canExtend": true, + "version": 59, + "minHeight": 1292, + "dynamicTriggerPathList": [], + "parentColumnSpace": 1, + "dynamicBindingPathList": [], + "leftColumn": 0, + "children": [ + { + "boxShadow": "none", + "widgetName": "UpdateModal", + "isCanvas": true, + "displayName": "Modal", + "iconSVG": "/static/media/icon.4975978e.svg", + "topRow": 51, + "bottomRow": 75, + "parentRowSpace": 10, + "type": "MODAL_WIDGET", + "hideCard": false, + "shouldScrollContents": true, + "animateLoading": true, + "parentColumnSpace": 16.71875, + "leftColumn": 20, + "dynamicBindingPathList": [ + { + "key": "borderRadius" + } + ], + "children": [ + { + "boxShadow": "none", + "widgetName": "Canvas1Copy", + "displayName": "Canvas", + "topRow": 0, + "bottomRow": 420, + "parentRowSpace": 1, + "type": "CANVAS_WIDGET", + "canExtend": true, + "hideCard": true, + "shouldScrollContents": false, + "minHeight": 428, + "parentColumnSpace": 1, + "leftColumn": 0, + "dynamicBindingPathList": [ + { + "key": "borderRadius" + }, + { + "key": "accentColor" + } + ], + "children": [ + { + "boxShadow": "none", + "widgetName": "Updatenumeric", + "displayName": "Input", + "iconSVG": "/static/media/icon.9f505595.svg", + "topRow": 25, + "bottomRow": 32, + "parentRowSpace": 10, + "labelWidth": 5, + "autoFocus": false, + "type": "INPUT_WIDGET_V2", + "hideCard": false, + "animateLoading": true, + "parentColumnSpace": 6.9375, + "dynamicTriggerPathList": [], + "resetOnSubmit": true, + "leftColumn": 2, + "dynamicBindingPathList": [ + { + "key": "accentColor" + }, + { + "key": "borderRadius" + }, + { + "key": "defaultText" + }, + { + "key": "label" + } + ], + "labelPosition": "Top", + "labelStyle": "", + "inputType": "NUMBER", + "isDisabled": false, + "key": "x49qcvsllj", + "labelTextSize": "0.875rem", + "isRequired": false, + "isDeprecated": false, + "rightColumn": 62, + "widgetId": "mwe3ff4xg7", + "accentColor": "{{appsmith.theme.colors.primaryColor}}", + "isVisible": true, + "label": "{{Table1.columnOrder[3].toString().replace(/(?:^|\\s|[\"'([{])+\\S/g, match => match.toUpperCase());\n}}", + "version": 2, + "parentId": "sdc2iv8uiq", + "labelAlignment": "left", + "renderMode": "CANVAS", + "isLoading": false, + "borderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}", + "iconAlign": "left", + "defaultText": "{{Table1.selectedRow.numericid}}" + }, + { + "boxShadow": "none", + "widgetName": "Updatedecimal", + "displayName": "Input", + "iconSVG": "/static/media/icon.9f505595.svg", + "topRow": 16, + "bottomRow": 23, + "parentRowSpace": 10, + "labelWidth": 5, + "autoFocus": false, + "type": "INPUT_WIDGET_V2", + "hideCard": false, + "animateLoading": true, + "parentColumnSpace": 6.9375, + "dynamicTriggerPathList": [], + "resetOnSubmit": true, + "leftColumn": 2, + "dynamicBindingPathList": [ + { + "key": "accentColor" + }, + { + "key": "borderRadius" + }, + { + "key": "defaultText" + }, + { + "key": "label" + } + ], + "labelPosition": "Top", + "labelStyle": "", + "inputType": "NUMBER", + "isDisabled": false, + "key": "x49qcvsllj", + "labelTextSize": "0.875rem", + "isRequired": false, + "isDeprecated": false, + "rightColumn": 62, + "widgetId": "el112yx9tb", + "accentColor": "{{appsmith.theme.colors.primaryColor}}", + "isVisible": true, + "label": "{{Table1.columnOrder[2].toString().replace(/(?:^|\\s|[\"'([{])+\\S/g, match => match.toUpperCase());\n}}", + "version": 2, + "parentId": "sdc2iv8uiq", + "labelAlignment": "left", + "renderMode": "CANVAS", + "isLoading": false, + "borderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}", + "iconAlign": "left", + "defaultText": "{{Table1.selectedRow.decimalid}}" + }, + { + "boxShadow": "none", + "widgetName": "IconButton1Copy", + "onClick": "{{closeModal('InsertModal')}}", + "buttonColor": "{{appsmith.theme.colors.primaryColor}}", + "displayName": "Icon Button", + "iconSVG": "/static/media/icon.1a0c634a.svg", + "topRow": 1, + "bottomRow": 5, + "type": "ICON_BUTTON_WIDGET", + "hideCard": false, + "animateLoading": true, + "leftColumn": 56, + "dynamicBindingPathList": [ + { + "key": "buttonColor" + }, + { + "key": "borderRadius" + } + ], + "iconSize": 24, + "isDisabled": false, + "key": "glch1esz5b", + "isDeprecated": false, + "rightColumn": 64, + "iconName": "cross", + "widgetId": "4fnws5ftg4", + "isVisible": true, + "version": 1, + "parentId": "sdc2iv8uiq", + "renderMode": "CANVAS", + "isLoading": false, + "borderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}", + "buttonVariant": "TERTIARY" + }, + { + "widgetName": "Text1Copy", + "displayName": "Text", + "iconSVG": "/static/media/icon.97c59b52.svg", + "topRow": 1, + "bottomRow": 5, + "type": "TEXT_WIDGET", + "hideCard": false, + "animateLoading": true, + "overflow": "NONE", + "fontFamily": "{{appsmith.theme.fontFamily.appFont}}", + "dynamicTriggerPathList": [], + "leftColumn": 1, + "dynamicBindingPathList": [ + { + "key": "fontFamily" + }, + { + "key": "borderRadius" + }, + { + "key": "text" + } + ], + "shouldTruncate": false, + "truncateButtonColor": "#FFC13D", + "text": "Update Data for SerialId # {{Table1.selectedRow.serialid}}", + "key": "orwoe8agwc", + "isDeprecated": false, + "rightColumn": 55, + "textAlign": "LEFT", + "widgetId": "3rncsabmka", + "isVisible": true, + "fontStyle": "BOLD", + "textColor": "#231F20", + "version": 1, + "parentId": "sdc2iv8uiq", + "renderMode": "CANVAS", + "isLoading": false, + "borderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}", + "fontSize": "1.5rem" + }, + { + "boxShadow": "none", + "widgetName": "Button5Copy", + "onClick": "{{closeModal('UpdateModal')}}", + "buttonColor": "{{appsmith.theme.colors.primaryColor}}", + "displayName": "Button", + "iconSVG": "/static/media/icon.cca02633.svg", + "topRow": 35, + "bottomRow": 39, + "type": "BUTTON_WIDGET", + "hideCard": false, + "animateLoading": true, + "leftColumn": 14, + "dynamicBindingPathList": [ + { + "key": "buttonColor" + }, + { + "key": "borderRadius" + } + ], + "text": "Close", + "isDisabled": false, + "key": "b7wg448vx0", + "isDeprecated": false, + "rightColumn": 30, + "isDefaultClickDisabled": true, + "widgetId": "kf5ait9qmq", + "buttonStyle": "PRIMARY", + "isVisible": true, + "recaptchaType": "V3", + "version": 1, + "parentId": "sdc2iv8uiq", + "renderMode": "CANVAS", + "isLoading": false, + "borderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}", + "buttonVariant": "SECONDARY", + "placement": "CENTER" + }, + { + "boxShadow": "none", + "widgetName": "runUpdateQuery", + "onClick": "{{updateRecord.run(() => {closeModal('UpdateModal'), () => {};\nselectRecords.run()\t\t\t\t\t\t\t\t\t\t\t\t })}}", + "buttonColor": "{{appsmith.theme.colors.primaryColor}}", + "dynamicPropertyPathList": [ + { + "key": "onClick" + } + ], + "displayName": "Button", + "iconSVG": "/static/media/icon.cca02633.svg", + "topRow": 35, + "bottomRow": 39, + "type": "BUTTON_WIDGET", + "hideCard": false, + "animateLoading": true, + "dynamicTriggerPathList": [ + { + "key": "onClick" + } + ], + "leftColumn": 34, + "dynamicBindingPathList": [ + { + "key": "buttonColor" + }, + { + "key": "borderRadius" + } + ], + "text": "Update", + "isDisabled": false, + "key": "b7wg448vx0", + "isDeprecated": false, + "rightColumn": 50, + "isDefaultClickDisabled": true, + "widgetId": "pb2y77v7wa", + "buttonStyle": "PRIMARY_BUTTON", + "isVisible": true, + "recaptchaType": "V3", + "version": 1, + "parentId": "sdc2iv8uiq", + "renderMode": "CANVAS", + "isLoading": false, + "borderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}", + "buttonVariant": "PRIMARY", + "placement": "CENTER" + }, + { + "boxShadow": "none", + "widgetName": "Updatebigint", + "displayName": "Input", + "iconSVG": "/static/media/icon.9f505595.svg", + "topRow": 7, + "bottomRow": 14, + "parentRowSpace": 10, + "labelWidth": 5, + "autoFocus": false, + "type": "INPUT_WIDGET_V2", + "hideCard": false, + "animateLoading": true, + "parentColumnSpace": 6.9375, + "dynamicTriggerPathList": [], + "resetOnSubmit": true, + "leftColumn": 2, + "dynamicBindingPathList": [ + { + "key": "accentColor" + }, + { + "key": "borderRadius" + }, + { + "key": "defaultText" + }, + { + "key": "label" + } + ], + "labelPosition": "Top", + "labelStyle": "", + "inputType": "NUMBER", + "isDisabled": false, + "key": "x49qcvsllj", + "labelTextSize": "0.875rem", + "isRequired": false, + "isDeprecated": false, + "rightColumn": 62, + "widgetId": "b88g2hsnfh", + "accentColor": "{{appsmith.theme.colors.primaryColor}}", + "isVisible": true, + "label": "{{Table1.columnOrder[1].toString().replace(/(?:^|\\s|[\"'([{])+\\S/g, match => match.toUpperCase());\n}}", + "version": 2, + "parentId": "sdc2iv8uiq", + "labelAlignment": "left", + "renderMode": "CANVAS", + "isLoading": false, + "borderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}", + "iconAlign": "left", + "defaultText": "{{Table1.selectedRow.bigintid}}" + } + ], + "isDisabled": false, + "key": "jcn9nfbcoh", + "isDeprecated": false, + "rightColumn": 401.25, + "detachFromLayout": true, + "widgetId": "sdc2iv8uiq", + "accentColor": "{{appsmith.theme.colors.primaryColor}}", + "isVisible": true, + "version": 1, + "parentId": "bl75l6vmtq", + "renderMode": "CANVAS", + "isLoading": false, + "borderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}" + } + ], + "key": "n6csxgy8za", + "height": 428, + "isDeprecated": false, + "rightColumn": 44, + "detachFromLayout": true, + "widgetId": "bl75l6vmtq", + "canOutsideClickClose": true, + "canEscapeKeyClose": true, + "version": 2, + "parentId": "0", + "renderMode": "CANVAS", + "isLoading": false, + "borderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}", + "width": 456 + }, + { + "boxShadow": "{{appsmith.theme.boxShadow.appBoxShadow}}", + "isVisibleDownload": true, + "iconSVG": "/static/media/icon.db8a9cbd.svg", + "topRow": 7, + "isSortable": true, + "type": "TABLE_WIDGET", + "animateLoading": true, + "dynamicBindingPathList": [ + { + "key": "accentColor" + }, + { + "key": "borderRadius" + }, + { + "key": "boxShadow" + }, + { + "key": "childStylesheet.button.buttonColor" + }, + { + "key": "childStylesheet.button.borderRadius" + }, + { + "key": "childStylesheet.menuButton.menuColor" + }, + { + "key": "childStylesheet.menuButton.borderRadius" + }, + { + "key": "childStylesheet.iconButton.buttonColor" + }, + { + "key": "childStylesheet.iconButton.borderRadius" + }, + { + "key": "tableData" + }, + { + "key": "primaryColumns.serialid.computedValue" + }, + { + "key": "primaryColumns.bigintid.computedValue" + }, + { + "key": "primaryColumns.numericid.computedValue" + }, + { + "key": "primaryColumns.decimalid.computedValue" + }, + { + "key": "derivedColumns.customColumn1.buttonColor" + }, + { + "key": "primaryColumns.customColumn1.buttonColor" + }, + { + "key": "derivedColumns.customColumn1.borderRadius" + }, + { + "key": "primaryColumns.customColumn1.borderRadius" + }, + { + "key": "derivedColumns.customColumn1.boxShadow" + }, + { + "key": "primaryColumns.customColumn1.boxShadow" + }, + { + "key": "derivedColumns.customColumn1.buttonLabel" + }, + { + "key": "primaryColumns.customColumn1.buttonLabel" + } + ], + "leftColumn": 4, + "delimiter": ",", + "accentColor": "{{appsmith.theme.colors.primaryColor}}", + "isVisibleFilters": true, + "isVisible": true, + "enableClientSideSearch": true, + "version": 3, + "totalRecordsCount": 0, + "isLoading": false, + "childStylesheet": { + "button": { + "buttonColor": "{{appsmith.theme.colors.primaryColor}}", + "borderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}", + "boxShadow": "none" + }, + "menuButton": { + "menuColor": "{{appsmith.theme.colors.primaryColor}}", + "borderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}", + "boxShadow": "none" + }, + "iconButton": { + "buttonColor": "{{appsmith.theme.colors.primaryColor}}", + "borderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}", + "boxShadow": "none" + } + }, + "borderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}", + "primaryColumnId": "serialid", + "columnSizeMap": { + "task": 245, + "step": 62, + "status": 75, + "serialid": 78, + "bigintid": 309, + "demimalid": 378, + "decimalid": 259, + "numericid": 270 + }, + "widgetName": "Table1", + "defaultPageSize": 0, + "columnOrder": [ + "serialid", + "bigintid", + "decimalid", + "numericid", + "customColumn1" + ], + "dynamicPropertyPathList": [], + "displayName": "Table", + "bottomRow": 50, + "parentRowSpace": 10, + "defaultSelectedRow": "0", + "hideCard": false, + "parentColumnSpace": 16.71875, + "dynamicTriggerPathList": [ + { + "key": "primaryColumns.customColumn1.onClick" + } + ], + "primaryColumns": { + "serialid": { + "index": 0, + "width": 150, + "id": "serialid", + "horizontalAlignment": "LEFT", + "verticalAlignment": "CENTER", + "columnType": "text", + "textSize": "0.875rem", + "enableFilter": true, + "enableSort": true, + "isVisible": true, + "isDisabled": false, + "isCellVisible": true, + "isDerived": false, + "label": "serialid", + "computedValue": "{{Table1.sanitizedTableData.map((currentRow) => ( currentRow.serialid))}}" + }, + "bigintid": { + "index": 1, + "width": 150, + "id": "bigintid", + "horizontalAlignment": "LEFT", + "verticalAlignment": "CENTER", + "columnType": "text", + "textSize": "0.875rem", + "enableFilter": true, + "enableSort": true, + "isVisible": true, + "isDisabled": false, + "isCellVisible": true, + "isDerived": false, + "label": "bigintid", + "computedValue": "{{Table1.sanitizedTableData.map((currentRow) => ( currentRow.bigintid))}}" + }, + "numericid": { + "index": 3, + "width": 150, + "id": "numericid", + "horizontalAlignment": "LEFT", + "verticalAlignment": "CENTER", + "columnType": "text", + "textSize": "0.875rem", + "enableFilter": true, + "enableSort": true, + "isVisible": true, + "isDisabled": false, + "isCellVisible": true, + "isDerived": false, + "label": "numericid", + "computedValue": "{{Table1.sanitizedTableData.map((currentRow) => ( currentRow.numericid))}}" + }, + "decimalid": { + "index": 2, + "width": 150, + "id": "decimalid", + "horizontalAlignment": "LEFT", + "verticalAlignment": "CENTER", + "columnType": "text", + "textColor": "", + "textSize": "0.875rem", + "enableFilter": true, + "enableSort": true, + "isVisible": true, + "isDisabled": false, + "isCellVisible": true, + "isDerived": false, + "label": "decimalid", + "computedValue": "{{Table1.sanitizedTableData.map((currentRow) => ( currentRow.decimalid))}}", + "cellBackground": "" + }, + "customColumn1": { + "index": 4, + "width": 150, + "id": "customColumn1", + "columnType": "button", + "enableFilter": true, + "enableSort": true, + "isVisible": true, + "isDisabled": false, + "isCellVisible": true, + "isDerived": true, + "label": "delete", + "computedValue": "", + "buttonStyle": "rgb(3, 179, 101)", + "labelColor": "#FFFFFF", + "buttonColor": "{{Table1.sanitizedTableData.map((currentRow) => ( appsmith.theme.colors.primaryColor))}}", + "borderRadius": "{{Table1.sanitizedTableData.map((currentRow) => ( appsmith.theme.borderRadius.appBorderRadius))}}", + "boxShadow": "{{Table1.sanitizedTableData.map((currentRow) => ( 'none'))}}", + "iconName": "", + "buttonLabel": "{{Table1.sanitizedTableData.map((currentRow) => ( 'DeleteQuery'))}}", + "onClick": "{{deleteRecord.run(() => selectRecords.run(), () => {})}}" + } + }, + "key": "8l8hit8gra", + "derivedColumns": { + "customColumn1": { + "index": 4, + "width": 150, + "id": "customColumn1", + "columnType": "button", + "enableFilter": true, + "enableSort": true, + "isVisible": true, + "isDisabled": false, + "isCellVisible": true, + "isDerived": true, + "label": "delete", + "computedValue": "", + "buttonStyle": "rgb(3, 179, 101)", + "labelColor": "#FFFFFF", + "buttonColor": "{{Table1.sanitizedTableData.map((currentRow) => ( appsmith.theme.colors.primaryColor))}}", + "borderRadius": "{{Table1.sanitizedTableData.map((currentRow) => ( appsmith.theme.borderRadius.appBorderRadius))}}", + "boxShadow": "{{Table1.sanitizedTableData.map((currentRow) => ( 'none'))}}", + "iconName": "", + "buttonLabel": "{{Table1.sanitizedTableData.map((currentRow) => ( 'DeleteQuery'))}}" + } + }, + "isDeprecated": false, + "rightColumn": 60, + "textSize": "0.875rem", + "widgetId": "w9mvbp1g2t", + "tableData": "{{selectRecords.data}}", + "label": "Data", + "searchKey": "", + "parentId": "0", + "renderMode": "CANVAS", + "horizontalAlignment": "LEFT", + "isVisibleSearch": true, + "isVisiblePagination": true, + "verticalAlignment": "CENTER" + }, + { + "boxShadow": "none", + "widgetName": "InsertButton", + "onClick": "{{showModal('InsertModal')}}", + "buttonColor": "{{appsmith.theme.colors.primaryColor}}", + "dynamicPropertyPathList": [ + { + "key": "onClick" + } + ], + "displayName": "Button", + "iconSVG": "/static/media/icon.cca02633.svg", + "topRow": 2, + "bottomRow": 6, + "parentRowSpace": 10, + "type": "BUTTON_WIDGET", + "hideCard": false, + "animateLoading": true, + "parentColumnSpace": 16.71875, + "dynamicTriggerPathList": [ + { + "key": "onClick" + } + ], + "leftColumn": 4, + "dynamicBindingPathList": [ + { + "key": "buttonColor" + }, + { + "key": "borderRadius" + } + ], + "text": "Run InsertQuery", + "isDisabled": false, + "key": "7va5q4amde", + "isDeprecated": false, + "rightColumn": 20, + "isDefaultClickDisabled": true, + "widgetId": "jr1y6sdur4", + "isVisible": true, + "recaptchaType": "V3", + "version": 1, + "parentId": "0", + "renderMode": "CANVAS", + "isLoading": false, + "borderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}", + "buttonVariant": "PRIMARY", + "placement": "CENTER" + }, + { + "boxShadow": "none", + "widgetName": "UpdateButton", + "onClick": "{{showModal('UpdateModal')}}", + "buttonColor": "{{appsmith.theme.colors.primaryColor}}", + "dynamicPropertyPathList": [], + "displayName": "Button", + "iconSVG": "/static/media/icon.cca02633.svg", + "topRow": 2, + "bottomRow": 6, + "parentRowSpace": 10, + "type": "BUTTON_WIDGET", + "hideCard": false, + "animateLoading": true, + "parentColumnSpace": 16.71875, + "dynamicTriggerPathList": [ + { + "key": "onClick" + } + ], + "leftColumn": 44, + "dynamicBindingPathList": [ + { + "key": "buttonColor" + }, + { + "key": "borderRadius" + } + ], + "text": "Run UpdateQuery", + "isDisabled": false, + "key": "7va5q4amde", + "isDeprecated": false, + "rightColumn": 60, + "isDefaultClickDisabled": true, + "widgetId": "3k4fg1zx8x", + "isVisible": true, + "recaptchaType": "V3", + "version": 1, + "parentId": "0", + "renderMode": "CANVAS", + "isLoading": false, + "borderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}", + "buttonVariant": "PRIMARY", + "placement": "CENTER" + }, + { + "boxShadow": "none", + "widgetName": "InsertModal", + "isCanvas": true, + "displayName": "Modal", + "iconSVG": "/static/media/icon.4975978e.svg", + "topRow": 22, + "bottomRow": 46, + "parentRowSpace": 10, + "type": "MODAL_WIDGET", + "hideCard": false, + "shouldScrollContents": true, + "animateLoading": true, + "parentColumnSpace": 16.71875, + "leftColumn": 20, + "dynamicBindingPathList": [ + { + "key": "borderRadius" + } + ], + "children": [ + { + "boxShadow": "none", + "widgetName": "Canvas1", + "displayName": "Canvas", + "topRow": 0, + "bottomRow": 420, + "parentRowSpace": 1, + "type": "CANVAS_WIDGET", + "canExtend": true, + "hideCard": true, + "shouldScrollContents": false, + "minHeight": 428, + "parentColumnSpace": 1, + "leftColumn": 0, + "dynamicBindingPathList": [ + { + "key": "borderRadius" + }, + { + "key": "accentColor" + } + ], + "children": [ + { + "boxShadow": "none", + "widgetName": "Insertnumeric", + "displayName": "Input", + "iconSVG": "/static/media/icon.9f505595.svg", + "topRow": 25, + "bottomRow": 32, + "parentRowSpace": 10, + "labelWidth": 5, + "autoFocus": false, + "type": "INPUT_WIDGET_V2", + "hideCard": false, + "animateLoading": true, + "parentColumnSpace": 6.9375, + "dynamicTriggerPathList": [], + "resetOnSubmit": true, + "leftColumn": 2, + "dynamicBindingPathList": [ + { + "key": "accentColor" + }, + { + "key": "borderRadius" + }, + { + "key": "label" + } + ], + "labelPosition": "Top", + "labelStyle": "", + "inputType": "NUMBER", + "isDisabled": false, + "key": "x49qcvsllj", + "labelTextSize": "0.875rem", + "isRequired": false, + "isDeprecated": false, + "rightColumn": 62, + "widgetId": "41k33kecwn", + "accentColor": "{{appsmith.theme.colors.primaryColor}}", + "isVisible": true, + "label": "{{Table1.columnOrder[3].toString().replace(/(?:^|\\s|[\"'([{])+\\S/g, match => match.toUpperCase());\n}}", + "version": 2, + "parentId": "6otxv391ns", + "labelAlignment": "left", + "renderMode": "CANVAS", + "isLoading": false, + "borderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}", + "iconAlign": "left", + "defaultText": "" + }, + { + "boxShadow": "none", + "widgetName": "Insertdecimal", + "displayName": "Input", + "iconSVG": "/static/media/icon.9f505595.svg", + "topRow": 16, + "bottomRow": 23, + "parentRowSpace": 10, + "labelWidth": 5, + "autoFocus": false, + "type": "INPUT_WIDGET_V2", + "hideCard": false, + "animateLoading": true, + "parentColumnSpace": 6.9375, + "dynamicTriggerPathList": [], + "resetOnSubmit": true, + "leftColumn": 2, + "dynamicBindingPathList": [ + { + "key": "accentColor" + }, + { + "key": "borderRadius" + }, + { + "key": "label" + } + ], + "labelPosition": "Top", + "labelStyle": "", + "inputType": "NUMBER", + "isDisabled": false, + "key": "x49qcvsllj", + "labelTextSize": "0.875rem", + "isRequired": false, + "isDeprecated": false, + "rightColumn": 62, + "widgetId": "uyzomn3bp6", + "accentColor": "{{appsmith.theme.colors.primaryColor}}", + "isVisible": true, + "label": "{{Table1.columnOrder[2].toString().replace(/(?:^|\\s|[\"'([{])+\\S/g, match => match.toUpperCase());\n}}", + "version": 2, + "parentId": "6otxv391ns", + "labelAlignment": "left", + "renderMode": "CANVAS", + "isLoading": false, + "borderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}", + "iconAlign": "left", + "defaultText": "" + }, + { + "boxShadow": "none", + "widgetName": "IconButton1", + "onClick": "{{closeModal('InsertModal')}}", + "buttonColor": "{{appsmith.theme.colors.primaryColor}}", + "displayName": "Icon Button", + "iconSVG": "/static/media/icon.1a0c634a.svg", + "topRow": 1, + "bottomRow": 5, + "type": "ICON_BUTTON_WIDGET", + "hideCard": false, + "animateLoading": true, + "leftColumn": 56, + "dynamicBindingPathList": [ + { + "key": "buttonColor" + }, + { + "key": "borderRadius" + } + ], + "iconSize": 24, + "isDisabled": false, + "key": "glch1esz5b", + "isDeprecated": false, + "rightColumn": 64, + "iconName": "cross", + "widgetId": "jqcrr1o8or", + "isVisible": true, + "version": 1, + "parentId": "6otxv391ns", + "renderMode": "CANVAS", + "isLoading": false, + "borderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}", + "buttonVariant": "TERTIARY" + }, + { + "widgetName": "Text1", + "displayName": "Text", + "iconSVG": "/static/media/icon.97c59b52.svg", + "topRow": 1, + "bottomRow": 5, + "type": "TEXT_WIDGET", + "hideCard": false, + "animateLoading": true, + "overflow": "NONE", + "fontFamily": "{{appsmith.theme.fontFamily.appFont}}", + "dynamicTriggerPathList": [], + "leftColumn": 1, + "dynamicBindingPathList": [ + { + "key": "fontFamily" + }, + { + "key": "borderRadius" + } + ], + "shouldTruncate": false, + "truncateButtonColor": "#FFC13D", + "text": "Insert Record", + "key": "orwoe8agwc", + "isDeprecated": false, + "rightColumn": 41, + "textAlign": "LEFT", + "widgetId": "achn17gfze", + "isVisible": true, + "fontStyle": "BOLD", + "textColor": "#231F20", + "version": 1, + "parentId": "6otxv391ns", + "renderMode": "CANVAS", + "isLoading": false, + "borderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}", + "fontSize": "1.5rem" + }, + { + "boxShadow": "none", + "widgetName": "Button5", + "onClick": "{{closeModal('InsertModal')}}", + "buttonColor": "{{appsmith.theme.colors.primaryColor}}", + "displayName": "Button", + "iconSVG": "/static/media/icon.cca02633.svg", + "topRow": 35, + "bottomRow": 39, + "type": "BUTTON_WIDGET", + "hideCard": false, + "animateLoading": true, + "leftColumn": 14, + "dynamicBindingPathList": [ + { + "key": "buttonColor" + }, + { + "key": "borderRadius" + } + ], + "text": "Close", + "isDisabled": false, + "key": "b7wg448vx0", + "isDeprecated": false, + "rightColumn": 30, + "isDefaultClickDisabled": true, + "widgetId": "0ym0mah4go", + "buttonStyle": "PRIMARY", + "isVisible": true, + "recaptchaType": "V3", + "version": 1, + "parentId": "6otxv391ns", + "renderMode": "CANVAS", + "isLoading": false, + "borderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}", + "buttonVariant": "SECONDARY", + "placement": "CENTER" + }, + { + "boxShadow": "none", + "widgetName": "runInsertQuery", + "onClick": "{{insertRecord.run(() => {\nselectRecords.run();\t\t\t\tresetWidget('InsertModal', true);\ncloseModal('InsertModal'), () => {};})}}", + "buttonColor": "{{appsmith.theme.colors.primaryColor}}", + "dynamicPropertyPathList": [ + { + "key": "onClick" + } + ], + "displayName": "Button", + "iconSVG": "/static/media/icon.cca02633.svg", + "topRow": 35, + "bottomRow": 39, + "type": "BUTTON_WIDGET", + "hideCard": false, + "animateLoading": true, + "dynamicTriggerPathList": [ + { + "key": "onClick" + } + ], + "leftColumn": 34, + "dynamicBindingPathList": [ + { + "key": "buttonColor" + }, + { + "key": "borderRadius" + } + ], + "text": "Insert", + "isDisabled": false, + "key": "b7wg448vx0", + "isDeprecated": false, + "rightColumn": 50, + "isDefaultClickDisabled": true, + "widgetId": "0trrzqxtbk", + "buttonStyle": "PRIMARY_BUTTON", + "isVisible": true, + "recaptchaType": "V3", + "version": 1, + "parentId": "6otxv391ns", + "renderMode": "CANVAS", + "isLoading": false, + "borderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}", + "buttonVariant": "PRIMARY", + "placement": "CENTER" + }, + { + "boxShadow": "none", + "widgetName": "Insertbigint", + "displayName": "Input", + "iconSVG": "/static/media/icon.9f505595.svg", + "topRow": 7, + "bottomRow": 14, + "parentRowSpace": 10, + "labelWidth": 5, + "autoFocus": false, + "type": "INPUT_WIDGET_V2", + "hideCard": false, + "animateLoading": true, + "parentColumnSpace": 6.9375, + "dynamicTriggerPathList": [], + "resetOnSubmit": true, + "leftColumn": 2, + "dynamicBindingPathList": [ + { + "key": "accentColor" + }, + { + "key": "borderRadius" + }, + { + "key": "label" + } + ], + "labelPosition": "Top", + "labelStyle": "", + "inputType": "NUMBER", + "isDisabled": false, + "key": "x49qcvsllj", + "labelTextSize": "0.875rem", + "isRequired": false, + "isDeprecated": false, + "rightColumn": 62, + "widgetId": "ufngck5pv5", + "accentColor": "{{appsmith.theme.colors.primaryColor}}", + "isVisible": true, + "label": "{{Table1.columnOrder[1].toString().replace(/(?:^|\\s|[\"'([{])+\\S/g, match => match.toUpperCase());\n}}", + "version": 2, + "parentId": "6otxv391ns", + "labelAlignment": "left", + "renderMode": "CANVAS", + "isLoading": false, + "borderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}", + "iconAlign": "left", + "defaultText": "" + } + ], + "isDisabled": false, + "key": "jcn9nfbcoh", + "isDeprecated": false, + "rightColumn": 401.25, + "detachFromLayout": true, + "widgetId": "6otxv391ns", + "accentColor": "{{appsmith.theme.colors.primaryColor}}", + "isVisible": true, + "version": 1, + "parentId": "rhom101hjk", + "renderMode": "CANVAS", + "isLoading": false, + "borderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}" + } + ], + "key": "n6csxgy8za", + "height": 428, + "isDeprecated": false, + "rightColumn": 44, + "detachFromLayout": true, + "widgetId": "rhom101hjk", + "canOutsideClickClose": true, + "canEscapeKeyClose": true, + "version": 2, + "parentId": "0", + "renderMode": "CANVAS", + "isLoading": false, + "borderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}", + "width": 456 + }, + { + "isVisible": true, + "iconName": "delete", + "buttonVariant": "PRIMARY", + "isDisabled": false, + "widgetName": "IconButton2", + "version": 1, + "animateLoading": true, + "type": "ICON_BUTTON_WIDGET", + "hideCard": false, + "isDeprecated": false, + "displayName": "Icon Button", + "key": "8he4nv2fbs", + "iconSVG": "/static/media/icon.1a0c634a.svg", + "widgetId": "30jhk2thdb", + "renderMode": "CANVAS", + "buttonColor": "{{appsmith.theme.colors.primaryColor}}", + "borderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}", + "boxShadow": "none", + "isLoading": false, + "parentColumnSpace": 16.71875, + "parentRowSpace": 10, + "leftColumn": 30, + "rightColumn": 34, + "topRow": 2, + "bottomRow": 6, + "parentId": "0", + "dynamicBindingPathList": [ + { + "key": "buttonColor" + }, + { + "key": "borderRadius" + } + ], + "dynamicTriggerPathList": [ + { + "key": "onClick" + } + ], + "onClick": "{{deleteAllRecords.run(() => selectRecords.run(), () => {})}}" + } + ] + } +} diff --git a/app/client/cypress/fixtures/datePickerdsl.json b/app/client/cypress/fixtures/datePickerdsl.json new file mode 100644 index 0000000000..2635492d7c --- /dev/null +++ b/app/client/cypress/fixtures/datePickerdsl.json @@ -0,0 +1,127 @@ +{ + "dsl": { + "widgetName": "MainContainer", + "backgroundColor": "none", + "rightColumn": 4896, + "snapColumns": 64, + "detachFromLayout": true, + "widgetId": "0", + "topRow": 0, + "bottomRow": 5120, + "containerStyle": "none", + "snapRows": 128, + "parentRowSpace": 1, + "type": "CANVAS_WIDGET", + "canExtend": true, + "version": 59, + "minHeight": 1292, + "parentColumnSpace": 1, + "dynamicBindingPathList": [], + "leftColumn": 0, + "children": [ + { + "boxShadow": "none", + "minDate": "", + "widgetName": "DatePicker1", + "dateFormat": "DD/MM/YYYY HH:mm", + "dynamicPropertyPathList": [ + { + "key": "defaultDate" + }, + { + "key": "minDate" + }, + { + "key": "maxDate" + } + ], + "topRow": 0, + "bottomRow": 4, + "shortcuts": false, + "parentRowSpace": 40, + "type": "DATE_PICKER_WIDGET2", + "parentColumnSpace": 74, + "dynamicTriggerPathList": [], + "leftColumn": 20, + "dynamicBindingPathList": [ + { + "key": "accentColor" + } + ], + "isDisabled": false, + "labelTextSize": "0.875rem", + "isRequired": false, + "defaultDate": "", + "rightColumn": 40, + "widgetId": "w4htilgv5t", + "accentColor": "{{appsmith.theme.colors.primaryColor}}", + "isVisible": true, + "datePickerType": "DATE_PICKER", + "label": "", + "version": 2, + "parentId": "0", + "isLoading": false, + "borderRadius": "0px", + "closeOnSelection": false, + "maxDate": "" + }, + { + "boxShadow": "none", + "widgetName": "Text1", + "topRow": 12, + "bottomRow": 16, + "parentRowSpace": 40, + "type": "TEXT_WIDGET", + "parentColumnSpace": 74, + "overflow": "NONE", + "fontFamily": "System Default", + "dynamicTriggerPathList": [], + "leftColumn": 4, + "dynamicBindingPathList": [ + { + "key": "text" + } + ], + "text": "{{DatePicker1.formattedDate}}", + "labelTextSize": "0.875rem", + "rightColumn": 20, + "textAlign": "LEFT", + "widgetId": "voohxsv4t2", + "isVisible": true, + "fontStyle": "BOLD", + "version": 1, + "textColor": "#231F20", + "parentId": "0", + "isLoading": false, + "borderRadius": "0px", + "fontSize": "0.875rem" + }, + { + "boxShadow": "none", + "widgetName": "Text2", + "topRow": 12, + "bottomRow": 16, + "parentRowSpace": 40, + "type": "TEXT_WIDGET", + "parentColumnSpace": 74, + "overflow": "NONE", + "fontFamily": "System Default", + "leftColumn": 32, + "dynamicBindingPathList": [], + "text": "Label", + "labelTextSize": "0.875rem", + "rightColumn": 48, + "textAlign": "LEFT", + "widgetId": "xif8wugzjv", + "isVisible": true, + "fontStyle": "BOLD", + "version": 1, + "textColor": "#231F20", + "parentId": "0", + "isLoading": false, + "borderRadius": "0px", + "fontSize": "0.875rem" + } + ] + } +} \ No newline at end of file diff --git a/app/client/cypress/fixtures/mongo_GET_Actions.json b/app/client/cypress/fixtures/mongo_GET_Actions.json index f039e2eda7..ec555c5db8 100644 --- a/app/client/cypress/fixtures/mongo_GET_Actions.json +++ b/app/client/cypress/fixtures/mongo_GET_Actions.json @@ -6,7 +6,7 @@ "data": [ { "id": "616d7e429594b25adfa3e57e", - "organizationId": "6156b8c6c7e12534da9c5a1d", + "workspaceId": "6156b8c6c7e12534da9c5a1d", "pluginType": "DB", "pluginId": "6156b848c7e12534da9c5985", "name": "InsertQuery", @@ -87,7 +87,7 @@ }, { "id": "616d7e429594b25adfa3e57d", - "organizationId": "6156b8c6c7e12534da9c5a1d", + "workspaceId": "6156b8c6c7e12534da9c5a1d", "pluginType": "DB", "pluginId": "6156b848c7e12534da9c5985", "name": "DeleteQuery", @@ -169,7 +169,7 @@ }, { "id": "616d7e429594b25adfa3e580", - "organizationId": "6156b8c6c7e12534da9c5a1d", + "workspaceId": "6156b8c6c7e12534da9c5a1d", "pluginType": "DB", "pluginId": "6156b848c7e12534da9c5985", "name": "FindQuery", @@ -266,7 +266,7 @@ }, { "id": "616d7e429594b25adfa3e57f", - "organizationId": "6156b8c6c7e12534da9c5a1d", + "workspaceId": "6156b8c6c7e12534da9c5a1d", "pluginType": "DB", "pluginId": "6156b848c7e12534da9c5985", "name": "UpdateQuery", diff --git a/app/client/cypress/fixtures/mySQL_GET_Actions.json b/app/client/cypress/fixtures/mySQL_GET_Actions.json index c4aa5fde3b..c9086b9bf2 100644 --- a/app/client/cypress/fixtures/mySQL_GET_Actions.json +++ b/app/client/cypress/fixtures/mySQL_GET_Actions.json @@ -6,7 +6,7 @@ "data": [ { "id": "616532b5b58fda6558e56bb9", - "organizationId": "6156b8c6c7e12534da9c5a1d", + "workspaceId": "6156b8c6c7e12534da9c5a1d", "pluginType": "DB", "pluginId": "6156b849c7e12534da9c5998", "name": "DeleteQuery", @@ -47,7 +47,7 @@ }, { "id": "616532b5b58fda6558e56bbc", - "organizationId": "6156b8c6c7e12534da9c5a1d", + "workspaceId": "6156b8c6c7e12534da9c5a1d", "pluginType": "DB", "pluginId": "6156b849c7e12534da9c5998", "name": "UpdateQuery", @@ -96,7 +96,7 @@ }, { "id": "616532b5b58fda6558e56bbb", - "organizationId": "6156b8c6c7e12534da9c5a1d", + "workspaceId": "6156b8c6c7e12534da9c5a1d", "pluginType": "DB", "pluginId": "6156b849c7e12534da9c5998", "name": "InsertQuery", @@ -145,7 +145,7 @@ }, { "id": "616532b5b58fda6558e56bba", - "organizationId": "6156b8c6c7e12534da9c5a1d", + "workspaceId": "6156b8c6c7e12534da9c5a1d", "pluginType": "DB", "pluginId": "6156b849c7e12534da9c5998", "name": "SelectQuery", diff --git a/app/client/cypress/fixtures/postInviteStub.json b/app/client/cypress/fixtures/postInviteStub.json index 607d02cb67..7fbaa92afd 100644 --- a/app/client/cypress/fixtures/postInviteStub.json +++ b/app/client/cypress/fixtures/postInviteStub.json @@ -11,8 +11,8 @@ "email": "viewerappsmith@mailinator.com", "source": "FORM", "isEnabled": true, - "currentOrganizationId": "5f16f6ea5536dc1f0549e42e", - "organizationIds": [ + "currentWorkspaceId": "5f16f6ea5536dc1f0549e42e", + "workspaceIds": [ "5f0d4e14d3f75e0ed39f20be", "5f0d4f38d3f75e0ed39f20c4", "5f0d557dd3f75e0ed39f20ce", @@ -132,7 +132,7 @@ "6057644469c2320b5c462471", "6057653869c2320b5c462478" ], - "examplesOrganizationId": "5f16f6ea5536dc1f0549e42e", + "examplesWorkspaceId": "5f16f6ea5536dc1f0549e42e", "groupIds": [], "permissions": [], "isAnonymous": false, diff --git a/app/client/cypress/fixtures/saveAction.json b/app/client/cypress/fixtures/saveAction.json index e628717ae9..3cff419e93 100644 --- a/app/client/cypress/fixtures/saveAction.json +++ b/app/client/cypress/fixtures/saveAction.json @@ -12,7 +12,7 @@ ], "name": "Untitled Datasource 5213", "pluginId": "5e687c18fb01e64e6a3f873f", - "organizationId": "5fd639aceb554e031ee61fef", + "workspaceId": "5fd639aceb554e031ee61fef", "datasourceConfiguration": { "connection": { "mode": "READ_WRITE", diff --git a/app/client/cypress/fixtures/user.json b/app/client/cypress/fixtures/user.json index 83564398db..8879189455 100644 --- a/app/client/cypress/fixtures/user.json +++ b/app/client/cypress/fixtures/user.json @@ -10,6 +10,6 @@ "isEnabled": true, "isSuperUser": true, "name": "test", - "organizationIds": ["61a8a112ccc8b629d92a1aad"], + "workspaceIds": ["61a8a112ccc8b629d92a1aad"], "username": "test@appsmith.com" } \ No newline at end of file diff --git a/app/client/cypress/integration/Smoke_TestSuite/Application/CommunityIssues_Spec.ts b/app/client/cypress/integration/Smoke_TestSuite/Application/CommunityIssues_Spec.ts index 39160975fc..92d14110d8 100644 --- a/app/client/cypress/integration/Smoke_TestSuite/Application/CommunityIssues_Spec.ts +++ b/app/client/cypress/integration/Smoke_TestSuite/Application/CommunityIssues_Spec.ts @@ -13,15 +13,15 @@ let homePage = ObjectsRegistry.HomePage, describe("AForce - Community Issues page validations", function() { before(function() { - agHelper.clearLocalStorageCache(); + agHelper.ClearLocalStorageCache(); }); beforeEach(() => { - agHelper.restoreLocalStorageCache(); + agHelper.RestoreLocalStorageCache(); }); afterEach(() => { - agHelper.saveLocalStorageCache(); + agHelper.SaveLocalStorageCache(); }); let selectedRow: number; @@ -104,7 +104,7 @@ describe("AForce - Community Issues page validations", function() { }); it("3. Validate table navigation with Server Side pagination disabled with Default selected row selection", () => { - agHelper.NavigateBacktoEditor(); + deployMode.NavigateBacktoEditor(); table.WaitUntilTableLoad(); ee.SelectEntityByName("Table1", "WIDGETS"); propPane.ToggleOnOrOff("serversidepagination", "Off"); @@ -112,7 +112,7 @@ describe("AForce - Community Issues page validations", function() { table.WaitUntilTableLoad(); table.AssertPageNumber(1, "Off"); table.AssertSelectedRow(selectedRow); - agHelper.NavigateBacktoEditor(); + deployMode.NavigateBacktoEditor(); table.WaitUntilTableLoad(); ee.SelectEntityByName("Table1", "WIDGETS"); propPane.ToggleOnOrOff("serversidepagination", "On"); @@ -127,7 +127,7 @@ describe("AForce - Community Issues page validations", function() { table.NavigateToNextPage(); //page 2 table.AssertPageNumber(2); table.AssertSelectedRow(1); - agHelper.NavigateBacktoEditor(); + deployMode.NavigateBacktoEditor(); table.WaitUntilTableLoad(); }); @@ -138,14 +138,14 @@ describe("AForce - Community Issues page validations", function() { table.AssertSearchText("Bug"); table.WaitUntilTableLoad(); table.WaitUntilTableLoad(); - agHelper.NavigateBacktoEditor(); + deployMode.NavigateBacktoEditor(); ee.SelectEntityByName("Table1", "WIDGETS"); jsEditor.EnterJSContext("Default Search Text", "Question", false); deployMode.DeployApp(); table.AssertSearchText("Question"); table.WaitUntilTableLoad(); - agHelper.NavigateBacktoEditor(); + deployMode.NavigateBacktoEditor(); table.WaitUntilTableLoad(); ee.SelectEntityByName("Table1", "WIDGETS"); @@ -153,7 +153,7 @@ describe("AForce - Community Issues page validations", function() { deployMode.DeployApp(); table.AssertSearchText("Epic"); table.WaitForTableEmpty(); - agHelper.NavigateBacktoEditor(); + deployMode.NavigateBacktoEditor(); table.WaitUntilTableLoad(); ee.SelectEntityByName("Table1", "WIDGETS"); @@ -176,7 +176,7 @@ describe("AForce - Community Issues page validations", function() { table.WaitUntilTableLoad(); cy.xpath(table._searchBoxCross).click(); - agHelper.NavigateBacktoEditor(); + deployMode.NavigateBacktoEditor(); table.WaitUntilTableLoad(); ee.SelectEntityByName("Table1", "WIDGETS"); @@ -193,7 +193,7 @@ describe("AForce - Community Issues page validations", function() { table.WaitForTableEmpty(); cy.xpath(table._searchBoxCross).click(); - agHelper.NavigateBacktoEditor(); + deployMode.NavigateBacktoEditor(); table.WaitUntilTableLoad(); ee.SelectEntityByName("Table1", "WIDGETS"); propPane.ToggleOnOrOff("enableclientsidesearch", "On"); diff --git a/app/client/cypress/integration/Smoke_TestSuite/Application/ImportExportForkApplication_spec.js b/app/client/cypress/integration/Smoke_TestSuite/Application/ImportExportForkApplication_spec.js index 1396d96860..469923152a 100644 --- a/app/client/cypress/integration/Smoke_TestSuite/Application/ImportExportForkApplication_spec.js +++ b/app/client/cypress/integration/Smoke_TestSuite/Application/ImportExportForkApplication_spec.js @@ -2,9 +2,9 @@ const homePage = require("../../../locators/HomePage"); const reconnectDatasourceModal = require("../../../locators/ReconnectLocators"); describe("Import, Export and Fork application and validate data binding", function() { - let orgid; + let workspaceId; let appid; - let newOrganizationName; + let newWorkspaceName; let appName; it("Import application from json and validate data on pageload", function() { // import application @@ -12,8 +12,8 @@ describe("Import, Export and Fork application and validate data binding", functi cy.get(homePage.optionsIcon) .first() .click(); - cy.get(homePage.orgImportAppOption).click({ force: true }); - cy.get(homePage.orgImportAppModal).should("be.visible"); + cy.get(homePage.workspaceImportAppOption).click({ force: true }); + cy.get(homePage.workspaceImportAppModal).should("be.visible"); cy.xpath(homePage.uploadLogo).attachFile("forkedApp.json"); cy.get(homePage.importAppProgressWrapper).should("be.visible"); cy.wait("@importNewApplication").then((interception) => { @@ -65,7 +65,7 @@ describe("Import, Export and Fork application and validate data binding", functi .first() .click({ force: true }); cy.get(homePage.forkAppFromMenu).click({ force: true }); - cy.get(homePage.forkAppOrgButton).click({ force: true }); + cy.get(homePage.forkAppWorkspaceButton).click({ force: true }); cy.wait(4000); // validating data binding for the forked application cy.xpath("//input[@value='Submit']").should("be.visible"); @@ -100,19 +100,20 @@ describe("Import, Export and Fork application and validate data binding", functi ); cy.writeFile("cypress/fixtures/exportedApp.json", body, "utf-8"); cy.generateUUID().then((uid) => { - orgid = uid; - localStorage.setItem("OrgName", orgid); - cy.createOrg(); - cy.wait("@createOrg").then((createOrgInterception) => { - newOrganizationName = createOrgInterception.response.body.data.name; - cy.renameOrg(newOrganizationName, orgid); - cy.get(homePage.orgImportAppOption).click({ force: true }); + workspaceId = uid; + localStorage.setItem("OrgName", workspaceId); + cy.createWorkspace(); + cy.wait("@createWorkspace").then((createWorkspaceInterception) => { + newWorkspaceName = + createWorkspaceInterception.response.body.data.name; + cy.renameWorkspace(newWorkspaceName, workspaceId); + cy.get(homePage.workspaceImportAppOption).click({ force: true }); - cy.get(homePage.orgImportAppModal).should("be.visible"); + cy.get(homePage.workspaceImportAppModal).should("be.visible"); // cy.get(".t--import-json-card input").attachFile("exportedApp.json"); cy.xpath(homePage.uploadLogo).attachFile("exportedApp.json"); - // import exported application in new organization - // cy.get(homePage.orgImportAppButton).click({ force: true }); + // import exported application in new workspace + // cy.get(homePage.workspaceImportAppButton).click({ force: true }); cy.wait("@importNewApplication").then((interception) => { const { isPartialImport } = interception.response.body.data; if (isPartialImport) { diff --git a/app/client/cypress/integration/Smoke_TestSuite/Application/PgAdmin_spec.js b/app/client/cypress/integration/Smoke_TestSuite/Application/PgAdmin_spec.js index 09db5d98e5..7c4ca572a5 100644 --- a/app/client/cypress/integration/Smoke_TestSuite/Application/PgAdmin_spec.js +++ b/app/client/cypress/integration/Smoke_TestSuite/Application/PgAdmin_spec.js @@ -6,8 +6,8 @@ const widgetsPage = require("../../../locators/Widgets.json"); const appPage = require("../../../locators/PgAdminlocators.json"); describe("PgAdmin Clone App", function() { - let orgid; - let newOrganizationName; + let workspaceId; + let newWorkspaceName; let appname; let datasourceName; diff --git a/app/client/cypress/integration/Smoke_TestSuite/Application/ReconnectDatasource_spec.js b/app/client/cypress/integration/Smoke_TestSuite/Application/ReconnectDatasource_spec.js index ebbd089f93..b1631c3fd7 100644 --- a/app/client/cypress/integration/Smoke_TestSuite/Application/ReconnectDatasource_spec.js +++ b/app/client/cypress/integration/Smoke_TestSuite/Application/ReconnectDatasource_spec.js @@ -2,22 +2,22 @@ const homePage = require("../../../locators/HomePage"); const reconnectDatasourceModal = require("../../../locators/ReconnectLocators"); describe("Reconnect Datasource Modal validation while importing application", function() { - let orgid; + let workspaceId; let appid; - let newOrganizationName; + let newWorkspaceName; let appName; it("Import application from json with one postgres and success modal", function() { cy.NavigateToHome(); // import application cy.generateUUID().then((uid) => { - orgid = uid; - localStorage.setItem("OrgName", orgid); - cy.createOrg(); - cy.wait("@createOrg").then((createOrgInterception) => { - newOrganizationName = createOrgInterception.response.body.data.name; - cy.renameOrg(newOrganizationName, orgid); - cy.get(homePage.orgImportAppOption).click({ force: true }); - cy.get(homePage.orgImportAppModal).should("be.visible"); + workspaceId = uid; + localStorage.setItem("OrgName", workspaceId); + cy.createWorkspace(); + cy.wait("@createWorkspace").then((createWorkspaceInterception) => { + newWorkspaceName = createWorkspaceInterception.response.body.data.name; + cy.renameWorkspace(newWorkspaceName, workspaceId); + cy.get(homePage.workspaceImportAppOption).click({ force: true }); + cy.get(homePage.workspaceImportAppModal).should("be.visible"); cy.xpath(homePage.uploadLogo).attachFile("one_postgres.json"); cy.wait("@importNewApplication").then((interception) => { cy.wait(100); diff --git a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/ApiPaneTests/API_ContextMenu_spec.js b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/ApiPaneTests/API_ContextMenu_spec.js index f352d4bcea..414b1fdfdb 100644 --- a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/ApiPaneTests/API_ContextMenu_spec.js +++ b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/ApiPaneTests/API_ContextMenu_spec.js @@ -13,7 +13,7 @@ describe("API Panel Test Functionality ", function() { cy.enterDatasourceAndPath(testdata.baseUrl, "{{ '/random' }}"); cy.assertPageSave(); cy.get("body").click(0, 0); - ee.expandCollapseEntity("QUERIES/JS"); + ee.ExpandCollapseEntity("QUERIES/JS"); ee.ActionContextMenuByEntityName("FirstAPI", "Copy to page", "SecondPage"); // click on learn how link cy.get(".t--learn-how-apis-link").click(); diff --git a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/ApiPaneTests/API_MultiPart_Spec.ts b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/ApiPaneTests/API_MultiPart_Spec.ts index 15868761ae..a5bd7412c4 100644 --- a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/ApiPaneTests/API_MultiPart_Spec.ts +++ b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/ApiPaneTests/API_MultiPart_Spec.ts @@ -131,7 +131,7 @@ describe("Validate API request body panel", () => { ee.SelectEntityByName("CloudinaryUploadApi", "QUERIES/JS"); - apiPage.OnPageLoadRun(false); //Bug 12476 + apiPage.ToggleOnPageLoadRun(false); //Bug 12476 ee.SelectEntityByName("Page1"); deployMode.DeployApp(locator._spanButton("Select Files")); agHelper.ClickButton("Select Files"); @@ -145,7 +145,7 @@ describe("Validate API request body panel", () => { expect($src).not.eq("https://assets.appsmith.com/widgets/default.png"); }); agHelper.AssertElementVisible(locator._spanButton("Select Files")); //verifying if reset! - agHelper.NavigateBacktoEditor(); + deployMode.NavigateBacktoEditor(); }); it("8. Checks MultiPart form data for a Array Type upload results in API error", () => { diff --git a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/AppThemingTests/Theming_spec.js b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/AppThemingTests/Theming_spec.js index a7e8b902e3..7a6373bfeb 100644 --- a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/AppThemingTests/Theming_spec.js +++ b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/AppThemingTests/Theming_spec.js @@ -618,7 +618,7 @@ describe("App Theming funtionality", function() { it("8. Verify widgets conform to the selected theme in Publish mode", () => { cy.PublishtheApp(); - cy.wait(2000); //for theme to settle + cy.wait(4000); //for theme to settle cy.get("body").should("have.css", "font-family", "Montserrat"); //Font @@ -808,7 +808,7 @@ describe("App Theming funtionality", function() { //Resetting back to theme ee.NavigateToSwitcher("explorer"); - ee.expandCollapseEntity("WIDGETS"); //to expand widgets + ee.ExpandCollapseEntity("WIDGETS"); //to expand widgets ee.SelectEntityByName("Button2"); cy.get(".t--property-control-buttoncolor .reset-button").then(($elem) => { $elem[0].removeAttribute("display: none"); diff --git a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/Applications/ExportApplication_spec.js b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/Applications/ExportApplication_spec.js index a89b547327..34e51c825b 100644 --- a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/Applications/ExportApplication_spec.js +++ b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/Applications/ExportApplication_spec.js @@ -3,9 +3,9 @@ import homePage from "../../../../locators/HomePage"; const commonlocators = require("../../../../locators/commonlocators.json"); describe("Export application as a JSON file", function() { - let orgid; + let workspaceId; let appid; - let newOrganizationName; + let newWorkspaceName; let appname; before(() => { @@ -45,15 +45,15 @@ describe("Export application as a JSON file", function() { it("User with admin access,should be able to export the app", function() { cy.LogintoApp(Cypress.env("USERNAME"), Cypress.env("PASSWORD")); cy.generateUUID().then((uid) => { - orgid = uid; + workspaceId = uid; appid = uid; - localStorage.setItem("OrgName", orgid); - cy.createOrg(); - cy.wait("@createOrg").then((interception) => { - newOrganizationName = interception.response.body.data.name; - cy.renameOrg(newOrganizationName, orgid); + localStorage.setItem("OrgName", workspaceId); + cy.createWorkspace(); + cy.wait("@createWorkspace").then((interception) => { + newWorkspaceName = interception.response.body.data.name; + cy.renameWorkspace(newWorkspaceName, workspaceId); }); - cy.CreateAppForOrg(orgid, appid); + cy.CreateAppForWorkspace(workspaceId, appid); cy.wait("@getPagesForCreateApp").should( "have.nested.property", "response.body.responseMeta.status", @@ -95,15 +95,15 @@ describe("Export application as a JSON file", function() { it("User with developer access,should not be able to export the app", function() { cy.LogintoApp(Cypress.env("USERNAME"), Cypress.env("PASSWORD")); cy.generateUUID().then((uid) => { - orgid = uid; + workspaceId = uid; appid = uid; - localStorage.setItem("OrgName", orgid); - cy.createOrg(); - cy.wait("@createOrg").then((interception) => { - newOrganizationName = interception.response.body.data.name; - cy.renameOrg(newOrganizationName, orgid); + localStorage.setItem("OrgName", workspaceId); + cy.createWorkspace(); + cy.wait("@createWorkspace").then((interception) => { + newWorkspaceName = interception.response.body.data.name; + cy.renameWorkspace(newWorkspaceName, workspaceId); }); - cy.CreateAppForOrg(orgid, appid); + cy.CreateAppForWorkspace(workspaceId, appid); cy.wait("@getPagesForCreateApp").should( "have.nested.property", "response.body.responseMeta.status", @@ -145,15 +145,15 @@ describe("Export application as a JSON file", function() { it("User with viewer access,should not be able to export the app", function() { cy.LogintoApp(Cypress.env("USERNAME"), Cypress.env("PASSWORD")); cy.generateUUID().then((uid) => { - orgid = uid; + workspaceId = uid; appid = uid; - localStorage.setItem("OrgName", orgid); - cy.createOrg(); - cy.wait("@createOrg").then((interception) => { - newOrganizationName = interception.response.body.data.name; - cy.renameOrg(newOrganizationName, orgid); + localStorage.setItem("OrgName", workspaceId); + cy.createWorkspace(); + cy.wait("@createWorkspace").then((interception) => { + newWorkspaceName = interception.response.body.data.name; + cy.renameWorkspace(newWorkspaceName, workspaceId); }); - cy.CreateAppForOrg(orgid, appid); + cy.CreateAppForWorkspace(workspaceId, appid); cy.wait("@getPagesForCreateApp").should( "have.nested.property", "response.body.responseMeta.status", diff --git a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/Applications/ForkApplication_spec.js b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/Applications/ForkApplication_spec.js index a339a2899d..5c63ece712 100644 --- a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/Applications/ForkApplication_spec.js +++ b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/Applications/ForkApplication_spec.js @@ -9,7 +9,7 @@ let forkedApplicationDsl; let parentApplicationDsl; let forkableAppUrl; -describe("Fork application across orgs", function() { +describe("Fork application across workspaces", function() { before(() => { cy.addDsl(dsl); }); @@ -35,10 +35,10 @@ describe("Fork application across orgs", function() { .first() .click({ force: true }); cy.get(homePage.forkAppFromMenu).click({ force: true }); - cy.get(homePage.forkAppOrgButton).click({ force: true }); + cy.get(homePage.forkAppWorkspaceButton).click({ force: true }); // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(4000); - cy.wait("@postForkAppOrg").then((httpResponse) => { + cy.wait("@postForkAppWorkspace").then((httpResponse) => { expect(httpResponse.status).to.equal(200); }); // check that forked application has same dsl @@ -59,8 +59,8 @@ describe("Fork application across orgs", function() { cy.get(homePage.optionsIcon) .first() .click(); - cy.get(homePage.orgImportAppOption).click({ force: true }); - cy.get(homePage.orgImportAppModal).should("be.visible"); + cy.get(homePage.workspaceImportAppOption).click({ force: true }); + cy.get(homePage.workspaceImportAppModal).should("be.visible"); cy.xpath(homePage.uploadLogo).attachFile("forkNonSignedInUser.json"); cy.wait("@importNewApplication").then((interception) => { const { isPartialImport } = interception.response.body.data; @@ -96,7 +96,7 @@ describe("Fork application across orgs", function() { cy.get(applicationLocators.forkButton) .first() .click({ force: true }); - cy.get(homePage.forkAppOrgButton).should("be.visible"); + cy.get(homePage.forkAppWorkspaceButton).should("be.visible"); }); }); }); diff --git a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/Auth/Analytics_spec.js b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/Auth/Analytics_spec.js index f7331bbaa7..54b8fc1e75 100644 --- a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/Auth/Analytics_spec.js +++ b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/Auth/Analytics_spec.js @@ -24,7 +24,7 @@ describe("Checks for analytics initialization", function() { }); cy.generateUUID().then((id) => { appId = id; - cy.CreateAppInFirstListedOrg(id); + cy.CreateAppInFirstListedWorkspace(id); localStorage.setItem("AppName", appId); }); cy.wait(3000); @@ -48,7 +48,7 @@ describe("Checks for analytics initialization", function() { }); cy.generateUUID().then((id) => { appId = id; - cy.CreateAppInFirstListedOrg(id); + cy.CreateAppInFirstListedWorkspace(id); localStorage.setItem("AppName", appId); }); cy.wait(3000); @@ -72,7 +72,7 @@ describe("Checks for analytics initialization", function() { }); cy.generateUUID().then((id) => { appId = id; - cy.CreateAppInFirstListedOrg(id); + cy.CreateAppInFirstListedWorkspace(id); localStorage.setItem("AppName", appId); }); cy.wait(3000); diff --git a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/Binding/BindButton_Text_WithRecaptcha_spec.js b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/Binding/BindButton_Text_WithRecaptcha_spec.js index e83bf12b7f..c2b3e5bb96 100644 --- a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/Binding/BindButton_Text_WithRecaptcha_spec.js +++ b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/Binding/BindButton_Text_WithRecaptcha_spec.js @@ -31,18 +31,21 @@ describe("Binding the Button widget with Text widget using Recpatcha v3", functi cy.get(".t--draggable-textwidget .bp3-ui-text").should("have.value", ""); }); - /* This test to be enabled once the product bug is fixed - it("Validate the Button binding with Text Widget with Recaptcha Token with invalid key before using valid key", function() { + //This test to be enabled once the product bug is fixed + it.skip("Validate the Button binding with Text Widget with Recaptcha Token with invalid key before using valid key", function() { cy.get("button") .contains("Submit") .should("be.visible") .click({ force: true }); - cy.testCodeMirrorLast(testdata.invalidKey) + cy.testCodeMirrorLast(testdata.invalidKey); cy.SearchEntityandOpen("Text1"); - cy.get(".t--draggable-textwidget span").last().invoke('text').then((x) => { - cy.log(x); - expect(x).to.be.empty; - }) + cy.get(".t--draggable-textwidget span") + .last() + .invoke("text") + .then((x) => { + cy.log(x); + expect(x).to.be.empty; + }); cy.SearchEntityandOpen("Button1"); cy.get(".t--property-control-googlerecaptchaversion .bp3-popover-target") .last() @@ -55,15 +58,18 @@ describe("Binding the Button widget with Text widget using Recpatcha v3", functi .contains("Submit") .should("be.visible") .click({ force: true }); - cy.get(".t--toast-action span").should("have.text",testdata.errorMsg) + cy.get(".t--toast-action span").should("have.text", testdata.errorMsg); cy.SearchEntityandOpen("Text1"); cy.wait(3000); - cy.get(".t--draggable-textwidget span").last().invoke('text').then((x) => { - cy.log(x); - expect(x).to.be.empty; - }) + cy.get(".t--draggable-textwidget span") + .last() + .invoke("text") + .then((x) => { + cy.log(x); + expect(x).to.be.empty; + }); }); -*/ + it("2. Validate the Button binding with Text Widget with Recaptcha Token with v2Key", function() { cy.get("button") .contains("Submit") @@ -138,19 +144,22 @@ describe("Binding the Button widget with Text widget using Recpatcha v3", functi }); }); - /* This test to be enabled once the product bug is fixed + //This test to be enabled once the product bug is fixed - it("Validate the Button binding with Text Widget with Recaptcha Token with invalid key", function() { + it.skip("Validate the Button binding with Text Widget with Recaptcha Token with invalid key", function() { cy.get("button") .contains("Submit") .should("be.visible") .click({ force: true }); - cy.testCodeMirrorLast(testdata.invalidKey) + cy.testCodeMirrorLast(testdata.invalidKey); cy.SearchEntityandOpen("Text1"); - cy.get(".t--draggable-textwidget span").last().invoke('text').then((x) => { - cy.log(x); - expect(x).not.to.be.empty; - }) + cy.get(".t--draggable-textwidget span") + .last() + .invoke("text") + .then((x) => { + cy.log(x); + expect(x).not.to.be.empty; + }); cy.SearchEntityandOpen("Button1"); cy.get(".t--property-control-googlerecaptchaversion .bp3-popover-target") .last() @@ -165,10 +174,12 @@ describe("Binding the Button widget with Text widget using Recpatcha v3", functi .click({ force: true }); cy.SearchEntityandOpen("Text1"); cy.wait(3000); - cy.get(".t--draggable-textwidget span").last().invoke('text').then((x) => { - cy.log(x); - expect(x).not.to.be.empty; - }) + cy.get(".t--draggable-textwidget span") + .last() + .invoke("text") + .then((x) => { + cy.log(x); + expect(x).not.to.be.empty; + }); }); - */ }); diff --git a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/Binding/JSObjectToInput_Spec.ts b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/Binding/JSObjectToInput_Spec.ts index 266d884512..5cf68691ea 100644 --- a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/Binding/JSObjectToInput_Spec.ts +++ b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/Binding/JSObjectToInput_Spec.ts @@ -31,8 +31,8 @@ describe("Validate JSObjects binding to Input widget", () => { toRun: true, shouldCreateNewJSObj: true, }); - ee.expandCollapseEntity("WIDGETS"); //to expand widgets - ee.expandCollapseEntity("Form1"); + ee.ExpandCollapseEntity("WIDGETS"); //to expand widgets + ee.ExpandCollapseEntity("Form1"); ee.SelectEntityByName("Input2"); cy.get(locator._inputWidget) .last() @@ -53,7 +53,7 @@ describe("Validate JSObjects binding to Input widget", () => { cy.get(locator._inputWidgetInDeployed) .last() .should("have.value", "Success"); - agHelper.NavigateBacktoEditor(); + deployMode.NavigateBacktoEditor(); // cy.get(locator._inputWidget) // .last() @@ -78,8 +78,8 @@ describe("Validate JSObjects binding to Input widget", () => { ee.SelectEntityByName(jsOjbNameReceived as string, "QUERIES/JS"); jsEditor.EditJSObj(jsBody); agHelper.AssertAutoSave(); - ee.expandCollapseEntity("WIDGETS"); - ee.expandCollapseEntity("Form1"); + ee.ExpandCollapseEntity("WIDGETS"); + ee.ExpandCollapseEntity("Form1"); ee.SelectEntityByName("Input2"); cy.get(locator._inputWidget).last().invoke("attr", "value").should("equal", 'Success'); //Function is renamed & reference is checked if updated properly! deployMode.DeployApp(locator._inputWidgetInDeployed) diff --git a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/Binding/JSObjectToListWidget_Spec.ts b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/Binding/JSObjectToListWidget_Spec.ts index cc9406f5b7..ca3cacf7ba 100644 --- a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/Binding/JSObjectToListWidget_Spec.ts +++ b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/Binding/JSObjectToListWidget_Spec.ts @@ -70,7 +70,7 @@ describe("Validate JSObj binding to Table widget", () => { table.NavigateToPreviousPage_List(); table.AssertPageNumber_List(1); agHelper.AssertElementLength(locator._textWidgetInDeployed, 8); - agHelper.NavigateBacktoEditor(); + deployMode.NavigateBacktoEditor(); }); it("3. Validate the List widget + Bug 12438 ", function() { diff --git a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/Binding/Promises_Spec.ts b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/Binding/Promises_Spec.ts index b738fbf26d..b7b1757993 100644 --- a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/Binding/Promises_Spec.ts +++ b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/Binding/Promises_Spec.ts @@ -23,7 +23,7 @@ describe("Validate basic Promises", () => { deployMode.DeployApp(); agHelper.ClickButton("Submit"); agHelper.ValidateToastMessage(date); - agHelper.NavigateBacktoEditor(); + deployMode.NavigateBacktoEditor(); }); it("2. Verify resolve & chaining via direct Promises", () => { @@ -48,7 +48,7 @@ describe("Validate basic Promises", () => { deployMode.DeployApp(); agHelper.ClickButton("Submit"); agHelper.ValidateToastMessage("We are on planet Earth"); - agHelper.NavigateBacktoEditor(); + deployMode.NavigateBacktoEditor(); }); it("3. Verify Async Await in direct Promises", () => { @@ -86,7 +86,7 @@ describe("Validate basic Promises", () => { cy.get(locator._toastMsg) .last() .contains(/male|female|null/g); - agHelper.NavigateBacktoEditor(); + deployMode.NavigateBacktoEditor(); }); it("4. Verify .then & .catch via direct Promises", () => { @@ -120,7 +120,7 @@ describe("Validate basic Promises", () => { cy.get(locator._toastMsg) .should("have.length", 1) .contains(/You have a beautiful picture|Oops!/g); - agHelper.NavigateBacktoEditor(); + deployMode.NavigateBacktoEditor(); }); it("5. Verify .then & .catch via JS Objects in Promises", () => { @@ -145,7 +145,7 @@ return InspiringQuotes.run().then((res) => { showAlert("Today's quote for " + us cy.get(locator._toastMsg) .should("have.length", 1) .contains(/Today's quote for You|Unable to fetch quote for/g); - agHelper.NavigateBacktoEditor(); + deployMode.NavigateBacktoEditor(); }); it("6. Verify Promise.race via direct Promises", () => { @@ -172,7 +172,7 @@ return InspiringQuotes.run().then((res) => { showAlert("Today's quote for " + us cy.get(locator._toastMsg) .should("have.length", 1) .contains(/Melinda|Trump/g); - agHelper.NavigateBacktoEditor(); + deployMode.NavigateBacktoEditor(); }); it("7. Verify maintaining context via direct Promises", () => { @@ -225,7 +225,7 @@ return InspiringQuotes.run().then((res) => { showAlert("Today's quote for " + us cy.get(locator._toastMsg) //.should("have.length", 1)//covered in WaitUntilEleAppear() .should("have.text", "Showing results for : fruits basket : the final"); - agHelper.NavigateBacktoEditor(); + deployMode.NavigateBacktoEditor(); }); it("8: Verify Promise.all via direct Promises", () => { @@ -252,7 +252,7 @@ return InspiringQuotes.run().then((res) => { showAlert("Today's quote for " + us deployMode.DeployApp(); agHelper.ClickButton("Submit"); agHelper.ValidateToastMessage("cat,dog,camel,rabbit,rat"); - agHelper.NavigateBacktoEditor(); + deployMode.NavigateBacktoEditor(); }); it("9. Bug 10150: Verify Promise.all via JSObjects", () => { @@ -296,7 +296,7 @@ showAlert("Wonderful! all apis executed", "success")).catch(() => showAlert("Ple cy.get(locator._toastMsg) .last() .contains(/Wonderful|Please check/g); - agHelper.NavigateBacktoEditor(); + deployMode.NavigateBacktoEditor(); }); it("10. Verify Promises.any via direct JSObjects", () => { @@ -320,7 +320,7 @@ showAlert("Wonderful! all apis executed", "success")).catch(() => showAlert("Ple return Promise.any([this.func2(), this.func3(), this.func1()]).then((value) => showAlert("Resolved promise is:" + value)) } }`, - { paste: true, completeReplace: true, toRun: true, shouldCreateNewJSObj: true }, + { paste: true, completeReplace: true, toRun: false, shouldCreateNewJSObj: true }, ); ee.SelectEntityByName("Button1", "WIDGETS"); cy.get("@jsObjName").then((jsObjName) => { @@ -340,7 +340,7 @@ showAlert("Wonderful! all apis executed", "success")).catch(() => showAlert("Ple cy.get(locator._toastMsg) .last() .contains("Resolved promise is:func3"); - agHelper.NavigateBacktoEditor(); + deployMode.NavigateBacktoEditor(); }); it("11. Bug : 11110 - Verify resetWidget via .then direct Promises", () => { @@ -358,7 +358,7 @@ showAlert("Wonderful! all apis executed", "success")).catch(() => showAlert("Ple cy.get(locator._inputWidgetInDeployed).type("Update value"); agHelper.ClickButton("Submit"); agHelper.ValidateToastMessage("Test"); - agHelper.NavigateBacktoEditor(); + deployMode.NavigateBacktoEditor(); }); //Skipping until this bug this is addressed! diff --git a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/Binding/Table_Property_ToggleJs_With_Binding_spec.js b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/Binding/Table_Property_ToggleJs_With_Binding_spec.js index 40b224d33e..e126f583f3 100644 --- a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/Binding/Table_Property_ToggleJs_With_Binding_spec.js +++ b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/Binding/Table_Property_ToggleJs_With_Binding_spec.js @@ -82,8 +82,8 @@ describe("Table Widget property pane feature validation", function() { }); it("Table widget toggle test for style Alignment", function() { - cy.openPropertyPane("tablewidget"); cy.get(".t--property-pane-back-btn").click({ force: true }); + cy.openPropertyPane("tablewidget"); cy.editColumn("id"); cy.get(widgetsPage.toggleVerticalAlig) .first() @@ -95,8 +95,7 @@ describe("Table Widget property pane feature validation", function() { .click({ force: true }); // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(1000); - cy.toggleJsAndUpdate("tabledata", testdata.bindingStyle); - + cy.toggleJsAndUpdateWithIndex("tabledata", testdata.bindingStyle, 3); cy.readTabledataValidateCSS("0", "0", "font-style", "normal"); cy.readTabledataValidateCSS("1", "0", "font-style", "italic"); }); @@ -115,7 +114,7 @@ describe("Table Widget property pane feature validation", function() { .click({ force: true }); // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(1000); - cy.toggleJsAndUpdate("tabledata", testdata.bindingTextColor); + cy.toggleJsAndUpdateWithIndex("tabledata", testdata.bindingTextColor, 5); cy.wait("@updateLayout"); cy.readTabledataValidateCSS("0", "0", "color", "rgb(0, 128, 0)"); @@ -136,7 +135,7 @@ describe("Table Widget property pane feature validation", function() { .click({ force: true }); // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(1000); - cy.toggleJsAndUpdate("tabledata", testdata.bindingTextColor); + cy.toggleJsAndUpdateWithIndex("tabledata", testdata.bindingTextColor, 6); cy.wait("@updateLayout"); cy.readTabledataValidateCSS( diff --git a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/CRUD_JSONForm/Mongo_Spec.ts b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/CRUD_JSONForm/Mongo_Spec.ts index 6864689d44..d6fe2c87ad 100644 --- a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/CRUD_JSONForm/Mongo_Spec.ts +++ b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/CRUD_JSONForm/Mongo_Spec.ts @@ -55,7 +55,7 @@ describe("Validate Mongo CRUD with JSON Form", () => { 10, ); - agHelper.NavigateBacktoEditor(); + deployMode.NavigateBacktoEditor(); table.WaitUntilTableLoad(); //Delete the test data @@ -79,14 +79,14 @@ describe("Validate Mongo CRUD with JSON Form", () => { agHelper.GetNClick(dataSources._selectTableDropdown); agHelper.GetNClickByContains(dataSources._dropdownOption, "coffeeCafe"); GenerateCRUDNValidateDeployPage("", "", "Washington, US", 11); - agHelper.NavigateBacktoEditor(); + deployMode.NavigateBacktoEditor(); table.WaitUntilTableLoad(1, 0); //Delete the test data - ee.expandCollapseEntity("PAGES"); + ee.ExpandCollapseEntity("PAGES"); ee.ActionContextMenuByEntityName("CoffeeCafe", "Delete", "Are you sure?"); agHelper.ValidateNetworkStatus("@deletePage", 200); deployMode.DeployApp(); - agHelper.NavigateBacktoEditor(); + deployMode.NavigateBacktoEditor(); dataSources.DeleteDatasouceFromActiveTab(dsName as string, 200); }); diff --git a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/CRUD_JSONForm/MySQL_Spec.ts b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/CRUD_JSONForm/MySQL_Spec.ts index 8c5fbc4ef8..3ecedfd3bd 100644 --- a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/CRUD_JSONForm/MySQL_Spec.ts +++ b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/CRUD_JSONForm/MySQL_Spec.ts @@ -54,7 +54,7 @@ describe("Validate MySQL Generate CRUD with JSON Form", () => { GenerateCRUDNValidateDeployPage("ABW", "Aruba", "North America", "Code"); - agHelper.NavigateBacktoEditor(); + deployMode.NavigateBacktoEditor(); table.WaitUntilTableLoad(); //Delete the test data ee.ActionContextMenuByEntityName("Page2", "Delete", "Are you sure?"); @@ -68,7 +68,7 @@ describe("Validate MySQL Generate CRUD with JSON Form", () => { }); deployMode.DeployApp(); - agHelper.NavigateBacktoEditor(); + deployMode.NavigateBacktoEditor(); cy.get("@dsName").then(($dsName) => { dsName = $dsName; dataSources.DeleteDatasouceFromActiveTab(dsName as string, 200); @@ -107,7 +107,7 @@ describe("Validate MySQL Generate CRUD with JSON Form", () => { "customerNumber", ); - agHelper.NavigateBacktoEditor(); + deployMode.NavigateBacktoEditor(); cy.get("@dsName").then(($dsName) => { dsName = $dsName; }); @@ -126,10 +126,10 @@ describe("Validate MySQL Generate CRUD with JSON Form", () => { "employeeNumber", ); - agHelper.NavigateBacktoEditor(); + deployMode.NavigateBacktoEditor(); table.WaitUntilTableLoad(); //Delete the test data - ee.expandCollapseEntity("PAGES"); + ee.ExpandCollapseEntity("PAGES"); ee.ActionContextMenuByEntityName("Employees", "Delete", "Are you sure?"); agHelper.ValidateNetworkStatus("@deletePage", 200); }); @@ -170,7 +170,7 @@ describe("Validate MySQL Generate CRUD with JSON Form", () => { dataSources.RunQuery(); agHelper.ActionContextMenuWithInPane("Delete"); - ee.expandCollapseEntity(dsName); + ee.ExpandCollapseEntity(dsName); ee.ActionContextMenuByEntityName(dsName, "Refresh"); agHelper.AssertElementVisible(ee._entityNameInExplorer("productlines")); }); @@ -225,7 +225,7 @@ describe("Validate MySQL Generate CRUD with JSON Form", () => { dataSources.AssertJSONFormHeader(0, 0, "productLine"); - agHelper.NavigateBacktoEditor(); + deployMode.NavigateBacktoEditor(); table.WaitUntilTableLoad(); // //Delete the test data // ee.ActionContextMenuByEntityName("Productlines", "Delete", "Are you sure?"); @@ -311,7 +311,7 @@ describe("Validate MySQL Generate CRUD with JSON Form", () => { dataSources.RunQuery(); agHelper.ActionContextMenuWithInPane("Delete"); - ee.expandCollapseEntity(dsName); + ee.ExpandCollapseEntity(dsName); ee.ActionContextMenuByEntityName(dsName, "Refresh"); agHelper.AssertElementVisible(ee._entityNameInExplorer("Stores")); }); @@ -340,7 +340,7 @@ describe("Validate MySQL Generate CRUD with JSON Form", () => { "store_id", ); - agHelper.NavigateBacktoEditor(); + deployMode.NavigateBacktoEditor(); table.WaitUntilTableLoad(); }); @@ -421,6 +421,7 @@ describe("Validate MySQL Generate CRUD with JSON Form", () => { agHelper.ClickButton("Confirm"); agHelper.ValidateNetworkStatus("@postExecute", 200); agHelper.ValidateNetworkStatus("@postExecute", 200); + agHelper.Sleep(2500);// for delete to take effect! table.AssertSelectedRow(0); //Control going back to 1st row in table dataSources.AssertJSONFormHeader(0, 0, "store_id"); }); @@ -453,10 +454,10 @@ describe("Validate MySQL Generate CRUD with JSON Form", () => { }); it("15. Verify Add/Insert from Deploy page - on Stores - new record", () => { - agHelper.NavigateBacktoEditor(); + deployMode.NavigateBacktoEditor(); table.WaitUntilTableLoad(); - ee.expandCollapseEntity("WIDGETS"); - ee.expandCollapseEntity("Insert_Modal"); + ee.ExpandCollapseEntity("WIDGETS"); + ee.ExpandCollapseEntity("Insert_Modal"); ee.SelectEntityByName("insert_form"); agHelper.Sleep(2000); @@ -508,6 +509,7 @@ describe("Validate MySQL Generate CRUD with JSON Form", () => { agHelper.Sleep(2000); //for Insert to reflect! agHelper.ValidateNetworkStatus("@postExecute", 200); agHelper.ValidateNetworkStatus("@postExecute", 200); + agHelper.Sleep(3000); //for Insert to reflect! agHelper .GetElementLength(locator._jsonFormWidget) .then(($len) => expect($len).to.eq(1)); @@ -570,7 +572,7 @@ describe("Validate MySQL Generate CRUD with JSON Form", () => { }); it("17. Validate Deletion of the Newly Created Page - Stores", () => { - agHelper.NavigateBacktoEditor(); + deployMode.NavigateBacktoEditor(); table.WaitUntilTableLoad(); //Delete the test data ee.ActionContextMenuByEntityName("Stores", "Delete", "Are you sure?"); @@ -588,7 +590,7 @@ describe("Validate MySQL Generate CRUD with JSON Form", () => { dataSources.RunQuery(); agHelper.ActionContextMenuWithInPane("Delete"); - ee.expandCollapseEntity(dsName); + ee.ExpandCollapseEntity(dsName); ee.ActionContextMenuByEntityName(dsName, "Refresh"); agHelper.AssertElementAbsence(ee._entityNameInExplorer("Stores")); }); diff --git a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/CRUD_JSONForm/Postgres_Spec.ts b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/CRUD_JSONForm/Postgres_Spec.ts index ece64d8592..2e336d1cd5 100644 --- a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/CRUD_JSONForm/Postgres_Spec.ts +++ b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/CRUD_JSONForm/Postgres_Spec.ts @@ -49,7 +49,7 @@ describe("Validate Postgres Generate CRUD with JSON Form", () => { "film_id", ); - agHelper.NavigateBacktoEditor(); + deployMode.NavigateBacktoEditor(); table.WaitUntilTableLoad(); //Delete the test data ee.ActionContextMenuByEntityName("Page2", "Delete", "Are you sure?"); @@ -63,7 +63,7 @@ describe("Validate Postgres Generate CRUD with JSON Form", () => { }); deployMode.DeployApp(); - agHelper.NavigateBacktoEditor(); + deployMode.NavigateBacktoEditor(); cy.get("@dsName").then(($dsName) => { dsName = $dsName; dataSources.DeleteDatasouceFromActiveTab(dsName as string, 200); @@ -102,7 +102,7 @@ describe("Validate Postgres Generate CRUD with JSON Form", () => { "supplier_id", ); - agHelper.NavigateBacktoEditor(); + deployMode.NavigateBacktoEditor(); cy.get("@dsName").then(($dsName) => { dsName = $dsName; }); @@ -122,10 +122,10 @@ describe("Validate Postgres Generate CRUD with JSON Form", () => { "order_id", ); - agHelper.NavigateBacktoEditor(); + deployMode.NavigateBacktoEditor(); table.WaitUntilTableLoad(); //Delete the test data - ee.expandCollapseEntity("PAGES"); + ee.ExpandCollapseEntity("PAGES"); ee.ActionContextMenuByEntityName( "Public.orders", "Delete", @@ -174,7 +174,7 @@ describe("Validate Postgres Generate CRUD with JSON Form", () => { dataSources.RunQuery(); agHelper.ActionContextMenuWithInPane("Delete"); - ee.expandCollapseEntity(dsName); + ee.ExpandCollapseEntity(dsName); ee.ActionContextMenuByEntityName(dsName, "Refresh"); agHelper.AssertElementVisible(ee._entityNameInExplorer("public.vessels")); }); @@ -251,7 +251,7 @@ describe("Validate Postgres Generate CRUD with JSON Form", () => { dataSources.AssertJSONFormHeader(0, 0, "ship_id"); - agHelper.NavigateBacktoEditor(); + deployMode.NavigateBacktoEditor(); table.WaitUntilTableLoad(); // //Delete the test data // ee.ActionContextMenuByEntityName("Productlines", "Delete", "Are you sure?"); @@ -279,7 +279,7 @@ describe("Validate Postgres Generate CRUD with JSON Form", () => { ee.SelectEntityByName("UpdateQuery", "QUERIES/JS"); agHelper.EnterValue(updateQuery); agHelper.AssertAutoSave(); - ee.expandCollapseEntity("QUERIES/JS", false); + ee.ExpandCollapseEntity("QUERIES/JS", false); }); it("8. Verify Update data from Deploy page - on Vessels - existing record", () => { @@ -288,8 +288,8 @@ describe("Validate Postgres Generate CRUD with JSON Form", () => { deployMode.DeployApp(); agHelper.Sleep(2000) table.SelectTableRow(0); //to make JSON form hidden + agHelper.Sleep(2000);//Sleep time for tab to disappear! agHelper.AssertElementAbsence(locator._jsonFormWidget); - table.SelectTableRow(5); agHelper.AssertElementVisible(locator._jsonFormWidget); dataSources.AssertJSONFormHeader(5, 0, "ship_id"); @@ -448,6 +448,7 @@ describe("Validate Postgres Generate CRUD with JSON Form", () => { agHelper.ClickButton("Confirm"); agHelper.ValidateNetworkStatus("@postExecute", 200); agHelper.ValidateNetworkStatus("@postExecute", 200); + agHelper.Sleep(2500);// for delete to take effect! table.AssertSelectedRow(0); //Control going back to 1st row in table dataSources.AssertJSONFormHeader(0, 0, "ship_id"); }); @@ -456,7 +457,7 @@ describe("Validate Postgres Generate CRUD with JSON Form", () => { agHelper.GetNClick(dataSources._refreshIcon); //Store Address deletion remains - table.ReadTableRowColumnData(7, 3, 200).then(($cellData) => { + table.ReadTableRowColumnData(7, 3, 2000).then(($cellData) => { expect($cellData).to.eq(""); }); table.ReadTableRowColumnData(7, 4, 200).then(($cellData) => { @@ -480,7 +481,7 @@ describe("Validate Postgres Generate CRUD with JSON Form", () => { }); it("12. Update the InsertQuery to insert all columns from UI", () => { - agHelper.NavigateBacktoEditor(); + deployMode.NavigateBacktoEditor(); table.WaitUntilTableLoad(); let insertQuery = `INSERT INTO public."vessels" ( "ship_id", @@ -520,12 +521,12 @@ describe("Validate Postgres Generate CRUD with JSON Form", () => { ee.SelectEntityByName("InsertQuery", "QUERIES/JS"); agHelper.EnterValue(insertQuery); agHelper.AssertAutoSave(); - ee.expandCollapseEntity("QUERIES/JS", false); + ee.ExpandCollapseEntity("QUERIES/JS", false); }); it("13. Verify Add/Insert from Deploy page - on Vessels - new record", () => { - ee.expandCollapseEntity("WIDGETS"); - ee.expandCollapseEntity("Insert_Modal"); + ee.ExpandCollapseEntity("WIDGETS"); + ee.ExpandCollapseEntity("Insert_Modal"); //ee.ActionContextMenuByEntityName("JSONForm1Copy", "Delete") ee.SelectEntityByName("insert_form"); agHelper.Sleep(2000); @@ -670,7 +671,7 @@ describe("Validate Postgres Generate CRUD with JSON Form", () => { }); it("15. Validate Deletion of the Newly Created Page - Vessels", () => { - agHelper.NavigateBacktoEditor(); + deployMode.NavigateBacktoEditor(); table.WaitUntilTableLoad(); //Delete the test data ee.ActionContextMenuByEntityName("Public.vessels", "Delete", "Are you sure?"); @@ -688,7 +689,7 @@ describe("Validate Postgres Generate CRUD with JSON Form", () => { dataSources.RunQuery(); agHelper.ActionContextMenuWithInPane("Delete"); - ee.expandCollapseEntity(dsName); + ee.ExpandCollapseEntity(dsName); ee.ActionContextMenuByEntityName(dsName, "Refresh"); agHelper.AssertElementAbsence(ee._entityNameInExplorer("public.vessels")); }); diff --git a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/Comments/AddComments_spec.js b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/Comments/AddComments_spec.js index 1995c9ba5b..bb997618e6 100644 --- a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/Comments/AddComments_spec.js +++ b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/Comments/AddComments_spec.js @@ -6,7 +6,7 @@ const dsl = require("../../../../fixtures/basicDsl.json"); const newCommentText1 = "new comment text 1"; let commentThreadId; let appName; -let orgName; +let workspaceName; describe("Comments", function() { before(() => { @@ -15,13 +15,13 @@ describe("Comments", function() { cy.generateUUID().then((uid) => { appName = uid; - orgName = uid; - cy.createOrg(); - cy.wait("@createOrg").then((interception) => { - const newOrganizationName = interception.response.body.data.name; - cy.renameOrg(newOrganizationName, orgName); + workspaceName = uid; + cy.createWorkspace(); + cy.wait("@createWorkspace").then((interception) => { + const newWorkspaceName = interception.response.body.data.name; + cy.renameWorkspace(newWorkspaceName, workspaceName); }); - cy.CreateAppForOrg(orgName, appName); + cy.CreateAppForWorkspace(workspaceName, appName); cy.addDsl(dsl); }); }); @@ -43,13 +43,13 @@ describe("Comments", function() { cy.generateUUID().then((uid) => { appName = uid; - orgName = uid; - cy.createOrg(); - cy.wait("@createOrg").then((interception) => { - const newOrganizationName = interception.response.body.data.name; - cy.renameOrg(newOrganizationName, orgName); + workspaceName = uid; + cy.createWorkspace(); + cy.wait("@createWorkspace").then((interception) => { + const newWorkspaceName = interception.response.body.data.name; + cy.renameWorkspace(newWorkspaceName, workspaceName); }); - cy.CreateAppForOrg(orgName, appName); + cy.CreateAppForWorkspace(workspaceName, appName); cy.addDsl(dsl); }); cy.skipCommentsOnboarding(); @@ -75,13 +75,13 @@ describe("Comments", function() { cy.generateUUID().then((uid) => { appName = uid; - orgName = uid; - cy.createOrg(); - cy.wait("@createOrg").then((interception) => { - const newOrganizationName = interception.response.body.data.name; - cy.renameOrg(newOrganizationName, orgName); + workspaceName = uid; + cy.createWorkspace(); + cy.wait("@createWorkspace").then((interception) => { + const newWorkspaceName = interception.response.body.data.name; + cy.renameWorkspace(newWorkspaceName, workspaceName); }); - cy.CreateAppForOrg(orgName, appName); + cy.CreateAppForWorkspace(workspaceName, appName); cy.addDsl(dsl); }); cy.get(commonLocators.canvas); diff --git a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/Debugger/Logs_spec.js b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/Debugger/Logs_spec.js index 3e6167e20b..cc8080df48 100644 --- a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/Debugger/Logs_spec.js +++ b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/Debugger/Logs_spec.js @@ -25,7 +25,7 @@ describe("Debugger logs", function() { cy.testJsontext("visible", "Test"); cy.get(commonlocators.homeIcon).click({ force: true }); cy.generateUUID().then((id) => { - cy.CreateAppInFirstListedOrg(id); + cy.CreateAppInFirstListedWorkspace(id); cy.get(debuggerLocators.errorCount).should("not.exist"); }); }); diff --git a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/DisplayWidgets/ChartDataPoint_Spec.ts b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/DisplayWidgets/ChartDataPoint_Spec.ts index a66ec9aa06..5f1c19153e 100644 --- a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/DisplayWidgets/ChartDataPoint_Spec.ts +++ b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/DisplayWidgets/ChartDataPoint_Spec.ts @@ -42,7 +42,7 @@ describe("Input widget test with default value from chart datapoint", () => { afterEach(() => { //this is to enable re-attempt passing! - agHelper.NavigateBacktoEditor() + deployMode.NavigateBacktoEditor() }) }); diff --git a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/DisplayWidgets/DocumentViewer_Spec.ts b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/DisplayWidgets/DocumentViewer_Spec.ts index 9edc799bed..703a66364b 100644 --- a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/DisplayWidgets/DocumentViewer_Spec.ts +++ b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/DisplayWidgets/DocumentViewer_Spec.ts @@ -1,7 +1,6 @@ import { ObjectsRegistry } from "../../../../support/Objects/Registry" -let agHelper = ObjectsRegistry.AggregateHelper, - ee = ObjectsRegistry.EntityExplorer, +let ee = ObjectsRegistry.EntityExplorer, locator = ObjectsRegistry.CommonLocators, deployMode = ObjectsRegistry.DeployMode, propPane = ObjectsRegistry.PropertyPane; @@ -19,7 +18,7 @@ describe("DocumentViewer Widget Functionality", () => { cy.get(locator._widgetInDeployed("documentviewerwidget")).should( "not.exist", ); - agHelper.NavigateBacktoEditor(); + deployMode.NavigateBacktoEditor(); }); it("3. Change visibility & Publish app & verify again", () => { diff --git a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/DisplayWidgets/Migration_Spec.js b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/DisplayWidgets/Migration_Spec.js index 5f9019235f..d533010f28 100644 --- a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/DisplayWidgets/Migration_Spec.js +++ b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/DisplayWidgets/Migration_Spec.js @@ -10,15 +10,15 @@ describe("Migration Validate", function() { cy.get(homePage.optionsIcon) .first() .click(); - cy.get(homePage.orgImportAppOption).click({ force: true }); - cy.get(homePage.orgImportAppModal).should("be.visible"); + cy.get(homePage.workspaceImportAppOption).click({ force: true }); + cy.get(homePage.workspaceImportAppModal).should("be.visible"); cy.xpath(homePage.uploadLogo) .attachFile("TableMigrationAppExported.json") .wait(500); - // cy.get(homePage.orgImportAppButton) + // cy.get(homePage.workspaceImportAppButton) // .trigger("click") // .wait(500); - cy.get(homePage.orgImportAppModal).should("not.exist"); + cy.get(homePage.workspaceImportAppModal).should("not.exist"); cy.wait("@importNewApplication").then((interception) => { // let appId = interception.response.body.data.id; @@ -510,13 +510,13 @@ describe("Migration Validate", function() { // cy.get(homePage.optionsIcon) // .first() // .click(); - // cy.get(homePage.orgImportAppOption).click({ force: true }); - // cy.get(homePage.orgImportAppModal).should("be.visible"); + // cy.get(homePage.workspaceImportAppOption).click({ force: true }); + // cy.get(homePage.workspaceImportAppModal).should("be.visible"); // cy.xpath(homePage.uploadLogo).attachFile("TableMigrationAppExported.json").wait(500); - // cy.get(homePage.orgImportAppButton) + // cy.get(homePage.workspaceImportAppButton) // .trigger("click") // .wait(500); - // cy.get(homePage.orgImportAppModal).should("not.exist"); + // cy.get(homePage.workspaceImportAppModal).should("not.exist"); // cy.wait("@importNewApplication").then((interception) => { // let appId = interception.response.body.data.id; diff --git a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/DisplayWidgets/TableBugs_Spec.ts b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/DisplayWidgets/TableBugs_Spec.ts index 99cbbd7ba1..701c720686 100644 --- a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/DisplayWidgets/TableBugs_Spec.ts +++ b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/DisplayWidgets/TableBugs_Spec.ts @@ -50,7 +50,7 @@ describe("Verify various Table property bugs", function () { table.AssertURLColumnNavigation(0, 0, 'https://wallpaperaccess.com/full/1376499.jpg') table.AssertURLColumnNavigation(3, 0, 'https://wallpaperaccess.com/full/812632.jpg') - agHelper.NavigateBacktoEditor() + deployMode.NavigateBacktoEditor() }); @@ -83,7 +83,7 @@ describe("Verify various Table property bugs", function () { table.AssertURLColumnNavigation(1, 0, 'https://wallpaperaccess.com/full/1688623.jpg') table.AssertURLColumnNavigation(2, 0, 'https://wallpaperaccess.com/full/2117775.jpg') - agHelper.NavigateBacktoEditor() + deployMode.NavigateBacktoEditor() }); @@ -116,7 +116,7 @@ describe("Verify various Table property bugs", function () { table.AssertURLColumnNavigation(0, 0, 'https://wallpaperaccess.com/full/1376499.jpg') table.AssertURLColumnNavigation(3, 0, 'https://wallpaperaccess.com/full/812632.jpg') - agHelper.NavigateBacktoEditor() + deployMode.NavigateBacktoEditor() }); diff --git a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Entity_Renaming_spec.js b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Entity_Renaming_spec.js index 79f7f556dc..df972c1f6a 100644 --- a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Entity_Renaming_spec.js +++ b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Entity_Renaming_spec.js @@ -15,7 +15,7 @@ describe("Api Naming conflict on a page test", function() { // create another API cy.NavigateToAPI_Panel(); cy.CreateAPI(secondApiName); - ee.expandCollapseEntity("QUERIES/JS", true); + ee.ExpandCollapseEntity("QUERIES/JS", true); // try to rename one of the APIs with an existing API name cy.get(`.t--entity-item:contains(${secondApiName})`).within(() => { cy.get(".t--context-menu").click({ force: true }); @@ -44,11 +44,11 @@ describe("Api Naming conflict on different pages test", function() { cy.log("Login Successful"); // create a new API cy.CreateAPI(firstApiName); - ee.expandCollapseEntity("QUERIES/JS", true); + ee.ExpandCollapseEntity("QUERIES/JS", true); // create a new page and an API on that page cy.Createpage("Page2"); cy.CreateAPI(firstApiName); - ee.expandCollapseEntity("QUERIES/JS", true); + ee.ExpandCollapseEntity("QUERIES/JS", true); cy.get(".t--entity-name") .contains(firstApiName) .should("exist"); @@ -71,7 +71,7 @@ describe("Api Naming conflict on different pages test", function() { describe("Entity Naming conflict test", function() { it("expects JS objects and actions to not have identical names on the same page.", function() { cy.log("Login Successful"); - ee.expandCollapseEntity("QUERIES/JS", true); + ee.ExpandCollapseEntity("QUERIES/JS", true); // create JS object and name it cy.createJSObject('return "Hello World";'); diff --git a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Widgets_Copy_Paste_Delete_Undo_Keyboard_Event_spec.js b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Widgets_Copy_Paste_Delete_Undo_Keyboard_Event_spec.js index 018238fa6a..5f84ddd804 100644 --- a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Widgets_Copy_Paste_Delete_Undo_Keyboard_Event_spec.js +++ b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Widgets_Copy_Paste_Delete_Undo_Keyboard_Event_spec.js @@ -42,8 +42,8 @@ describe("Test Suite to validate copy/delete/undo functionalites", function() { 200, ); cy.get("body").type(`{${modifierKey}}z`); - ee.expandCollapseEntity("WIDGETS"); - ee.expandCollapseEntity("FormTest"); + ee.ExpandCollapseEntity("WIDGETS"); + ee.ExpandCollapseEntity("FormTest"); ee.ActionContextMenuByEntityName("FormTestCopy", "Show Bindings"); cy.get(apiwidget.propertyList).then(function($lis) { expect($lis).to.have.length(3); diff --git a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/FormWidgets/DatePicker_2_Default_spec.js b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/FormWidgets/DatePicker_2_Default_spec.js index 75fb3c7c28..98b8b5aad2 100644 --- a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/FormWidgets/DatePicker_2_Default_spec.js +++ b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/FormWidgets/DatePicker_2_Default_spec.js @@ -105,6 +105,8 @@ describe("DatePicker Widget Property pane tests with js bindings", function() { it("7. Datepicker default date validation with js binding and default date with moment object", function() { cy.openPropertyPane("datepickerwidget2"); + //cy.testJsontext("defaultdate", ""); + cy.clearPropertyValue(0); cy.get(formWidgetsPage.toggleJsDefaultDate) .click() .wait(1000); //disable diff --git a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/FormWidgets/DatePicker_2_spec.js b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/FormWidgets/DatePicker_2_spec.js index 75b4a2d457..a4e2105963 100644 --- a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/FormWidgets/DatePicker_2_spec.js +++ b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/FormWidgets/DatePicker_2_spec.js @@ -3,6 +3,7 @@ const formWidgetsPage = require("../../../../locators/FormWidgets.json"); const dsl = require("../../../../fixtures/datePicker2dsl.json"); const publishPage = require("../../../../locators/publishWidgetspage.json"); const pages = require("../../../../locators/Pages.json"); +const datedsl = require("../../../../fixtures/datePickerdsl.json"); describe("DatePicker Widget Property pane tests with js bindings", function() { before(() => { @@ -36,7 +37,7 @@ describe("DatePicker Widget Property pane tests with js bindings", function() { }); it("Text widgets binding with datepicker", function() { - cy.SearchEntityandOpen("Text1"); + cy.openPropertyPane("textwidget"); cy.testJsontext("text", "{{DatePicker1.formattedDate}}"); cy.closePropertyPane(); cy.SearchEntityandOpen("Text2"); @@ -59,6 +60,19 @@ describe("DatePicker Widget Property pane tests with js bindings", function() { cy.assertDateFormat(); }); + it("Datepicker default date validation message", function() { + cy.openPropertyPane("datepickerwidget2"); + cy.testJsontext("defaultdate", "24-12-2021"); + cy.evaluateErrorMessage("Value does not match: ISO 8601 date string"); + cy.closePropertyPane(); + }); +}); + +describe("DatePicker Widget Property pane tests with js bindings", function() { + before(() => { + cy.addDsl(datedsl); + }); + it("Datepicker should not change the display data unless user selects the date", () => { cy.openPropertyPane("datepickerwidget2"); @@ -69,7 +83,6 @@ describe("DatePicker Widget Property pane tests with js bindings", function() { cy.get(formWidgetsPage.toggleJsMinDate).click(); cy.get(".t--property-control-mindate .bp3-input").clear(); cy.get(".t--property-control-mindate .bp3-input").type("2020-02-01"); - cy.selectDateFormat("D MMMM, YYYY"); cy.get(".t--widget-datepickerwidget2 .bp3-input").should( "contain.value", @@ -87,12 +100,11 @@ describe("DatePicker Widget Property pane tests with js bindings", function() { "{{moment().subtract(10, 'days').toISOString()}}", ); }); +}); - it("Datepicker default date validation message", function() { - cy.openPropertyPane("datepickerwidget2"); - cy.testJsontext("defaultdate", "24-12-2021"); - cy.evaluateErrorMessage("Value does not match: ISO 8601 date string"); - cy.closePropertyPane(); +describe("DatePicker Widget Property pane tests with js bindings", function() { + before(() => { + cy.addDsl(datedsl); }); it("Datepicker default date validation with strings", function() { @@ -139,12 +151,19 @@ describe("DatePicker Widget Property pane tests with js bindings", function() { .first() .should("contain.text", "May 4, 2021 6:25 AM"); }); +}); + +describe("DatePicker Widget Property pane tests with js bindings", function() { + before(() => { + cy.addDsl(datedsl); + }); it("Check isDirty meta property", function() { cy.openPropertyPane("textwidget"); cy.updateCodeInput(".t--property-control-text", `{{DatePicker1.isDirty}}`); // Init isDirty cy.openPropertyPane("datepickerwidget2"); + cy.testJsontextclear("defaultdate"); cy.get(formWidgetsPage.toggleJsDefaultDate).click(); cy.get(".t--property-control-defaultdate .bp3-input").clear(); cy.get(formWidgetsPage.toggleJsDefaultDate).click(); @@ -170,6 +189,7 @@ describe("DatePicker Widget Property pane tests with js bindings", function() { .should("contain", "true"); // Change defaultDate cy.openPropertyPane("datepickerwidget2"); + cy.testJsontext("defaultdate", ""); cy.get(formWidgetsPage.toggleJsDefaultDate).click(); cy.get(".t--property-control-defaultdate .bp3-input").clear(); cy.get(formWidgetsPage.toggleJsDefaultDate).click(); diff --git a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/GitImport/GitImport_spec.js b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/GitImport/GitImport_spec.js index df95248633..f629d8320f 100644 --- a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/GitImport/GitImport_spec.js +++ b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/GitImport/GitImport_spec.js @@ -14,10 +14,10 @@ let repoName; describe("Git import flow", function() { before(() => { cy.NavigateToHome(); - cy.createOrg(); - cy.wait("@createOrg").then((interception) => { - const newOrganizationName = interception.response.body.data.name; - cy.CreateAppForOrg(newOrganizationName, newOrganizationName); + cy.createWorkspace(); + cy.wait("@createWorkspace").then((interception) => { + const newWorkspaceName = interception.response.body.data.name; + cy.CreateAppForWorkspace(newWorkspaceName, newWorkspaceName); }); }); it("Import an app from JSON with Postgres, MySQL, Mongo db", () => { @@ -25,8 +25,8 @@ describe("Git import flow", function() { cy.get(homePage.optionsIcon) .first() .click(); - cy.get(homePage.orgImportAppOption).click({ force: true }); - cy.get(homePage.orgImportAppModal).should("be.visible"); + cy.get(homePage.workspaceImportAppOption).click({ force: true }); + cy.get(homePage.workspaceImportAppModal).should("be.visible"); cy.xpath(homePage.uploadLogo).attachFile("gitImport.json"); cy.wait("@importNewApplication").then((interception) => { cy.log(interception.response.body.data); @@ -69,16 +69,16 @@ describe("Git import flow", function() { }); it("Import an app from Git and reconnect Postgres, MySQL and Mongo db ", () => { cy.NavigateToHome(); - cy.createOrg(); - cy.wait("@createOrg").then((interception) => { - const newOrganizationName = interception.response.body.data.name; - cy.CreateAppForOrg(newOrganizationName, "gitImport"); + cy.createWorkspace(); + cy.wait("@createWorkspace").then((interception) => { + const newWorkspaceName = interception.response.body.data.name; + cy.CreateAppForWorkspace(newWorkspaceName, "gitImport"); }); cy.get(homePage.homeIcon).click(); cy.get(homePage.optionsIcon) .first() .click(); - cy.get(homePage.orgImportAppOption).click({ force: true }); + cy.get(homePage.workspaceImportAppOption).click({ force: true }); cy.get(".t--import-json-card") .next() .click(); diff --git a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/GitImport/ImportEmptyRepo_spec.js b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/GitImport/ImportEmptyRepo_spec.js index a094a2c9c5..ad412a82dd 100644 --- a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/GitImport/ImportEmptyRepo_spec.js +++ b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/GitImport/ImportEmptyRepo_spec.js @@ -12,7 +12,7 @@ describe("Git import empty repository", function() { cy.get(homePage.optionsIcon) .first() .click(); - cy.get(homePage.orgImportAppOption).click({ force: true }); + cy.get(homePage.workspaceImportAppOption).click({ force: true }); cy.get(".t--import-json-card") .next() .click(); diff --git a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/GitSync/Comments_spec.js b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/GitSync/Comments_spec.js index 3c56d891a9..c76b5bb7da 100644 --- a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/GitSync/Comments_spec.js +++ b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/GitSync/Comments_spec.js @@ -20,10 +20,10 @@ describe("Git sync:", function() { cy.Signup(`${uid}@appsmith.com`, uid); }); cy.NavigateToHome(); - cy.createOrg(); - cy.wait("@createOrg").then((interception) => { - const newOrganizationName = interception.response.body.data.name; - cy.CreateAppForOrg(newOrganizationName, newOrganizationName); + cy.createWorkspace(); + cy.wait("@createWorkspace").then((interception) => { + const newWorkspaceName = interception.response.body.data.name; + cy.CreateAppForWorkspace(newWorkspaceName, newWorkspaceName); }); cy.connectToGitRepo(repoName); diff --git a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/GitSync/Connection_spec.js b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/GitSync/Connection_spec.js index ce4143e38e..7f9ccb7afb 100644 --- a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/GitSync/Connection_spec.js +++ b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/GitSync/Connection_spec.js @@ -17,10 +17,10 @@ const owner = Cypress.env("TEST_GITHUB_USER_NAME"); describe("Git sync modal: connect tab", function() { before(() => { cy.NavigateToHome(); - cy.createOrg(); - cy.wait("@createOrg").then((interception) => { - const newOrganizationName = interception.response.body.data.name; - cy.CreateAppForOrg(newOrganizationName, newOrganizationName); + cy.createWorkspace(); + cy.wait("@createWorkspace").then((interception) => { + const newWorkspaceName = interception.response.body.data.name; + cy.CreateAppForWorkspace(newWorkspaceName, newWorkspaceName); }); cy.generateUUID().then((uid) => { repoName = uid; diff --git a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/GitSync/Deploy_spec.js b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/GitSync/Deploy_spec.js index a00ab5674e..2c925d991d 100644 --- a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/GitSync/Deploy_spec.js +++ b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/GitSync/Deploy_spec.js @@ -6,10 +6,10 @@ let repoName; describe("Git sync modal: deploy tab", function() { before(() => { cy.NavigateToHome(); - cy.createOrg(); - cy.wait("@createOrg").then((interception) => { - const newOrganizationName = interception.response.body.data.name; - cy.CreateAppForOrg(newOrganizationName, newOrganizationName); + cy.createWorkspace(); + cy.wait("@createWorkspace").then((interception) => { + const newWorkspaceName = interception.response.body.data.name; + cy.CreateAppForWorkspace(newWorkspaceName, newWorkspaceName); }); cy.generateUUID().then((uid) => { repoName = uid; diff --git a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/GitSync/DisconnectGit_spec.js b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/GitSync/DisconnectGit_spec.js index fc7b5f7a74..77190bf0e3 100644 --- a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/GitSync/DisconnectGit_spec.js +++ b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/GitSync/DisconnectGit_spec.js @@ -5,10 +5,10 @@ let windowOpenSpy; describe("Git disconnect modal:", function() { before(() => { cy.NavigateToHome(); - cy.createOrg(); - cy.wait("@createOrg").then((interception) => { - const newOrganizationName = interception.response.body.data.name; - cy.CreateAppForOrg(newOrganizationName, newOrganizationName); + cy.createWorkspace(); + cy.wait("@createWorkspace").then((interception) => { + const newWorkspaceName = interception.response.body.data.name; + cy.CreateAppForWorkspace(newWorkspaceName, newWorkspaceName); }); cy.generateUUID().then((uid) => { repoName = uid; @@ -59,7 +59,7 @@ describe("Git disconnect modal:", function() { }); it("should have disconnect repo button", function() { - cy.wait(2000); + cy.wait(4000); cy.get(gitSyncLocators.bottomBarCommitButton).click(); cy.get("[data-cy=t--tab-GIT_CONNECTION]").click(); @@ -87,7 +87,7 @@ describe("Git disconnect modal:", function() { // disconnecting validation cy.route("POST", "api/v1/git/disconnect/*").as("disconnect"); cy.get(gitSyncLocators.disconnectButton).click(); - cy.get(gitSyncLocators.disconnectButton).should("be.disabled"); + //cy.get(gitSyncLocators.disconnectButton).should("be.disabled"); cy.wait("@disconnect").should( "have.nested.property", "response.body.responseMeta.status", diff --git a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/GitSync/GitBugs_spec.js b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/GitSync/GitBugs_spec.js index 626627d460..17bc7ce133 100644 --- a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/GitSync/GitBugs_spec.js +++ b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/GitSync/GitBugs_spec.js @@ -16,10 +16,10 @@ let repoName; describe("Git sync Bug #10773", function() { before(() => { cy.NavigateToHome(); - cy.createOrg(); - cy.wait("@createOrg").then((interception) => { - const newOrganizationName = interception.response.body.data.name; - cy.CreateAppForOrg(newOrganizationName, newOrganizationName); + cy.createWorkspace(); + cy.wait("@createWorkspace").then((interception) => { + const newWorkspaceName = interception.response.body.data.name; + cy.CreateAppForWorkspace(newWorkspaceName, newWorkspaceName); }); cy.generateUUID().then((uid) => { @@ -64,10 +64,10 @@ describe("Git sync Bug #10773", function() { describe("Git Bug: Fix clone page issue where JSObject are not showing up in destination page when application is connected to git", function() { it("Connect app to git, clone the Page ,verify JSobject duplication should not happen and validate data binding in deploy mode and edit mode", () => { cy.NavigateToHome(); - cy.createOrg(); - cy.wait("@createOrg").then((interception) => { - const newOrganizationName = interception.response.body.data.name; - cy.CreateAppForOrg(newOrganizationName, newOrganizationName); + cy.createWorkspace(); + cy.wait("@createWorkspace").then((interception) => { + const newWorkspaceName = interception.response.body.data.name; + cy.CreateAppForWorkspace(newWorkspaceName, newWorkspaceName); cy.addDsl(dsl); }); // connect app to git @@ -76,7 +76,7 @@ describe("Git Bug: Fix clone page issue where JSObject are not showing up in des cy.createTestGithubRepo(repoName); cy.connectToGitRepo(repoName); }); - ee.expandCollapseEntity("QUERIES/JS", true); + ee.ExpandCollapseEntity("QUERIES/JS", true); // create JS object and validate its data on Page1 cy.createJSObject('return "Success";'); cy.get(`.t--entity-name:contains("Page1")`) @@ -168,13 +168,13 @@ describe("Git Bug: Fix clone page issue where JSObject are not showing up in des describe("Git synced app with JSObject", function() { it("Create an app with JSObject, connect it to git and verify its data in edit and deploy mode", function() { cy.NavigateToHome(); - cy.createOrg(); - cy.wait("@createOrg").then((interception) => { - const newOrganizationName = interception.response.body.data.name; - cy.CreateAppForOrg(newOrganizationName, newOrganizationName); + cy.createWorkspace(); + cy.wait("@createWorkspace").then((interception) => { + const newWorkspaceName = interception.response.body.data.name; + cy.CreateAppForWorkspace(newWorkspaceName, newWorkspaceName); cy.addDsl(dsl); }); - ee.expandCollapseEntity("QUERIES/JS", true); + ee.ExpandCollapseEntity("QUERIES/JS", true); // create JS object and validate its data on Page1 cy.createJSObject('return "Success";'); cy.get(`.t--entity-name:contains("Page1")`) @@ -270,10 +270,10 @@ describe("Git synced app with JSObject", function() { describe("Git sync Bug #13385", function() { it("Bug:13385 : Unable to see application in home page after the git connect flow is aborted in middle", () => { cy.NavigateToHome(); - cy.createOrg(); - cy.wait("@createOrg").then((interception) => { - const newOrganizationName = interception.response.body.data.name; - cy.CreateAppForOrg(newOrganizationName, `${newOrganizationName}app`); + cy.createWorkspace(); + cy.wait("@createWorkspace").then((interception) => { + const newWorkspaceName = interception.response.body.data.name; + cy.CreateAppForWorkspace(newWorkspaceName, `${newWorkspaceName}app`); cy.generateUUID().then((uid) => { const owner = Cypress.env("TEST_GITHUB_USER_NAME"); @@ -306,7 +306,7 @@ describe("Git sync Bug #13385", function() { cy.NavigateToHome(); cy.reload(); cy.wait(3000); - cy.SearchApp(`${newOrganizationName}app`); + cy.SearchApp(`${newWorkspaceName}app`); }); }); }); diff --git a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/GitSync/GitSyncedApps_spec.js b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/GitSync/GitSyncedApps_spec.js index 309f315669..35adf29ea9 100644 --- a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/GitSync/GitSyncedApps_spec.js +++ b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/GitSync/GitSyncedApps_spec.js @@ -24,10 +24,10 @@ let repoName; describe("Git sync apps", function() { before(() => { // cy.NavigateToHome(); - // cy.createOrg(); - // cy.wait("@createOrg").then((interception) => { - // const newOrganizationName = interception.response.body.data.name; - // cy.CreateAppForOrg(newOrganizationName, "gitSyncApp"); + // cy.createWorkspace(); + // cy.wait("@createWorkspace").then((interception) => { + // const newWorkspaceName = interception.response.body.data.name; + // cy.CreateAppForWorkspace(newWorkspaceName, "gitSyncApp"); }); it("1. Generate postgreSQL crud page , connect to git, clone the page, rename page with special character in it", () => { cy.NavigateToHome(); @@ -503,7 +503,7 @@ describe("Git sync apps", function() { cy.get(homePage.optionsIcon) .first() .click(); - cy.get(homePage.orgImportAppOption).click({ force: true }); + cy.get(homePage.workspaceImportAppOption).click({ force: true }); cy.get(".t--import-json-card") .next() .click(); diff --git a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/GitSync/Git_spec.js b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/GitSync/Git_spec.js index d8537245b5..ffb982e3fa 100644 --- a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/GitSync/Git_spec.js +++ b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/GitSync/Git_spec.js @@ -28,11 +28,11 @@ let repoName; describe("Git sync:", function() { before(() => { cy.NavigateToHome(); - cy.createOrg(); - cy.wait("@createOrg").then((interception) => { - const newOrganizationName = interception.response.body.data.name; + cy.createWorkspace(); + cy.wait("@createWorkspace").then((interception) => { + const newWorkspaceName = interception.response.body.data.name; cy.generateUUID().then((uid) => { - cy.CreateAppForOrg(newOrganizationName, uid); + cy.CreateAppForWorkspace(newWorkspaceName, uid); applicationName = uid; cy.get("@currentApplicationId").then( (currentAppId) => (applicationId = currentAppId), diff --git a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/GitSync/Merge_spec.js b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/GitSync/Merge_spec.js index d620f61b57..04b01779fa 100644 --- a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/GitSync/Merge_spec.js +++ b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/GitSync/Merge_spec.js @@ -7,10 +7,10 @@ let mainBranch = "master"; describe("Git sync modal: merge tab", function() { before(() => { cy.NavigateToHome(); - cy.createOrg(); - cy.wait("@createOrg").then((interception) => { - const newOrganizationName = interception.response.body.data.name; - cy.CreateAppForOrg(newOrganizationName, newOrganizationName); + cy.createWorkspace(); + cy.wait("@createWorkspace").then((interception) => { + const newWorkspaceName = interception.response.body.data.name; + cy.CreateAppForWorkspace(newWorkspaceName, newWorkspaceName); }); cy.generateUUID().then((uid) => { diff --git a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/GitSync/PreconnectionAppNameDeployMenu_spec.js b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/GitSync/PreconnectionAppNameDeployMenu_spec.js index 5609e8f58d..46e58160c7 100644 --- a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/GitSync/PreconnectionAppNameDeployMenu_spec.js +++ b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/GitSync/PreconnectionAppNameDeployMenu_spec.js @@ -7,10 +7,10 @@ describe("Pre git connection spec:", function() { it("deploy menu at the application dropdown menu", () => { // create new app cy.NavigateToHome(); - cy.createOrg(); - cy.wait("@createOrg").then((interception) => { - const newOrganizationName = interception.response.body.data.name; - cy.CreateAppForOrg(newOrganizationName, newOrganizationName); + 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"); diff --git a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/GitSync/SwitchBranches_spec.js b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/GitSync/SwitchBranches_spec.js index 8b4b4a1bc5..972332a9ca 100644 --- a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/GitSync/SwitchBranches_spec.js +++ b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/GitSync/SwitchBranches_spec.js @@ -13,10 +13,10 @@ let repoName; describe("Git sync:", function() { before(() => { cy.NavigateToHome(); - cy.createOrg(); - cy.wait("@createOrg").then((interception) => { - const newOrganizationName = interception.response.body.data.name; - cy.CreateAppForOrg(newOrganizationName, newOrganizationName); + cy.createWorkspace(); + cy.wait("@createWorkspace").then((interception) => { + const newWorkspaceName = interception.response.body.data.name; + cy.CreateAppForWorkspace(newWorkspaceName, newWorkspaceName); }); cy.generateUUID().then((uid) => { diff --git a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/JsFunctionExecution/JSFunctionExecution_spec.ts b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/JsFunctionExecution/JSFunctionExecution_spec.ts index f99301c1e5..e7dd635ada 100644 --- a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/JsFunctionExecution/JSFunctionExecution_spec.ts +++ b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/JsFunctionExecution/JSFunctionExecution_spec.ts @@ -8,7 +8,44 @@ const jsEditor = ObjectsRegistry.JSEditor, agHelper = ObjectsRegistry.AggregateHelper, deployMode = ObjectsRegistry.DeployMode; +let onPageLoadAndConfirmExecuteFunctionsLength: number, + getJSObject: any, + functionsLength: number, jsObj: any; + describe("JS Function Execution", function() { + interface IFunctionSettingData { + name: string; + onPageLoad: boolean; + confirmBeforeExecute: boolean; + } + const FUNCTIONS_SETTINGS_DEFAULT_DATA: IFunctionSettingData[] = [ + { + name: "getId", + onPageLoad: true, + confirmBeforeExecute: false, + }, + { + name: "zip", + onPageLoad: true, + confirmBeforeExecute: true, + }, + { + name: "base", + onPageLoad: false, + confirmBeforeExecute: false, + }, + { + name: "assert", + onPageLoad: false, + confirmBeforeExecute: false, + }, + { + name: "test", + onPageLoad: true, + confirmBeforeExecute: true, + }, + ]; + before(() => { ee.DragDropWidgetNVerify("tablewidget", 300, 300); ee.NavigateToSwitcher("explorer"); @@ -170,7 +207,7 @@ describe("JS Function Execution", function() { table.WaitUntilTableLoad(); table.ReadTableRowColumnData(0, 1, 2000).then(($cellData) => { expect($cellData).to.eq("1"); //validating id column value - row 0 - agHelper.NavigateBacktoEditor(); + deployMode.NavigateBacktoEditor(); }); }); @@ -238,4 +275,137 @@ describe("JS Function Execution", function() { jsEditor.EditJSObj(asyncJSCodeWithRenamedFunction2); agHelper.AssertElementAbsence(locator._toastMsg); }); + + it("7. Maintains order of async functions in settings tab alphabetically at all times", function() { + functionsLength = FUNCTIONS_SETTINGS_DEFAULT_DATA.length; + // Number of functions set to run on page load and should also confirm before execute + onPageLoadAndConfirmExecuteFunctionsLength = FUNCTIONS_SETTINGS_DEFAULT_DATA.filter( + (func) => func.onPageLoad && func.confirmBeforeExecute, + ).length; + + getJSObject = (data: IFunctionSettingData[]) => { + let JS_OBJECT_BODY = `export default`; + for (let i = 0; i < functionsLength; i++) { + const functionName = data[i].name; + JS_OBJECT_BODY += + i === 0 + ? `{ + ${functionName}: async ()=>"${functionName}",` + : i === functionsLength - 1 + ? ` + ${functionName}: async ()=>"${functionName}", + }` + : ` + ${functionName}: async ()=> "${functionName}",`; + } + return JS_OBJECT_BODY; + }; + + // Create js object + jsEditor.CreateJSObject(getJSObject(FUNCTIONS_SETTINGS_DEFAULT_DATA), { + paste: true, + completeReplace: true, + toRun: false, + shouldCreateNewJSObj: true, + }); + + cy.get("@jsObjName").then((jsObjName: any) => { + jsObj = jsObjName; + }); + // Switch to settings tab + agHelper.GetNClick(jsEditor._settingsTab); + // Add settings for each function (according to data) + Object.values(FUNCTIONS_SETTINGS_DEFAULT_DATA).forEach( + (functionSetting) => { + jsEditor.EnableDisableAsyncFuncSettings( + functionSetting.name, + functionSetting.onPageLoad, + functionSetting.confirmBeforeExecute, + ); + }, + ); + // Switch to settings tab + agHelper.GetNClick(jsEditor._settingsTab); + //After JSObj is created - check methods are in alphabetical order + assertAsyncFunctionsOrder(FUNCTIONS_SETTINGS_DEFAULT_DATA); + + agHelper.RefreshPage(); + // click "Yes" button for all onPageload && ConfirmExecute functions + for (let i = 0; i <= onPageLoadAndConfirmExecuteFunctionsLength - 1; i++) { + //agHelper.AssertElementPresence(jsEditor._dialog("Confirmation Dialog")); // Not working in edit mode + agHelper.ClickButton("Yes"); + agHelper.Sleep(); + } + // Switch to settings tab and assert order + agHelper.GetNClick(jsEditor._settingsTab); + assertAsyncFunctionsOrder(FUNCTIONS_SETTINGS_DEFAULT_DATA); + }); + + it("8. Verify Asyn methods alphabetical order after clone page and after rename", () => { + const FUNCTIONS_SETTINGS_RENAMED_DATA: IFunctionSettingData[] = [ + { + name: "newGetId", + onPageLoad: true, + confirmBeforeExecute: false, + }, + { + name: "zip1", + onPageLoad: true, + confirmBeforeExecute: true, + }, + { + name: "base", + onPageLoad: false, + confirmBeforeExecute: false, + }, + { + name: "newAssert", + onPageLoad: true, + confirmBeforeExecute: false, + }, + { + name: "test", + onPageLoad: true, + confirmBeforeExecute: true, + }, + ]; + + // clone page and assert order of functions + ee.ClonePage(); + // click "Yes" button for all onPageload && ConfirmExecute functions + for (let i = 0; i <= onPageLoadAndConfirmExecuteFunctionsLength - 1; i++) { + //agHelper.AssertElementPresence(jsEditor._dialog("Confirmation Dialog")); // Not working in edit mode + agHelper.ClickButton("Yes"); + agHelper.Sleep(); + } + + ee.SelectEntityByName(jsObj as string, "QUERIES/JS"); + + agHelper.GetNClick(jsEditor._settingsTab); + assertAsyncFunctionsOrder(FUNCTIONS_SETTINGS_DEFAULT_DATA); + + // rename functions and assert order + agHelper.GetNClick(jsEditor._codeTab); + jsEditor.EditJSObj(getJSObject(FUNCTIONS_SETTINGS_RENAMED_DATA)); + cy.wait(3000); + agHelper.GetNClick(jsEditor._settingsTab); + assertAsyncFunctionsOrder(FUNCTIONS_SETTINGS_RENAMED_DATA); + }); + + function assertAsyncFunctionsOrder(data: IFunctionSettingData[]) { + // sorts functions alphabetically + const sortFunctions = (data: IFunctionSettingData[]) => + data.sort((a, b) => a.name.localeCompare(b.name)); + cy.get(jsEditor._asyncJSFunctionSettings).then(function($lis) { + const asyncFunctionLength = $lis.length; + // Assert number of async functions + expect(asyncFunctionLength).to.equal(functionsLength); + Object.values(sortFunctions(data)).forEach((functionSetting, idx) => { + // Assert alphabetical order + expect($lis.eq(idx)).to.have.id( + jsEditor._getJSFunctionSettingsId(functionSetting.name), + ); + }); + }); + } }); diff --git a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/Onboarding/GuidedTour_spec.js b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/Onboarding/GuidedTour_spec.js index a74ec6a4a0..480c67de7b 100644 --- a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/Onboarding/GuidedTour_spec.js +++ b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/Onboarding/GuidedTour_spec.js @@ -73,7 +73,7 @@ describe("Guided Tour", function() { cy.get(guidedTourLocators.successButton).click(); // Step 9: Deploy cy.PublishtheApp(); - cy.wait("@getOrganisation"); + cy.wait("@getWorkspace"); cy.get(guidedTourLocators.rating).should("be.visible"); cy.get(guidedTourLocators.rating) .eq(4) diff --git a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/OrganisationTests/DeleteOrganization_spec.js b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/OrganisationTests/DeleteOrganization_spec.js deleted file mode 100644 index c985ff4640..0000000000 --- a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/OrganisationTests/DeleteOrganization_spec.js +++ /dev/null @@ -1,48 +0,0 @@ -/// - -import homePage from "../../../../locators/HomePage"; - -describe("Delete organization test spec", function() { - let newOrganizationName; - - it("should delete the organization", function() { - cy.visit("/applications"); - cy.createOrg(); - cy.wait("@createOrg").then((interception) => { - newOrganizationName = interception.response.body.data.name; - cy.visit("/applications"); - cy.openOrgOptionsPopup(newOrganizationName); - cy.contains("Delete Organization").click(); - cy.contains("Are you sure").click(); - cy.wait("@deleteOrgApiCall").then((httpResponse) => { - expect(httpResponse.status).to.equal(200); - }); - cy.get(newOrganizationName).should("not.exist"); - }); - }); - - it("should show option to delete organization for an admin user", function() { - cy.visit("/applications"); - cy.wait(2000); - cy.createOrg(); - cy.wait("@createOrg").then((interception) => { - newOrganizationName = interception.response.body.data.name; - cy.visit("/applications"); - cy.openOrgOptionsPopup(newOrganizationName); - cy.contains("Delete Organization"); - cy.inviteUserForOrg( - newOrganizationName, - Cypress.env("TESTUSERNAME1"), - homePage.viewerRole, - ); - cy.LogOut(); - cy.LogintoApp(Cypress.env("TESTUSERNAME1"), Cypress.env("TESTPASSWORD1")); - cy.visit("/applications"); - cy.openOrgOptionsPopup(newOrganizationName); - cy.get(homePage.orgNamePopoverContent) - .contains("Delete Organization") - .should("not.exist"); - cy.LogOut(); - }); - }); -}); diff --git a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/OrganisationTests/LeaveOrganizationTest_spec.js b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/OrganisationTests/LeaveOrganizationTest_spec.js deleted file mode 100644 index 44ea0fab5a..0000000000 --- a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/OrganisationTests/LeaveOrganizationTest_spec.js +++ /dev/null @@ -1,62 +0,0 @@ -/// - -import homePage from "../../../../locators/HomePage"; - -describe("Leave organization test spec", function() { - let newOrgId; - let newOrganizationName; - - it("leave organization menu is visible validation", function() { - cy.visit("/applications"); - cy.createOrg(); - cy.wait("@createOrg").then((interception) => { - newOrganizationName = interception.response.body.data.name; - newOrgId = interception.response.body.data.name; - cy.visit("/applications"); - cy.openOrgOptionsPopup(newOrganizationName); - cy.contains("Leave Organization"); - }); - }); - - it("Only admin user can not leave organization validation", function() { - cy.visit("/applications"); - cy.createOrg(); - cy.wait("@createOrg").then((interception) => { - newOrganizationName = interception.response.body.data.name; - newOrgId = interception.response.body.data.name; - cy.visit("/applications"); - cy.openOrgOptionsPopup(newOrganizationName); - cy.contains("Leave Organization").click(); - cy.contains("Are you sure").click(); - cy.wait("@leaveOrgApiCall").then((httpResponse) => { - expect(httpResponse.status).to.equal(400); - }); - cy.contains(newOrganizationName); - }); - }); - - it("Non admin users can only access leave organization popup menu validation", function() { - cy.visit("/applications"); - cy.createOrg(); - cy.wait("@createOrg").then((interception) => { - newOrganizationName = interception.response.body.data.name; - newOrgId = interception.response.body.data.name; - cy.visit("/applications"); - cy.inviteUserForOrg( - newOrganizationName, - Cypress.env("TESTUSERNAME1"), - homePage.viewerRole, - ); - cy.LogOut(); - - cy.LogintoApp(Cypress.env("TESTUSERNAME1"), Cypress.env("TESTPASSWORD1")); - cy.visit("/applications"); - cy.openOrgOptionsPopup(newOrganizationName); - cy.get(homePage.orgNamePopoverContent) - .find("a") - .should("have.length", 1) - .first() - .contains("Leave Organization"); - }); - }); -}); diff --git a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/OrganisationTests/OrgUserIconTest_spec.js b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/OrganisationTests/OrgUserIconTest_spec.js deleted file mode 100644 index 228c2a60f0..0000000000 --- a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/OrganisationTests/OrgUserIconTest_spec.js +++ /dev/null @@ -1,30 +0,0 @@ -/// - -import homePage from "../../../../locators/HomePage"; - -describe("Check if org has user icons on homepage", function() { - let orgid; - let newOrganizationName; - - it("create org and check if user icons exists in that org on homepage", function() { - cy.NavigateToHome(); - cy.generateUUID().then((uid) => { - orgid = uid; - localStorage.setItem("OrgName", orgid); - cy.createOrg(); - cy.wait("@createOrg").then((interception) => { - newOrganizationName = interception.response.body.data.name; - cy.renameOrg(newOrganizationName, orgid); - cy.get(homePage.orgList.concat(orgid).concat(")")) - .scrollIntoView() - .should("be.visible") - .within(() => { - cy.get(homePage.shareUserIcons) - .first() - .should("be.visible"); - }); - }); - }); - cy.LogOut(); - }); -}); diff --git a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/OrganisationTests/Orgname_validation_spec.js b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/OrganisationTests/Orgname_validation_spec.js deleted file mode 100644 index a4df8a60b7..0000000000 --- a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/OrganisationTests/Orgname_validation_spec.js +++ /dev/null @@ -1,46 +0,0 @@ -/// - -import homePage from "../../../../locators/HomePage"; - -describe("Org name validation spec", function() { - let orgid; - let newOrganizationName; - it("create org with leading space validation", function() { - cy.NavigateToHome(); - cy.createOrg(); - cy.wait("@createOrg").then((interception) => { - newOrganizationName = interception.response.body.data.name; - cy.NavigateToHome(); - cy.contains(newOrganizationName) - .closest(homePage.orgCompleteSection) - .find(homePage.orgNamePopover) - .find(homePage.optionsIcon) - .click({ force: true }); - cy.get(homePage.renameOrgInput) - .should("be.visible") - .type(" "); - cy.get(".error-message").should("be.visible"); - }); - }); - it("creates org and checks that orgname is editable", function() { - cy.createOrg(); - cy.generateUUID().then((uid) => { - orgid = - "kadjhfkjadsjkfakjdscajdsnckjadsnckadsjcnanakdjsnckjdscnakjdscnnadjkncakjdsnckjadsnckajsdfkjadshfkjsdhfjkasdhfkjasdhfjkasdhjfasdjkfhjhdsfjhdsfjhadasdfasdfadsasdf" + - uid; - // create org with long name - cy.createOrg(); - cy.wait("@createOrg").then((interception) => { - newOrganizationName = interception.response.body.data.name; - cy.renameOrg(newOrganizationName, orgid); - }); - }); - }); - it("create org with special characters validation", function() { - cy.createOrg(); - cy.wait("@createOrg").then((interception) => { - newOrganizationName = interception.response.body.data.name; - cy.renameOrg(newOrganizationName, "Test & Org"); - }); - }); -}); diff --git a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/PreviewMode/ExecuteAction_spec.js b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/PreviewMode/ExecuteAction_spec.js index d922a82665..d911eeeb42 100644 --- a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/PreviewMode/ExecuteAction_spec.js +++ b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/PreviewMode/ExecuteAction_spec.js @@ -7,8 +7,8 @@ describe("Execute Action Functionality", function() { .first() .click(); // Importing the App from the sample application - cy.get(homePage.orgImportAppOption).click({ force: true }); - cy.get(homePage.orgImportAppModal).should("be.visible"); + cy.get(homePage.workspaceImportAppOption).click({ force: true }); + cy.get(homePage.workspaceImportAppModal).should("be.visible"); cy.xpath(homePage.uploadLogo).attachFile("executeAction.json"); cy.get(homePage.importAppProgressWrapper).should("be.visible"); cy.wait(3000); diff --git a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/Templates/Fork_Template_spec.js b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/Templates/Fork_Template_spec.js index 0fcc08a697..5885887c93 100644 --- a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/Templates/Fork_Template_spec.js +++ b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/Templates/Fork_Template_spec.js @@ -1,8 +1,8 @@ const commonlocators = require("../../../../locators/commonlocators.json"); const templateLocators = require("../../../../locators/TemplatesLocators.json"); -describe("Fork a template to an organisation", () => { - it("Fork a template to an organisation", () => { +describe("Fork a template to an workspace", () => { + it("Fork a template to an workspace", () => { cy.NavigateToHome(); cy.get(templateLocators.templatesTab).click(); cy.get(templateLocators.templateForkButton) diff --git a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/WorkspaceTests/DeleteWorkspace_spec.js b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/WorkspaceTests/DeleteWorkspace_spec.js new file mode 100644 index 0000000000..aad2a58ba6 --- /dev/null +++ b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/WorkspaceTests/DeleteWorkspace_spec.js @@ -0,0 +1,48 @@ +/// + +import homePage from "../../../../locators/HomePage"; + +describe("Delete workspace test spec", function() { + let newWorkspaceName; + + it("should delete the workspace", function() { + cy.visit("/applications"); + cy.createWorkspace(); + cy.wait("@createWorkspace").then((interception) => { + newWorkspaceName = interception.response.body.data.name; + cy.visit("/applications"); + cy.openWorkspaceOptionsPopup(newWorkspaceName); + cy.contains("Delete Organization").click(); + cy.contains("Are you sure").click(); + cy.wait("@deleteWorkspaceApiCall").then((httpResponse) => { + expect(httpResponse.status).to.equal(200); + }); + cy.get(newWorkspaceName).should("not.exist"); + }); + }); + + it("should show option to delete workspace for an admin user", function() { + cy.visit("/applications"); + cy.wait(2000); + cy.createWorkspace(); + cy.wait("@createWorkspace").then((interception) => { + newWorkspaceName = interception.response.body.data.name; + cy.visit("/applications"); + cy.openWorkspaceOptionsPopup(newWorkspaceName); + cy.contains("Delete Organization"); + cy.inviteUserForWorkspace( + newWorkspaceName, + Cypress.env("TESTUSERNAME1"), + homePage.viewerRole, + ); + cy.LogOut(); + cy.LogintoApp(Cypress.env("TESTUSERNAME1"), Cypress.env("TESTPASSWORD1")); + cy.visit("/applications"); + cy.openWorkspaceOptionsPopup(newWorkspaceName); + cy.get(homePage.workspaceNamePopoverContent) + .contains("Delete Organization") + .should("not.exist"); + cy.LogOut(); + }); + }); +}); diff --git a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/WorkspaceTests/LeaveWorkspaceTest_spec.js b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/WorkspaceTests/LeaveWorkspaceTest_spec.js new file mode 100644 index 0000000000..12a6e810cb --- /dev/null +++ b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/WorkspaceTests/LeaveWorkspaceTest_spec.js @@ -0,0 +1,62 @@ +/// + +import homePage from "../../../../locators/HomePage"; + +describe("Leave workspace test spec", function() { + let newWorkspaceId; + let newWorkspaceName; + + it("leave workspace menu is visible validation", function() { + cy.visit("/applications"); + cy.createWorkspace(); + cy.wait("@createWorkspace").then((interception) => { + newWorkspaceName = interception.response.body.data.name; + newWorkspaceId = interception.response.body.data.name; + cy.visit("/applications"); + cy.openWorkspaceOptionsPopup(newWorkspaceName); + cy.contains("Leave Organization"); + }); + }); + + it("Only admin user can not leave workspace validation", function() { + cy.visit("/applications"); + cy.createWorkspace(); + cy.wait("@createWorkspace").then((interception) => { + newWorkspaceName = interception.response.body.data.name; + newWorkspaceId = interception.response.body.data.name; + cy.visit("/applications"); + cy.openWorkspaceOptionsPopup(newWorkspaceName); + cy.contains("Leave Organization").click(); + cy.contains("Are you sure").click(); + cy.wait("@leaveWorkspaceApiCall").then((httpResponse) => { + expect(httpResponse.status).to.equal(400); + }); + cy.contains(newWorkspaceName); + }); + }); + + it("Non admin users can only access leave workspace popup menu validation", function() { + cy.visit("/applications"); + cy.createWorkspace(); + cy.wait("@createWorkspace").then((interception) => { + newWorkspaceName = interception.response.body.data.name; + newWorkspaceId = interception.response.body.data.name; + cy.visit("/applications"); + cy.inviteUserForWorkspace( + newWorkspaceName, + Cypress.env("TESTUSERNAME1"), + homePage.viewerRole, + ); + cy.LogOut(); + + cy.LogintoApp(Cypress.env("TESTUSERNAME1"), Cypress.env("TESTPASSWORD1")); + cy.visit("/applications"); + cy.openWorkspaceOptionsPopup(newWorkspaceName); + cy.get(homePage.workspaceNamePopoverContent) + .find("a") + .should("have.length", 1) + .first() + .contains("Leave Organization"); + }); + }); +}); diff --git a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/OrganisationTests/OrgImportApplication_spec.js b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/WorkspaceTests/WorkspaceImportApplication_spec.js similarity index 78% rename from app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/OrganisationTests/OrgImportApplication_spec.js rename to app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/WorkspaceTests/WorkspaceImportApplication_spec.js index 3319dbd0fe..5e317c50da 100644 --- a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/OrganisationTests/OrgImportApplication_spec.js +++ b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/WorkspaceTests/WorkspaceImportApplication_spec.js @@ -1,9 +1,9 @@ import homePage from "../../../../locators/HomePage"; const dsl = require("../../../../fixtures/displayWidgetDsl.json"); -describe("Organization Import Application", function() { - let orgid; - let newOrganizationName; +describe("Workspace Import Application", function() { + let workspaceId; + let newWorkspaceName; let appname; before(() => { @@ -37,15 +37,16 @@ describe("Organization Import Application", function() { cy.writeFile("cypress/fixtures/exported-app.json", body, "utf-8"); cy.generateUUID().then((uid) => { - orgid = uid; - localStorage.setItem("OrgName", orgid); - cy.createOrg(); - cy.wait("@createOrg").then((createOrgInterception) => { - newOrganizationName = createOrgInterception.response.body.data.name; - cy.renameOrg(newOrganizationName, orgid); - cy.get(homePage.orgImportAppOption).click({ force: true }); + workspaceId = uid; + localStorage.setItem("OrgName", workspaceId); + cy.createWorkspace(); + cy.wait("@createWorkspace").then((createWorkspaceInterception) => { + newWorkspaceName = + createWorkspaceInterception.response.body.data.name; + cy.renameWorkspace(newWorkspaceName, workspaceId); + cy.get(homePage.workspaceImportAppOption).click({ force: true }); - cy.get(homePage.orgImportAppModal).should("be.visible"); + cy.get(homePage.workspaceImportAppModal).should("be.visible"); cy.xpath(homePage.uploadLogo).attachFile("exported-app.json"); cy.wait("@importNewApplication").then((interception) => { diff --git a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/OrganisationTests/OrgSettings_validation_spec.js b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/WorkspaceTests/WorkspaceSettings_validation_spec.js similarity index 53% rename from app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/OrganisationTests/OrgSettings_validation_spec.js rename to app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/WorkspaceTests/WorkspaceSettings_validation_spec.js index 1a94ea4629..a5a7d61a60 100644 --- a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/OrganisationTests/OrgSettings_validation_spec.js +++ b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/WorkspaceTests/WorkspaceSettings_validation_spec.js @@ -2,27 +2,27 @@ import homePage from "../../../../locators/HomePage"; -describe("Org Settings validation spec", function() { - let orgid; - let newOrganizationName; +describe("Workspace Settings validation spec", function() { + let workspaceId; + let newWorkspaceName; - it("create org with long name should use ellipsis validation", function() { + it("create workspace with long name should use ellipsis validation", function() { cy.NavigateToHome(); cy.generateUUID().then((uid) => { - orgid = + workspaceId = "kadjhfkjadsjkfakjdscajdsnckjadsnckadsjcnanakdjsnckjdscnakjdscnnadjkncakjdsnckjadsnckajsdfkjadshfkjsdhfjkasdhfkjasdhfjkasdhjfasdjkfhjhdsfjhdsfjhadasdfasdfadsasdf" + uid; - localStorage.setItem("OrgName", orgid); - // create org with long name - cy.createOrg(); + localStorage.setItem("OrgName", workspaceId); + // create workspace with long name + cy.createWorkspace(); // stub the response and // find app name - cy.wait("@createOrg").then((interception) => { - newOrganizationName = interception.response.body.data.name; - cy.renameOrg(newOrganizationName, orgid); - cy.navigateToOrgSettings(orgid); + cy.wait("@createWorkspace").then((interception) => { + newWorkspaceName = interception.response.body.data.name; + cy.renameWorkspace(newWorkspaceName, workspaceId); + cy.navigateToWorkspaceSettings(workspaceId); // checking parent's() since the child() inherits css from it - cy.get(homePage.orgHeaderName) + cy.get(homePage.workspaceHeaderName) .parent() .then((elem) => { assert.isBelow(elem[0].offsetWidth, elem[0].scrollWidth); diff --git a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/WorkspaceTests/WorkspaceUserIconTest_spec.js b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/WorkspaceTests/WorkspaceUserIconTest_spec.js new file mode 100644 index 0000000000..e5e9afa11a --- /dev/null +++ b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/WorkspaceTests/WorkspaceUserIconTest_spec.js @@ -0,0 +1,30 @@ +/// + +import homePage from "../../../../locators/HomePage"; + +describe("Check if workspace has user icons on homepage", function() { + let workspaceId; + let newWorkspaceName; + + it("create workspace and check if user icons exists in that workspace on homepage", function() { + cy.NavigateToHome(); + cy.generateUUID().then((uid) => { + workspaceId = uid; + localStorage.setItem("OrgName", workspaceId); + cy.createWorkspace(); + cy.wait("@createWorkspace").then((interception) => { + newWorkspaceName = interception.response.body.data.name; + cy.renameWorkspace(newWorkspaceName, workspaceId); + cy.get(homePage.workspaceList.concat(workspaceId).concat(")")) + .scrollIntoView() + .should("be.visible") + .within(() => { + cy.get(homePage.shareUserIcons) + .first() + .should("be.visible"); + }); + }); + }); + cy.LogOut(); + }); +}); diff --git a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/WorkspaceTests/Workspacename_validation_spec.js b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/WorkspaceTests/Workspacename_validation_spec.js new file mode 100644 index 0000000000..a321d81c3d --- /dev/null +++ b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/WorkspaceTests/Workspacename_validation_spec.js @@ -0,0 +1,46 @@ +/// + +import homePage from "../../../../locators/HomePage"; + +describe("Workspace name validation spec", function() { + let workspaceId; + let newWorkspaceName; + it("create workspace with leading space validation", function() { + cy.NavigateToHome(); + cy.createWorkspace(); + cy.wait("@createWorkspace").then((interception) => { + newWorkspaceName = interception.response.body.data.name; + cy.NavigateToHome(); + cy.contains(newWorkspaceName) + .closest(homePage.workspaceCompleteSection) + .find(homePage.workspaceNamePopover) + .find(homePage.optionsIcon) + .click({ force: true }); + cy.get(homePage.renameWorkspaceInput) + .should("be.visible") + .type(" "); + cy.get(".error-message").should("be.visible"); + }); + }); + it("creates workspace and checks that workspace name is editable", function() { + cy.createWorkspace(); + cy.generateUUID().then((uid) => { + workspaceId = + "kadjhfkjadsjkfakjdscajdsnckjadsnckadsjcnanakdjsnckjdscnakjdscnnadjkncakjdsnckjadsnckajsdfkjadshfkjsdhfjkasdhfkjasdhfjkasdhjfasdjkfhjhdsfjhdsfjhadasdfasdfadsasdf" + + uid; + // create workspace with long name + cy.createWorkspace(); + cy.wait("@createWorkspace").then((interception) => { + newWorkspaceName = interception.response.body.data.name; + cy.renameWorkspace(newWorkspaceName, workspaceId); + }); + }); + }); + it("create workspace with special characters validation", function() { + cy.createWorkspace(); + cy.wait("@createWorkspace").then((interception) => { + newWorkspaceName = interception.response.body.data.name; + cy.renameWorkspace(newWorkspaceName, "Test & Workspace"); + }); + }); +}); diff --git a/app/client/cypress/integration/Smoke_TestSuite/ServerSideTests/DataTypes/Character_Spec.ts b/app/client/cypress/integration/Smoke_TestSuite/ServerSideTests/DataTypes/Character_Spec.ts new file mode 100644 index 0000000000..36e0593f00 --- /dev/null +++ b/app/client/cypress/integration/Smoke_TestSuite/ServerSideTests/DataTypes/Character_Spec.ts @@ -0,0 +1,391 @@ +import { ObjectsRegistry } from "../../../../support/Objects/Registry"; + +let guid: any, dsName: any, query: string; +const agHelper = ObjectsRegistry.AggregateHelper, + ee = ObjectsRegistry.EntityExplorer, + dataSources = ObjectsRegistry.DataSources, + propPane = ObjectsRegistry.PropertyPane, + table = ObjectsRegistry.Table, + locator = ObjectsRegistry.CommonLocators, + deployMode = ObjectsRegistry.DeployMode; + +describe("Postgres - Datatype Character tests", function() { + before(() => { + cy.fixture("CharacterDTdsl").then((val: any) => { + agHelper.AddDsl(val); + }); + propPane.ChangeTheme("Sharp"); + }); + + it("1. Create Postgress DS", function() { + agHelper.GenerateUUID(); + cy.get("@guid").then((uid) => { + dataSources.NavigateToDSCreateNew(); + dataSources.CreatePlugIn("PostgreSQL"); + guid = uid; + agHelper.RenameWithInPane("Postgres " + guid, false); + dataSources.FillPostgresDSForm(); + dataSources.TestSaveDatasource(); + cy.wrap("Postgres " + guid).as("dsName"); + }); + cy.get("@dsName").then(($dsName) => { + dsName = $dsName; + }); + }); + + it("2. Creating table - chartypes", () => { + query = `create table charTypes(serialid serial primary key, "One(1)" char, "AsMany" varchar, "Limited(4)" varchar(4), "Unlimited" text)`; + dataSources.NavigateFromActiveDS(dsName, true); + agHelper.GetNClick(dataSources._templateMenu); + agHelper.RenameWithInPane("createTable"); + agHelper.EnterValue(query); + cy.get(".CodeMirror textarea").focus(); + dataSources.RunQuery(); + ee.ExpandCollapseEntity(dsName); + ee.ActionContextMenuByEntityName(dsName, "Refresh"); + agHelper.AssertElementVisible(ee._entityNameInExplorer("public.chartypes")); + }); + + it("3. Creating SELECT query - chartypes + Bug 14493", () => { + query = `SELECT *, char_length("AsMany") as "AsMany-Len", char_length("Unlimited") as "Unlimited-Len" FROM public."chartypes" as charT LIMIT 10;`; + ee.ActionTemplateMenuByEntityName("public.chartypes", "SELECT"); + agHelper.RenameWithInPane("selectRecords"); + dataSources.RunQuery(); + agHelper + .GetText(dataSources._noRecordFound) + .then(($noRecMsg) => expect($noRecMsg).to.eq("No data records to show")); + agHelper.EnterValue(query); + }); + + it("4. Creating INSERT query - chartypes", () => { + query = `INSERT INTO public."chartypes" ("One(1)", "AsMany", "Limited(4)", "Unlimited") + VALUES ({{Insertone.text}}, {{Insertasmany.text}}, {{Insertlimited.text}}::varchar(4), {{Insertunlimited.text}});`; + ee.ActionTemplateMenuByEntityName("public.chartypes", "INSERT"); + agHelper.RenameWithInPane("insertRecord"); + agHelper.EnterValue(query); + }); + + it("5. Creating UPDATE query - chartypes", () => { + query = `UPDATE public."chartypes" SET + "One(1)" = {{Updateone.text}}, + "AsMany" = {{Updateasmany.text}}, + "Limited(4)" = {{Updatelimited.text}}::varchar(4), + "Unlimited" = {{Updateunlimited.text}} + WHERE serialid = {{Table1.selectedRow.serialid}};`; + ee.ActionTemplateMenuByEntityName("public.chartypes", "UPDATE"); + agHelper.RenameWithInPane("updateRecord"); + agHelper.EnterValue(query); + }); + + it("5. Creating DELETE query with condition - chartypes", () => { + query = `DELETE FROM public."chartypes" + WHERE serialId = {{Table1.selectedRow.serialid}};`; + ee.ActionTemplateMenuByEntityName("public.chartypes", "DELETE"); + agHelper.RenameWithInPane("deleteRecord"); + agHelper.EnterValue(query); + }); + + it("6. Creating DELETE query for complete table empty - chartypes", () => { + query = `DELETE FROM public."chartypes"`; + ee.ActionTemplateMenuByEntityName("public.chartypes", "DELETE"); + agHelper.RenameWithInPane("deleteAllRecords"); + agHelper.EnterValue(query); + }); + + it("7. Creating DROP table query - chartypes", () => { + query = `drop table public."chartypes"`; + ee.ActionTemplateMenuByEntityName("public.chartypes", "DELETE"); + agHelper.RenameWithInPane("dropTable"); + agHelper.EnterValue(query); + ee.ExpandCollapseEntity("QUERIES/JS", false); + ee.ExpandCollapseEntity(dsName, false); + }); + + it("8. Inserting record (null values) - chartypes", () => { + ee.SelectEntityByName("Page1"); + deployMode.DeployApp(); + table.WaitForTableEmpty(); //asserting table is empty before inserting! + agHelper.ClickButton("Run InsertQuery"); + agHelper.AssertElementVisible(locator._modal); + agHelper.ClickButton("Insert"); + agHelper.AssertElementVisible(locator._spanButton("Run InsertQuery")); + table.ReadTableRowColumnData(0, 0, 2000).then(($cellData) => { + expect($cellData).to.eq("1"); //asserting serial column is inserting fine in sequence + }); + table.ReadTableRowColumnData(0, 1, 200).then(($cellData) => { + expect($cellData).to.eq(" "); //white space for padding length! + }); + table.ReadTableRowColumnData(0, 3, 200).then(($cellData) => { + expect($cellData).to.eq(""); + }); + table.ReadTableRowColumnData(0, 5, 200).then(($cellData) => { + expect(Number($cellData)).to.eq(0); + }); + table.ReadTableRowColumnData(0, 6, 200).then(($cellData) => { + expect(Number($cellData)).to.eq(0); + }); + }); + + it("9. Inserting record (not null values) - chartypes", () => { + agHelper.ClickButton("Run InsertQuery"); + agHelper.AssertElementVisible(locator._modal); + agHelper.EnterInputText("One_1_", "a"); + agHelper.EnterInputText( + "AsMany", + "Sailing ships were used for thousands of years!", + ); + agHelper.EnterInputText("Limited_4_", "Ocean"); + agHelper.EnterInputText( + "Unlimited", + "At one time, the steamships Titanic, Olympic, and Britannic were the largest ships in the world, Titanic sank on her maiden voyage after hitting an iceberg, becoming one of the most famous shipwrecks of all time", + false, + false, + ); + agHelper.ClickButton("Insert"); + agHelper.AssertElementVisible(locator._spanButton("Run InsertQuery")); + table.ReadTableRowColumnData(1, 0, 2000).then(($cellData) => { + expect($cellData).to.eq("2"); //asserting serial column is inserting fine in sequence + }); + table.ReadTableRowColumnData(1, 1, 200).then(($cellData) => { + expect($cellData).to.eq("a"); + }); + table.ReadTableRowColumnData(1, 3, 200).then(($cellData) => { + expect($cellData).to.eq("Ocea"); //asserting only 4 chars are inserted due to column dt constraint + }); + table.ReadTableRowColumnData(1, 5, 200).then(($cellData) => { + expect(Number($cellData)).to.be.greaterThan(0); //asserting length columns + }); + table.ReadTableRowColumnData(1, 6, 200).then(($cellData) => { + expect(Number($cellData)).to.be.greaterThan(0); //asserting length columns + }); + }); + + it("10. Inserting another record (not null values) - chartypes", () => { + agHelper.ClickButton("Run InsertQuery"); + agHelper.AssertElementVisible(locator._modal); + agHelper.EnterInputText("One_1_", "<"); + agHelper.EnterInputText( + "AsMany", + "Some planes can fly for more than five hours after one of their engines goes out.!", + ); + agHelper.EnterInputText("Limited_4_", "Planes"); + agHelper.EnterInputText( + "Unlimited", + " In fact, according to the FAA, there are 5,000 planes in the air over the United States at any moment in time, and more than 8,000 flying across the globe.", + false, + false, + ); + agHelper.ClickButton("Insert"); + agHelper.AssertElementVisible(locator._spanButton("Run InsertQuery")); + table.ReadTableRowColumnData(2, 0, 2000).then(($cellData) => { + expect($cellData).to.eq("3"); //asserting serial column is inserting fine in sequence + }); + table.ReadTableRowColumnData(2, 1, 200).then(($cellData) => { + expect($cellData).to.eq("<"); + }); + table.ReadTableRowColumnData(2, 3, 200).then(($cellData) => { + expect($cellData).to.eq("Plan"); + }); + table.ReadTableRowColumnData(2, 5, 200).then(($cellData) => { + expect(Number($cellData)).to.be.greaterThan(0); + }); + table.ReadTableRowColumnData(2, 6, 200).then(($cellData) => { + expect(Number($cellData)).to.be.greaterThan(0); + }); + }); + + it("11. Updating record (emtying some field) - chartypes", () => { + table.SelectTableRow(2); + agHelper.ClickButton("Run UpdateQuery"); + agHelper.AssertElementVisible(locator._modal); + agHelper.EnterInputText("One_1_", ">", true); + agHelper.EnterInputText( + "AsMany", + "Dimming the aircraft's lights serves a purpose beyond sleep.!", + true, + ); + agHelper.EnterInputText("Limited_4_", "Flights", true); + agHelper.ClearInputText("Unlimited", false); + agHelper.ClickButton("Update"); + agHelper.AssertElementVisible(locator._spanButton("Run UpdateQuery")); + table.ReadTableRowColumnData(2, 0, 2000).then(($cellData) => { + expect($cellData).to.eq("3"); //asserting serial column is inserting fine in sequence + }); + table.ReadTableRowColumnData(2, 1, 200).then(($cellData) => { + expect($cellData).to.eq(">"); + }); + table.ReadTableRowColumnData(2, 3, 200).then(($cellData) => { + expect($cellData).to.eq("Flig"); + }); + table.ReadTableRowColumnData(2, 5, 200).then(($cellData) => { + expect(Number($cellData)).to.be.greaterThan(0); + }); + table.ReadTableRowColumnData(2, 6, 200).then(($cellData) => { + expect(Number($cellData)).to.eq(0); + }); + }); + + it("12. Deleting records - chartypes", () => { + table.SelectTableRow(1); + agHelper.ClickButton("DeleteQuery", 1); + agHelper.ValidateNetworkStatus("@postExecute", 200); + agHelper.ValidateNetworkStatus("@postExecute", 200); + agHelper.Sleep(2500);//Allwowing time for delete to be success + table.ReadTableRowColumnData(1, 0, 2000).then(($cellData) => { + expect($cellData).not.to.eq("2"); //asserting 2nd record is deleted + }); + table.ReadTableRowColumnData(1, 0, 200).then(($cellData) => { + expect($cellData).to.eq("3"); + }); + }); + + it("13. Updating record (null inserted record) - chartypes", () => { + agHelper.ClickButton("Run UpdateQuery"); + agHelper.AssertElementVisible(locator._modal); + //agHelper.EnterInputText("One_1_", "&"); + agHelper.EnterInputText( + "AsMany", + "First electric tram in England was opened in 1885 in Blackpool!", + ); + agHelper.EnterInputText("Limited_4_", "Trams"); + agHelper.EnterInputText( + "Unlimited", + "The word tram is used mainly outside North America, while within North America these vehicles are called streetcars or trolleys as they run mainly on streets.The word tram is used mainly outside North America, while within North America these vehicles are called streetcars or trolleys as they run mainly on streets.", + false, + false, + ); + agHelper.ClickButton("Update"); + agHelper.AssertElementVisible(locator._spanButton("Run UpdateQuery")); + table.ReadTableRowColumnData(1, 0, 2000).then(($cellData) => { + //since record updated is moving to last row in table - BUg 14347! + expect($cellData).to.eq("1"); //asserting serial column is inserting fine in sequence + }); + table.ReadTableRowColumnData(1, 1, 200).then(($cellData) => { + expect($cellData).to.eq(" "); //Not updating one column + }); + table.ReadTableRowColumnData(1, 3, 200).then(($cellData) => { + expect($cellData).to.eq("Tram"); + }); + table.ReadTableRowColumnData(1, 5, 200).then(($cellData) => { + expect(Number($cellData)).to.be.greaterThan(0); + }); + table.ReadTableRowColumnData(1, 6, 200).then(($cellData) => { + expect(Number($cellData)).to.be.greaterThan(0); + }); + }); + + it("14. Inserting another record (+ve record - to check serial column) - chartypes", () => { + agHelper.ClickButton("Run InsertQuery"); + agHelper.AssertElementVisible(locator._modal); + agHelper.EnterInputText("One_1_", "e"); + agHelper.EnterInputText( + "AsMany", + "Sailing ships were used for thousands of years!", + ); + agHelper.EnterInputText( + "Unlimited", + "At one time, the steamships Titanic, Olympic, and Britannic were the largest ships in the world, Titanic sank on her maiden voyage after hitting an iceberg, becoming one of the most famous shipwrecks of all time", + false, + false, + ); + agHelper.ClickButton("Insert"); + agHelper.AssertElementVisible(locator._spanButton("Run InsertQuery")); + table.ReadTableRowColumnData(2, 0, 2000).then(($cellData) => { + expect($cellData).to.eq("4"); //asserting serial column is inserting fine in sequence + }); + table.ReadTableRowColumnData(2, 1, 200).then(($cellData) => { + expect($cellData).to.eq("e"); + }); + table.ReadTableRowColumnData(2, 3, 200).then(($cellData) => { + expect($cellData).to.eq(""); //asserting empty field inserted + }); + table.ReadTableRowColumnData(2, 5, 200).then(($cellData) => { + expect(Number($cellData)).to.be.greaterThan(0); //asserting length columns + }); + table.ReadTableRowColumnData(2, 6, 200).then(($cellData) => { + expect(Number($cellData)).to.be.greaterThan(0); //asserting length columns + }); + }); + + it("15. Deleting records - chartypes", () => { + table.SelectTableRow(1); + agHelper.ClickButton("DeleteQuery", 1); + agHelper.AssertElementVisible(locator._spanButton("Run InsertQuery")); + table.ReadTableRowColumnData(1, 0, 2000).then(($cellData) => { + expect($cellData).not.to.eq("3"); //asserting 3rd record is deleted + }); + table.ReadTableRowColumnData(1, 0, 2000).then(($cellData) => { + expect($cellData).to.eq("4"); + }); + }); + + it("16. Deleting all records from table - chartypes", () => { + agHelper.GetNClick(locator._deleteIcon); + agHelper.AssertElementVisible(locator._spanButton("Run InsertQuery")); + agHelper.Sleep(2000); + table.WaitForTableEmpty(); + }); + + it("17. Inserting record (null record - to check serial column) - chartypes", () => { + agHelper.ClickButton("Run InsertQuery"); + agHelper.AssertElementVisible(locator._modal); + agHelper.ClickButton("Insert"); + agHelper.AssertElementVisible(locator._spanButton("Run InsertQuery")); + table.ReadTableRowColumnData(0, 0, 2000).then(($cellData) => { + expect($cellData).to.eq("5"); //asserting serial column is inserting fine in sequence + }); + table.ReadTableRowColumnData(0, 1, 200).then(($cellData) => { + expect($cellData).to.eq(" "); + }); + table.ReadTableRowColumnData(0, 3, 200).then(($cellData) => { + expect($cellData).to.eq(""); + }); + table.ReadTableRowColumnData(0, 5, 200).then(($cellData) => { + expect(Number($cellData)).to.eq(0); + }); + table.ReadTableRowColumnData(0, 6, 200).then(($cellData) => { + expect(Number($cellData)).to.eq(0); + }); + }); + + it("18. Validate Drop of the Newly Created - Vessels - Table from Postgres datasource", () => { + deployMode.NavigateBacktoEditor(); + ee.ExpandCollapseEntity("QUERIES/JS"); + ee.SelectEntityByName("dropTable"); + dataSources.RunQuery(); + dataSources.ReadQueryTableResponse(0).then(($cellData) => { + expect($cellData).to.eq("0"); //Success response for dropped table! + }); + ee.ExpandCollapseEntity("QUERIES/JS", false); + ee.ExpandCollapseEntity("DATASOURCES"); + ee.ExpandCollapseEntity(dsName); + ee.ActionContextMenuByEntityName(dsName, "Refresh"); + agHelper.AssertElementAbsence(ee._entityNameInExplorer("public.chartypes")); + ee.ExpandCollapseEntity(dsName, false); + ee.ExpandCollapseEntity("DATASOURCES", false); + }); + + it("19. Verify Deletion of the datasource after all created queries are Deleted", () => { + dataSources.DeleteDatasouceFromWinthinDS(dsName, 409); //Since all queries exists + ee.ExpandCollapseEntity("QUERIES/JS"); + ee.ActionContextMenuByEntityName("createTable", "Delete", "Are you sure?"); + ee.ActionContextMenuByEntityName( + "deleteAllRecords", + "Delete", + "Are you sure?", + ); + ee.ActionContextMenuByEntityName("deleteRecord", "Delete", "Are you sure?"); + ee.ActionContextMenuByEntityName("dropTable", "Delete", "Are you sure?"); + ee.ActionContextMenuByEntityName("insertRecord", "Delete", "Are you sure?"); + ee.ActionContextMenuByEntityName( + "selectRecords", + "Delete", + "Are you sure?", + ); + ee.ActionContextMenuByEntityName("updateRecord", "Delete", "Are you sure?"); + deployMode.DeployApp(); + deployMode.NavigateBacktoEditor(); + ee.ExpandCollapseEntity("QUERIES/JS"); + dataSources.DeleteDatasouceFromWinthinDS(dsName, 200); //ProductLines, Employees pages are still using this ds + }); +}); diff --git a/app/client/cypress/integration/Smoke_TestSuite/ServerSideTests/DataTypes/DateTime_Spec.ts b/app/client/cypress/integration/Smoke_TestSuite/ServerSideTests/DataTypes/DateTime_Spec.ts new file mode 100644 index 0000000000..b4282db8ce --- /dev/null +++ b/app/client/cypress/integration/Smoke_TestSuite/ServerSideTests/DataTypes/DateTime_Spec.ts @@ -0,0 +1,326 @@ +import { ObjectsRegistry } from "../../../../support/Objects/Registry"; + +let guid: any, dsName: any, query: string; +const agHelper = ObjectsRegistry.AggregateHelper, + ee = ObjectsRegistry.EntityExplorer, + dataSources = ObjectsRegistry.DataSources, + propPane = ObjectsRegistry.PropertyPane, + table = ObjectsRegistry.Table, + locator = ObjectsRegistry.CommonLocators, + deployMode = ObjectsRegistry.DeployMode; + +describe("Postgres - Datatype DateTime tests", function() { + before(() => { + cy.fixture("DateTimeDTdsl").then((val: any) => { + agHelper.AddDsl(val); + }); + propPane.ChangeColor(22, "Primary"); + propPane.ChangeColor(32, "Background"); + }); + + it("1. Create Postgress DS", function() { + agHelper.GenerateUUID(); + cy.get("@guid").then((uid) => { + dataSources.NavigateToDSCreateNew(); + dataSources.CreatePlugIn("PostgreSQL"); + guid = uid; + agHelper.RenameWithInPane("Postgres " + guid, false); + dataSources.FillPostgresDSForm(); + dataSources.TestSaveDatasource(); + cy.wrap("Postgres " + guid).as("dsName"); + }); + cy.get("@dsName").then(($dsName) => { + dsName = $dsName; + }); + }); + + it("2. 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.NavigateFromActiveDS(dsName, true); + agHelper.GetNClick(dataSources._templateMenu); + agHelper.RenameWithInPane("createTable"); + agHelper.EnterValue(query); + cy.get(".CodeMirror textarea").focus(); + dataSources.RunQuery(); + ee.ExpandCollapseEntity(dsName); + ee.ActionContextMenuByEntityName(dsName, "Refresh"); + agHelper.AssertElementVisible( + ee._entityNameInExplorer("public.datetimetypes"), + ); + }); + + it("3. 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 week/Weekday", + TO_CHAR (datetimeT.dater, 'W') as "Week of Month" FROM public."datetimetypes" as datetimeT;`; + ee.ActionTemplateMenuByEntityName("public.datetimetypes", "SELECT"); + agHelper.RenameWithInPane("selectRecords"); + dataSources.RunQuery(); + agHelper + .GetText(dataSources._noRecordFound) + .then(($noRecMsg) => expect($noRecMsg).to.eq("No data records to show")); + agHelper.EnterValue(query); + }); + + it("4. Creating INSERT query - datetimetypes", () => { + query = `INSERT INTO public."datetimetypes" (ts, tstz, dater, timer, intervaler) + VALUES('{{Insertts.text}}', '{{Inserttstz.text}}', '{{Insertdater.text}}', '{{Inserttimer.text}}', '{{Insertintervaler.text}}');`; + ee.ActionTemplateMenuByEntityName("public.datetimetypes", "INSERT"); + agHelper.RenameWithInPane("insertRecord"); + agHelper.EnterValue(query); + dataSources.ToggleUsePreparedStatement(false); + }); + + it("5. Creating UPDATE query - datetimetypes", () => { + 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}};`; + ee.ActionTemplateMenuByEntityName("public.datetimetypes", "UPDATE"); + agHelper.RenameWithInPane("updateRecord"); + agHelper.EnterValue(query); + dataSources.ToggleUsePreparedStatement(false); + }); + + it("6. Creating DELETE query with condition - datetimetypes", () => { + query = `DELETE FROM public."datetimetypes" + WHERE serialId = {{Table1.selectedRow.serialid}};`; + ee.ActionTemplateMenuByEntityName("public.datetimetypes", "DELETE"); + agHelper.RenameWithInPane("deleteRecord"); + agHelper.EnterValue(query); + }); + + it("7. Creating DELETE query for complete table empty - datetimetypes", () => { + query = `DELETE FROM public."datetimetypes"`; + ee.ActionTemplateMenuByEntityName("public.datetimetypes", "DELETE"); + agHelper.RenameWithInPane("deleteAllRecords"); + agHelper.EnterValue(query); + }); + + it("8. Creating DROP table query - datetimetypes", () => { + query = `drop table public."datetimetypes"`; + ee.ActionTemplateMenuByEntityName("public.datetimetypes", "DELETE"); + agHelper.RenameWithInPane("dropTable"); + agHelper.EnterValue(query); + ee.ExpandCollapseEntity("QUERIES/JS", false); + ee.ExpandCollapseEntity(dsName, false); + }); + + it("9. Inserting record - datetimetypes", () => { + ee.SelectEntityByName("Page1"); + deployMode.DeployApp(); + table.WaitForTableEmpty(); //asserting table is empty before inserting! + agHelper.ClickButton("Run InsertQuery"); + agHelper.AssertElementVisible(locator._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.ClickButton("Insert"); + agHelper.AssertElementVisible(locator._spanButton("Run InsertQuery")); + table.ReadTableRowColumnData(0, 0, 2000).then(($cellData) => { + expect($cellData).to.eq("1"); //asserting serial column is inserting fine in sequence + }); + table.ReadTableRowColumnData(0, 1, 200).then(($ts) => { + table.ReadTableRowColumnData(0, 2, 200).then(($tstz) => { + expect($ts).to.not.eq($tstz); //ts & tstz not equal since tstz is time zone applied + }); + }); + table.ReadTableRowColumnData(0, 3, 200).then(($cellData) => { + expect($cellData).to.eq("1989-01-19"); //date format! + }); + table.ReadTableRowColumnData(0, 4, 200).then(($cellData) => { + expect($cellData).to.eq("16:05:00"); //time format + }); + table.ReadTableRowColumnData(0, 6, 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, 200).then(($cellData) => { + expect($cellData).to.eq("19.01.1989"); + }); + agHelper + .GetText(table._showPageItemsCount) + .then(($count) => expect($count).contain("1")); + }); + + it("10. Inserting another format of record - datetimetypes", () => { + agHelper.ClickButton("Run InsertQuery"); + agHelper.AssertElementVisible(locator._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.ClickButton("Insert"); + agHelper.AssertElementVisible(locator._spanButton("Run InsertQuery")); + + table.ReadTableRowColumnData(1, 0, 2000).then(($cellData) => { + expect($cellData).to.eq("2"); //asserting serial column is inserting fine in sequence + }); + table.ReadTableRowColumnData(1, 1, 200).then(($ts) => { + table.ReadTableRowColumnData(1, 2, 200).then(($tstz) => { + expect($ts).to.not.eq($tstz); //ts & tstz not equal since tstz is time zone applied + }); + }); + table.ReadTableRowColumnData(1, 3, 200).then(($cellData) => { + expect($cellData).to.eq("2045-12-29"); + }); + table.ReadTableRowColumnData(1, 4, 200).then(($cellData) => { + expect($cellData).to.eq("04:05:00"); + }); + table.ReadTableRowColumnData(1, 6, 200).then(($cellData) => { + expect($cellData).to.eq("0 years 0 mons 3 days 4 hours 5 mins 6.0 secs"); + }); + table.ReadTableRowColumnData(1, 7, 200).then(($cellData) => { + expect($cellData).to.eq("29.12.2045"); + }); + agHelper + .GetText(table._showPageItemsCount) + .then(($count) => expect($count).contain("2")); + }); + + it("11. Updating record (emtying some field) - datetimetypes", () => { + table.SelectTableRow(1); + agHelper.ClickButton("Run UpdateQuery"); + agHelper.AssertElementVisible(locator._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.ClickButton("Update"); + agHelper.AssertElementVisible(locator._spanButton("Run UpdateQuery")); + table.ReadTableRowColumnData(1, 0, 2000).then(($cellData) => { + expect($cellData).to.eq("2"); //asserting serial column is same + }); + table.ReadTableRowColumnData(1, 1, 200).then(($ts) => { + table.ReadTableRowColumnData(1, 2, 200).then(($tstz) => { + expect($ts).to.not.eq($tstz); + }); + }); + table.ReadTableRowColumnData(1, 3, 200).then(($cellData) => { + expect($cellData).to.eq("2014-03-17"); + }); + table.ReadTableRowColumnData(1, 4, 200).then(($cellData) => { + expect($cellData).to.eq("04:05:06.789"); + }); + table.ReadTableRowColumnData(1, 6, 200).then(($cellData) => { + expect($cellData).to.eq("1 years 3 mons 2 days 6 hours 4 mins 5.0 secs"); + }); + table.ReadTableRowColumnData(1, 7, 200).then(($cellData) => { + expect($cellData).to.eq("17.03.2014"); + }); + agHelper + .GetText(table._showPageItemsCount) + .then(($count) => expect($count).contain("2")); + }); + + it("12. Deleting records - datetimetypes", () => { + agHelper.ClickButton("DeleteQuery", 1); + agHelper.ValidateNetworkStatus("@postExecute", 200); + agHelper.ValidateNetworkStatus("@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("13. Inserting another record (+ve record - to check serial column) - datetimetypes", () => { + agHelper.ClickButton("Run InsertQuery"); + agHelper.AssertElementVisible(locator._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.ClickButton("Insert"); + agHelper.AssertElementVisible(locator._spanButton("Run InsertQuery")); + + table.ReadTableRowColumnData(1, 0, 2000).then(($cellData) => { + expect($cellData).to.eq("3"); //asserting serial column is inserting fine in sequence + }); + table.ReadTableRowColumnData(1, 1, 200).then(($ts) => { + table.ReadTableRowColumnData(1, 2, 200).then(($tstz) => { + expect($ts).to.not.eq($tstz); //ts & tstz not equal since tstz is time zone applied + }); + }); + table.ReadTableRowColumnData(1, 3, 200).then(($cellData) => { + expect($cellData).to.eq("1999-01-08"); + }); + table.ReadTableRowColumnData(1, 4, 200).then(($cellData) => { + expect($cellData).to.eq("18:14:16"); + }); + table.ReadTableRowColumnData(1, 6, 200).then(($cellData) => { + expect($cellData).to.eq("1 years 2 mons 0 days 0 hours 0 mins 0.0 secs"); + }); + table.ReadTableRowColumnData(1, 7, 200).then(($cellData) => { + expect($cellData).to.eq("08.01.1999"); + }); + agHelper + .GetText(table._showPageItemsCount) + .then(($count) => expect($count).contain("2")); + }); + + it("14. Deleting all records from table - datetimetypes", () => { + agHelper.GetNClick(locator._deleteIcon); + agHelper.AssertElementVisible(locator._spanButton("Run InsertQuery")); + agHelper.Sleep(2000); + table.WaitForTableEmpty(); + }); + + it("15. Validate Drop of the Newly Created - Vessels - Table from Postgres datasource", () => { + deployMode.NavigateBacktoEditor(); + ee.ExpandCollapseEntity("QUERIES/JS"); + ee.SelectEntityByName("dropTable"); + dataSources.RunQuery(); + dataSources.ReadQueryTableResponse(0).then(($cellData) => { + expect($cellData).to.eq("0"); //Success response for dropped table! + }); + ee.ExpandCollapseEntity("QUERIES/JS", false); + ee.ExpandCollapseEntity("DATASOURCES"); + ee.ExpandCollapseEntity(dsName); + ee.ActionContextMenuByEntityName(dsName, "Refresh"); + agHelper.AssertElementAbsence( + ee._entityNameInExplorer("public.datetimetypes"), + ); + ee.ExpandCollapseEntity(dsName, false); + ee.ExpandCollapseEntity("DATASOURCES", false); + }); + + it("16. Verify Deletion of the datasource after all created queries are Deleted", () => { + dataSources.DeleteDatasouceFromWinthinDS(dsName, 409); //Since all queries exists + ee.ExpandCollapseEntity("QUERIES/JS"); + ee.ActionContextMenuByEntityName("createTable", "Delete", "Are you sure?"); + ee.ActionContextMenuByEntityName( + "deleteAllRecords", + "Delete", + "Are you sure?", + ); + ee.ActionContextMenuByEntityName("deleteRecord", "Delete", "Are you sure?"); + ee.ActionContextMenuByEntityName("dropTable", "Delete", "Are you sure?"); + ee.ActionContextMenuByEntityName("insertRecord", "Delete", "Are you sure?"); + ee.ActionContextMenuByEntityName( + "selectRecords", + "Delete", + "Are you sure?", + ); + ee.ActionContextMenuByEntityName("updateRecord", "Delete", "Are you sure?"); + deployMode.DeployApp(); + deployMode.NavigateBacktoEditor(); + ee.ExpandCollapseEntity("QUERIES/JS"); + dataSources.DeleteDatasouceFromWinthinDS(dsName, 200); //ProductLines, Employees pages are still using this ds + }); +}); diff --git a/app/client/cypress/integration/Smoke_TestSuite/ServerSideTests/DataTypes/Numeric_Spec.ts b/app/client/cypress/integration/Smoke_TestSuite/ServerSideTests/DataTypes/Numeric_Spec.ts new file mode 100644 index 0000000000..de58787e29 --- /dev/null +++ b/app/client/cypress/integration/Smoke_TestSuite/ServerSideTests/DataTypes/Numeric_Spec.ts @@ -0,0 +1,337 @@ +import { ObjectsRegistry } from "../../../../support/Objects/Registry"; + +let guid: any, dsName: any, query: string; +const agHelper = ObjectsRegistry.AggregateHelper, + ee = ObjectsRegistry.EntityExplorer, + dataSources = ObjectsRegistry.DataSources, + propPane = ObjectsRegistry.PropertyPane, + table = ObjectsRegistry.Table, + locator = ObjectsRegistry.CommonLocators, + deployMode = ObjectsRegistry.DeployMode; + +describe("Postgres - Datatype Numeric tests", function() { + before(() => { + cy.fixture("NumericDTdsl").then((val: any) => { + agHelper.AddDsl(val); + }); + propPane.ChangeTheme("Modern"); + }); + + it("1. Create Postgress DS", function() { + agHelper.GenerateUUID(); + cy.get("@guid").then((uid) => { + dataSources.NavigateToDSCreateNew(); + dataSources.CreatePlugIn("PostgreSQL"); + guid = uid; + agHelper.RenameWithInPane("Postgres " + guid, false); + dataSources.FillPostgresDSForm(); + dataSources.TestSaveDatasource(); + cy.wrap("Postgres " + guid).as("dsName"); + }); + cy.get("@dsName").then(($dsName) => { + dsName = $dsName; + }); + }); + + it("2. 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.NavigateFromActiveDS(dsName, true); + agHelper.GetNClick(dataSources._templateMenu); + agHelper.RenameWithInPane("createTable"); + agHelper.EnterValue(query); + cy.get(".CodeMirror textarea").focus(); + dataSources.RunQuery(); + ee.ExpandCollapseEntity(dsName); + ee.ActionContextMenuByEntityName(dsName, "Refresh"); + agHelper.AssertElementVisible( + ee._entityNameInExplorer("public.numerictypes"), + ); + }); + + it("3. Creating SELECT query - numerictypes + Bug 14493", () => { + ee.ActionTemplateMenuByEntityName("public.numerictypes", "SELECT"); + agHelper.RenameWithInPane("selectRecords"); + dataSources.RunQuery(); + agHelper + .GetText(dataSources._noRecordFound) + .then(($noRecMsg) => expect($noRecMsg).to.eq("No data records to show")); + }); + + it("4. Creating INSERT query - numerictypes", () => { + query = `INSERT INTO public."numerictypes" ("bigintid", "decimalid", "numericid") + VALUES ({{Insertbigint.text}}, {{Insertdecimal.text}}, {{Insertnumeric.text}})`; + ee.ActionTemplateMenuByEntityName("public.numerictypes", "INSERT"); + agHelper.RenameWithInPane("insertRecord"); + agHelper.EnterValue(query); + }); + + it("5. Creating UPDATE query - numerictypes", () => { + query = `UPDATE public."numerictypes" SET + "bigintid" = {{Updatebigint.text}}, + "decimalid" = {{Updatedecimal.text}}, + "numericid" = {{Updatenumeric.text}} + WHERE serialid = {{Table1.selectedRow.serialid}};`; + ee.ActionTemplateMenuByEntityName("public.numerictypes", "UPDATE"); + agHelper.RenameWithInPane("updateRecord"); + agHelper.EnterValue(query); + }); + + it("5. Creating DELETE query with condition - numerictypes", () => { + query = `DELETE FROM public."numerictypes" + WHERE serialId ={{Table1.selectedRow.serialid}}`; + ee.ActionTemplateMenuByEntityName("public.numerictypes", "DELETE"); + agHelper.RenameWithInPane("deleteRecord"); + agHelper.EnterValue(query); + }); + + it("6. Creating DELETE query for complete table empty - numerictypes", () => { + query = `DELETE FROM public."numerictypes"`; + ee.ActionTemplateMenuByEntityName("public.numerictypes", "DELETE"); + agHelper.RenameWithInPane("deleteAllRecords"); + agHelper.EnterValue(query); + }); + + it("7. Creating DROP table query - numerictypes", () => { + query = `drop table public."numerictypes"`; + ee.ActionTemplateMenuByEntityName("public.numerictypes", "DELETE"); + agHelper.RenameWithInPane("dropTable"); + agHelper.EnterValue(query); + ee.ExpandCollapseEntity("QUERIES/JS", false); + ee.ExpandCollapseEntity(dsName, false); + }); + + it("8. Inserting record (+ve limit) - numerictypes + Bug 14516", () => { + ee.SelectEntityByName("Page1"); + deployMode.DeployApp(); + table.WaitForTableEmpty(); //asserting table is empty before inserting! + agHelper.ClickButton("Run InsertQuery"); + agHelper.AssertElementVisible(locator._modal); + agHelper.EnterInputText("Bigintid", "922337203685477"); //9223372036854775807 + agHelper.EnterInputText("Decimalid", "865456.987654567"); + agHelper.EnterInputText("Numericid", "2147483647.2147484"); //2147483647.2147483647 + agHelper.ClickButton("Insert"); + agHelper.AssertElementVisible(locator._spanButton("Run InsertQuery")); + table.ReadTableRowColumnData(0, 0, 2000).then(($cellData) => { + expect($cellData).to.eq("1"); //asserting serial column is inserting fine in sequence + }); + table.ReadTableRowColumnData(0, 1, 200).then(($cellData) => { + expect($cellData).to.eq("922337203685477"); + }); + table.ReadTableRowColumnData(0, 2, 200).then(($cellData) => { + expect($cellData).to.eq("865456.987654567"); + }); + table.ReadTableRowColumnData(0, 3, 200).then(($cellData) => { + expect($cellData).to.eq("2147483647.2147484"); + }); + }); + + it("9. Inserting record (-ve limit) - numerictypes + Bug 14516", () => { + agHelper.ClickButton("Run InsertQuery"); + agHelper.AssertElementVisible(locator._modal); + agHelper.EnterInputText("Bigintid", "-922337203685477"); //-9223372036854775808 + agHelper.EnterInputText("Decimalid", "232143455655456.34"); //232143455655456.3434456565 + agHelper.EnterInputText("Numericid", "9877700000.143423"); //9877700000.14342340008876 + agHelper.ClickButton("Insert"); + agHelper.AssertElementVisible(locator._spanButton("Run InsertQuery")); + table.ReadTableRowColumnData(1, 0, 2000).then(($cellData) => { + expect($cellData).to.eq("2"); //asserting serial column is inserting fine in sequence + }); + table.ReadTableRowColumnData(1, 1, 200).then(($cellData) => { + expect($cellData).to.eq("-922337203685477"); //-9223372036854775808 + }); + table.ReadTableRowColumnData(1, 2, 200).then(($cellData) => { + expect($cellData).to.eq("232143455655456.34"); + }); + table.ReadTableRowColumnData(1, 3, 200).then(($cellData) => { + expect($cellData).to.eq("9877700000.143423"); + }); + }); + + it("10. Inserting another record (+ve record) - numerictypes", () => { + agHelper.ClickButton("Run InsertQuery"); + agHelper.AssertElementVisible(locator._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.AssertElementVisible(locator._spanButton("Run InsertQuery")); + table.ReadTableRowColumnData(2, 0, 2000).then(($cellData) => { + expect($cellData).to.eq("3"); //asserting serial column is inserting fine in sequence + }); + table.ReadTableRowColumnData(2, 1, 200).then(($cellData) => { + expect($cellData).to.eq("12233720368547758"); + }); + table.ReadTableRowColumnData(2, 2, 200).then(($cellData) => { + expect($cellData).to.eq("877675655441232.1"); + }); + table.ReadTableRowColumnData(2, 3, 200).then(($cellData) => { + expect($cellData).to.eq("86542300099.1"); + }); + }); + + it("11. Updating record (permissible value) - numerictypes", () => { + table.SelectTableRow(2); + agHelper.ClickButton("Run UpdateQuery"); + agHelper.AssertElementVisible(locator._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.AssertElementVisible(locator._spanButton("Run UpdateQuery")); + table.ReadTableRowColumnData(2, 0, 2000).then(($cellData) => { + expect($cellData).to.eq("3"); //asserting serial column is inserting fine in sequence + }); + table.ReadTableRowColumnData(2, 1, 200).then(($cellData) => { + expect($cellData).to.eq("11233720368547758"); + }); + table.ReadTableRowColumnData(2, 2, 200).then(($cellData) => { + expect($cellData).to.eq("777675655441232.1"); + }); + table.ReadTableRowColumnData(2, 3, 200).then(($cellData) => { + expect($cellData).to.eq("76542300099.10988"); + }); + }); + + it("12. Deleting records - numerictypes", () => { + table.SelectTableRow(1); + agHelper.ClickButton("DeleteQuery", 1); + agHelper.ValidateNetworkStatus("@postExecute", 200); + agHelper.ValidateNetworkStatus("@postExecute", 200); + agHelper.Sleep(2500);//Allwowing time for delete to be success + table.ReadTableRowColumnData(1, 0, 2000).then(($cellData) => { + expect($cellData).not.to.eq("2"); //asserting 2nd record is deleted + }); + table.ReadTableRowColumnData(1, 0, 200).then(($cellData) => { + expect($cellData).to.eq("3"); + }); + }); + + it("13. Updating record again - numerictypes", () => { + table.SelectTableRow(1); + agHelper.ClickButton("Run UpdateQuery"); + agHelper.AssertElementVisible(locator._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.AssertElementVisible(locator._spanButton("Run UpdateQuery")); + table.ReadTableRowColumnData(1, 0, 2000).then(($cellData) => { + expect($cellData).to.eq("3"); //asserting serial column is inserting fine in sequence + }); + table.ReadTableRowColumnData(1, 1, 200).then(($cellData) => { + expect($cellData).to.eq("11133720368547700"); + }); + table.ReadTableRowColumnData(1, 2, 200).then(($cellData) => { + expect($cellData).to.eq("777575655441232.1"); + }); + table.ReadTableRowColumnData(1, 3, 200).then(($cellData) => { + expect($cellData).to.eq("66542300099.00088"); + }); + }); + + it("14. Inserting another record (+ve record - to check serial column) - numerictypes", () => { + agHelper.ClickButton("Run InsertQuery"); + agHelper.AssertElementVisible(locator._modal); + agHelper.EnterInputText("Bigintid", "11111720368547700"); + agHelper.EnterInputText("Decimalid", "8765456.987654345"); //8765456.98765434567 + agHelper.EnterInputText("Numericid", "87654356.98765436"); // 87654356.987654356 + agHelper.ClickButton("Insert"); + agHelper.AssertElementVisible(locator._spanButton("Run InsertQuery")); + table.ReadTableRowColumnData(2, 0, 2000).then(($cellData) => { + expect($cellData).to.eq("4"); //asserting serial column is inserting fine in sequence + }); + table.ReadTableRowColumnData(2, 1, 200).then(($cellData) => { + expect($cellData).to.eq("11111720368547700"); + }); + table.ReadTableRowColumnData(2, 2, 200).then(($cellData) => { + expect($cellData).to.eq("8765456.987654345"); + }); + table.ReadTableRowColumnData(2, 3, 200).then(($cellData) => { + expect($cellData).to.eq("87654356.98765436"); + }); + }); + + it("15. Deleting records - numerictypes", () => { + table.SelectTableRow(1); + agHelper.ClickButton("DeleteQuery", 1); + agHelper.AssertElementVisible(locator._spanButton("Run InsertQuery")); + table.ReadTableRowColumnData(1, 0, 2000).then(($cellData) => { + expect($cellData).not.to.eq("3"); //asserting 3rd record is deleted + }); + table.ReadTableRowColumnData(1, 0, 2000).then(($cellData) => { + expect($cellData).to.eq("4"); + }); + }); + + it("16. Deleting all records from table - numerictypes", () => { + agHelper.GetNClick(locator._deleteIcon); + agHelper.AssertElementVisible(locator._spanButton("Run InsertQuery")); + agHelper.Sleep(2000); + table.WaitForTableEmpty(); + }); + + it("17. Inserting record (+ve record - to check serial column) - numerictypes", () => { + agHelper.ClickButton("Run InsertQuery"); + agHelper.AssertElementVisible(locator._modal); + agHelper.EnterInputText("Bigintid", "11111720368547700"); + agHelper.EnterInputText("Decimalid", "8765456.987654345"); + agHelper.EnterInputText("Numericid", "87654356.98765436"); // 87654356.9876543567 + agHelper.ClickButton("Insert"); + agHelper.AssertElementVisible(locator._spanButton("Run InsertQuery")); + table.ReadTableRowColumnData(0, 0, 2000).then(($cellData) => { + expect($cellData).to.eq("5"); //asserting serial column is inserting fine in sequence + }); + table.ReadTableRowColumnData(0, 1, 200).then(($cellData) => { + expect($cellData).to.eq("11111720368547700"); + }); + table.ReadTableRowColumnData(0, 2, 200).then(($cellData) => { + expect($cellData).to.eq("8765456.987654345"); + }); + table.ReadTableRowColumnData(0, 3, 200).then(($cellData) => { + expect($cellData).to.eq("87654356.98765436"); + }); + }); + + it("18. Validate Drop of the Newly Created - Vessels - Table from Postgres datasource", () => { + deployMode.NavigateBacktoEditor(); + ee.ExpandCollapseEntity("QUERIES/JS"); + ee.SelectEntityByName("dropTable"); + dataSources.RunQuery(); + dataSources.ReadQueryTableResponse(0).then(($cellData) => { + expect($cellData).to.eq("0"); //Success response for dropped table! + }); + ee.ExpandCollapseEntity("QUERIES/JS", false); + ee.ExpandCollapseEntity("DATASOURCES"); + ee.ExpandCollapseEntity(dsName); + ee.ActionContextMenuByEntityName(dsName, "Refresh"); + agHelper.AssertElementAbsence( + ee._entityNameInExplorer("public.numerictypes"), + ); + ee.ExpandCollapseEntity(dsName, false); + ee.ExpandCollapseEntity("DATASOURCES", false); + }); + + it("19. Verify Deletion of the datasource after all created queries are Deleted", () => { + dataSources.DeleteDatasouceFromWinthinDS(dsName, 409); //Since all queries exists + ee.ExpandCollapseEntity("QUERIES/JS"); + ee.ActionContextMenuByEntityName("createTable", "Delete", "Are you sure?"); + ee.ActionContextMenuByEntityName( + "deleteAllRecords", + "Delete", + "Are you sure?", + ); + ee.ActionContextMenuByEntityName("deleteRecord", "Delete", "Are you sure?"); + ee.ActionContextMenuByEntityName("dropTable", "Delete", "Are you sure?"); + ee.ActionContextMenuByEntityName("insertRecord", "Delete", "Are you sure?"); + ee.ActionContextMenuByEntityName( + "selectRecords", + "Delete", + "Are you sure?", + ); + ee.ActionContextMenuByEntityName("updateRecord", "Delete", "Are you sure?"); + deployMode.DeployApp(); + deployMode.NavigateBacktoEditor(); + ee.ExpandCollapseEntity("QUERIES/JS"); + dataSources.DeleteDatasouceFromWinthinDS(dsName, 200); //ProductLines, Employees pages are still using this ds + }); +}); diff --git a/app/client/cypress/integration/Smoke_TestSuite/ServerSideTests/Datasources/RestApiDatasource_spec.js b/app/client/cypress/integration/Smoke_TestSuite/ServerSideTests/Datasources/RestApiDatasource_spec.js index bdb87592af..d16724e887 100644 --- a/app/client/cypress/integration/Smoke_TestSuite/ServerSideTests/Datasources/RestApiDatasource_spec.js +++ b/app/client/cypress/integration/Smoke_TestSuite/ServerSideTests/Datasources/RestApiDatasource_spec.js @@ -1,18 +1,22 @@ const testdata = require("../../../../fixtures/testdata.json"); +import { ObjectsRegistry } from "../../../../support/Objects/Registry"; + +let agHelper = ObjectsRegistry.AggregateHelper; describe("Create a rest datasource", function() { beforeEach(() => { cy.startRoutesForDatasource(); }); - it("Create a rest datasource", function() { + it("Create a rest datasource + Bug 14566", function() { cy.NavigateToAPI_Panel(); cy.CreateAPI("Testapi"); cy.enterDatasourceAndPath(testdata.baseUrl, testdata.methods); cy.assertPageSave(); cy.get(".t--store-as-datasource") .trigger("click") - .wait(500); + .wait(1000); + agHelper.ValidateToastMessage("datasource created"); //verifying there is no error toast, Bug 14566 cy.saveDatasource(); cy.contains(".datasource-highlight", "https://mock-api.appsmith.com"); cy.SaveAndRunAPI(); diff --git a/app/client/cypress/integration/Smoke_TestSuite/ServerSideTests/ExplorerTests/JSEditorContextMenu_Spec.ts b/app/client/cypress/integration/Smoke_TestSuite/ServerSideTests/ExplorerTests/JSEditorContextMenu_Spec.ts index f01a6a17ff..136316756b 100644 --- a/app/client/cypress/integration/Smoke_TestSuite/ServerSideTests/ExplorerTests/JSEditorContextMenu_Spec.ts +++ b/app/client/cypress/integration/Smoke_TestSuite/ServerSideTests/ExplorerTests/JSEditorContextMenu_Spec.ts @@ -1,7 +1,6 @@ import { ObjectsRegistry } from "../../../../support/Objects/Registry" -let agHelper = ObjectsRegistry.AggregateHelper, - ee = ObjectsRegistry.EntityExplorer, +let ee = ObjectsRegistry.EntityExplorer, jsEditor = ObjectsRegistry.JSEditor; describe("Validate basic operations on Entity explorer JSEditor structure", () => { @@ -9,15 +8,15 @@ describe("Validate basic operations on Entity explorer JSEditor structure", () = it("1. Validate JSObject creation & Run", () => { jsEditor.CreateJSObject('return "Hello World";'); - ee.expandCollapseEntity("QUERIES/JS"); + ee.ExpandCollapseEntity("QUERIES/JS"); ee.AssertEntityPresenceInExplorer("JSObject1"); - jsEditor.validateDefaultJSObjProperties("JSObject1"); + jsEditor.ValidateDefaultJSObjProperties("JSObject1"); }); it("2. Validate Rename JSObject from Form Header", function() { - jsEditor.RenameJSObjFromForm("RenamedJSObject"); + jsEditor.RenameJSObjFromPane("RenamedJSObject"); ee.AssertEntityPresenceInExplorer("RenamedJSObject"); - jsEditor.validateDefaultJSObjProperties("RenamedJSObject"); + jsEditor.ValidateDefaultJSObjProperties("RenamedJSObject"); }); it("3. Validate Copy JSObject", function() { @@ -32,13 +31,13 @@ describe("Validate basic operations on Entity explorer JSEditor structure", () = 201, ); ee.AssertEntityPresenceInExplorer("RenamedJSObjectCopy"); - jsEditor.validateDefaultJSObjProperties("RenamedJSObjectCopy"); + jsEditor.ValidateDefaultJSObjProperties("RenamedJSObjectCopy"); }); it("4. Validate Rename JSObject from Entity Explorer", function() { jsEditor.RenameJSObjFromExplorer("RenamedJSObject", "ExplorerRenamed"); ee.AssertEntityPresenceInExplorer("ExplorerRenamed"); - jsEditor.validateDefaultJSObjProperties("ExplorerRenamed"); + jsEditor.ValidateDefaultJSObjProperties("ExplorerRenamed"); }); it("5. Validate Move JSObject", function() { @@ -46,7 +45,7 @@ describe("Validate basic operations on Entity explorer JSEditor structure", () = ee.AddNewPage(); ee.AssertEntityPresenceInExplorer(newPageId); ee.SelectEntityByName(pageId); - ee.expandCollapseEntity("QUERIES/JS"); + ee.ExpandCollapseEntity("QUERIES/JS"); ee.ActionContextMenuByEntityName( "RenamedJSObjectCopy", "Move to page", @@ -54,12 +53,12 @@ describe("Validate basic operations on Entity explorer JSEditor structure", () = ); ee.SelectEntityByName(newPageId); ee.AssertEntityPresenceInExplorer("RenamedJSObjectCopy"); - jsEditor.validateDefaultJSObjProperties("RenamedJSObjectCopy"); + jsEditor.ValidateDefaultJSObjProperties("RenamedJSObjectCopy"); }); it("6. Validate Deletion of JSObject", function() { ee.SelectEntityByName(pageId); - ee.expandCollapseEntity("QUERIES/JS"); + ee.ExpandCollapseEntity("QUERIES/JS"); ee.ActionContextMenuByEntityName( "ExplorerRenamed", "Delete", diff --git a/app/client/cypress/integration/Smoke_TestSuite/ServerSideTests/OnLoadTests/JSOnLoad_Spec.ts b/app/client/cypress/integration/Smoke_TestSuite/ServerSideTests/OnLoadTests/JSOnLoad_Spec.ts index 42eec743b0..8fc3f3d0de 100644 --- a/app/client/cypress/integration/Smoke_TestSuite/ServerSideTests/OnLoadTests/JSOnLoad_Spec.ts +++ b/app/client/cypress/integration/Smoke_TestSuite/ServerSideTests/OnLoadTests/JSOnLoad_Spec.ts @@ -72,7 +72,7 @@ describe("JSObjects OnLoad Actions tests", function() { table.ReadTableRowColumnData(0, 0).then((cellData) => { expect(cellData).to.be.equal("8"); }); - agHelper.NavigateBacktoEditor(); + deployMode.NavigateBacktoEditor(); }); it("3. Tc 54, 55 - Verify OnPage Load - auto enabled from above case for JSOBject", function() { @@ -92,7 +92,7 @@ describe("JSObjects OnLoad Actions tests", function() { jsEditor.EnableDisableAsyncFuncSettings("getId", false, true); deployMode.DeployApp(locator._widgetInDeployed("tablewidget"), false); agHelper.WaitUntilToastDisappear('The action "GetUser" has failed'); - agHelper.NavigateBacktoEditor(); + deployMode.NavigateBacktoEditor(); agHelper.WaitUntilToastDisappear('The action "GetUser" has failed'); }); @@ -110,7 +110,7 @@ describe("JSObjects OnLoad Actions tests", function() { table.ReadTableRowColumnData(0, 0).then((cellData) => { expect(cellData).to.be.equal("8"); }); - agHelper.NavigateBacktoEditor(); + deployMode.NavigateBacktoEditor(); }); it("6. Tc 55 - Verify OnPage Load - Enabling & Before Function calling Enabling for JSOBject", function() { @@ -123,11 +123,11 @@ describe("JSObjects OnLoad Actions tests", function() { ); agHelper.ClickButton("Yes"); agHelper.AssertElementAbsence(locator._toastMsg); - agHelper.ValidateNetworkExecutionSuccess("@postExecute"); - table.ReadTableRowColumnData(0, 0).then((cellData) => { + table.ReadTableRowColumnData(0, 0, 2000).then((cellData) => { expect(cellData).to.be.equal("8"); }); - agHelper.NavigateBacktoEditor(); + agHelper.ValidateNetworkExecutionSuccess("@postExecute"); + deployMode.NavigateBacktoEditor(); agHelper.AssertElementVisible(jsEditor._dialog("Confirmation Dialog")); agHelper.AssertElementVisible( jsEditor._dialogBody((jsName as string) + ".getId"), @@ -156,7 +156,7 @@ describe("JSObjects OnLoad Actions tests", function() { table.ReadTableRowColumnData(0, 0).then((cellData) => { expect(cellData).to.be.equal("8"); }); - agHelper.NavigateBacktoEditor(); + deployMode.NavigateBacktoEditor(); agHelper.AssertElementVisible(jsEditor._dialog("Confirmation Dialog")); agHelper.AssertElementVisible( jsEditor._dialogBody((jsName as string) + ".getId"), @@ -229,18 +229,18 @@ describe("JSObjects OnLoad Actions tests", function() { agHelper.AddDsl(val, locator._widgetInCanvas("imagewidget")); }); - ee.expandCollapseEntity("QUERIES/JS"); + ee.ExpandCollapseEntity("QUERIES/JS"); apiPage.CreateAndFillApi( "https://api.forismatic.com/api/1.0/?method=getQuote&lang=en&format=json", "Quotes", ); - apiPage.ConfirmBeforeRunningApi(true); + apiPage.ToggleConfirmBeforeRunningApi(true); apiPage.CreateAndFillApi( "https://api.whatdoestrumpthink.com/api/v1/quotes/random", "WhatTrumpThinks", ); - apiPage.ConfirmBeforeRunningApi(true); + apiPage.ToggleConfirmBeforeRunningApi(true); jsEditor.CreateJSObject( `export default { @@ -348,7 +348,7 @@ describe("JSObjects OnLoad Actions tests", function() { }); it("10. API with OnPageLoad & Confirmation both enabled & called directly & setting previous Api's confirmation to false", () => { - agHelper.NavigateBacktoEditor(); + deployMode.NavigateBacktoEditor(); agHelper.AssertElementVisible(jsEditor._dialogBody("Quotes")); agHelper.ClickButton("No"); agHelper.ValidateToastMessage('The action "Quotes" has failed'); @@ -364,10 +364,10 @@ describe("JSObjects OnLoad Actions tests", function() { agHelper.ClickButton("No"); agHelper.ValidateToastMessage("Failed to execute actions during page load"); - ee.expandCollapseEntity("QUERIES/JS"); + ee.ExpandCollapseEntity("QUERIES/JS"); apiPage.CreateAndFillApi("https://catfact.ninja/fact", "CatFacts"); - apiPage.OnPageLoadRun(true); - apiPage.ConfirmBeforeRunningApi(true); + apiPage.ToggleOnPageLoadRun(true); + apiPage.ToggleConfirmBeforeRunningApi(true); ee.SelectEntityByName("Image1", "WIDGETS"); jsEditor.EnterJSContext( @@ -378,9 +378,9 @@ describe("JSObjects OnLoad Actions tests", function() { ); ee.SelectEntityByName("Quotes", "QUERIES/JS"); - apiPage.OnPageLoadRun(false); + apiPage.ToggleOnPageLoadRun(false); ee.SelectEntityByName("WhatTrumpThinks"); - apiPage.OnPageLoadRun(false); + apiPage.ToggleOnPageLoadRun(false); ee.SelectEntityByName(jsName as string, "QUERIES/JS"); jsEditor.EnableDisableAsyncFuncSettings("callQuotes", false, false); //OnPageLoad made true once mapped with widget @@ -403,13 +403,13 @@ describe("JSObjects OnLoad Actions tests", function() { homePage.ImportApp("JSObjOnLoadApp.json"); homePage.AssertImport(); - ee.expandCollapseEntity("QUERIES/JS"); + ee.ExpandCollapseEntity("QUERIES/JS"); apiPage.CreateAndFillApi( "https://anapioficeandfire.com/api/books/{{this.params.id}}", "getBooks", ); //apiPage.OnPageLoadRun(true); //OnPageLoad made true after mapping to JSONForm - apiPage.ConfirmBeforeRunningApi(true); + apiPage.ToggleConfirmBeforeRunningApi(true); dataSources.NavigateFromActiveDS(guid, true); agHelper.GetNClick(dataSources._templateMenu); @@ -540,7 +540,7 @@ describe("JSObjects OnLoad Actions tests", function() { .GetText(locator._jsonFormInputField("url"), "val") .then(($url) => expect($url).not.be.empty); - agHelper.NavigateBacktoEditor(); + deployMode.NavigateBacktoEditor(); agHelper.AssertElementVisible(jsEditor._dialogBody("getBooks")); agHelper.ClickButton("No"); agHelper.ValidateToastMessage('The action "getBooks" has failed'); diff --git a/app/client/cypress/integration/Smoke_TestSuite/ServerSideTests/OnLoadTests/OnLoadActions_Spec.ts b/app/client/cypress/integration/Smoke_TestSuite/ServerSideTests/OnLoadTests/OnLoadActions_Spec.ts index f5c82e8245..92a0efaf09 100644 --- a/app/client/cypress/integration/Smoke_TestSuite/ServerSideTests/OnLoadTests/OnLoadActions_Spec.ts +++ b/app/client/cypress/integration/Smoke_TestSuite/ServerSideTests/OnLoadTests/OnLoadActions_Spec.ts @@ -61,7 +61,7 @@ describe("Layout OnLoad Actions tests", function() { //apiPage.RunAPI(); //Adding dependency in right order matters! - ee.expandCollapseEntity("WIDGETS"); + ee.ExpandCollapseEntity("WIDGETS"); ee.SelectEntityByName("Image1"); jsEditor.EnterJSContext("Image", `{{RandomFlora.data}}`, true); @@ -162,7 +162,7 @@ describe("Layout OnLoad Actions tests", function() { ); }); - agHelper.NavigateBacktoEditor(); + deployMode.NavigateBacktoEditor(); }); it("3. Bug 10049, 10055: Dependency not executed in expected order in layoutOnLoadActions when dependency added via URL", function() { diff --git a/app/client/cypress/integration/Smoke_TestSuite/ServerSideTests/OrganisationTests/CreateAppWithSameNameInOrg_spec.js b/app/client/cypress/integration/Smoke_TestSuite/ServerSideTests/OrganisationTests/CreateAppWithSameNameInOrg_spec.js deleted file mode 100644 index 32a444c4f0..0000000000 --- a/app/client/cypress/integration/Smoke_TestSuite/ServerSideTests/OrganisationTests/CreateAppWithSameNameInOrg_spec.js +++ /dev/null @@ -1,25 +0,0 @@ -/// - -describe("Create org and a new app / delete and recreate app", function() { - let orgid; - let appid; - let newOrganizationName; - - it("create app within an org and delete and re-create another app with same name", function() { - cy.NavigateToHome(); - cy.generateUUID().then((uid) => { - orgid = uid; - appid = uid; - localStorage.setItem("OrgName", orgid); - cy.createOrg(); - cy.wait("@createOrg").then((interception) => { - newOrganizationName = interception.response.body.data.name; - cy.renameOrg(newOrganizationName, orgid); - }); - cy.CreateAppForOrg(orgid, appid); - cy.DeleteAppByApi(); - cy.NavigateToHome(); - cy.CreateAppForOrg(orgid, appid); - }); - }); -}); diff --git a/app/client/cypress/integration/Smoke_TestSuite/ServerSideTests/OrganisationTests/CreateSameAppInDiffOrg_spec.js b/app/client/cypress/integration/Smoke_TestSuite/ServerSideTests/OrganisationTests/CreateSameAppInDiffOrg_spec.js deleted file mode 100644 index 318d304bc3..0000000000 --- a/app/client/cypress/integration/Smoke_TestSuite/ServerSideTests/OrganisationTests/CreateSameAppInDiffOrg_spec.js +++ /dev/null @@ -1,44 +0,0 @@ -/// - -describe("Create app same name in different org", function() { - let orgid; - let appid; - let newOrganizationName; - - it("create app within a new org", function() { - cy.NavigateToHome(); - cy.generateUUID().then((uid) => { - orgid = uid; - appid = uid; - localStorage.setItem("OrgName", orgid); - cy.createOrg(); - // stub the response and - // find app name - cy.wait("@createOrg").then((interception) => { - newOrganizationName = interception.response.body.data.name; - cy.renameOrg(newOrganizationName, orgid); - cy.CreateAppForOrg(orgid, appid); - cy.NavigateToHome(); - cy.LogOut(); - }); - }); - }); - - it("create app with same name in a different org", function() { - cy.LoginFromAPI(Cypress.env("USERNAME"), Cypress.env("PASSWORD")); - cy.visit("/applications"); - cy.wait("@applications").should( - "have.nested.property", - "response.body.responseMeta.status", - 200, - ); - const newOrgName = orgid + "1"; - cy.createOrg(); - cy.wait("@createOrg").then((interception) => { - console.log("createOrganization response: ", interception); - newOrganizationName = interception.response.body.data.name; - cy.renameOrg(newOrganizationName, newOrgName); - cy.CreateAppForOrg(newOrgName, appid); - }); - }); -}); diff --git a/app/client/cypress/integration/Smoke_TestSuite/ServerSideTests/OrganisationTests/MemberRoles_Spec.ts b/app/client/cypress/integration/Smoke_TestSuite/ServerSideTests/OrganisationTests/MemberRoles_Spec.ts deleted file mode 100644 index f501c68458..0000000000 --- a/app/client/cypress/integration/Smoke_TestSuite/ServerSideTests/OrganisationTests/MemberRoles_Spec.ts +++ /dev/null @@ -1,80 +0,0 @@ -import { ObjectsRegistry } from "../../../../support/Objects/Registry" - -let orgid: any, appid: any; -let agHelper = ObjectsRegistry.AggregateHelper, - homePage = ObjectsRegistry.HomePage; - -describe("Create new org and invite user & validate all roles", () => { - it("1. Create new Organization, Share with a user from UI & verify", () => { - homePage.NavigateToHome() - agHelper.GenerateUUID() - cy.get("@guid").then(uid => { - orgid = uid; - appid = uid; - //localStorage.setItem("OrgName", orgid); - homePage.CreateNewOrg(orgid) - homePage.CheckOrgShareUsersCount(orgid, 1); - homePage.InviteUserToOrg(orgid, Cypress.env("TESTUSERNAME1"), 'App Viewer'); - cy.xpath(homePage._visibleTextSpan('MANAGE USERS')).click({ force: true }) - homePage.NavigateToHome() - homePage.CheckOrgShareUsersCount(orgid, 2); - homePage.CreateAppInOrg(orgid, appid); - }) - homePage.LogOutviaAPI() - }); - - it("2. Login as Invited user and validate Viewer role", function () { - homePage.LogintoApp(Cypress.env("TESTUSERNAME1"), Cypress.env("TESTPASSWORD1"), 'App Viewer') - homePage.FilterApplication(appid, orgid) - cy.get(homePage._applicationCard).first().trigger("mouseover"); - cy.get(homePage._appHoverIcon('edit')).should("not.exist"); - homePage.LaunchAppFromAppHover() - homePage.LogOutviaAPI() - }); - - it("3. Login as Org owner and Update the Invited user role to Developer", function () { - homePage.LogintoApp(Cypress.env("USERNAME"), Cypress.env("PASSWORD")) - homePage.FilterApplication(appid, orgid) - homePage.UpdateUserRoleInOrg(orgid, Cypress.env("TESTUSERNAME1"), 'App Viewer', 'Developer'); - homePage.LogOutviaAPI() - }); - - it("4. Login as Invited user and validate Developer role", function () { - homePage.LogintoApp(Cypress.env("TESTUSERNAME1"), Cypress.env("TESTPASSWORD1"), 'Developer') - homePage.FilterApplication(appid, orgid) - cy.get(homePage._applicationCard).first().trigger("mouseover"); - cy.get(homePage._appHoverIcon('edit')).first() - .click({ force: true }); - cy.xpath(homePage._editPageLanding).should("exist"); - homePage.LogOutviaAPI() - }); - - it("5. Login as Org owner and Update the Invited user role to Administrator", function () { - homePage.LogintoApp(Cypress.env("USERNAME"), Cypress.env("PASSWORD")) - homePage.FilterApplication(appid, orgid) - homePage.UpdateUserRoleInOrg(orgid, Cypress.env("TESTUSERNAME1"), 'Developer', 'Administrator'); - homePage.LogOutviaAPI() - }); - - it("6. Login as Invited user and validate Administrator role", function () { - homePage.LogintoApp(Cypress.env("TESTUSERNAME1"), Cypress.env("TESTPASSWORD1"), 'Administrator') - homePage.FilterApplication(appid, orgid) - cy.get(homePage._applicationCard).first().trigger("mouseover"); - homePage.InviteUserToOrg(orgid, Cypress.env("TESTUSERNAME2"), 'App Viewer'); - homePage.LogOutviaAPI() - }); - - it("7. Login as Org owner and verify all 3 users are present", function () { - homePage.LogintoApp(Cypress.env("USERNAME"), Cypress.env("PASSWORD")) - homePage.FilterApplication(appid, orgid) - homePage.OpenMembersPageForOrg(orgid) - cy.get(homePage._usersEmailList).then(function ($list) { - expect($list).to.have.length(3); - expect($list.eq(0)).to.contain(Cypress.env("USERNAME")); - expect($list.eq(1)).to.contain(Cypress.env("TESTUSERNAME1")); - expect($list.eq(2)).to.contain(Cypress.env("TESTUSERNAME2")); - }); - homePage.NavigateToHome() - }); - -}); \ No newline at end of file diff --git a/app/client/cypress/integration/Smoke_TestSuite/ServerSideTests/OrganisationTests/UpdateOrgTests_spec.js b/app/client/cypress/integration/Smoke_TestSuite/ServerSideTests/OrganisationTests/UpdateOrgTests_spec.js deleted file mode 100644 index 071a3e2825..0000000000 --- a/app/client/cypress/integration/Smoke_TestSuite/ServerSideTests/OrganisationTests/UpdateOrgTests_spec.js +++ /dev/null @@ -1,89 +0,0 @@ -import homePage from "../../../../locators/HomePage"; - -describe("Update Organization", function() { - let orgid; - let newOrganizationName; - - it("Open the org general settings and update org name. The update should reflect in the org. It should also reflect in the org names on the left side and the org dropdown. ", function() { - cy.NavigateToHome(); - cy.generateUUID().then((uid) => { - orgid = uid; - localStorage.setItem("OrgName", orgid); - cy.createOrg(); - cy.wait("@createOrg").then((interception) => { - newOrganizationName = interception.response.body.data.name; - cy.renameOrg(newOrganizationName, orgid); - cy.get(homePage.orgSettingOption).click({ force: true }); - }); - }); - cy.generateUUID().then((uid) => { - orgid = uid; - localStorage.setItem("OrgName", orgid); - cy.get(homePage.orgNameInput).click({ force: true }); - cy.get(homePage.orgNameInput).clear(); - cy.get(homePage.orgNameInput).type(orgid); - // eslint-disable-next-line cypress/no-unnecessary-waiting - cy.wait(2000); - cy.get(homePage.orgHeaderName).should("have.text", orgid); - }); - cy.NavigateToHome(); - cy.get(homePage.leftPanelContainer).within(() => { - cy.get("span").should((item) => { - expect(item).to.contain.text(orgid); - }); - }); - }); - - it("Open the org general settings and update org email. The update should reflect in the org.", function() { - cy.createOrg(); - cy.wait("@createOrg").then((interception) => { - newOrganizationName = interception.response.body.data.name; - cy.renameOrg(newOrganizationName, orgid); - cy.get(homePage.orgSettingOption).click({ force: true }); - }); - cy.get(homePage.orgEmailInput).clear(); - cy.get(homePage.orgEmailInput).type(Cypress.env("TESTUSERNAME2")); - cy.wait("@updateOrganization").should( - "have.nested.property", - "response.body.responseMeta.status", - 200, - ); - cy.get(homePage.orgEmailInput).should( - "have.value", - Cypress.env("TESTUSERNAME2"), - ); - }); - - it("Upload logo / delete logo and validate", function() { - const fixturePath = "appsmithlogo.png"; - cy.xpath(homePage.uploadLogo).attachFile(fixturePath); - cy.wait("@updateLogo").should( - "have.nested.property", - "response.body.responseMeta.status", - 200, - ); - cy.xpath(homePage.membersTab).click({ force: true }); - cy.xpath(homePage.generalTab).click({ force: true }); - 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, - ); - }); - - it("Open the org general settings and update org website. The update should reflect in the org.", function() { - cy.get(homePage.orgWebsiteInput).clear(); - cy.get(homePage.orgWebsiteInput).type("demowebsite"); - cy.wait("@updateOrganization").should( - "have.nested.property", - "response.body.responseMeta.status", - 200, - ); - cy.get(homePage.orgWebsiteInput).should("have.value", "demowebsite"); - }); -}); diff --git a/app/client/cypress/integration/Smoke_TestSuite/ServerSideTests/Params/PassingParams_Spec.ts b/app/client/cypress/integration/Smoke_TestSuite/ServerSideTests/Params/PassingParams_Spec.ts index 9b10b01a65..6f331b6ee1 100644 --- a/app/client/cypress/integration/Smoke_TestSuite/ServerSideTests/Params/PassingParams_Spec.ts +++ b/app/client/cypress/integration/Smoke_TestSuite/ServerSideTests/Params/PassingParams_Spec.ts @@ -57,7 +57,7 @@ describe("[Bug] - 10784 - Passing params from JS to SQL query should not break", jsEditor.EnterJSContext("Table Data", "{{ParamsTest.data}}"); ee.SelectEntityByName("ParamsTest", "QUERIES/JS"); - apiPage.OnPageLoadRun(false); //Bug 12476 + apiPage.ToggleOnPageLoadRun(false); //Bug 12476 deployMode.DeployApp(locator._spanButton("Submit")); agHelper.SelectDropDown("7"); @@ -67,7 +67,7 @@ describe("[Bug] - 10784 - Passing params from JS to SQL query should not break", expect(cellData).to.be.equal("7"); }); - agHelper.NavigateBacktoEditor(); + deployMode.NavigateBacktoEditor(); }); it("2. With Optional chaining : {{ (function() { return this?.params?.condition })() }}", function() { @@ -82,7 +82,7 @@ describe("[Bug] - 10784 - Passing params from JS to SQL query should not break", table.ReadTableRowColumnData(0, 0, 2000).then((cellData) => { expect(cellData).to.be.equal("9"); }); - agHelper.NavigateBacktoEditor(); + deployMode.NavigateBacktoEditor(); }); it("3. With Optional chaining : {{ (() => { return this?.params?.condition })() }}", function() { @@ -97,7 +97,7 @@ describe("[Bug] - 10784 - Passing params from JS to SQL query should not break", table.ReadTableRowColumnData(0, 0, 2000).then((cellData) => { expect(cellData).to.be.equal("7"); }); - agHelper.NavigateBacktoEditor(); + deployMode.NavigateBacktoEditor(); }); it("4. With Optional chaining : {{ this?.params.condition }}", function() { @@ -112,7 +112,7 @@ describe("[Bug] - 10784 - Passing params from JS to SQL query should not break", table.ReadTableRowColumnData(0, 0, 2000).then((cellData) => { expect(cellData).to.be.equal("9"); }); - agHelper.NavigateBacktoEditor(); + deployMode.NavigateBacktoEditor(); }); it("5. With Optional chaining : {{ (function() { return this?.params.condition })() }}", function() { @@ -127,7 +127,7 @@ describe("[Bug] - 10784 - Passing params from JS to SQL query should not break", table.ReadTableRowColumnData(0, 0, 2000).then((cellData) => { expect(cellData).to.be.equal("7"); }); - agHelper.NavigateBacktoEditor(); + deployMode.NavigateBacktoEditor(); }); it("6. With Optional chaining : {{ (() => { return this?.params.condition })() }}", function() { @@ -142,7 +142,7 @@ describe("[Bug] - 10784 - Passing params from JS to SQL query should not break", table.ReadTableRowColumnData(0, 0, 2000).then((cellData) => { expect(cellData).to.be.equal("9"); }); - agHelper.NavigateBacktoEditor(); + deployMode.NavigateBacktoEditor(); }); it("7. With No Optional chaining : {{ this.params.condition }}", function() { @@ -157,7 +157,7 @@ describe("[Bug] - 10784 - Passing params from JS to SQL query should not break", table.ReadTableRowColumnData(0, 0, 2000).then((cellData) => { expect(cellData).to.be.equal("7"); }); - agHelper.NavigateBacktoEditor(); + deployMode.NavigateBacktoEditor(); }); it("8. With No Optional chaining : {{ (function() { return this.params.condition })() }}", function() { @@ -172,7 +172,7 @@ describe("[Bug] - 10784 - Passing params from JS to SQL query should not break", table.ReadTableRowColumnData(0, 0, 2000).then((cellData) => { expect(cellData).to.be.equal("8"); }); - agHelper.NavigateBacktoEditor(); + deployMode.NavigateBacktoEditor(); }); it("9. With No Optional chaining : {{ (() => { return this.params.condition })() }}", function() { @@ -187,7 +187,7 @@ describe("[Bug] - 10784 - Passing params from JS to SQL query should not break", table.ReadTableRowColumnData(0, 0, 2000).then((cellData) => { expect(cellData).to.be.equal("9"); }); - agHelper.NavigateBacktoEditor(); + deployMode.NavigateBacktoEditor(); }); it("10. With Optional chaining : {{ this.params.condition }} && direct paramter passed", function() { @@ -206,7 +206,7 @@ describe("[Bug] - 10784 - Passing params from JS to SQL query should not break", table.ReadTableRowColumnData(0, 0, 2000).then((cellData) => { expect(cellData).to.be.equal("7"); }); - agHelper.NavigateBacktoEditor(); + deployMode.NavigateBacktoEditor(); }); it("11. With Optional chaining : {{ this.params.condition }} && no optional paramter passed", function() { @@ -220,11 +220,11 @@ describe("[Bug] - 10784 - Passing params from JS to SQL query should not break", table.ReadTableRowColumnData(0, 0, 2000).then((cellData) => { expect(cellData).to.be.equal("8"); }); - agHelper.NavigateBacktoEditor(); + deployMode.NavigateBacktoEditor(); }); it("12. Delete all entities - Query, JSObjects, Datasource + Bug 12532", () => { - ee.expandCollapseEntity("QUERIES/JS"); + ee.ExpandCollapseEntity("QUERIES/JS"); ee.ActionContextMenuByEntityName("ParamsTest", "Delete", "Are you sure?"); agHelper.ValidateNetworkStatus("@deleteAction", 200); ee.ActionContextMenuByEntityName( diff --git a/app/client/cypress/integration/Smoke_TestSuite/ServerSideTests/QueryPane/Mongo_Spec.js b/app/client/cypress/integration/Smoke_TestSuite/ServerSideTests/QueryPane/Mongo_Spec.js index 7c1e9189ce..c64080a104 100644 --- a/app/client/cypress/integration/Smoke_TestSuite/ServerSideTests/QueryPane/Mongo_Spec.js +++ b/app/client/cypress/integration/Smoke_TestSuite/ServerSideTests/QueryPane/Mongo_Spec.js @@ -228,7 +228,7 @@ describe("Create a query with a mongo datasource, run, save and then delete the it("9. Bug 7399: Validate Form based & Raw command based templates", function() { let id; - ee.expandCollapseEntity(`${datasourceName}`); + ee.ExpandCollapseEntity(`${datasourceName}`); cy.xpath(queryLocators.listingAndReviewContext) .invoke("show") .click({ force: true }); diff --git a/app/client/cypress/integration/Smoke_TestSuite/ServerSideTests/QueryPane/Mongo_Spec.ts b/app/client/cypress/integration/Smoke_TestSuite/ServerSideTests/QueryPane/Mongo_Spec.ts index 20df4f1097..9e5814da54 100644 --- a/app/client/cypress/integration/Smoke_TestSuite/ServerSideTests/QueryPane/Mongo_Spec.ts +++ b/app/client/cypress/integration/Smoke_TestSuite/ServerSideTests/QueryPane/Mongo_Spec.ts @@ -55,7 +55,7 @@ describe("Validate Mongo Query Pane Validations", () => { 11, ); - agHelper.NavigateBacktoEditor(); + deployMode.NavigateBacktoEditor(); cy.get("@dsName").then(($dsName) => { dsName = $dsName; }); @@ -315,8 +315,8 @@ describe("Validate Mongo Query Pane Validations", () => { }); agHelper.ActionContextMenuWithInPane("Delete"); - ee.expandCollapseEntity("DATASOURCES"); - ee.expandCollapseEntity(dsName); + ee.ExpandCollapseEntity("DATASOURCES"); + ee.ExpandCollapseEntity(dsName); ee.ActionContextMenuByEntityName(dsName, "Refresh"); agHelper.AssertElementVisible(ee._entityNameInExplorer("AuthorNAwards")); }); @@ -626,10 +626,10 @@ describe("Validate Mongo Query Pane Validations", () => { }); it("16. Validate Deletion of the Newly Created Page - AuthorNAwards", () => { - agHelper.NavigateBacktoEditor(); + deployMode.NavigateBacktoEditor(); table.WaitUntilTableLoad(); //Delete the test data - ee.expandCollapseEntity("PAGES"); + ee.ExpandCollapseEntity("PAGES"); ee.ActionContextMenuByEntityName( "AuthorNAwards", "Delete", @@ -652,7 +652,7 @@ describe("Validate Mongo Query Pane Validations", () => { dataSources.RunQuery(); agHelper.ActionContextMenuWithInPane("Delete"); - ee.expandCollapseEntity(dsName); + ee.ExpandCollapseEntity(dsName); ee.ActionContextMenuByEntityName(dsName, "Refresh"); agHelper.AssertElementAbsence(ee._entityNameInExplorer("AuthorNAwards")); }); @@ -680,7 +680,7 @@ describe("Validate Mongo Query Pane Validations", () => { // ee.ActionContextMenuByEntityName("Page1", "Delete", "Are you sure?"); //Cant be deleted since this is the Home page! // agHelper.ValidateNetworkStatus("@deletePage", 200); deployMode.DeployApp(); - agHelper.NavigateBacktoEditor(); + deployMode.NavigateBacktoEditor(); dataSources.DeleteDatasouceFromWinthinDS(dsName, 409); //Friends pages are still using this ds }); diff --git a/app/client/cypress/integration/Smoke_TestSuite/ServerSideTests/WorkspaceTests/CreateAppWithSameNameInWorkspace_spec.js b/app/client/cypress/integration/Smoke_TestSuite/ServerSideTests/WorkspaceTests/CreateAppWithSameNameInWorkspace_spec.js new file mode 100644 index 0000000000..e86c81a605 --- /dev/null +++ b/app/client/cypress/integration/Smoke_TestSuite/ServerSideTests/WorkspaceTests/CreateAppWithSameNameInWorkspace_spec.js @@ -0,0 +1,25 @@ +/// + +describe("Create workspace and a new app / delete and recreate app", function() { + let workspaceId; + let appid; + let newWorkspaceName; + + it("create app within an workspace and delete and re-create another app with same name", function() { + cy.NavigateToHome(); + cy.generateUUID().then((uid) => { + workspaceId = uid; + appid = uid; + localStorage.setItem("OrgName", workspaceId); + cy.createWorkspace(); + cy.wait("@createWorkspace").then((interception) => { + newWorkspaceName = interception.response.body.data.name; + cy.renameWorkspace(newWorkspaceName, workspaceId); + }); + cy.CreateAppForWorkspace(workspaceId, appid); + cy.DeleteAppByApi(); + cy.NavigateToHome(); + cy.CreateAppForWorkspace(workspaceId, appid); + }); + }); +}); diff --git a/app/client/cypress/integration/Smoke_TestSuite/ServerSideTests/WorkspaceTests/CreateSameAppInDiffWorkspace_spec.js b/app/client/cypress/integration/Smoke_TestSuite/ServerSideTests/WorkspaceTests/CreateSameAppInDiffWorkspace_spec.js new file mode 100644 index 0000000000..919f7d4991 --- /dev/null +++ b/app/client/cypress/integration/Smoke_TestSuite/ServerSideTests/WorkspaceTests/CreateSameAppInDiffWorkspace_spec.js @@ -0,0 +1,44 @@ +/// + +describe("Create app same name in different workspace", function() { + let workspaceId; + let appid; + let newWorkspaceName; + + it("create app within a new workspace", function() { + cy.NavigateToHome(); + cy.generateUUID().then((uid) => { + workspaceId = uid; + appid = uid; + localStorage.setItem("OrgName", workspaceId); + cy.createWorkspace(); + // stub the response and + // find app name + cy.wait("@createWorkspace").then((interception) => { + newWorkspaceName = interception.response.body.data.name; + cy.renameWorkspace(newWorkspaceName, workspaceId); + cy.CreateAppForWorkspace(workspaceId, appid); + cy.NavigateToHome(); + cy.LogOut(); + }); + }); + }); + + it("create app with same name in a different workspace", function() { + cy.LoginFromAPI(Cypress.env("USERNAME"), Cypress.env("PASSWORD")); + cy.visit("/applications"); + cy.wait("@applications").should( + "have.nested.property", + "response.body.responseMeta.status", + 200, + ); + const newWSName = workspaceId + "1"; + cy.createWorkspace(); + cy.wait("@createWorkspace").then((interception) => { + console.log("createWorkspace response: ", interception); + newWorkspaceName = interception.response.body.data.name; + cy.renameWorkspace(newWorkspaceName, newWSName); + cy.CreateAppForWorkspace(newWSName, appid); + }); + }); +}); diff --git a/app/client/cypress/integration/Smoke_TestSuite/ServerSideTests/WorkspaceTests/MemberRoles_Spec.ts b/app/client/cypress/integration/Smoke_TestSuite/ServerSideTests/WorkspaceTests/MemberRoles_Spec.ts new file mode 100644 index 0000000000..77f68a70cb --- /dev/null +++ b/app/client/cypress/integration/Smoke_TestSuite/ServerSideTests/WorkspaceTests/MemberRoles_Spec.ts @@ -0,0 +1,114 @@ +import { ObjectsRegistry } from "../../../../support/Objects/Registry"; + +let workspaceId: any, appid: any; +let agHelper = ObjectsRegistry.AggregateHelper, + homePage = ObjectsRegistry.HomePage; + +describe("Create new workspace and invite user & validate all roles", () => { + it("1. Create new Workspace, Share with a user from UI & verify", () => { + homePage.NavigateToHome(); + agHelper.GenerateUUID(); + cy.get("@guid").then((uid) => { + workspaceId = uid; + appid = uid; + //localStorage.setItem("OrgName", workspaceId); + homePage.CreateNewWorkspace(workspaceId); + homePage.CheckWorkspaceShareUsersCount(workspaceId, 1); + homePage.InviteUserToWorkspace( + workspaceId, + Cypress.env("TESTUSERNAME1"), + "App Viewer", + ); + cy.xpath(homePage._visibleTextSpan("MANAGE USERS")).click({ + force: true, + }); + homePage.NavigateToHome(); + homePage.CheckWorkspaceShareUsersCount(workspaceId, 2); + homePage.CreateAppInWorkspace(workspaceId, appid); + }); + homePage.LogOutviaAPI(); + }); + + it("2. Login as Invited user and validate Viewer role", function() { + homePage.LogintoApp( + Cypress.env("TESTUSERNAME1"), + Cypress.env("TESTPASSWORD1"), + "App Viewer", + ); + homePage.FilterApplication(appid, workspaceId); + cy.get(homePage._applicationCard) + .first() + .trigger("mouseover"); + cy.get(homePage._appHoverIcon("edit")).should("not.exist"); + homePage.LaunchAppFromAppHover(); + homePage.LogOutviaAPI(); + }); + + it("3. Login as Workspace owner and Update the Invited user role to Developer", function() { + homePage.LogintoApp(Cypress.env("USERNAME"), Cypress.env("PASSWORD")); + homePage.FilterApplication(appid, workspaceId); + homePage.UpdateUserRoleInWorkspace( + workspaceId, + Cypress.env("TESTUSERNAME1"), + "App Viewer", + "Developer", + ); + homePage.LogOutviaAPI(); + }); + + it("4. Login as Invited user and validate Developer role", function() { + homePage.LogintoApp( + Cypress.env("TESTUSERNAME1"), + Cypress.env("TESTPASSWORD1"), + "Developer", + ); + homePage.FilterApplication(appid, workspaceId); + cy.get(homePage._applicationCard) + .first() + .trigger("mouseover"); + cy.get(homePage._appHoverIcon("edit")) + .first() + .click({ force: true }); + cy.xpath(homePage._editPageLanding).should("exist"); + homePage.LogOutviaAPI(); + }); + + it("5. Login as Workspace owner and Update the Invited user role to Administrator", function() { + homePage.LogintoApp(Cypress.env("USERNAME"), Cypress.env("PASSWORD")); + homePage.FilterApplication(appid, workspaceId); + homePage.UpdateUserRoleInWorkspace( + workspaceId, + Cypress.env("TESTUSERNAME1"), + "Developer", + "Administrator", + ); + homePage.LogOutviaAPI(); + }); + + it("6. Login as Invited user and validate Administrator role", function() { + homePage.LogintoApp( + Cypress.env("TESTUSERNAME1"), + Cypress.env("TESTPASSWORD1"), + "Administrator", + ); + homePage.FilterApplication(appid, workspaceId); + cy.get(homePage._applicationCard) + .first() + .trigger("mouseover"); + homePage.InviteUserToWorkspace(workspaceId, Cypress.env("TESTUSERNAME2"), "App Viewer"); + homePage.LogOutviaAPI(); + }); + + it("7. Login as Workspace owner and verify all 3 users are present", function() { + homePage.LogintoApp(Cypress.env("USERNAME"), Cypress.env("PASSWORD")); + homePage.FilterApplication(appid, workspaceId); + homePage.OpenMembersPageForWorkspace(workspaceId); + cy.get(homePage._usersEmailList).then(function($list) { + expect($list).to.have.length(3); + expect($list.eq(0)).to.contain(Cypress.env("USERNAME")); + expect($list.eq(1)).to.contain(Cypress.env("TESTUSERNAME1")); + expect($list.eq(2)).to.contain(Cypress.env("TESTUSERNAME2")); + }); + homePage.NavigateToHome(); + }); +}); diff --git a/app/client/cypress/integration/Smoke_TestSuite/ServerSideTests/OrganisationTests/ShareAppTests_spec.js b/app/client/cypress/integration/Smoke_TestSuite/ServerSideTests/WorkspaceTests/ShareAppTests_spec.js similarity index 88% rename from app/client/cypress/integration/Smoke_TestSuite/ServerSideTests/OrganisationTests/ShareAppTests_spec.js rename to app/client/cypress/integration/Smoke_TestSuite/ServerSideTests/WorkspaceTests/ShareAppTests_spec.js index a4f29834b4..392d2a18f6 100644 --- a/app/client/cypress/integration/Smoke_TestSuite/ServerSideTests/OrganisationTests/ShareAppTests_spec.js +++ b/app/client/cypress/integration/Smoke_TestSuite/ServerSideTests/WorkspaceTests/ShareAppTests_spec.js @@ -3,24 +3,24 @@ import homePage from "../../../../locators/HomePage"; const publish = require("../../../../locators/publishWidgetspage.json"); -describe("Create new org and share with a user", function() { - let orgid; +describe("Create new workspace and share with a user", function() { + let workspaceId; let appid; let currentUrl; - let newOrganizationName; + let newWorkspaceName; - it("1. Create org and then share with a user from Application share option within application", function() { + it("1. Create workspace and then share with a user from Application share option within application", function() { cy.NavigateToHome(); cy.generateUUID().then((uid) => { - orgid = uid; + workspaceId = uid; appid = uid; - localStorage.setItem("OrgName", orgid); - cy.createOrg(); - cy.wait("@createOrg").then((interception) => { - newOrganizationName = interception.response.body.data.name; - cy.renameOrg(newOrganizationName, orgid); + localStorage.setItem("OrgName", workspaceId); + cy.createWorkspace(); + cy.wait("@createWorkspace").then((interception) => { + newWorkspaceName = interception.response.body.data.name; + cy.renameWorkspace(newWorkspaceName, workspaceId); }); - cy.CreateAppForOrg(orgid, appid); + cy.CreateAppForWorkspace(workspaceId, appid); cy.wait("@getPagesForCreateApp").should( "have.nested.property", "response.body.responseMeta.status", @@ -38,7 +38,7 @@ describe("Create new org and share with a user", function() { cy.get(homePage.searchInput).type(appid); // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(2000); - cy.get(homePage.appsContainer).contains(orgid); + cy.get(homePage.appsContainer).contains(workspaceId); cy.xpath(homePage.ShareBtn) .first() .should("be.visible"); diff --git a/app/client/cypress/integration/Smoke_TestSuite/ServerSideTests/WorkspaceTests/UpdateWorkspaceTests_spec.js b/app/client/cypress/integration/Smoke_TestSuite/ServerSideTests/WorkspaceTests/UpdateWorkspaceTests_spec.js new file mode 100644 index 0000000000..087e669f75 --- /dev/null +++ b/app/client/cypress/integration/Smoke_TestSuite/ServerSideTests/WorkspaceTests/UpdateWorkspaceTests_spec.js @@ -0,0 +1,89 @@ +import homePage from "../../../../locators/HomePage"; + +describe("Update Workspace", function() { + let workspaceId; + let newWorkspaceName; + + it("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() { + cy.NavigateToHome(); + cy.generateUUID().then((uid) => { + workspaceId = uid; + localStorage.setItem("OrgName", workspaceId); + cy.createWorkspace(); + cy.wait("@createWorkspace").then((interception) => { + newWorkspaceName = interception.response.body.data.name; + cy.renameWorkspace(newWorkspaceName, workspaceId); + cy.get(homePage.workspaceSettingOption).click({ force: true }); + }); + }); + cy.generateUUID().then((uid) => { + workspaceId = uid; + localStorage.setItem("OrgName", workspaceId); + 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); + }); + cy.NavigateToHome(); + cy.get(homePage.leftPanelContainer).within(() => { + cy.get("span").should((item) => { + expect(item).to.contain.text(workspaceId); + }); + }); + }); + + it("Open the workspace general settings and update workspace email. The update should reflect in the workspace.", function() { + cy.createWorkspace(); + cy.wait("@createWorkspace").then((interception) => { + newWorkspaceName = interception.response.body.data.name; + cy.renameWorkspace(newWorkspaceName, workspaceId); + 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"), + ); + }); + + it("Upload logo / delete logo and validate", function() { + const fixturePath = "appsmithlogo.png"; + cy.xpath(homePage.uploadLogo).attachFile(fixturePath); + cy.wait("@updateLogo").should( + "have.nested.property", + "response.body.responseMeta.status", + 200, + ); + cy.xpath(homePage.membersTab).click({ force: true }); + cy.xpath(homePage.generalTab).click({ force: true }); + 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, + ); + }); + + it("Open the workspace general settings and update workspace website. The update should reflect in the workspace.", function() { + cy.get(homePage.workspaceWebsiteInput).clear(); + cy.get(homePage.workspaceWebsiteInput).type("demowebsite"); + cy.wait("@updateWorkspace").should( + "have.nested.property", + "response.body.responseMeta.status", + 200, + ); + cy.get(homePage.workspaceWebsiteInput).should("have.value", "demowebsite"); + }); +}); diff --git a/app/client/cypress/locators/HomePage.js b/app/client/cypress/locators/HomePage.js index 0fbff3a4f3..4609932dcd 100644 --- a/app/client/cypress/locators/HomePage.js +++ b/app/client/cypress/locators/HomePage.js @@ -13,7 +13,7 @@ export default { duplicateApp: "[data-cy=t--duplicate]", forkAppFromMenu: "[data-cy=t--fork-app]", exportAppFromMenu: "[data-cy=t--export-app]", - forkAppOrgButton: ".t--fork-app-to-org-button", + forkAppWorkspaceButton: ".t--fork-app-to-workspace-button", selectAction: "#Base", deleteApp: "[data-cy=t--delete]", createNewAppButton: ".t--new-button", @@ -21,13 +21,13 @@ export default { homeIcon: ".t--appsmith-logo", inputAppName: "input[name=applicationName]", createNew: ".createnew", - createOrg: "span:contains('New Organization')", - inputOrgName: "//input[@name='name']", + createWorkspace: "span:contains('New Organization')", + inputWorkspaceName: "//input[@name='name']", submitBtn: "//span[text()='Submit']", - orgMenu: "//span[text()='TestShareOrg']", + workspaceMenu: "//span[text()='TestShareOrg']", members: "//span[contains(text(),'Members')]", share: "//span[contains(text(),'Share')]", - OrgSettings: "//span[contains(text(),'Organization Settings')]", + WorkspaceSettings: "//span[contains(text(),'Organization Settings')]", MemberSettings: "//span[contains(text(),'Members')]", inviteUser: "//span[text()='Invite Users']", inviteUserMembersPage: "[data-cy=t--invite-users]", @@ -49,11 +49,11 @@ export default { appsContainer: ".t--applications-container", appHome: "//a[@href='/applications']", emailList: "[data-colindex='0']", - orgList: ".t--org-section:contains(", - orgSectionBtn: ".t--org-section .bp3-button", - shareOrg: ") button:contains('Share')", - orgSection: "a:contains(", - createAppFrOrg: ") .t--new-button", + workspaceList: ".t--workspace-section:contains(", + workspaceSectionBtn: ".t--workspace-section .bp3-button", + shareWorkspace: ") button:contains('Share')", + workspaceSection: "a:contains(", + createAppFrWorkspace: ") .t--new-button", shareApp: ".t--application-share-btn", enablePublicAccess: ".t--share-public-toggle .slider", closeBtn: ".bp3-dialog-close-button", @@ -68,20 +68,20 @@ export default { applicationIconSelector: ".t--icon-not-selected", applicationColorSelector: ".t--color-not-selected", applicationBackgroundColor: ".t--application-card-background", - orgSettingOption: "[data-cy=t--org-setting]", - orgImportAppOption: "[data-cy=t--org-import-app]", - orgImportAppModal: ".t--import-application-modal", - orgImportAppButton: "[data-cy=t--org-import-app-button]", - leaveOrgConfirmModal: ".t--member-delete-confirmation-modal", - leaveOrgConfirmButton: "[data-cy=t--org-leave-button]", - orgNameInput: "[data-cy=t--org-name-input]", - renameOrgInput: "[data-cy=t--org-rename-input]", - orgEmailInput: "[data-cy=t--org-email-input]", - orgWebsiteInput: "[data-cy=t--org-website-input]", - orgHeaderName: ".t--organization-header", + workspaceSettingOption: "[data-cy=t--workspace-setting]", + workspaceImportAppOption: "[data-cy=t--workspace-import-app]", + workspaceImportAppModal: ".t--import-application-modal", + workspaceImportAppButton: "[data-cy=t--workspace-import-app-button]", + leaveWorkspaceConfirmModal: ".t--member-delete-confirmation-modal", + leaveWorkspaceConfirmButton: "[data-cy=t--workspace-leave-button]", + workspaceNameInput: "[data-cy=t--workspace-name-input]", + renameWorkspaceInput: "[data-cy=t--workspace-rename-input]", + workspaceEmailInput: "[data-cy=t--workspace-email-input]", + workspaceWebsiteInput: "[data-cy=t--workspace-website-input]", + workspaceHeaderName: ".t--workspace-header", leftPanelContainer: "[data-cy=t--left-panel]", themeText: "label div", - shareUserIcons: ".org-share-user-icons", + shareUserIcons: ".workspace-share-user-icons", toastMessage: ".t--toast-action", uploadLogo: "//div/form/input", removeLogo: ".remove-button a span", @@ -89,10 +89,10 @@ export default { membersTab: "//li//span[text()='Members']", cancelBtn: "//span[text()='Cancel']", submit: "button:contains('Submit')", - orgNamePopover: ".t--org-name", - orgNamePopoverContent: ".bp3-popover-content", - orgCompleteSection: ".t--org-section", - orgNameText: ".t--org-name-text", + workspaceNamePopover: ".t--workspace-name", + workspaceNamePopoverContent: ".bp3-popover-content", + workspaceCompleteSection: ".t--workspace-section", + workspaceNameText: ".t--workspace-name-text", optionsIcon: ".t--options-icon", reconnectDatasourceModal: ".reconnect-datasource-modal", importAppProgressWrapper: ".t-import-app-progress-wrapper", diff --git a/app/client/cypress/manual_TestSuite/CommentedScriptFiles/App_Theming_New_spec.js b/app/client/cypress/manual_TestSuite/CommentedScriptFiles/App_Theming_New_spec.js index 8efd265a9f..de41ca0cdf 100644 --- a/app/client/cypress/manual_TestSuite/CommentedScriptFiles/App_Theming_New_spec.js +++ b/app/client/cypress/manual_TestSuite/CommentedScriptFiles/App_Theming_New_spec.js @@ -750,7 +750,7 @@ // //Resetting back to theme // ee.NavigateToSwitcher('explorer') -// ee.expandCollapseEntity("WIDGETS")//to expand widgets +// ee.ExpandCollapseEntity("WIDGETS")//to expand widgets // ee.SelectEntityByName("Button2") // cy.get(".t--property-control-buttoncolor .reset-button") // .then($elem => { diff --git a/app/client/cypress/manual_TestSuite/Duplicate_App_Spec.js b/app/client/cypress/manual_TestSuite/Duplicate_App_Spec.js index 45df24c373..094696e7b2 100644 --- a/app/client/cypress/manual_TestSuite/Duplicate_App_Spec.js +++ b/app/client/cypress/manual_TestSuite/Duplicate_App_Spec.js @@ -43,6 +43,6 @@ describe("Duplicate an application must duplicate every API ,Query widget and Da // Ensure App is created with App name prefixed with Copy // Click on Delete option of Duplicate Application // Click on "Are You Sure?" option - // Ensure only Duplicate Application is deleted and not the Orginal application + // Ensure only Duplicate Application is deleted and not the Workspace application }); }); diff --git a/app/client/cypress/manual_TestSuite/Invite_flow_Spec.js b/app/client/cypress/manual_TestSuite/Invite_flow_Spec.js index c69327d2df..648a8e2ac4 100644 --- a/app/client/cypress/manual_TestSuite/Invite_flow_Spec.js +++ b/app/client/cypress/manual_TestSuite/Invite_flow_Spec.js @@ -14,20 +14,20 @@ describe("adding role without Email Id", function() { // Select the "Role" // Ensure the "Invite" option is "Inactive" and error message is displayed to user }); - it("Clicking on the organisation list the user must be lead to organisation Station ", function() { + it("Clicking on the workspace list the user must be lead to workspace Station ", function() { // Navigate to Home Page - // Navigate to Organisation list - // Click on one of the organisation name - // Ensure user is directed to the organisation + // Navigate to Workspace list + // Click on one of the workspace name + // Ensure user is directed to the workspace }); it("Admin can only assign another Admin ", function() { - // Navigate to Organisation Setting + // Navigate to Workspace Setting // Navigate to Members // Navigate to roles // Ensure your also an "Admin" // Change the role "Admin" }); - it("Ensure the user can not delete or create an application in the organisation", function() { + it("Ensure the user can not delete or create an application in the workspace", function() { // Navigate to Home page // Navigate to Members // Navigate to roles diff --git a/app/client/cypress/manual_TestSuite/Org_Logo_Del.js b/app/client/cypress/manual_TestSuite/Org_Logo_Del.js deleted file mode 100644 index da75820294..0000000000 --- a/app/client/cypress/manual_TestSuite/Org_Logo_Del.js +++ /dev/null @@ -1,14 +0,0 @@ -import homePage from "../../../locators/HomePage"; - -describe("Deletion of organisational Logo ", function() { - it(" org logo upload ", function() { - //Click on the dropdown next to organisational Name - // Navigate between tabs - // Naviagte to General Tab - // Add an Organisational Logo - // Wait until it loads - // Switch between Tabs - // Click on the remove Icon - //Ensure the organisational Logo is deleted - }); -}); diff --git a/app/client/cypress/manual_TestSuite/Workspace_Logo_Del.js b/app/client/cypress/manual_TestSuite/Workspace_Logo_Del.js new file mode 100644 index 0000000000..b4d7c63201 --- /dev/null +++ b/app/client/cypress/manual_TestSuite/Workspace_Logo_Del.js @@ -0,0 +1,14 @@ +import homePage from "../../../locators/HomePage"; + +describe("Deletion of workspace Logo ", function() { + it(" workspace logo upload ", function() { + //Click on the dropdown next to workspace Name + // Navigate between tabs + // Naviagte to General Tab + // Add an workspace Logo + // Wait until it loads + // Switch between Tabs + // Click on the remove Icon + //Ensure the workspace Logo is deleted + }); +}); diff --git a/app/client/cypress/manual_TestSuite/Org_Logo_Set.js b/app/client/cypress/manual_TestSuite/Workspace_Logo_Set.js similarity index 59% rename from app/client/cypress/manual_TestSuite/Org_Logo_Set.js rename to app/client/cypress/manual_TestSuite/Workspace_Logo_Set.js index 17d0693011..babcf3fa74 100644 --- a/app/client/cypress/manual_TestSuite/Org_Logo_Set.js +++ b/app/client/cypress/manual_TestSuite/Workspace_Logo_Set.js @@ -1,11 +1,11 @@ import homePage from "../../../locators/HomePage"; -describe("insert organisational Logo ", function() { - it(" org logo upload ", function() { - //Click on the dropdown next to organisational Name +describe("insert workspace Logo ", function() { + it(" workspace logo upload ", function() { + //Click on the dropdown next to workspace Name // Navigate between tabs // Naviagte to General Tab - // Add an Organisational Logo + // Add an workspace Logo //Wait until it loads // Switch between Tabs // Navigate to General Tab and ensure the logo exsits diff --git a/app/client/cypress/manual_TestSuite/Organisation_Name_Spec.js b/app/client/cypress/manual_TestSuite/Workspace_Name_Spec.js similarity index 75% rename from app/client/cypress/manual_TestSuite/Organisation_Name_Spec.js rename to app/client/cypress/manual_TestSuite/Workspace_Name_Spec.js index 4b65a4c209..e80c6dff3d 100644 --- a/app/client/cypress/manual_TestSuite/Organisation_Name_Spec.js +++ b/app/client/cypress/manual_TestSuite/Workspace_Name_Spec.js @@ -1,9 +1,9 @@ import homePage from "../../../locators/HomePage"; -describe("Checking for error message on Organisation Name ", function() { +describe("Checking for error message on Workspace Name ", function() { it("Ensure of Inactive Submit button ", function() { // Navigate to home Page - // Click on Create Organisation + // Click on Create workspace // Type "Space" as first character // Ensure "Submit" button does not get Active // Now click on "X" (Close icon) ensure the pop up closes @@ -14,35 +14,35 @@ describe("Checking for error message on Organisation Name ", function() { // Add some widgets // Navigate back to the application // Delete the Application - // Click on "Create New" option under same organisation + // Click on "Create New" option under same workspace // Enter the name "XYZ" // Ensure the application can be created with the same name }); it("Adding Special Character ", function() { // Navigate to home Page - // Click on Create Organisation + // Click on Create workspace // Add special as first character // Ensure "Submit" get Active // Now click outside and ensure the pop up closes }); - it("Reuse the name of the deleted application name on the other organisation", function() { + it("Reuse the name of the deleted application name on the other workspace", function() { // Navigate to home Page // Create an Application by name "XYZ" // Add some widgets // Navigate back to the application // Delete the Application - // Click on "Create New" option under different organisation + // Click on "Create New" option under different workspace // Enter the name "XYZ" // Ensure the application can be created with the same name }); - it("User must not be able to add empty organisation name", function() { + it("User must not be able to add empty workspace name", function() { // Navigate to home Page // Click on the "Create Organisation" button // Ensure "Organisation Name" field is empty // Ensure "Submit" is inactive }); - it("Cancel creating an Organisation when the Organisation name is empty", function() { + it("Cancel creating an Workspace when the Workspace name is empty", function() { // Navigate to home Page // Click on the "Create Organisation" button // Ensure "Organisation Name" field is empty @@ -50,7 +50,7 @@ describe("Checking for error message on Organisation Name ", function() { // Observe the organisation is not created }); - it("Cancel creating an Organisation when the Organisation name is dually filled", function() { + it("Cancel creating an Workspace when the Workspace name is dually filled", function() { // Navigate to home Page // Click on the "Create Organisation" button // Ensure "Organisation Name" field is enterd respectively diff --git a/app/client/cypress/support/Objects/CommonLocators.ts b/app/client/cypress/support/Objects/CommonLocators.ts index a82ae0100e..6a6b591840 100644 --- a/app/client/cypress/support/Objects/CommonLocators.ts +++ b/app/client/cypress/support/Objects/CommonLocators.ts @@ -71,4 +71,7 @@ export class CommonLocators { _jsonFormWidget = ".t--widget-jsonformwidget" _lintErrorElement = `span.CodeMirror-lint-mark-error` _datePicker = (date: number) => "//div[@class ='bp3-datepicker']//div[@class = 'DayPicker-Day']//div[text()='" + date + "']"; + _inputWidgetValueField= (fieldName: string, input : boolean = true) => `//label[contains(@class, 't--input-widget-label')][text()='${fieldName}']/ancestor::div[@data-testid='input-container']//${input ? "input" : "textarea"}` + _deleteIcon = "button .bp3-icon-delete"; + } diff --git a/app/client/cypress/support/Pages/AggregateHelper.ts b/app/client/cypress/support/Pages/AggregateHelper.ts index 9ed01c1e97..9e757d7547 100644 --- a/app/client/cypress/support/Pages/AggregateHelper.ts +++ b/app/client/cypress/support/Pages/AggregateHelper.ts @@ -17,19 +17,19 @@ const DEFAULT_ENTERVALUE_OPTIONS = { export class AggregateHelper { private locator = ObjectsRegistry.CommonLocators; - public saveLocalStorageCache() { + public SaveLocalStorageCache() { Object.keys(localStorage).forEach((key) => { LOCAL_STORAGE_MEMORY[key] = localStorage[key]; }); } - public restoreLocalStorageCache() { + public RestoreLocalStorageCache() { Object.keys(LOCAL_STORAGE_MEMORY).forEach((key) => { localStorage.setItem(key, LOCAL_STORAGE_MEMORY[key]); }); } - public clearLocalStorageCache() { + public ClearLocalStorageCache() { localStorage.clear(); LOCAL_STORAGE_MEMORY = {}; } @@ -417,11 +417,11 @@ export class AggregateHelper { } } - public NavigateBacktoEditor() { - cy.get(this.locator._backToEditor).click(); - this.Sleep(2000); - localStorage.setItem("inDeployedMode", "false"); - } + // public NavigateBacktoEditor() { + // cy.get(this.locator._backToEditor).click(); + // this.Sleep(2000); + // localStorage.setItem("inDeployedMode", "false"); + // } public GenerateUUID() { let id = uuid.v4(); @@ -511,6 +511,18 @@ export class AggregateHelper { this.AssertAutoSave(); } + public EnterInputText(name: string, input: string, toClear = false, isInput = true) { + toClear && this.ClearInputText(name) + cy.xpath(this.locator._inputWidgetValueField(name, isInput)) + .trigger('click') + .type(input); + } + + public ClearInputText(name: string, isInput = true) { + cy.xpath(this.locator._inputWidgetValueField(name, isInput)) + .clear(); + } + public UpdateCodeInput(selector: string, value: string) { cy.wrap(selector) .find(".CodeMirror") diff --git a/app/client/cypress/support/Pages/ApiPage.ts b/app/client/cypress/support/Pages/ApiPage.ts index a928b6f145..a1b6f51f68 100644 --- a/app/client/cypress/support/Pages/ApiPage.ts +++ b/app/client/cypress/support/Pages/ApiPage.ts @@ -170,7 +170,7 @@ export class ApiPage { this.SelectPaneTab("Headers"); } - OnPageLoadRun(enable = true || false) { + ToggleOnPageLoadRun(enable = true || false) { this.SelectPaneTab("Settings"); if (enable) cy.get(this._onPageLoad).check({ @@ -182,7 +182,7 @@ export class ApiPage { }); } - ConfirmBeforeRunningApi(enable = true || false) { + ToggleConfirmBeforeRunningApi(enable = true || false) { this.SelectPaneTab("Settings"); if (enable) cy.get(this._confirmBeforeRunningAPI).check({ diff --git a/app/client/cypress/support/Pages/DataSources.ts b/app/client/cypress/support/Pages/DataSources.ts index 158afde0a2..8975dd0acf 100644 --- a/app/client/cypress/support/Pages/DataSources.ts +++ b/app/client/cypress/support/Pages/DataSources.ts @@ -57,6 +57,9 @@ export class DataSources { "//div/span[text()='Result:']/span[contains(text(),'" + recordCount + " Record')]"; + _noRecordFound = "span[data-testid='no-data-table-message']"; + _usePreparedStatement = + "input[name='actionConfiguration.pluginSpecifiedTemplates[0].value'][type='checkbox']"; public StartDataSourceRoutes() { cy.intercept("PUT", "/api/v1/datasources/*").as("saveDatasource"); @@ -352,4 +355,17 @@ export class DataSources { .then(($header: any) => expect($header).to.eq(jsonHeaderString)); }); } + + public ToggleUsePreparedStatement(enable = true || false) { + if (enable) + cy.get(this._usePreparedStatement).check({ + force: true, + }); + else + cy.get(this._usePreparedStatement).uncheck({ + force: true, + }); + + this.agHelper.AssertAutoSave(); + } } diff --git a/app/client/cypress/support/Pages/DeployModeHelper.ts b/app/client/cypress/support/Pages/DeployModeHelper.ts index 20801d432a..27d7670f54 100644 --- a/app/client/cypress/support/Pages/DeployModeHelper.ts +++ b/app/client/cypress/support/Pages/DeployModeHelper.ts @@ -54,6 +54,12 @@ export class DeployMode { }); } + public NavigateBacktoEditor() { + cy.get(this.locator._backToEditor).click(); + this.agHelper.Sleep(2000); + localStorage.setItem("inDeployedMode", "false"); + } + public EnterJSONInputValue(fieldName: string, value: string, index = 0) { cy.xpath(this._jsonFormFieldByName(fieldName)) .eq(index) diff --git a/app/client/cypress/support/Pages/EntityExplorer.ts b/app/client/cypress/support/Pages/EntityExplorer.ts index 865495b473..6253a5904d 100644 --- a/app/client/cypress/support/Pages/EntityExplorer.ts +++ b/app/client/cypress/support/Pages/EntityExplorer.ts @@ -40,12 +40,17 @@ export class EntityExplorer { "']/ancestor::div[contains(@class, 't--entity-item')]//div[contains(@class, 't--template-menu-trigger')]"; private _templateMenuItem = (menuItem: string) => "//div[contains(@class, 'bp3-popover-dismiss')][text()='" + menuItem + "']"; + private _moreOptionsPopover = + "//*[local-name()='g' and @id='Icon/Outline/more-vertical']"; + private _pageClone = ".single-select >div:contains('Clone')"; + private getPageLocator = (pageName: string) => + `.t--entity-name:contains(${pageName})`; public SelectEntityByName( entityNameinLeftSidebar: string, section: "WIDGETS" | "QUERIES/JS" | "DATASOURCES" | "" = "", ) { - if (section) this.expandCollapseEntity(section); //to expand respective section + if (section) this.ExpandCollapseEntity(section); //to expand respective section cy.xpath(this._entityNameInExplorer(entityNameinLeftSidebar)) .last() .click({ multiple: true }); @@ -76,7 +81,7 @@ export class EntityExplorer { ); } - public expandCollapseEntity(entityName: string, expand = true) { + public ExpandCollapseEntity(entityName: string, expand = true) { cy.xpath(this._expandCollapseArrow(entityName)) .invoke("attr", "name") .then((arrow) => { @@ -134,4 +139,18 @@ export class EntityExplorer { this.agHelper.AssertAutoSave(); //settling time for widget on canvas! cy.get(this.locator._widgetInCanvas(widgetType)).should("exist"); } + + public ClonePage(pageName = "Page1") { + this.ExpandCollapseEntity("PAGES") + cy.get(this.getPageLocator(pageName)) + .trigger("mouseover") + .click({ force: true }); + cy.xpath(this._moreOptionsPopover) + .first() + .should("be.hidden") + .invoke("show") + .click({ force: true }); + cy.get(this._pageClone).click({ force: true }); + this.agHelper.ValidateNetworkStatus("@clonePage", 201); + } } diff --git a/app/client/cypress/support/Pages/HomePage.ts b/app/client/cypress/support/Pages/HomePage.ts index 6bca4a7bf9..15e0e33d15 100644 --- a/app/client/cypress/support/Pages/HomePage.ts +++ b/app/client/cypress/support/Pages/HomePage.ts @@ -1,276 +1,343 @@ -import { ObjectsRegistry } from "../Objects/Registry" +import { ObjectsRegistry } from "../Objects/Registry"; export class HomePage { + private agHelper = ObjectsRegistry.AggregateHelper; + private locator = ObjectsRegistry.CommonLocators; - private agHelper = ObjectsRegistry.AggregateHelper; - private locator = ObjectsRegistry.CommonLocators; + private _username = "input[name='username']"; + private _password = "input[name='password']"; + private _submitBtn = "button[type='submit']"; + private _workspaceCompleteSection = ".t--workspace-section"; + private _workspaceName = ".t--workspace-name"; + private _optionsIcon = ".t--options-icon"; + private _renameWorkspaceInput = "[data-cy=t--workspace-rename-input]"; + private _workspaceList = (workspaceName: string) => + ".t--workspace-section:contains(" + workspaceName + ")"; + private _workspaceShareUsersIcon = (workspaceName: string) => + ".t--workspace-section:contains(" + + workspaceName + + ") .workspace-share-user-icons"; + private _shareWorkspace = (workspaceName: string) => + ".t--workspace-section:contains(" + + workspaceName + + ") button:contains('Share')"; + private _email = "//input[@type='email']"; + _visibleTextSpan = (spanText: string) => "//span[text()='" + spanText + "']"; + private _userRole = (role: string) => + "//div[contains(@class, 'label-container')]//span[1][text()='" + + role + + "']"; + private _manageUsers = ".manageUsers"; + private _appHome = "//a[@href='/applications']"; + _applicationCard = ".t--application-card"; + private _homeIcon = ".t--appsmith-logo"; + private _appContainer = ".t--applications-container"; + private _homePageAppCreateBtn = this._appContainer + " .createnew"; + private _newWorkspaceCreateNewApp = (newWorkspaceName: string) => + "//span[text()='" + + newWorkspaceName + + "']/ancestor::div[contains(@class, 't--workspace-name-text')]/parent::div/following-sibling::div//button[contains(@class, 't--new-button')]"; + private _existingWorkspaceCreateNewApp = (existingWorkspaceName: string) => + "//span[text()='" + + existingWorkspaceName + + "']/ancestor::div[contains(@class, 't--workspace-name-text')]/following-sibling::div//button[contains(@class, 't--new-button')]"; + private _applicationName = ".t--application-name"; + private _editAppName = "bp3-editable-text-editing"; + private _appMenu = ".t--editor-appname-menu-portal .bp3-menu-item"; + private _buildFromScratchActionCard = ".t--BuildFromScratch"; + _buildFromDataTableActionCard = ".t--GenerateCRUDPage"; + private _selectRole = "//span[text()='Select a role']/ancestor::div"; + private _searchInput = "input[type='text']"; + _appHoverIcon = (action: string) => ".t--application-" + action + "-link"; + private _deleteUser = (email: string) => + "//td[text()='" + + email + + "']/following-sibling::td//span[contains(@class, 't--deleteUser')]"; + private _userRoleDropDown = (email: string, role: string) => + "//td[text()='" + + email + + "']/following-sibling::td//span[text()='" + + role + + "']"; + //private _userRoleDropDown = (email: string) => "//td[text()='" + email + "']/following-sibling::td" + private _leaveWorkspaceConfirmModal = ".t--member-delete-confirmation-modal"; + private _workspaceImportAppModal = ".t--import-application-modal"; + private _leaveWorkspaceConfirmButton = + "[data - cy= t--workspace-leave - button]"; + private _lastWorkspaceInHomePage = + "//div[contains(@class, 't--workspace-section')][last()]//span/span"; + _editPageLanding = "//h2[text()='Drag and drop a widget here']"; + _usersEmailList = "[data-colindex='1']"; + private _workspaceImport = "[data-cy=t--workspace-import-app]"; + private _uploadFile = "//div/form/input"; - private _username = "input[name='username']" - private _password = "input[name='password']" - private _submitBtn = "button[type='submit']" - private _orgCompleteSection = ".t--org-section" - private _orgName = ".t--org-name" - private _optionsIcon = ".t--options-icon" - private _renameOrgInput = "[data-cy=t--org-rename-input]" - private _orgList = (orgName: string) => ".t--org-section:contains(" + orgName + ")" - private _orgShareUsersIcon = (orgName: string) => ".t--org-section:contains(" + orgName + ") .org-share-user-icons" - private _shareOrg = (orgName: string) => ".t--org-section:contains(" + orgName + ") button:contains('Share')" - private _email = "//input[@type='email']" - _visibleTextSpan = (spanText: string) => "//span[text()='" + spanText + "']" - private _userRole = (role: string) => "//div[contains(@class, 'label-container')]//span[1][text()='" + role + "']" - private _manageUsers = ".manageUsers" - private _appHome = "//a[@href='/applications']" - _applicationCard = ".t--application-card" - private _homeIcon = ".t--appsmith-logo" - private _appContainer = ".t--applications-container" - private _homePageAppCreateBtn = this._appContainer + " .createnew" - private _newOrganizationCreateNewApp = (newOrgName: string) => "//span[text()='" + newOrgName + "']/ancestor::div[contains(@class, 't--org-name-text')]/parent::div/following-sibling::div//button[contains(@class, 't--new-button')]" - private _existingOrganizationCreateNewApp = (existingOrgName: string) => "//span[text()='" + existingOrgName + "']/ancestor::div[contains(@class, 't--org-name-text')]/following-sibling::div//button[contains(@class, 't--new-button')]" - private _applicationName = ".t--application-name" - private _editAppName = "bp3-editable-text-editing" - private _appMenu = ".t--editor-appname-menu-portal .bp3-menu-item" - private _buildFromScratchActionCard = ".t--BuildFromScratch" - _buildFromDataTableActionCard = ".t--GenerateCRUDPage" - private _selectRole = "//span[text()='Select a role']/ancestor::div" - private _searchInput = "input[type='text']" - _appHoverIcon = (action: string) => ".t--application-" + action + "-link" - private _deleteUser = (email: string) => "//td[text()='" + email + "']/following-sibling::td//span[contains(@class, 't--deleteUser')]" - private _userRoleDropDown = (email: string, role: string) => "//td[text()='" + email + "']/following-sibling::td//span[text()='" + role + "']" - //private _userRoleDropDown = (email: string) => "//td[text()='" + email + "']/following-sibling::td" - private _leaveOrgConfirmModal = ".t--member-delete-confirmation-modal" - private _orgImportAppModal = ".t--import-application-modal" - private _leaveOrgConfirmButton = "[data - cy= t--org-leave - button]" - private _lastOrgInHomePage = "//div[contains(@class, 't--org-section')][last()]//span/span" - _editPageLanding = "//h2[text()='Drag and drop a widget here']" - _usersEmailList = "[data-colindex='1']" - private _orgImport = "[data-cy=t--org-import-app]" - private _uploadFile = "//div/form/input" + public CreateNewWorkspace(workspaceNewName: string) { + let oldName: string = ""; + cy.xpath(this._visibleTextSpan("New Organization")) + .should("be.visible") + .first() + .click({ force: true }); + cy.wait("@createWorkspace"); + this.agHelper.Sleep(2000); + cy.xpath(this._lastWorkspaceInHomePage) + .first() + .then(($ele) => { + oldName = $ele.text(); + cy.log("oldName is : " + oldName); + this.RenameWorkspace(oldName, workspaceNewName); + }); + } - public CreateNewOrg(orgNewName: string) { - let oldName: string = "" - cy.xpath(this._visibleTextSpan('New Organization')) - .should("be.visible") - .first() - .click({ force: true }); - cy.wait("@createOrg") - this.agHelper.Sleep(2000) - cy.xpath(this._lastOrgInHomePage).first().then($ele => { - oldName = $ele.text(); - cy.log("oldName is : " + oldName); - this.RenameOrg(oldName, orgNewName); - }) - } + public RenameWorkspace(workspaceName: string, newWorkspaceName: string) { + cy.contains(workspaceName) + .closest(this._workspaceCompleteSection) + .find(this._workspaceName) + .find(this._optionsIcon) + .click({ force: true }); + cy.get(this._renameWorkspaceInput) + .should("be.visible") + .type(newWorkspaceName.concat("{enter}")); + this.agHelper.Sleep(2000); + cy.wait("@updateWorkspace").should( + "have.nested.property", + "response.body.responseMeta.status", + 200, + ); + cy.contains(newWorkspaceName); + } - public RenameOrg(orgName: string, newOrgName: string) { - cy.contains(orgName) - .closest(this._orgCompleteSection) - .find(this._orgName) - .find(this._optionsIcon) - .click({ force: true }); - cy.get(this._renameOrgInput) - .should("be.visible") - .type(newOrgName.concat("{enter}")); - this.agHelper.Sleep(2000) - cy.wait("@updateOrganization").should( - "have.nested.property", - "response.body.responseMeta.status", - 200, - ); - cy.contains(newOrgName); - } + //Maps to CheckShareIcon in command.js + public CheckWorkspaceShareUsersCount(workspaceName: string, count: number) { + cy.get(this._workspaceList(workspaceName)) + .scrollIntoView() + .should("be.visible"); + cy.get(this._workspaceShareUsersIcon(workspaceName)).should( + "have.length", + count, + ); + } - //Maps to CheckShareIcon in command.js - public CheckOrgShareUsersCount(orgName: string, count: number) { - cy.get(this._orgList(orgName)) - .scrollIntoView() - .should("be.visible"); - cy.get(this._orgShareUsersIcon(orgName)).should("have.length", count); - } + //Maps to inviteUserForWorkspace in command.js + public InviteUserToWorkspace( + workspaceName: string, + email: string, + role: string, + ) { + const successMessage = "The user has been invited successfully"; + this.StubPostHeaderReq(); + cy.get(this._workspaceList(workspaceName)) + .scrollIntoView() + .should("be.visible"); + cy.get(this._shareWorkspace(workspaceName)) + .first() + .should("be.visible") + .click({ force: true }); + cy.xpath(this._email) + .click({ force: true }) + .type(email); + cy.xpath(this._selectRole) + .first() + .click({ force: true }); + this.agHelper.Sleep(500); + cy.xpath(this._userRole(role)).click({ force: true }); + this.agHelper.ClickButton("Invite"); + cy.wait("@mockPostInvite") + .its("request.headers") + .should("have.property", "origin", "Cypress"); + cy.contains(email, { matchCase: false }); + cy.contains(successMessage); + } - //Maps to inviteUserForOrg in command.js - public InviteUserToOrg(orgName: string, email: string, role: string) { - const successMessage = "The user has been invited successfully"; - this.stubPostHeaderReq(); - cy.get(this._orgList(orgName)) - .scrollIntoView() - .should("be.visible"); - cy.get(this._shareOrg(orgName)) - .first() - .should("be.visible") - .click({ force: true }); - cy.xpath(this._email) - .click({ force: true }) - .type(email); - cy.xpath(this._selectRole).first().click({ force: true }); - this.agHelper.Sleep(500) - cy.xpath(this._userRole(role)).click({ force: true }); - this.agHelper.ClickButton('Invite') - cy.wait("@mockPostInvite") - .its("request.headers") - .should("have.property", "origin", "Cypress"); - cy.contains(email, { matchCase: false }); - cy.contains(successMessage); - } + public StubPostHeaderReq() { + cy.intercept("POST", "/api/v1/users/invite", (req) => { + req.headers["origin"] = "Cypress"; + }).as("mockPostInvite"); + } - public stubPostHeaderReq() { - cy.intercept("POST", "/api/v1/users/invite", (req) => { req.headers["origin"] = "Cypress"; }).as("mockPostInvite"); - } + public NavigateToHome() { + cy.get(this._homeIcon).click({ force: true }); + this.agHelper.Sleep(3000); + //cy.wait("@applications"); this randomly fails & introduces flakyness hence commenting! + cy.get(this._homePageAppCreateBtn) + .should("be.visible") + .should("be.enabled"); + } - public NavigateToHome() { - cy.get(this._homeIcon).click({ force: true }); - this.agHelper.Sleep(3000) - //cy.wait("@applications"); this randomly fails & introduces flakyness hence commenting! - cy.get(this._homePageAppCreateBtn).should("be.visible").should("be.enabled"); - } + public CreateNewApplication() { + cy.get(this._homePageAppCreateBtn) + .first() + .click({ force: true }); + this.agHelper.ValidateNetworkStatus("@createNewApplication", 201); + cy.get(this.locator._loading).should("not.exist"); + } - public CreateNewApplication() { - cy.get(this._homePageAppCreateBtn).first().click({ force: true }) - this.agHelper.ValidateNetworkStatus("@createNewApplication", 201) - cy.get(this.locator._loading).should("not.exist"); - } + //Maps to CreateAppForWorkspace in command.js + public CreateAppInWorkspace(workspaceName: string, appname: string) { + cy.xpath(this._newWorkspaceCreateNewApp(workspaceName)) + .scrollIntoView() + .should("be.visible") + .click({ force: true }); + cy.wait("@createNewApplication").should( + "have.nested.property", + "response.body.responseMeta.status", + 201, + ); + cy.get(this.locator._loading).should("not.exist"); + this.agHelper.Sleep(2000); + this.RenameApplication(appname); + cy.get(this._buildFromScratchActionCard).click(); + cy.wait("@updateApplication").should( + "have.nested.property", + "response.body.responseMeta.status", + 200, + ); + } - //Maps to CreateAppForOrg in command.js - public CreateAppInOrg(orgName: string, appname: string) { - cy.xpath(this._newOrganizationCreateNewApp(orgName)) - .scrollIntoView() - .should("be.visible") - .click({ force: true }); - cy.wait("@createNewApplication").should( - "have.nested.property", - "response.body.responseMeta.status", - 201, - ); - cy.get(this.locator._loading).should("not.exist"); - this.agHelper.Sleep(2000) - this.RenameApplication(appname) - cy.get(this._buildFromScratchActionCard).click(); - cy.wait("@updateApplication").should( - "have.nested.property", - "response.body.responseMeta.status", - 200, - ); - } + //Maps to AppSetupForRename in command.js + public RenameApplication(appName: string) { + cy.get(this._applicationName).then(($appName) => { + if (!$appName.hasClass(this._editAppName)) { + cy.get(this._applicationName).click(); + cy.get(this._appMenu) + .contains("Edit Name", { matchCase: false }) + .click(); + } + }); + cy.get(this._applicationName).type(appName + "{enter}"); + } - //Maps to AppSetupForRename in command.js - public RenameApplication(appName: string) { - cy.get(this._applicationName).then(($appName) => { - if (!$appName.hasClass(this._editAppName)) { - cy.get(this._applicationName).click(); - cy.get(this._appMenu) - .contains("Edit Name", { matchCase: false }) - .click(); - } - }); - cy.get(this._applicationName).type(appName + "{enter}"); - } + //Maps to LogOut in command.js + public LogOutviaAPI() { + cy.request("POST", "/api/v1/logout"); + this.agHelper.Sleep(); //for logout to complete! + } - //Maps to LogOut in command.js - public LogOutviaAPI() { - cy.request("POST", "/api/v1/logout"); - this.agHelper.Sleep()//for logout to complete! - } + public LogintoApp( + uname: string, + pswd: string, + role: "App Viewer" | "Developer" | "Administrator" = "Administrator", + ) { + this.agHelper.Sleep(); //waiting for window to load + cy.window() + .its("store") + .invoke("dispatch", { type: "LOGOUT_USER_INIT" }); + cy.wait("@postLogout"); + cy.visit("/user/login"); + cy.get(this._username) + .should("be.visible") + .type(uname); + cy.get(this._password).type(pswd, { log: false }); + cy.get(this._submitBtn).click(); + cy.wait("@getMe"); + this.agHelper.Sleep(3000); + if (role != "App Viewer") + cy.get(this._homePageAppCreateBtn) + .should("be.visible") + .should("be.enabled"); + } - public LogintoApp(uname: string, pswd: string, role: 'App Viewer' | 'Developer' | 'Administrator' = 'Administrator') { - this.agHelper.Sleep() //waiting for window to load - cy.window().its("store").invoke("dispatch", { type: "LOGOUT_USER_INIT" }); - cy.wait("@postLogout"); - cy.visit("/user/login"); - cy.get(this._username).should("be.visible").type(uname) - cy.get(this._password).type(pswd, {log: false}); - cy.get(this._submitBtn).click(); - cy.wait("@getMe"); - this.agHelper.Sleep(3000) - if (role != 'App Viewer') - cy.get(this._homePageAppCreateBtn).should("be.visible").should("be.enabled"); - } + public FilterApplication(appName: string, workspaceId: string) { + cy.get(this._searchInput).type(appName); + this.agHelper.Sleep(2000); + cy.get(this._appContainer).contains(workspaceId); + cy.xpath(this.locator._spanButton("Share")) + .first() + .should("be.visible"); + } - public FilterApplication(appName: string, orgId: string) { - cy.get(this._searchInput).type(appName); - this.agHelper.Sleep(2000) - cy.get(this._appContainer).contains(orgId); - cy.xpath(this.locator._spanButton('Share')) - .first() - .should("be.visible") - } + //Maps to launchApp in command.js + public LaunchAppFromAppHover() { + cy.get(this._appHoverIcon("view")) + .should("be.visible") + .first() + .click(); + cy.get(this.locator._loading).should("not.exist"); + cy.wait("@getPagesForViewApp").should( + "have.nested.property", + "response.body.responseMeta.status", + 200, + ); + } - //Maps to launchApp in command.js - public LaunchAppFromAppHover() { - cy.get(this._appHoverIcon('view')) - .should("be.visible") - .first() - .click(); - cy.get(this.locator._loading).should("not.exist"); - cy.wait("@getPagesForViewApp").should( - "have.nested.property", - "response.body.responseMeta.status", - 200, - ); - } + //Maps to deleteUserFromWorkspace in command.js + public DeleteUserFromWorkspace(workspaceName: string, email: string) { + cy.get(this._workspaceList(workspaceName)) + .scrollIntoView() + .should("be.visible"); + cy.contains(workspaceName) + .closest(this._workspaceCompleteSection) + .find(this._workspaceName) + .find(this._optionsIcon) + .click({ force: true }); + cy.xpath(this._visibleTextSpan("Members")).click({ force: true }); + cy.wait("@getMembers").should( + "have.nested.property", + "response.body.responseMeta.status", + 200, + ); + cy.get(this._deleteUser(email)) + .last() + .click({ force: true }); + cy.get(this._leaveWorkspaceConfirmModal).should("be.visible"); + cy.get(this._leaveWorkspaceConfirmButton).click({ force: true }); + this.NavigateToHome(); + } - //Maps to deleteUserFromOrg in command.js - public DeleteUserFromOrg(orgName: string, email: string) { - cy.get(this._orgList(orgName)) - .scrollIntoView() - .should("be.visible"); - cy.contains(orgName) - .closest(this._orgCompleteSection) - .find(this._orgName) - .find(this._optionsIcon) - .click({ force: true }); - cy.xpath(this._visibleTextSpan('Members')).click({ force: true }); - cy.wait("@getMembers").should( - "have.nested.property", - "response.body.responseMeta.status", - 200, - ); - cy.get(this._deleteUser(email)) - .last() - .click({ force: true }); - cy.get(this._leaveOrgConfirmModal).should("be.visible"); - cy.get(this._leaveOrgConfirmButton).click({ force: true }); - this.NavigateToHome() - } + public OpenMembersPageForWorkspace(workspaceName: string) { + cy.get(this._appContainer) + .contains(workspaceName) + .scrollIntoView() + .should("be.visible"); + cy.get(this._appContainer) + .contains(workspaceName) + .closest(this._workspaceCompleteSection) + .find(this._workspaceName) + .find(this._optionsIcon) + .click({ force: true }); + cy.xpath(this._visibleTextSpan("Members")) + .last() + .click({ force: true }); + cy.wait("@getMembers").should( + "have.nested.property", + "response.body.responseMeta.status", + 200, + ); + this.agHelper.Sleep(2500); //wait for members page to load! + } - public OpenMembersPageForOrg(orgName: string) { - cy.get(this._appContainer).contains(orgName) - .scrollIntoView() - .should("be.visible"); - cy.get(this._appContainer).contains(orgName) - .closest(this._orgCompleteSection) - .find(this._orgName) - .find(this._optionsIcon) - .click({ force: true }); - cy.xpath(this._visibleTextSpan('Members')).last().click({ force: true }); - cy.wait("@getMembers").should( - "have.nested.property", - "response.body.responseMeta.status", - 200, - ); - this.agHelper.Sleep(2500)//wait for members page to load! - } + public UpdateUserRoleInWorkspace( + workspaceName: string, + email: string, + currentRole: string, + newRole: string, + ) { + this.OpenMembersPageForWorkspace(workspaceName); + cy.xpath(this._userRoleDropDown(email, currentRole)) + .first() + .trigger("click"); + //cy.xpath(this._userRoleDropDown(email)).first().click({force: true}); + cy.xpath(this._visibleTextSpan(newRole)) + .last() + .click({ force: true }); + this.agHelper.Sleep(); + this.NavigateToHome(); + } - public UpdateUserRoleInOrg(orgName: string, email: string, currentRole: string, newRole: string) { - this.OpenMembersPageForOrg(orgName) - cy.xpath(this._userRoleDropDown(email, currentRole)).first().trigger('click'); - //cy.xpath(this._userRoleDropDown(email)).first().click({force: true}); - cy.xpath(this._visibleTextSpan(newRole)).last().click({ force: true }); - this.agHelper.Sleep() - this.NavigateToHome() - } + public ImportApp(fixtureJson: string) { + cy.get(this._homeIcon).click(); + cy.get(this._optionsIcon) + .first() + .click(); + cy.get(this._workspaceImport).click({ force: true }); + cy.get(this._workspaceImportAppModal).should("be.visible"); + cy.xpath(this._uploadFile) + .attachFile(fixtureJson) + .wait(500); + cy.get(this._workspaceImportAppModal).should("not.exist"); + } - public ImportApp(fixtureJson: string) { - cy.get(this._homeIcon).click(); - cy.get(this._optionsIcon).first().click(); - cy.get(this._orgImport).click({ force: true }); - cy.get(this._orgImportAppModal).should("be.visible"); - cy.xpath(this._uploadFile).attachFile(fixtureJson).wait(500); - cy.get(this._orgImportAppModal).should("not.exist"); - } - - public AssertImport() { - this.agHelper.ValidateToastMessage("Application imported successfully") - this.agHelper.Sleep(5000)//for imported app to settle! - cy.get(this.locator._loading).should("not.exist"); - } + public AssertImport() { + this.agHelper.ValidateToastMessage("Application imported successfully"); + this.agHelper.Sleep(5000); //for imported app to settle! + cy.get(this.locator._loading).should("not.exist"); + } } - - diff --git a/app/client/cypress/support/Pages/JSEditor.ts b/app/client/cypress/support/Pages/JSEditor.ts index 2e4328063e..37e92f5e18 100644 --- a/app/client/cypress/support/Pages/JSEditor.ts +++ b/app/client/cypress/support/Pages/JSEditor.ts @@ -19,9 +19,9 @@ export class JSEditor { public ee = ObjectsRegistry.EntityExplorer; //#region Element locators - private _runButton = "button.run-js-action"; - private _settingsTab = ".tab-title:contains('Settings')"; - private _codeTab = ".tab-title:contains('Code')"; + _runButton = "button.run-js-action"; + _settingsTab = ".tab-title:contains('Settings')"; + _codeTab = ".tab-title:contains('Code')"; private _jsObjectParseErrorCallout = "div.t--js-response-parse-error-call-out"; private _jsFunctionExecutionParseErrorCallout = @@ -78,7 +78,9 @@ export class JSEditor { "')]"; _funcDropdown = ".t--formActionButtons div[role='listbox']"; _funcDropdownOptions = ".ads-dropdown-options-wrapper div > div"; - + _getJSFunctionSettingsId = (JSFunctionName: string) => + `${JSFunctionName}-settings`; + _asyncJSFunctionSettings = `.t--async-js-function-settings`; //#endregion //#region constants @@ -282,7 +284,7 @@ export class JSEditor { this.agHelper.AssertAutoSave(); } - public RenameJSObjFromForm(renameVal: string) { + public RenameJSObjFromPane(renameVal: string) { cy.get(this._jsObjName).click({ force: true }); cy.get(this._jsObjTxt) .clear() @@ -307,7 +309,7 @@ export class JSEditor { .then((text) => cy.wrap(text).as("jsObjName")); } - public validateDefaultJSObjProperties(jsObjName: string) { + public ValidateDefaultJSObjProperties(jsObjName: string) { this.ee.ActionContextMenuByEntityName(jsObjName, "Show Bindings"); cy.get(this._propertyList).then(function($lis) { const bindingsLength = $lis.length; @@ -381,8 +383,8 @@ export class JSEditor { // Return to code tab this.agHelper.GetNClick(this._codeTab); } + /** - * There are two types of parse errors in the JS Editor 1. Parse errors that render the JS Object invalid and all functions unrunnable 2. Parse errors within functions that throw errors when executing those functions @@ -403,5 +405,12 @@ export class JSEditor { ).should(exists ? "exist" : "not.exist"); } + public SelectFunctionDropdown(funName: string) { + cy.get(this._funcDropdown).click(); + cy.get(this.locator._dropdownText) + .contains(funName) + .click(); + } + //#endregion } diff --git a/app/client/cypress/support/Pages/PropertyPane.ts b/app/client/cypress/support/Pages/PropertyPane.ts index 0669c11e0e..565813701a 100644 --- a/app/client/cypress/support/Pages/PropertyPane.ts +++ b/app/client/cypress/support/Pages/PropertyPane.ts @@ -40,6 +40,9 @@ export class PropertyPane { ".t--property-control-" + controlToToggle.replace(/ +/g, "").toLowerCase() + " input[type='checkbox']"; + _colorPickerV2Popover = ".t--colorpicker-v2-popover"; + _colorPickerV2Color = ".t--colorpicker-v2-color"; + _colorRing = ".border-2"; public OpenJsonFormFieldSettings(fieldName: string) { this.agHelper.GetNClick(this._fieldConfig(fieldName)); @@ -69,11 +72,21 @@ export class PropertyPane { public ChangeTheme(newTheme: string) { this.agHelper.GetNClick(this._changeThemeBtn, 0, true); this.agHelper.GetNClick(this._themeCard(newTheme)); - this.agHelper.ValidateToastMessage("Theme " + (newTheme == "Modern" ? "Default" : newTheme) + " Applied"); + this.agHelper.ValidateToastMessage("Theme " + newTheme + " Applied"); + } + + public ChangeColor( + colorIndex: number, + type: "Primary" | "Background" = "Primary", + ) { + const typeIndex = type == "Primary" ? 0 : 1; + this.agHelper.GetNClick(this._colorRing, typeIndex); + this.agHelper.GetNClick(this._colorPickerV2Popover); + this.agHelper.GetNClick(this._colorPickerV2Color, colorIndex); } public GetJSONFormConfigurationFileds() { - let fieldNames: string[] = []; + const fieldNames: string[] = []; let fieldInvokeValue: string; cy.xpath(this._jsonFieldConfigList).each(function($item) { cy.wrap($item) diff --git a/app/client/cypress/support/OrgCommands.js b/app/client/cypress/support/WorkspaceCommands.js similarity index 65% rename from app/client/cypress/support/OrgCommands.js rename to app/client/cypress/support/WorkspaceCommands.js index 7052303bf0..3f6807c2c9 100644 --- a/app/client/cypress/support/OrgCommands.js +++ b/app/client/cypress/support/WorkspaceCommands.js @@ -1,6 +1,6 @@ /* eslint-disable cypress/no-unnecessary-waiting */ /* eslint-disable cypress/no-assigning-return-values */ -/* Contains all methods related to Organisation features*/ +/* Contains all methods related to Workspace features*/ require("cy-verify-downloads").addCustomCommand(); require("cypress-file-upload"); @@ -14,39 +14,39 @@ export const initLocalstorage = () => { }); }; -Cypress.Commands.add("createOrg", () => { - cy.get(homePage.createOrg) +Cypress.Commands.add("createWorkspace", () => { + cy.get(homePage.createWorkspace) .should("be.visible") .first() .click({ force: true }); }); -Cypress.Commands.add("renameOrg", (orgName, newOrgName) => { - cy.contains(orgName) - .closest(homePage.orgCompleteSection) - .find(homePage.orgNamePopover) +Cypress.Commands.add("renameWorkspace", (workspaceName, newWorkspaceName) => { + cy.contains(workspaceName) + .closest(homePage.workspaceCompleteSection) + .find(homePage.workspaceNamePopover) .find(homePage.optionsIcon) .click({ force: true }); - cy.get(homePage.renameOrgInput) + cy.get(homePage.renameWorkspaceInput) .should("be.visible") - .type(newOrgName.concat("{enter}")); + .type(newWorkspaceName.concat("{enter}")); cy.wait(3000); //cy.get(commonlocators.homeIcon).click({ force: true }); - cy.wait("@updateOrganization").should( + cy.wait("@updateWorkspace").should( "have.nested.property", "response.body.responseMeta.status", 200, ); - cy.contains(newOrgName); + cy.contains(newWorkspaceName); }); -Cypress.Commands.add("navigateToOrgSettings", (orgName) => { - cy.get(homePage.orgList.concat(orgName).concat(")")) +Cypress.Commands.add("navigateToWorkspaceSettings", (workspaceName) => { + cy.get(homePage.workspaceList.concat(workspaceName).concat(")")) .scrollIntoView() .should("be.visible"); - cy.get(homePage.orgList.concat(orgName).concat(")")) - .closest(homePage.orgCompleteSection) - .find(homePage.orgNamePopover) + cy.get(homePage.workspaceList.concat(workspaceName).concat(")")) + .closest(homePage.workspaceCompleteSection) + .find(homePage.workspaceNamePopover) .find(homePage.optionsIcon) .click({ force: true }); cy.xpath(homePage.MemberSettings).click({ force: true }); @@ -58,23 +58,27 @@ Cypress.Commands.add("navigateToOrgSettings", (orgName) => { cy.get(homePage.inviteUserMembersPage).should("be.visible"); }); -Cypress.Commands.add("openOrgOptionsPopup", (orgName) => { - cy.get(homePage.orgList.concat(orgName).concat(")")) +Cypress.Commands.add("openWorkspaceOptionsPopup", (workspaceName) => { + cy.get(homePage.workspaceList.concat(workspaceName).concat(")")) .scrollIntoView() .should("be.visible"); - cy.get(homePage.orgList.concat(orgName).concat(")")) - .closest(homePage.orgCompleteSection) - .find(homePage.orgNamePopover) + cy.get(homePage.workspaceList.concat(workspaceName).concat(")")) + .closest(homePage.workspaceCompleteSection) + .find(homePage.workspaceNamePopover) .find(homePage.optionsIcon) .click({ force: true }); }); -Cypress.Commands.add("inviteUserForOrg", (orgName, email, role) => { +Cypress.Commands.add("inviteUserForWorkspace", (workspaceName, email, role) => { cy.stubPostHeaderReq(); - cy.get(homePage.orgList.concat(orgName).concat(")")) + cy.get(homePage.workspaceList.concat(workspaceName).concat(")")) .scrollIntoView() .should("be.visible"); - cy.get(homePage.orgList.concat(orgName).concat(homePage.shareOrg)) + cy.get( + homePage.workspaceList + .concat(workspaceName) + .concat(homePage.shareWorkspace), + ) .first() .should("be.visible") .click({ force: true }); @@ -91,12 +95,14 @@ Cypress.Commands.add("inviteUserForOrg", (orgName, email, role) => { cy.contains(email, { matchCase: false }); }); -Cypress.Commands.add("CheckShareIcon", (orgName, count) => { - cy.get(homePage.orgList.concat(orgName).concat(")")) +Cypress.Commands.add("CheckShareIcon", (workspaceName, count) => { + cy.get(homePage.workspaceList.concat(workspaceName).concat(")")) .scrollIntoView() .should("be.visible"); cy.get( - homePage.orgList.concat(orgName).concat(") .org-share-user-icons"), + homePage.workspaceList + .concat(workspaceName) + .concat(") .workspace-share-user-icons"), ).should("have.length", count); }); @@ -145,13 +151,13 @@ Cypress.Commands.add("enablePublicAccess", () => { .click({ force: true }); }); -Cypress.Commands.add("deleteUserFromOrg", (orgName) => { - cy.get(homePage.orgList.concat(orgName).concat(")")) +Cypress.Commands.add("deleteUserFromWorkspace", (workspaceName) => { + cy.get(homePage.workspaceList.concat(workspaceName).concat(")")) .scrollIntoView() .should("be.visible"); - cy.get(homePage.orgList.concat(orgName).concat(")")) - .closest(homePage.orgCompleteSection) - .find(homePage.orgNamePopover) + cy.get(homePage.workspaceList.concat(workspaceName).concat(")")) + .closest(homePage.workspaceCompleteSection) + .find(homePage.workspaceNamePopover) .find(homePage.optionsIcon) .click({ force: true }); cy.xpath(homePage.MemberSettings).click({ force: true }); @@ -163,8 +169,8 @@ Cypress.Commands.add("deleteUserFromOrg", (orgName) => { cy.get(homePage.DeleteBtn) .last() .click({ force: true }); - cy.get(homePage.leaveOrgConfirmModal).should("be.visible"); - cy.get(homePage.leaveOrgConfirmButton).click({ force: true }); + cy.get(homePage.leaveWorkspaceConfirmModal).should("be.visible"); + cy.get(homePage.leaveWorkspaceConfirmButton).click({ force: true }); cy.xpath(homePage.appHome) .first() .should("be.visible") @@ -176,44 +182,47 @@ Cypress.Commands.add("deleteUserFromOrg", (orgName) => { ); }); -Cypress.Commands.add("updateUserRoleForOrg", (orgName, email, role) => { - cy.stubPostHeaderReq(); - cy.get(homePage.orgList.concat(orgName).concat(")")) - .scrollIntoView() - .should("be.visible"); - cy.get(homePage.orgList.concat(orgName).concat(")")) - .closest(homePage.orgCompleteSection) - .find(homePage.orgNamePopover) - .find(homePage.optionsIcon) - .click({ force: true }); - cy.xpath(homePage.MemberSettings).click({ force: true }); - cy.wait("@getMembers").should( - "have.nested.property", - "response.body.responseMeta.status", - 200, - ); - cy.get(homePage.inviteUserMembersPage).click({ force: true }); - cy.xpath(homePage.email) - .click({ force: true }) - .type(email); - cy.xpath(homePage.selectRole).click({ force: true }); - cy.xpath(role).click({ force: true }); - cy.xpath(homePage.inviteBtn).click({ force: true }); - cy.wait("@mockPostInvite") - .its("request.headers") - .should("have.property", "origin", "Cypress"); - cy.contains(email, { matchCase: false }); - cy.get(".bp3-icon-small-cross").click({ force: true }); - cy.xpath(homePage.appHome) - .first() - .should("be.visible") - .click(); - cy.wait("@applications").should( - "have.nested.property", - "response.body.responseMeta.status", - 200, - ); -}); +Cypress.Commands.add( + "updateUserRoleForWorkspace", + (workspaceName, email, role) => { + cy.stubPostHeaderReq(); + cy.get(homePage.workspaceList.concat(workspaceName).concat(")")) + .scrollIntoView() + .should("be.visible"); + cy.get(homePage.workspaceList.concat(workspaceName).concat(")")) + .closest(homePage.workspaceCompleteSection) + .find(homePage.workspaceNamePopover) + .find(homePage.optionsIcon) + .click({ force: true }); + cy.xpath(homePage.MemberSettings).click({ force: true }); + cy.wait("@getMembers").should( + "have.nested.property", + "response.body.responseMeta.status", + 200, + ); + cy.get(homePage.inviteUserMembersPage).click({ force: true }); + cy.xpath(homePage.email) + .click({ force: true }) + .type(email); + cy.xpath(homePage.selectRole).click({ force: true }); + cy.xpath(role).click({ force: true }); + cy.xpath(homePage.inviteBtn).click({ force: true }); + cy.wait("@mockPostInvite") + .its("request.headers") + .should("have.property", "origin", "Cypress"); + cy.contains(email, { matchCase: false }); + cy.get(".bp3-icon-small-cross").click({ force: true }); + cy.xpath(homePage.appHome) + .first() + .should("be.visible") + .click(); + cy.wait("@applications").should( + "have.nested.property", + "response.body.responseMeta.status", + 200, + ); + }, +); Cypress.Commands.add("launchApp", () => { cy.get(homePage.appView) @@ -239,8 +248,12 @@ Cypress.Commands.add("AppSetupForRename", () => { }); }); -Cypress.Commands.add("CreateAppForOrg", (orgName, appname) => { - cy.get(homePage.orgList.concat(orgName).concat(homePage.createAppFrOrg)) +Cypress.Commands.add("CreateAppForWorkspace", (workspaceName, appname) => { + cy.get( + homePage.workspaceList + .concat(workspaceName) + .concat(homePage.createAppFrWorkspace), + ) .scrollIntoView() .should("be.visible") .click({ force: true }); @@ -267,7 +280,7 @@ Cypress.Commands.add("CreateAppForOrg", (orgName, appname) => { ); }); -Cypress.Commands.add("CreateAppInFirstListedOrg", (appname) => { +Cypress.Commands.add("CreateAppInFirstListedWorkspace", (appname) => { let applicationId; cy.get(homePage.createNew) .first() diff --git a/app/client/cypress/support/commands.js b/app/client/cypress/support/commands.js index 7e0d1ef11c..c4b69d31d9 100644 --- a/app/client/cypress/support/commands.js +++ b/app/client/cypress/support/commands.js @@ -161,7 +161,7 @@ Cypress.Commands.add("DeleteApp", (appName) => { "response.body.responseMeta.status", 200, ); - cy.wait("@organizations").should( + cy.wait("@workspaces").should( "have.nested.property", "response.body.responseMeta.status", 200, @@ -874,7 +874,7 @@ Cypress.Commands.add("startServerAndRoutes", () => { cy.route("GET", "/api/v1/plugins").as("getPlugins"); cy.route("POST", "/api/v1/logout").as("postLogout"); - cy.route("GET", "/api/v1/datasources?organizationId=*").as("getDataSources"); + cy.route("GET", "/api/v1/datasources?workspaceId=*").as("getDataSources"); cy.route("GET", "/api/v1/pages?*mode=EDIT").as("getPagesForCreateApp"); cy.route("GET", "/api/v1/pages?*mode=PUBLISHED").as("getPagesForViewApp"); @@ -901,8 +901,8 @@ Cypress.Commands.add("startServerAndRoutes", () => { cy.route("PUT", "/api/v1/pages/crud-page/*").as("replaceLayoutWithCRUDPage"); cy.route("POST", "/api/v1/pages/crud-page").as("generateCRUDPage"); - cy.route("GET", "/api/v1/organizations").as("organizations"); - cy.route("GET", "/api/v1/organizations/*").as("getOrganisation"); + cy.route("GET", "/api/v1/workspaces").as("workspaces"); + cy.route("GET", "/api/v1/workspaces/*").as("getWorkspace"); cy.route("POST", "/api/v1/applications/publish/*").as("publishApp"); cy.route("PUT", "/api/v1/layouts/*/pages/*").as("updateLayout"); @@ -923,31 +923,31 @@ Cypress.Commands.add("startServerAndRoutes", () => { cy.route("GET", "/api/v1/plugins/*/form").as("getPluginForm"); cy.route("DELETE", "/api/v1/applications/*").as("deleteApplication"); - cy.route("POST", "/api/v1/applications?orgId=*").as("createNewApplication"); + cy.route("POST", "/api/v1/applications?workspaceId=*").as( + "createNewApplication", + ); cy.route("PUT", "/api/v1/applications/*").as("updateApplication"); cy.route("PUT", "/api/v1/actions/*").as("saveAction"); cy.route("PUT", "/api/v1/actions/move").as("moveAction"); - cy.route("POST", "/api/v1/organizations").as("createOrg"); + cy.route("POST", "/api/v1/workspaces").as("createWorkspace"); cy.route("POST", "api/v1/applications/import/*").as("importNewApplication"); cy.route("GET", "api/v1/applications/export/*").as("exportApplication"); - cy.route("GET", "/api/v1/organizations/roles?organizationId=*").as( - "getRoles", - ); + cy.route("GET", "/api/v1/workspaces/roles?workspaceId=*").as("getRoles"); cy.route("GET", "/api/v1/users/me").as("getMe"); cy.route("POST", "/api/v1/pages").as("createPage"); cy.route("POST", "/api/v1/pages/clone/*").as("clonePage"); cy.route("POST", "/api/v1/applications/clone/*").as("cloneApp"); cy.route("PUT", "/api/v1/applications/*/changeAccess").as("changeAccess"); - cy.route("PUT", "/api/v1/organizations/*").as("updateOrganization"); + cy.route("PUT", "/api/v1/workspaces/*").as("updateWorkspace"); cy.route("GET", "/api/v1/pages/view/application/*").as("viewApp"); cy.route("GET", "/api/v1/pages/*/view?*").as("viewPage"); - cy.route("POST", "/api/v1/organizations/*/logo").as("updateLogo"); - cy.route("DELETE", "/api/v1/organizations/*/logo").as("deleteLogo"); - cy.route("POST", "/api/v1/applications/*/fork/*").as("postForkAppOrg"); - cy.route("PUT", "/api/v1/users/leaveOrganization/*").as("leaveOrgApiCall"); - cy.route("DELETE", "api/v1/organizations/*").as("deleteOrgApiCall"); + cy.route("POST", "/api/v1/workspaces/*/logo").as("updateLogo"); + cy.route("DELETE", "/api/v1/workspaces/*/logo").as("deleteLogo"); + cy.route("POST", "/api/v1/applications/*/fork/*").as("postForkAppWorkspace"); + cy.route("PUT", "/api/v1/users/leaveWorkspace/*").as("leaveWorkspaceApiCall"); + cy.route("DELETE", "api/v1/workspaces/*").as("deleteWorkspaceApiCall"); cy.route("POST", "/api/v1/comments/threads").as("createNewThread"); cy.route("POST", "/api/v1/comments?threadId=*").as("createNewComment"); @@ -968,7 +968,7 @@ Cypress.Commands.add("startServerAndRoutes", () => { cy.intercept("DELETE", "/api/v1/git/branch/*").as("deleteBranch"); cy.intercept("GET", "/api/v1/git/status/*").as("gitStatus"); cy.intercept("PUT", "/api/v1/layouts/refactor").as("updateWidgetName"); - cy.intercept("GET", "/api/v1/organizations/*/members").as("getMembers"); + cy.intercept("GET", "/api/v1/workspaces/*/members").as("getMembers"); }); Cypress.Commands.add("startErrorRoutes", () => { diff --git a/app/client/cypress/support/index.js b/app/client/cypress/support/index.js index 3d04e88475..2249ff8ca8 100644 --- a/app/client/cypress/support/index.js +++ b/app/client/cypress/support/index.js @@ -25,7 +25,7 @@ import { initLocalstorage } from "./commands"; import "./dataSourceCommands"; import "./gitSync"; import { initLocalstorageRegistry } from "./Objects/Registry"; -import "./OrgCommands"; +import "./WorkspaceCommands"; import "./queryCommands"; import "./widgetCommands"; import "./themeCommands"; @@ -86,7 +86,7 @@ before(function() { cy.get(".t--applications-container .createnew").should("be.visible"); cy.get(".t--applications-container .createnew").should("be.enabled"); cy.generateUUID().then((id) => { - cy.CreateAppInFirstListedOrg(id); + cy.CreateAppInFirstListedWorkspace(id); localStorage.setItem("AppName", id); }); diff --git a/app/client/cypress/support/themeCommands.js b/app/client/cypress/support/themeCommands.js index 649a83bd48..10cbd58a30 100644 --- a/app/client/cypress/support/themeCommands.js +++ b/app/client/cypress/support/themeCommands.js @@ -1,6 +1,6 @@ /* eslint-disable cypress/no-unnecessary-waiting */ /* eslint-disable cypress/no-assigning-return-values */ -/* Contains all methods related to Organisation features*/ +/* Contains all methods related to Workspace features*/ require("cy-verify-downloads").addCustomCommand(); require("cypress-file-upload"); diff --git a/app/client/cypress/support/widgetCommands.js b/app/client/cypress/support/widgetCommands.js index b620cb0688..84493e186d 100644 --- a/app/client/cypress/support/widgetCommands.js +++ b/app/client/cypress/support/widgetCommands.js @@ -374,7 +374,7 @@ Cypress.Commands.add("testJsontext", (endp, value, paste = true) => { cy.get(".t--property-control-" + endp + " .CodeMirror textarea") .first() .focus({ force: true }) - .type("{uparrow}", { force: true }) + .type("{ctrl}{uparrow}", { force: true }) .type("{ctrl}{shift}{downarrow}", { force: true }); cy.focused().then(($cm) => { if ($cm.contents !== "") { @@ -407,6 +407,25 @@ Cypress.Commands.add("testJsontext", (endp, value, paste = true) => { cy.wait(2500); //Allowing time for Evaluate value to capture value }); +Cypress.Commands.add("testJsontextclear", (endp, value, paste = true) => { + cy.get(".t--property-control-" + endp + " .CodeMirror textarea") + .first() + .focus({ force: true }) + .type("{ctrl}{uparrow}", { force: true }) + .type("{ctrl}{shift}{downarrow}", { force: true }); + cy.focused().then(($cm) => { + if ($cm.contents !== "") { + cy.log("The field is not empty"); + cy.get(".t--property-control-" + endp + " .CodeMirror textarea") + .first() + .click({ force: true }) + .focused({ force: true }) + .clear({ + force: true, + }); + } + }); +}); /** * Usage: * Find the element which has a code editor input and then pass it in the function @@ -469,6 +488,32 @@ Cypress.Commands.add("toggleJsAndUpdate", (endp, value) => { cy.wait(200); }); +Cypress.Commands.add("toggleJsAndUpdateWithIndex", (endp, value, index) => { + cy.get(".CodeMirror textarea") + .eq(index) + .focus({ force: true }) + .type("{uparrow}", { force: true }) + .type("{ctrl}{shift}{downarrow}", { force: true }); + cy.focused().then(($cm) => { + if ($cm.contents !== "") { + cy.log("The field is empty"); + cy.get(".CodeMirror textarea") + .eq(index) + .clear({ + force: true, + }); + } + cy.get(".CodeMirror textarea") + .eq(index) + .type(value, { + force: true, + parseSpecialCharSequences: false, + }); + }); + // eslint-disable-next-line cypress/no-unnecessary-waiting + cy.wait(200); +}); + Cypress.Commands.add("assertControlVisibility", (endp) => { cy.get(".t--property-control-" + endp + " .CodeMirror") .first() diff --git a/app/client/perf/src/perf.js b/app/client/perf/src/perf.js index e41b8c0f82..2ec1aa8b62 100644 --- a/app/client/perf/src/perf.js +++ b/app/client/perf/src/perf.js @@ -12,9 +12,9 @@ const { } = require("./utils/utils"); const selectors = { appMoreIcon: "span.t--options-icon", - orgImportAppOption: '[data-cy*="t--org-import-app"]', + workspaceImportAppOption: '[data-cy*="t--workspace-import-app"]', fileInput: "#fileInput", - importButton: '[data-cy*="t--org-import-app-button"]', + importButton: '[data-cy*="t--workspace-import-app-button"]', createNewApp: ".createnew", }; module.exports = class Perf { @@ -151,8 +151,8 @@ module.exports = class Perf { importApplication = async (jsonPath) => { await this.page.waitForSelector(selectors.appMoreIcon); await this.page.click(selectors.appMoreIcon); - await this.page.waitForSelector(selectors.orgImportAppOption); - await this.page.click(selectors.orgImportAppOption); + await this.page.waitForSelector(selectors.workspaceImportAppOption); + await this.page.click(selectors.workspaceImportAppOption); const elementHandle = await this.page.$(selectors.fileInput); await elementHandle.uploadFile(jsonPath); diff --git a/app/client/src/AppRouter.tsx b/app/client/src/AppRouter.tsx index b62e5c5f43..31b39153ed 100644 --- a/app/client/src/AppRouter.tsx +++ b/app/client/src/AppRouter.tsx @@ -9,7 +9,7 @@ import { BASE_SIGNUP_URL, BASE_URL, BUILDER_PATH, - ORG_URL, + WORKSPACE_URL, SIGN_UP_URL, SIGNUP_SUCCESS_URL, USER_AUTH_URL, @@ -27,7 +27,7 @@ import { VIEWER_PATCH_PATH, BUILDER_PATCH_PATH, } from "constants/routes"; -import OrganizationLoader from "pages/organization/loader"; +import WorkspaceLoader from "pages/workspace/loader"; import ApplicationListLoader from "pages/Applications/loader"; import EditorLoader from "pages/Editor/loader"; import AppViewerLoader from "pages/AppViewer/loader"; @@ -119,7 +119,7 @@ function AppRouter(props: { - + diff --git a/app/client/src/actions/applicationActions.ts b/app/client/src/actions/applicationActions.ts index 96e3c647f8..1cf720d8b5 100644 --- a/app/client/src/actions/applicationActions.ts +++ b/app/client/src/actions/applicationActions.ts @@ -133,15 +133,15 @@ export const setIsReconnectingDatasourcesModalOpen = (payload: { payload, }); -export const setOrgIdForImport = (orgId?: string) => ({ - type: ReduxActionTypes.SET_ORG_ID_FOR_IMPORT, - payload: orgId, +export const setWorkspaceIdForImport = (workspaceId?: string) => ({ + type: ReduxActionTypes.SET_WORKSPACE_ID_FOR_IMPORT, + payload: workspaceId, }); export const showReconnectDatasourceModal = (payload: { application: ApplicationResponsePayload; unConfiguredDatasourceList: Array; - orgId: string; + workspaceId: string; }) => ({ type: ReduxActionTypes.SHOW_RECONNECT_DATASOURCE_MODAL, payload, diff --git a/app/client/src/actions/datasourceActions.ts b/app/client/src/actions/datasourceActions.ts index 12def32957..1b4210527f 100644 --- a/app/client/src/actions/datasourceActions.ts +++ b/app/client/src/actions/datasourceActions.ts @@ -145,7 +145,7 @@ export const setDatsourceEditorMode = (payload: { }; }; -export const fetchDatasources = (payload?: { orgId?: string }) => { +export const fetchDatasources = (payload?: { workspaceId?: string }) => { return { type: ReduxActionTypes.FETCH_DATASOURCES_INIT, payload, @@ -161,7 +161,7 @@ export const fetchMockDatasources = () => { export interface addMockRequest extends ReduxAction<{ name: string; - organizationId: string; + workspaceId: string; pluginId: string; packageName: string; isGeneratePageMode?: string; @@ -169,16 +169,16 @@ export interface addMockRequest extraParams?: any; } -export const addMockDatasourceToOrg = ( +export const addMockDatasourceToWorkspace = ( name: string, - organizationId: string, + workspaceId: string, pluginId: string, packageName: string, isGeneratePageMode?: string, ): addMockRequest => { return { type: ReduxActionTypes.ADD_MOCK_DATASOURCES_INIT, - payload: { name, packageName, pluginId, organizationId }, + payload: { name, packageName, pluginId, workspaceId }, extraParams: { isGeneratePageMode }, }; }; diff --git a/app/client/src/actions/orgActions.ts b/app/client/src/actions/orgActions.ts deleted file mode 100644 index a838183814..0000000000 --- a/app/client/src/actions/orgActions.ts +++ /dev/null @@ -1,83 +0,0 @@ -import { ReduxActionTypes } from "@appsmith/constants/ReduxActionConstants"; -import { SaveOrgLogo, SaveOrgRequest } from "api/OrgApi"; - -export const fetchOrg = (orgId: string, skipValidation?: boolean) => { - return { - type: ReduxActionTypes.FETCH_CURRENT_ORG, - payload: { - orgId, - skipValidation, - }, - }; -}; - -export const deleteOrg = (orgId: string) => { - return { - type: ReduxActionTypes.DELETE_ORG_INIT, - payload: orgId, - }; -}; - -export const changeOrgUserRole = ( - orgId: string, - role: string, - username: string, -) => { - return { - type: ReduxActionTypes.CHANGE_ORG_USER_ROLE_INIT, - payload: { - orgId, - role, - username, - }, - }; -}; - -export const deleteOrgUser = (orgId: string, username: string) => { - return { - type: ReduxActionTypes.DELETE_ORG_USER_INIT, - payload: { - orgId, - username, - }, - }; -}; -export const fetchUsersForOrg = (orgId: string) => { - return { - type: ReduxActionTypes.FETCH_ALL_USERS_INIT, - payload: { - orgId, - }, - }; -}; -export const fetchRolesForOrg = (orgId: string) => { - return { - type: ReduxActionTypes.FETCH_ALL_ROLES_INIT, - payload: { - orgId, - }, - }; -}; - -export const saveOrg = (orgSettings: SaveOrgRequest) => { - return { - type: ReduxActionTypes.SAVE_ORG_INIT, - payload: orgSettings, - }; -}; - -export const uploadOrgLogo = (orgLogo: SaveOrgLogo) => { - return { - type: ReduxActionTypes.UPLOAD_ORG_LOGO, - payload: orgLogo, - }; -}; - -export const deleteOrgLogo = (id: string) => { - return { - type: ReduxActionTypes.REMOVE_ORG_LOGO, - payload: { - id: id, - }, - }; -}; diff --git a/app/client/src/actions/pluginActions.ts b/app/client/src/actions/pluginActions.ts index a1c65aa249..853871973d 100644 --- a/app/client/src/actions/pluginActions.ts +++ b/app/client/src/actions/pluginActions.ts @@ -8,8 +8,8 @@ import { PluginFormPayload } from "api/PluginApi"; import { DependencyMap } from "utils/DynamicBindingUtils"; export const fetchPlugins = (payload?: { - orgId?: string; -}): ReduxAction<{ orgId?: string } | undefined> => ({ + workspaceId?: string; +}): ReduxAction<{ workspaceId?: string } | undefined> => ({ type: ReduxActionTypes.FETCH_PLUGINS_REQUEST, payload, }); diff --git a/app/client/src/actions/templateActions.ts b/app/client/src/actions/templateActions.ts index f8ef1834b6..6fd731ea8c 100644 --- a/app/client/src/actions/templateActions.ts +++ b/app/client/src/actions/templateActions.ts @@ -17,14 +17,14 @@ export const setTemplateSearchQuery = (query: string) => ({ payload: query, }); -export const importTemplateToOrganisation = ( +export const importTemplateToWorkspace = ( templateId: string, - organizationId: string, + workspaceId: string, ) => ({ - type: ReduxActionTypes.IMPORT_TEMPLATE_TO_ORGANISATION_INIT, + type: ReduxActionTypes.IMPORT_TEMPLATE_TO_WORKSPACE_INIT, payload: { templateId, - organizationId, + workspaceId, }, }); diff --git a/app/client/src/actions/userActions.ts b/app/client/src/actions/userActions.ts index 86709a2ca2..36b716a634 100644 --- a/app/client/src/actions/userActions.ts +++ b/app/client/src/actions/userActions.ts @@ -96,11 +96,11 @@ export const updatePhotoId = (payload: { photoId: string }) => ({ payload, }); -export const leaveOrganization = (orgId: string) => { +export const leaveWorkspace = (workspaceId: string) => { return { - type: ReduxActionTypes.LEAVE_ORG_INIT, + type: ReduxActionTypes.LEAVE_WORKSPACE_INIT, payload: { - orgId, + workspaceId, }, }; }; diff --git a/app/client/src/actions/workspaceActions.ts b/app/client/src/actions/workspaceActions.ts new file mode 100644 index 0000000000..5081d80cab --- /dev/null +++ b/app/client/src/actions/workspaceActions.ts @@ -0,0 +1,86 @@ +import { ReduxActionTypes } from "@appsmith/constants/ReduxActionConstants"; +import { SaveWorkspaceLogo, SaveWorkspaceRequest } from "api/WorkspaceApi"; + +export const fetchWorkspace = ( + workspaceId: string, + skipValidation?: boolean, +) => { + return { + type: ReduxActionTypes.FETCH_CURRENT_WORKSPACE, + payload: { + workspaceId, + skipValidation, + }, + }; +}; + +export const deleteWorkspace = (workspaceId: string) => { + return { + type: ReduxActionTypes.DELETE_WORKSPACE_INIT, + payload: workspaceId, + }; +}; + +export const changeWorkspaceUserRole = ( + workspaceId: string, + role: string, + username: string, +) => { + return { + type: ReduxActionTypes.CHANGE_WORKSPACE_USER_ROLE_INIT, + payload: { + workspaceId, + role, + username, + }, + }; +}; + +export const deleteWorkspaceUser = (workspaceId: string, username: string) => { + return { + type: ReduxActionTypes.DELETE_WORKSPACE_USER_INIT, + payload: { + workspaceId, + username, + }, + }; +}; +export const fetchUsersForWorkspace = (workspaceId: string) => { + return { + type: ReduxActionTypes.FETCH_ALL_USERS_INIT, + payload: { + workspaceId, + }, + }; +}; +export const fetchRolesForWorkspace = (workspaceId: string) => { + return { + type: ReduxActionTypes.FETCH_ALL_ROLES_INIT, + payload: { + workspaceId, + }, + }; +}; + +export const saveWorkspace = (workspaceSettings: SaveWorkspaceRequest) => { + return { + type: ReduxActionTypes.SAVE_WORKSPACE_INIT, + payload: workspaceSettings, + }; +}; + +export const uploadWorkspaceLogo = (workspaceLogo: SaveWorkspaceLogo) => { + return { + type: ReduxActionTypes.UPLOAD_WORKSPACE_LOGO, + payload: workspaceLogo, + }; +}; + +export const deleteWorkspaceLogo = (id: string) => { + return { + type: ReduxActionTypes.REMOVE_WORKSPACE_LOGO, + payload: { + id: id, + }, + }; +}; diff --git a/app/client/src/api/ApiResponses.tsx b/app/client/src/api/ApiResponses.tsx index 2184ee33b3..dc3b1bbb0b 100644 --- a/app/client/src/api/ApiResponses.tsx +++ b/app/client/src/api/ApiResponses.tsx @@ -26,7 +26,7 @@ export type GenericApiResponse = { // MISSING_PLUGIN_ID, 4002, "Missing plugin id. Please input correct plugin id" // MISSING_DATASOURCES_ID, 4003, "Missing datasource id. Please input correct datasource id" // MISSING_PAGE_ID, 4004, "Missing page id. Pleaes input correct page id" -// PAGE_DOES_NOT_EXIST_IN_ORG, 4006, "Page {0} does not belong to the current user {1} organization." +// PAGE_DOES_NOT_EXIST_IN_WORKSPACE, 4006, "Page {0} does not belong to the current user {1} workspace." // UNAUTHORIZED_DOMAIN, 4001, "Invalid email domain provided. Please sign in with a valid work email ID" // INTERNAL_SERVER_ERROR, 5000, "Internal server error while processing request" // REPOSITORY_SAVE_FAILED, 5001, "Repository save failed." diff --git a/app/client/src/api/ApplicationApi.tsx b/app/client/src/api/ApplicationApi.tsx index 4d99bd1f61..ea7d4e7fbe 100644 --- a/app/client/src/api/ApplicationApi.tsx +++ b/app/client/src/api/ApplicationApi.tsx @@ -45,7 +45,7 @@ export type GitApplicationMetadata = export interface ApplicationResponsePayload { id: string; name: string; - organizationId: string; + workspaceId: string; evaluationVersion?: EvaluationVersion; pages: ApplicationPagePayload[]; appIsExample: boolean; @@ -65,7 +65,7 @@ export interface FetchApplicationPayload { export interface FetchApplicationResponseData { application: Omit; pages: ApplicationPagePayload[]; - organizationId: string; + workspaceId: string; } export type FetchApplicationResponse = ApiResponse< @@ -79,7 +79,7 @@ export type FetchApplicationsResponse = ApiResponse< export type CreateApplicationResponse = ApiResponse; export interface CreateApplicationRequest { name: string; - orgId: string; + workspaceId: string; color?: AppColorCode; icon?: AppIconName; } @@ -98,7 +98,7 @@ export interface DuplicateApplicationRequest { } export interface ForkApplicationRequest { applicationId: string; - organizationId: string; + workspaceId: string; } export type GetAllApplicationResponse = ApiResponse; @@ -122,7 +122,7 @@ export interface ApplicationObject { name: string; icon?: string; color?: string; - organizationId: string; + workspaceId: string; pages: ApplicationPagePayload[]; userPermissions: string[]; } @@ -133,17 +133,17 @@ export interface UserRoles { username: string; } -export interface OrganizationApplicationObject { +export interface WorkspaceApplicationObject { applications: Array; - organization: { + workspace: { id: string; name: string; }; userRoles: Array; } -export interface FetchUsersApplicationsOrgsResponse extends ApiResponse { +export interface FetchUsersApplicationsWorkspacesResponse extends ApiResponse { data: { - organizationApplications: Array; + workspaceApplications: Array; user: string; newReleasesCount: string; releaseItems: Array>; @@ -155,7 +155,7 @@ export interface FetchUnconfiguredDatasourceListResponse extends ApiResponse { } export interface ImportApplicationRequest { - orgId: string; + workspaceId: string; applicationFile?: File; progress?: (progressEvent: ProgressEvent) => void; onSuccessCallback?: () => void; @@ -165,7 +165,8 @@ class ApplicationApi extends Api { static baseURL = "v1/applications"; static publishURLPath = (applicationId: string) => `/publish/${applicationId}`; - static createApplicationPath = (orgId: string) => `?orgId=${orgId}`; + static createApplicationPath = (workspaceId: string) => + `?workspaceId=${workspaceId}`; static changeAppViewAccessPath = (applicationId: string) => `/${applicationId}/changeAccess`; static setDefaultPagePath = (request: SetDefaultPageRequest) => @@ -196,10 +197,10 @@ class ApplicationApi extends Api { static fetchUnconfiguredDatasourceList(payload: { applicationId: string; - orgId: string; + workspaceId: string; }): AxiosPromise { return Api.get( - `${ApplicationApi.baseURL}/import/${payload.orgId}/datasources?defaultApplicationId=${payload.applicationId}`, + `${ApplicationApi.baseURL}/import/${payload.workspaceId}/datasources?defaultApplicationId=${payload.applicationId}`, ); } @@ -214,7 +215,7 @@ class ApplicationApi extends Api { ): AxiosPromise { return Api.post( ApplicationApi.baseURL + - ApplicationApi.createApplicationPath(request.orgId), + ApplicationApi.createApplicationPath(request.workspaceId), { name: request.name, color: request.color, icon: request.icon }, ); } @@ -262,11 +263,11 @@ class ApplicationApi extends Api { "/" + request.applicationId + "/fork/" + - request.organizationId, + request.workspaceId, ); } - static importApplicationToOrg( + static importApplicationToWorkspace( request: ImportApplicationRequest, ): AxiosPromise { const formData = new FormData(); @@ -274,7 +275,7 @@ class ApplicationApi extends Api { formData.append("file", request.applicationFile); } return Api.post( - ApplicationApi.baseURL + "/import/" + request.orgId, + ApplicationApi.baseURL + "/import/" + request.workspaceId, formData, null, { diff --git a/app/client/src/api/DatasourcesApi.ts b/app/client/src/api/DatasourcesApi.ts index b36aaa2cc5..8bd6bfeff4 100644 --- a/app/client/src/api/DatasourcesApi.ts +++ b/app/client/src/api/DatasourcesApi.ts @@ -21,7 +21,7 @@ export interface EmbeddedRestDatasourceRequest { invalids: Array; isValid: boolean; name: string; - organizationId: string; + workspaceId: string; pluginId: string; } @@ -36,9 +36,9 @@ class DatasourcesApi extends API { static url = "v1/datasources"; static fetchDatasources( - orgId: string, + workspaceId: string, ): AxiosPromise> { - return API.get(DatasourcesApi.url + `?organizationId=${orgId}`); + return API.get(DatasourcesApi.url + `?workspaceId=${workspaceId}`); } static createDatasource(datasourceConfig: Partial): Promise { @@ -79,13 +79,13 @@ class DatasourcesApi extends API { static addMockDbToDatasources( name: string, - organizationId: string, + workspaceId: string, pluginId: string, packageName: string, ): Promise { return API.post(DatasourcesApi.url + `/mocks`, { name, - organizationId, + workspaceId, pluginId, packageName, }); diff --git a/app/client/src/api/GitSyncAPI.tsx b/app/client/src/api/GitSyncAPI.tsx index 4c4a23c679..802152bb55 100644 --- a/app/client/src/api/GitSyncAPI.tsx +++ b/app/client/src/api/GitSyncAPI.tsx @@ -132,8 +132,8 @@ class GitSyncAPI extends Api { return Api.post(`${GitSyncAPI.baseURL}/disconnect/${applicationId}`); } - static importApp(payload: ConnectToGitPayload, orgId: string) { - return Api.post(`${GitSyncAPI.baseURL}/import/${orgId}`, payload); + static importApp(payload: ConnectToGitPayload, workspaceId: string) { + return Api.post(`${GitSyncAPI.baseURL}/import/${workspaceId}`, payload); } static getSSHKeyPair(applicationId: string): AxiosPromise { diff --git a/app/client/src/api/ImportApi.ts b/app/client/src/api/ImportApi.ts index eac6e0ad76..c724ce6653 100644 --- a/app/client/src/api/ImportApi.ts +++ b/app/client/src/api/ImportApi.ts @@ -7,19 +7,19 @@ export interface CurlImportRequest { pageId: string; name: string; curl: string; - organizationId: string; + workspaceId: string; } class CurlImportApi extends Api { static curlImportURL = `v1/import`; static curlImport(request: CurlImportRequest): AxiosPromise { - const { curl, name, organizationId, pageId } = request; + const { curl, name, pageId, workspaceId } = request; return Api.post(CurlImportApi.curlImportURL, curl, { type: "CURL", pageId, name, - organizationId, + workspaceId, }); } } diff --git a/app/client/src/api/JSActionAPI.tsx b/app/client/src/api/JSActionAPI.tsx index bf2ee37e13..9717117918 100644 --- a/app/client/src/api/JSActionAPI.tsx +++ b/app/client/src/api/JSActionAPI.tsx @@ -23,7 +23,7 @@ export interface UpdateJSObjectNameRequest { export interface CreateJSCollectionRequest { name: string; pageId: string; - organizationId: string; + workspaceId: string; pluginId: string; body: string; variables: Array; diff --git a/app/client/src/api/OrgApi.ts b/app/client/src/api/OrgApi.ts deleted file mode 100644 index 141839eeef..0000000000 --- a/app/client/src/api/OrgApi.ts +++ /dev/null @@ -1,135 +0,0 @@ -import { AxiosPromise } from "axios"; -import Api from "api/Api"; -import { ApiResponse } from "./ApiResponses"; -import { OrgRole, Org } from "constants/orgConstants"; - -export interface FetchOrgRolesResponse extends ApiResponse { - data: OrgRole[]; -} - -export interface FetchOrgsResponse extends ApiResponse { - data: Org[]; -} -export interface FetchOrgResponse extends ApiResponse { - data: Org; -} - -export interface FetchAllUsersResponse extends ApiResponse { - data: OrgRole[]; -} - -export interface FetchAllRolesResponse extends ApiResponse { - data: Org[]; -} - -export interface FetchOrgRequest { - orgId: string; - skipValidation?: boolean; -} - -export interface FetchAllUsersRequest { - orgId: string; -} - -export interface ChangeUserRoleRequest { - orgId: string; - role: string; - username: string; -} - -export interface DeleteOrgUserRequest { - orgId: string; - username: string; -} - -export interface FetchAllRolesRequest { - orgId: string; -} - -export interface SaveOrgRequest { - id: string; - name?: string; - website?: string; - email?: string; -} - -export interface SaveOrgLogo { - id: string; - logo: File; - progress: (progressEvent: ProgressEvent) => void; -} - -export interface CreateOrgRequest { - name: string; -} - -class OrgApi extends Api { - static rolesURL = "v1/groups"; - static orgsURL = "v1/organizations"; - static fetchRoles(): AxiosPromise { - return Api.get(OrgApi.rolesURL); - } - static fetchOrgs(): AxiosPromise { - return Api.get(OrgApi.orgsURL); - } - static fetchOrg(request: FetchOrgRequest): AxiosPromise { - return Api.get(OrgApi.orgsURL + "/" + request.orgId); - } - static saveOrg(request: SaveOrgRequest): AxiosPromise { - return Api.put(OrgApi.orgsURL + "/" + request.id, request); - } - static createOrg(request: CreateOrgRequest): AxiosPromise { - return Api.post(OrgApi.orgsURL, request); - } - static fetchAllUsers( - request: FetchAllUsersRequest, - ): AxiosPromise { - return Api.get(OrgApi.orgsURL + "/" + request.orgId + "/members"); - } - static fetchAllRoles( - request: FetchAllRolesRequest, - ): AxiosPromise { - return Api.get(OrgApi.orgsURL + `/roles?organizationId=${request.orgId}`); - } - static changeOrgUserRole( - request: ChangeUserRoleRequest, - ): AxiosPromise { - return Api.put(OrgApi.orgsURL + "/" + request.orgId + "/role", { - username: request.username, - roleName: request.role, - }); - } - static deleteOrgUser( - request: DeleteOrgUserRequest, - ): AxiosPromise { - return Api.put(OrgApi.orgsURL + "/" + request.orgId + "/role", { - username: request.username, - roleName: null, - }); - } - static saveOrgLogo(request: SaveOrgLogo): AxiosPromise { - const formData = new FormData(); - if (request.logo) { - formData.append("file", request.logo); - } - - return Api.post( - OrgApi.orgsURL + "/" + request.id + "/logo", - formData, - null, - { - headers: { - "Content-Type": "multipart/form-data", - }, - onUploadProgress: request.progress, - }, - ); - } - static deleteOrgLogo(request: { id: string }): AxiosPromise { - return Api.delete(OrgApi.orgsURL + "/" + request.id + "/logo"); - } - static deleteOrg(orgId: string): AxiosPromise { - return Api.delete(`${OrgApi.orgsURL}/${orgId}`); - } -} -export default OrgApi; diff --git a/app/client/src/api/PageApi.tsx b/app/client/src/api/PageApi.tsx index 0a3040d0ce..a6bee60eae 100644 --- a/app/client/src/api/PageApi.tsx +++ b/app/client/src/api/PageApi.tsx @@ -85,7 +85,7 @@ export type FetchPageListResponseData = { layouts: Array; slug?: string; }>; - organizationId: string; + workspaceId: string; }; export interface DeletePageRequest { diff --git a/app/client/src/api/PluginApi.ts b/app/client/src/api/PluginApi.ts index 95484bcf26..8068c645c4 100644 --- a/app/client/src/api/PluginApi.ts +++ b/app/client/src/api/PluginApi.ts @@ -55,9 +55,9 @@ export interface DefaultPlugin { class PluginsApi extends Api { static url = "v1/plugins"; static fetchPlugins( - orgId: string, + workspaceId: string, ): AxiosPromise> { - return Api.get(PluginsApi.url, { organizationId: orgId }); + return Api.get(PluginsApi.url, { workspaceId: workspaceId }); } static fetchFormConfig( diff --git a/app/client/src/api/ProvidersApi.ts b/app/client/src/api/ProvidersApi.ts index 993de90070..2942617598 100644 --- a/app/client/src/api/ProvidersApi.ts +++ b/app/client/src/api/ProvidersApi.ts @@ -51,7 +51,7 @@ export interface AddApiToPageRequest { name: string; pageId: string; marketplaceElement: any; - organizationId?: string; + workspaceId?: string; // Added for analytics source?: string; } diff --git a/app/client/src/api/TemplatesApi.ts b/app/client/src/api/TemplatesApi.ts index 683350b593..117545d8b7 100644 --- a/app/client/src/api/TemplatesApi.ts +++ b/app/client/src/api/TemplatesApi.ts @@ -52,11 +52,11 @@ class TemplatesAPI extends Api { } static importTemplate( templateId: string, - organizationId: string, + workspaceId: string, ): AxiosPromise { return Api.post( TemplatesAPI.baseUrl + - `/app-templates/${templateId}/import/${organizationId}`, + `/app-templates/${templateId}/import/${workspaceId}`, ); } } diff --git a/app/client/src/api/WorkspaceApi.ts b/app/client/src/api/WorkspaceApi.ts new file mode 100644 index 0000000000..ebb1d4efc7 --- /dev/null +++ b/app/client/src/api/WorkspaceApi.ts @@ -0,0 +1,155 @@ +import { AxiosPromise } from "axios"; +import Api from "api/Api"; +import { ApiResponse } from "./ApiResponses"; +import { WorkspaceRole, Workspace } from "constants/workspaceConstants"; + +export interface FetchWorkspaceRolesResponse extends ApiResponse { + data: WorkspaceRole[]; +} + +export interface FetchWorkspacesResponse extends ApiResponse { + data: Workspace[]; +} +export interface FetchWorkspaceResponse extends ApiResponse { + data: Workspace; +} + +export interface FetchAllUsersResponse extends ApiResponse { + data: WorkspaceRole[]; +} + +export interface FetchAllRolesResponse extends ApiResponse { + data: Workspace[]; +} + +export interface FetchWorkspaceRequest { + workspaceId: string; + skipValidation?: boolean; +} + +export interface FetchAllUsersRequest { + workspaceId: string; +} + +export interface ChangeUserRoleRequest { + workspaceId: string; + role: string; + username: string; +} + +export interface DeleteWorkspaceUserRequest { + workspaceId: string; + username: string; +} + +export interface FetchAllRolesRequest { + workspaceId: string; +} + +export interface SaveWorkspaceRequest { + id: string; + name?: string; + website?: string; + email?: string; +} + +export interface SaveWorkspaceLogo { + id: string; + logo: File; + progress: (progressEvent: ProgressEvent) => void; +} + +export interface CreateWorkspaceRequest { + name: string; +} + +class WorkspaceApi extends Api { + static rolesURL = "v1/groups"; + static workspacesURL = "v1/workspaces"; + static fetchRoles(): AxiosPromise { + return Api.get(WorkspaceApi.rolesURL); + } + static fetchWorkspaces(): AxiosPromise { + return Api.get(WorkspaceApi.workspacesURL); + } + static fetchWorkspace( + request: FetchWorkspaceRequest, + ): AxiosPromise { + return Api.get(WorkspaceApi.workspacesURL + "/" + request.workspaceId); + } + static saveWorkspace( + request: SaveWorkspaceRequest, + ): AxiosPromise { + return Api.put(WorkspaceApi.workspacesURL + "/" + request.id, request); + } + static createWorkspace( + request: CreateWorkspaceRequest, + ): AxiosPromise { + return Api.post(WorkspaceApi.workspacesURL, request); + } + static fetchAllUsers( + request: FetchAllUsersRequest, + ): AxiosPromise { + return Api.get( + WorkspaceApi.workspacesURL + "/" + request.workspaceId + "/members", + ); + } + static fetchAllRoles( + request: FetchAllRolesRequest, + ): AxiosPromise { + return Api.get( + WorkspaceApi.workspacesURL + `/roles?workspaceId=${request.workspaceId}`, + ); + } + static changeWorkspaceUserRole( + request: ChangeUserRoleRequest, + ): AxiosPromise { + return Api.put( + WorkspaceApi.workspacesURL + "/" + request.workspaceId + "/role", + { + username: request.username, + roleName: request.role, + }, + ); + } + static deleteWorkspaceUser( + request: DeleteWorkspaceUserRequest, + ): AxiosPromise { + return Api.put( + WorkspaceApi.workspacesURL + "/" + request.workspaceId + "/role", + { + username: request.username, + roleName: null, + }, + ); + } + static saveWorkspaceLogo( + request: SaveWorkspaceLogo, + ): AxiosPromise { + const formData = new FormData(); + if (request.logo) { + formData.append("file", request.logo); + } + + return Api.post( + WorkspaceApi.workspacesURL + "/" + request.id + "/logo", + formData, + null, + { + headers: { + "Content-Type": "multipart/form-data", + }, + onUploadProgress: request.progress, + }, + ); + } + static deleteWorkspaceLogo(request: { + id: string; + }): AxiosPromise { + return Api.delete(WorkspaceApi.workspacesURL + "/" + request.id + "/logo"); + } + static deleteWorkspace(workspaceId: string): AxiosPromise { + return Api.delete(`${WorkspaceApi.workspacesURL}/${workspaceId}`); + } +} +export default WorkspaceApi; diff --git a/app/client/src/assets/icons/ads/organizationIcon.svg b/app/client/src/assets/icons/ads/workspaceIcon.svg similarity index 100% rename from app/client/src/assets/icons/ads/organizationIcon.svg rename to app/client/src/assets/icons/ads/workspaceIcon.svg diff --git a/app/client/src/assets/icons/menu/org.svg b/app/client/src/assets/icons/menu/workspace.svg similarity index 100% rename from app/client/src/assets/icons/menu/org.svg rename to app/client/src/assets/icons/menu/workspace.svg diff --git a/app/client/src/ce/api/UserApi.tsx b/app/client/src/ce/api/UserApi.tsx index 2cde6032fb..b890705af4 100644 --- a/app/client/src/ce/api/UserApi.tsx +++ b/app/client/src/ce/api/UserApi.tsx @@ -41,8 +41,8 @@ export interface FetchUserRequest { id: string; } -export interface LeaveOrgRequest { - orgId: string; +export interface LeaveWorkspaceRequest { + workspaceId: string; } export interface InviteUserRequest { @@ -91,8 +91,8 @@ export class UserApi extends Api { static inviteUserURL = "v1/users/invite"; static verifyInviteTokenURL = `${UserApi.inviteUserURL}/verify`; static confirmUserInviteURL = `${UserApi.inviteUserURL}/confirm`; - static addOrgURL = `${UserApi.usersURL}/addOrganization`; - static leaveOrgURL = `${UserApi.usersURL}/leaveOrganization`; + static addWorkspaceURL = `${UserApi.usersURL}/addWorkspace`; + static leaveWorkspaceURL = `${UserApi.usersURL}/leaveWorkspace`; static logoutURL = "v1/logout"; static currentUserURL = "v1/users/me"; static photoURL = "v1/users/photo"; @@ -166,7 +166,7 @@ export class UserApi extends Api { id: string; new: boolean; profilePhotoAssetId: string; - recentlyUsedOrgIds: string[]; + recentlyUsedWorkspaceIds: string[]; }> { const formData = new FormData(); if (request.file) { @@ -184,8 +184,10 @@ export class UserApi extends Api { return Api.delete(UserApi.photoURL); } - static leaveOrg(request: LeaveOrgRequest): AxiosPromise { - return Api.put(UserApi.leaveOrgURL + "/" + request.orgId); + static leaveWorkspace( + request: LeaveWorkspaceRequest, + ): AxiosPromise { + return Api.put(UserApi.leaveWorkspaceURL + "/" + request.workspaceId); } static fetchFeatureFlags(): AxiosPromise { diff --git a/app/client/src/ce/constants/ReduxActionConstants.tsx b/app/client/src/ce/constants/ReduxActionConstants.tsx index f36ce8ff40..4b73dcc4c4 100644 --- a/app/client/src/ce/constants/ReduxActionConstants.tsx +++ b/app/client/src/ce/constants/ReduxActionConstants.tsx @@ -1,6 +1,6 @@ import { WidgetCardProps, WidgetProps } from "widgets/BaseWidget"; import { PageAction } from "constants/AppsmithActionConstants/ActionConstants"; -import { Org } from "constants/orgConstants"; +import { Workspace } from "constants/workspaceConstants"; import { ERROR_CODES } from "@appsmith/constants/ApiConstants"; import { AppLayoutConfig } from "reducers/entityReducers/pageListReducer"; import { @@ -26,7 +26,7 @@ export const ReduxActionTypes = { RESET_DATASOURCE_CONFIG_FETCHED_FOR_IMPORT_FLAG: "RESET_DATASOURCE_CONFIG_FETCHED_FOR_IMPORT_FLAG", SET_UNCONFIGURED_DATASOURCES: "SET_UNCONFIGURED_DATASOURCES", - SET_ORG_ID_FOR_IMPORT: "SET_ORG_ID_FOR_IMPORT", + SET_WORKSPACE_ID_FOR_IMPORT: "SET_WORKSPACE_ID_FOR_IMPORT", RESET_SSH_KEY_PAIR: "RESET_SSH_KEY_PAIR", GIT_INFO_INIT: "GIT_INFO_INIT", IMPORT_APPLICATION_FROM_GIT_ERROR: "IMPORT_APPLICATION_FROM_GIT_ERROR", @@ -340,7 +340,7 @@ export const ReduxActionTypes = { INITIALIZE_PAGE_VIEWER_SUCCESS: "INITIALIZE_PAGE_VIEWER_SUCCESS", FETCH_APPLICATION_INIT: "FETCH_APPLICATION_INIT", FETCH_APPLICATION_SUCCESS: "FETCH_APPLICATION_SUCCESS", - INVITED_USERS_TO_ORGANIZATION: "INVITED_USERS_TO_ORGANIZATION", + INVITED_USERS_TO_WORKSPACE: "INVITED_USERS_TO_WORKSPACE", CREATE_APPLICATION_INIT: "CREATE_APPLICATION_INIT", CREATE_APPLICATION_SUCCESS: "CREATE_APPLICATION_SUCCESS", UPDATE_WIDGET_PROPERTY_VALIDATION: "UPDATE_WIDGET_PROPERTY_VALIDATION", @@ -362,30 +362,30 @@ export const ReduxActionTypes = { FETCH_PLUGIN_FORM_CONFIGS_REQUEST: "FETCH_PLUGIN_FORM_CONFIGS_REQUEST", FETCH_PLUGIN_FORM_CONFIGS_SUCCESS: "FETCH_PLUGIN_FORM_CONFIGS_SUCCESS", FETCH_PLUGIN_FORM_SUCCESS: "FETCH_PLUGIN_FORM_SUCCESS", - INVITE_USERS_TO_ORG_INIT: "INVITE_USERS_TO_ORG_INIT", - INVITE_USERS_TO_ORG_SUCCESS: "INVITE_USERS_TO_ORG_SUCCESS", + INVITE_USERS_TO_WORKSPACE_INIT: "INVITE_USERS_TO_WORKSPACE_INIT", + INVITE_USERS_TO_WORKSPACE_SUCCESS: "INVITE_USERS_TO_WORKSPACE_SUCCESS", FORGOT_PASSWORD_INIT: "FORGOT_PASSWORD_INIT", FORGOT_PASSWORD_SUCCESS: "FORGOT_PASSWORD_SUCCESS", RESET_PASSWORD_VERIFY_TOKEN_SUCCESS: "RESET_PASSWORD_VERIFY_TOKEN_SUCCESS", RESET_PASSWORD_VERIFY_TOKEN_INIT: "RESET_PASSWORD_VERIFY_TOKEN_INIT", EXECUTE_PAGE_LOAD_ACTIONS: "EXECUTE_PAGE_LOAD_ACTIONS", - SWITCH_ORGANIZATION_INIT: "SWITCH_ORGANIZATION_INIT", - SWITCH_ORGANIZATION_SUCCESS: "SWITCH_ORGANIZATION_SUCCESS", - FETCH_ORG_ROLES_INIT: "FETCH_ORG_ROLES_INIT", - FETCH_ORG_ROLES_SUCCESS: "FETCH_ORG_ROLES_SUCCESS", - FETCH_ORG_INIT: "FETCH_ORG_INIT", - FETCH_ORG_SUCCESS: "FETCH_ORG_SUCCESS", - FETCH_ORGS_SUCCESS: "FETCH_ORGS_SUCCES", - FETCH_ORGS_INIT: "FETCH_ORGS_INIT", - SAVE_ORG_INIT: "SAVE_ORG_INIT", - SAVE_ORG_SUCCESS: "SAVE_ORG_SUCCESS", - UPLOAD_ORG_LOGO: "UPLOAD_ORG_LOGO", - REMOVE_ORG_LOGO: "REMOVE_ORG_LOGO", - SAVING_ORG_INFO: "SAVING_ORG_INFO", + SWITCH_WORKSPACE_INIT: "SWITCH_WORKSPACE_INIT", + SWITCH_WORKSPACE_SUCCESS: "SWITCH_WORKSPACE_SUCCESS", + FETCH_WORKSPACE_ROLES_INIT: "FETCH_WORKSPACE_ROLES_INIT", + FETCH_WORKSPACE_ROLES_SUCCESS: "FETCH_WORKSPACE_ROLES_SUCCESS", + FETCH_WORKSPACE_INIT: "FETCH_WORKSPACE_INIT", + FETCH_WORKSPACE_SUCCESS: "FETCH_WORKSPACE_SUCCESS", + FETCH_WORKSPACES_SUCCESS: "FETCH_WORKSPACES_SUCCES", + FETCH_WORKSPACES_INIT: "FETCH_WORKSPACES_INIT", + SAVE_WORKSPACE_INIT: "SAVE_WORKSPACE_INIT", + SAVE_WORKSPACE_SUCCESS: "SAVE_WORKSPACE_SUCCESS", + UPLOAD_WORKSPACE_LOGO: "UPLOAD_WORKSPACE_LOGO", + REMOVE_WORKSPACE_LOGO: "REMOVE_WORKSPACE_LOGO", + SAVING_WORKSPACE_INFO: "SAVING_WORKSPACE_INFO", SET_LAST_UPDATED_TIME: "SET_LAST_UPDATED_TIME", - SET_CURRENT_ORG: "SET_CURRENT_ORG", - SET_CURRENT_ORG_ID: "SET_CURRENT_ORG_ID", - FETCH_CURRENT_ORG: "FETCH_CURRENT_ORG", + SET_CURRENT_WORKSPACE: "SET_CURRENT_WORKSPACE", + SET_CURRENT_WORKSPACE_ID: "SET_CURRENT_WORKSPACE_ID", + FETCH_CURRENT_WORKSPACE: "FETCH_CURRENT_WORKSPACE", STORE_DATASOURCE_REFS: "STORE_DATASOURCE_REFS", UPDATE_DATASOURCE_REFS: "UPDATE_DATASOURCE_REFS", FETCH_USER_INIT: "FETCH_USER_INIT", @@ -432,10 +432,10 @@ export const ReduxActionTypes = { CLONE_PAGE_SUCCESS: "CLONE_PAGE_SUCCESS", SET_DEFAULT_APPLICATION_PAGE_INIT: "SET_DEFAULT_APPLICATION_PAGE_INIT", SET_DEFAULT_APPLICATION_PAGE_SUCCESS: "SET_DEFAULT_APPLICATION_PAGE_SUCCESS", - CREATE_ORGANIZATION_INIT: "CREATE_ORGANIZATION_INIT", - CREATE_ORGANIZATION_SUCCESS: "CREATE_ORGANIZATION_SUCCESS", - ADD_USER_TO_ORG_INIT: "ADD_USER_TO_ORG_INIT", - ADD_USER_TO_ORG_SUCCESS: "ADD_USER_TO_ORG_ERROR", + CREATE_WORKSPACE_INIT: "CREATE_WORKSPACE_INIT", + CREATE_WORKSPACE_SUCCESS: "CREATE_WORKSPACE_SUCCESS", + ADD_USER_TO_WORKSPACE_INIT: "ADD_USER_TO_WORKSPACE_INIT", + ADD_USER_TO_WORKSPACE_SUCCESS: "ADD_USER_TO_WORKSPACE_ERROR", SET_META_PROP: "SET_META_PROP", SET_META_PROP_AND_EVAL: "SET_META_PROP_AND_EVAL", META_UPDATE_DEBOUNCED_EVAL: "META_UPDATE_DEBOUNCED_EVAL", @@ -490,17 +490,18 @@ export const ReduxActionTypes = { "FETCH_PROVIDER_DETAILS_BY_PROVIDER_ID_SUCCESS", SET_PROVIDERS_LENGTH: "SET_PROVIDERS_LENGTH", GET_ALL_APPLICATION_INIT: "GET_ALL_APPLICATION_INIT", - FETCH_USER_APPLICATIONS_ORGS_SUCCESS: "FETCH_USER_APPLICATIONS_ORGS_SUCCESS", + FETCH_USER_APPLICATIONS_WORKSPACES_SUCCESS: + "FETCH_USER_APPLICATIONS_WORKSPACES_SUCCESS", FETCH_USER_DETAILS_SUCCESS: "FETCH_USER_DETAILS_SUCCESS", FETCH_ALL_USERS_SUCCESS: "FETCH_ALL_USERS_SUCCESS", FETCH_ALL_USERS_INIT: "FETCH_ALL_USERS_INIT", FETCH_ALL_ROLES_SUCCESS: "FETCH_ALL_ROLES_SUCCESS", FETCH_ALL_ROLES_INIT: "FETCH_ALL_ROLES_INIT", - DELETE_ORG_USER_INIT: "DELETE_ORG_USER_INIT", - DELETE_ORG_USER_SUCCESS: "DELETE_ORG_USER_SUCCESS", - LEAVE_ORG_INIT: "LEAVE_ORG_INIT", - CHANGE_ORG_USER_ROLE_INIT: "CHANGE_ORG_USER_ROLE_INIT", - CHANGE_ORG_USER_ROLE_SUCCESS: "CHANGE_ORG_USER_ROLE_SUCCESS", + DELETE_WORKSPACE_USER_INIT: "DELETE_WORKSPACE_USER_INIT", + DELETE_WORKSPACE_USER_SUCCESS: "DELETE_WORKSPACE_USER_SUCCESS", + LEAVE_WORKSPACE_INIT: "LEAVE_WORKSPACE_INIT", + CHANGE_WORKSPACE_USER_ROLE_INIT: "CHANGE_WORKSPACE_USER_ROLE_INIT", + CHANGE_WORKSPACE_USER_ROLE_SUCCESS: "CHANGE_WORKSPACE_USER_ROLE_SUCCESS", UPDATE_USER_DETAILS_INIT: "UPDATE_USER_DETAILS_INIT", UPDATE_USER_DETAILS_SUCCESS: "UPDATE_USER_DETAILS_SUCCESS", SET_DEFAULT_REFINEMENT: "SET_DEFAULT_REFINEMENT", @@ -680,8 +681,8 @@ export const ReduxActionTypes = { FORCE_SHOW_CONTENT: "FORCE_SHOW_CONTENT", UPDATE_BUTTON_WIDGET_TEXT: "UPDATE_BUTTON_WIDGET_TEXT", UPDATE_REPLAY_ENTITY: "UPDATE_REPLAY_ENTITY", - DELETE_ORG_INIT: "DELETE_ORG_INIT", - DELETE_ORG_SUCCESS: "DELETE_ORG_SUCCESS", + DELETE_WORKSPACE_INIT: "DELETE_WORKSPACE_INIT", + DELETE_WORKSPACE_SUCCESS: "DELETE_WORKSPACE_SUCCESS", SET_USER_CURRENT_GEO_LOCATION: "SET_USER_CURRENT_GEO_LOCATION", SET_DISCONNECTING_GIT_APPLICATION: "SET_DISCONNECTING_GIT_APPLICATION", SET_APP_THEMING_STACK: "SET_APP_THEMING_STACK", @@ -704,9 +705,8 @@ export const ReduxActionTypes = { GET_ALL_TEMPLATES_SUCCESS: "GET_ALL_TEMPLATES_SUCCESS", UPDATE_TEMPLATE_FILTERS: "UPDATE_TEMPLATE_FILTERS", SET_TEMPLATE_SEARCH_QUERY: "SET_TEMPLATE_SEARCH_QUERY", - IMPORT_TEMPLATE_TO_ORGANISATION_INIT: "IMPORT_TEMPLATE_TO_ORGANISATION_INIT", - IMPORT_TEMPLATE_TO_ORGANISATION_SUCCESS: - "IMPORT_TEMPLATE_TO_ORGANISATION_SUCCESS", + IMPORT_TEMPLATE_TO_WORKSPACE_INIT: "IMPORT_TEMPLATE_TO_WORKSPACE_INIT", + IMPORT_TEMPLATE_TO_WORKSPACE_SUCCESS: "IMPORT_TEMPLATE_TO_WORKSPACE_SUCCESS", SET_TEMPLATE_NOTIFICATION_SEEN: "SET_TEMPLATE_NOTIFICATION_SEEN", GET_TEMPLATE_NOTIFICATION_SEEN: "GET_TEMPLATE_NOTIFICATION_SEEN", GET_SIMILAR_TEMPLATES_INIT: "GET_SIMILAR_TEMPLATES_INIT", @@ -813,20 +813,20 @@ export const ReduxActionErrorTypes = { LOGIN_USER_ERROR: "LOGIN_USER_ERROR", CREATE_USER_ERROR: "CREATE_USER_ERROR", RESET_USER_PASSWORD_ERROR: "RESET_USER_PASSWORD_ERROR", - CHANGE_ORG_USER_ROLE_ERROR: "CHANGE_ORG_USER_ROLE_ERROR", + CHANGE_WORKSPACE_USER_ROLE_ERROR: "CHANGE_WORKSPACE_USER_ROLE_ERROR", SAVE_JS_EXECUTION_RECORD: "SAVE_JS_EXECUTION_RECORD", FETCH_PLUGINS_ERROR: "FETCH_PLUGINS_ERROR", FETCH_PLUGIN_FORM_CONFIGS_ERROR: "FETCH_PLUGIN_FORM_CONFIGS_ERROR", - UPDATE_ORG_NAME_ERROR: "UPDATE_ORG_NAME_ERROR", - SWITCH_ORGANIZATION_ERROR: "SWITCH_ORGANIZATION_ERROR", + UPDATE_WORKSPACE_NAME_ERROR: "UPDATE_WORKSPACE_NAME_ERROR", + SWITCH_WORKSPACE_ERROR: "SWITCH_WORKSPACE_ERROR", TEST_DATASOURCE_ERROR: "TEST_DATASOURCE_ERROR", FORGOT_PASSWORD_ERROR: "FORGOT_PASSWORD_ERROR", RESET_PASSWORD_VERIFY_TOKEN_ERROR: "RESET_PASSWORD_VERIFY_TOKEN_ERROR", - FETCH_ORG_ROLES_ERROR: "FETCH_ORG_ROLES_ERROR", - INVITE_USERS_TO_ORG_ERROR: "INVITE_USERS_TO_ORG_ERROR", - SAVE_ORG_ERROR: "SAVE_ORG_ERROR", - FETCH_ORG_ERROR: "FETCH_ORG_ERROR", - FETCH_ORGS_ERROR: "FETCH_ORGS_ERROR", + FETCH_WORKSPACE_ROLES_ERROR: "FETCH_WORKSPACE_ROLES_ERROR", + INVITE_USERS_TO_WORKSPACE_ERROR: "INVITE_USERS_TO_WORKSPACE_ERROR", + SAVE_WORKSPACE_ERROR: "SAVE_WORKSPACE_ERROR", + FETCH_WORKSPACE_ERROR: "FETCH_WORKSPACE_ERROR", + FETCH_WORKSPACES_ERROR: "FETCH_WORKSPACES_ERROR", FETCH_USER_ERROR: "FETCH_USER_ERROR", SET_CURRENT_USER_ERROR: "SET_CURRENT_USER_ERROR", LOGOUT_USER_ERROR: "LOGOUT_USER_ERROR", @@ -839,8 +839,8 @@ export const ReduxActionErrorTypes = { DELETE_APPLICATION_ERROR: "DELETE_APPLICATION_ERROR", DUPLICATE_APPLICATION_ERROR: "DUPLICATE_APPLICATION_ERROR", SET_DEFAULT_APPLICATION_PAGE_ERROR: "SET_DEFAULT_APPLICATION_PAGE_ERROR", - CREATE_ORGANIZATION_ERROR: "CREATE_ORGANIZATION_ERROR", - ADD_USER_TO_ORG_ERROR: "ADD_USER_TO_ORG_ERROR", + CREATE_WORKSPACE_ERROR: "CREATE_WORKSPACE_ERROR", + ADD_USER_TO_WORKSPACE_ERROR: "ADD_USER_TO_WORKSPACE_ERROR", UPDATE_WIDGET_NAME_ERROR: "UPDATE_WIDGET_NAME_ERROR", FETCH_ACTIONS_FOR_PAGE_ERROR: "FETCH_ACTIONS_FOR_PAGE_ERROR", FETCH_IMPORTED_COLLECTIONS_ERROR: "FETCH_IMPORTED_COLLECTIONS_ERROR", @@ -854,7 +854,8 @@ export const ReduxActionErrorTypes = { FETCH_PROVIDER_DETAILS_BY_PROVIDER_ID_ERROR: "FETCH_PROVIDER_DETAILS_BY_PROVIDER_ID_ERROR", SAVE_ACTION_NAME_ERROR: "SAVE_ACTION_NAME_ERROR", - FETCH_USER_APPLICATIONS_ORGS_ERROR: "FETCH_USER_APPLICATIONS_ORGS_ERROR", + FETCH_USER_APPLICATIONS_WORKSPACES_ERROR: + "FETCH_USER_APPLICATIONS_WORKSPACES_ERROR", FORK_APPLICATION_ERROR: "FORK_APPLICATION_ERROR", IMPORT_APPLICATION_ERROR: "IMPORT_APPLICATION_ERROR", FETCH_ALL_USERS_ERROR: "FETCH_ALL_USERS_ERROR", @@ -872,7 +873,7 @@ export const ReduxActionErrorTypes = { UPDATE_JS_ACTION_ERROR: "UPDATE_JS_ACTION_ERROR", COPY_JS_ACTION_ERROR: "COPY_JS_ACTION_ERROR", MOVE_JS_ACTION_ERROR: "MOVE_JS_ACTION_ERROR", - DELETE_ORG_USER_ERROR: "DELETE_ORG_USER_ERROR", + DELETE_WORKSPACE_USER_ERROR: "DELETE_WORKSPACE_USER_ERROR", CHANGE_APPVIEW_ACCESS_ERROR: "CHANGE_APPVIEW_ACCESS_ERROR", SAVE_JS_COLLECTION_NAME_ERROR: "SAVE_JS_COLLECTION_NAME_ERROR", FETCH_JS_ACTIONS_FOR_PAGE_ERROR: "FETCH_JS_ACTIONS_FOR_PAGE_ERROR", @@ -892,14 +893,13 @@ export const ReduxActionErrorTypes = { UPDATE_SELECTED_APP_THEME_ERROR: "UPDATE_SELECTED_APP_THEME_ERROR", CHANGE_SELECTED_APP_THEME_ERROR: "CHANGE_SELECTED_APP_THEME_ERROR", UPDATE_JS_FUNCTION_PROPERTY_ERROR: "UPDATE_JS_FUNCTION_PROPERTY_ERROR", - DELETE_ORG_ERROR: "DELETE_ORG_ERROR", + DELETE_WORKSPACE_ERROR: "DELETE_WORKSPACE_ERROR", REFLOW_BETA_FLAGS_INIT_ERROR: "REFLOW_BETA_FLAGS_INIT_ERROR", SAVE_APP_THEME_ERROR: "SAVE_APP_THEME_ERROR", DELETE_APP_THEME_ERROR: "DELETE_APP_THEME_ERROR", GET_ALL_TEMPLATES_ERROR: "GET_ALL_TEMPLATES_ERROR", GET_SIMILAR_TEMPLATES_ERROR: "GET_SIMILAR_TEMPLATES_ERROR", - IMPORT_TEMPLATE_TO_ORGANISATION_ERROR: - "IMPORT_TEMPLATE_TO_ORGANISATION_ERROR", + IMPORT_TEMPLATE_TO_WORKSPACE_ERROR: "IMPORT_TEMPLATE_TO_WORKSPACE_ERROR", GET_DEFAULT_PLUGINS_ERROR: "GET_DEFAULT_PLUGINS_ERROR", GET_TEMPLATE_ERROR: "GET_TEMPLATE_ERROR", }; @@ -1013,7 +1013,7 @@ export interface ApplicationPayload { name: string; color?: string; icon?: string; - organizationId: string; + workspaceId: string; defaultPageId: string; isPublic?: boolean; userPermissions?: string[]; @@ -1032,8 +1032,8 @@ export interface ApplicationPayload { isManualUpdate?: boolean; } -export type OrganizationDetails = { - organization: Org; +export type WorkspaceDetails = { + workspace: Workspace; applications: any[]; }; diff --git a/app/client/src/ce/constants/messages.ts b/app/client/src/ce/constants/messages.ts index 81efc95856..83fd6c6a2d 100644 --- a/app/client/src/ce/constants/messages.ts +++ b/app/client/src/ce/constants/messages.ts @@ -184,7 +184,7 @@ export const SIGN_IN = () => `Sign in`; export const CREATE_NEW_APPLICATION = () => `Create new`; export const SEARCH_APPS = () => `Search for apps...`; export const GETTING_STARTED = () => `GETTING STARTED`; -export const ORGANIZATIONS_HEADING = () => `ORGANIZATIONS`; +export const WORKSPACES_HEADING = () => `ORGANIZATIONS`; export const WELCOME_TOUR = () => `Welcome Tour`; export const NO_APPS_FOUND = () => `Whale! Whale! This name doesn't ring a bell!`; @@ -704,8 +704,8 @@ export const DISCONNECT_EXISTING_REPOSITORIES = () => export const DISCONNECT_EXISTING_REPOSITORIES_INFO = () => "To make space for newer repositories you can remove existing repositories."; export const CONTACT_SUPPORT = () => "Contact Support"; -export const CONTACT_SALES_MESSAGE_ON_INTERCOM = (orgName: string) => - `Hey there, Thanks for getting in touch! We understand that you’d like to extend the number of private repos for your ${orgName}. Could you tell us how many private repos you’d require and why? We'll get back to you in a short while.`; +export const CONTACT_SALES_MESSAGE_ON_INTERCOM = (workspaceName: string) => + `Hey there, Thanks for getting in touch! We understand that you’d like to extend the number of private repos for your ${workspaceName}. Could you tell us how many private repos you’d require and why? We'll get back to you in a short while.`; export const REPOSITORY_LIMIT_REACHED = () => "Repository Limit Reached"; export const REPOSITORY_LIMIT_REACHED_INFO = () => "Adding and using upto 3 repositories is free. To add more repositories kindly upgrade."; @@ -1048,6 +1048,7 @@ export const WIDGET_DEPRECATION_WARNING = (widgetName: string) => export const WIDGET_DEPRECATION_WARNING_HEADER = () => "Stay up-to-date"; export const LOCK_ENTITY_EXPLORER_MESSAGE = () => `Lock sidebar open`; export const CLOSE_ENTITY_EXPLORER_MESSAGE = () => `Close sidebar`; +export const JS_TOGGLE_DISABLED_MESSAGE = "Clear the field to toggle back"; // API Pane export const API_PANE_NO_BODY = () => "This request does not have a body"; @@ -1061,7 +1062,8 @@ export const ADD_QUERY_JS_TOOLTIP = () => "Create New"; export const GENERATE_APPLICATION_TITLE = () => "Generate Page"; export const GENERATE_APPLICATION_DESCRIPTION = () => "Quickly generate a page to perform CRUD operations on your database tables"; -export const DELETE_ORG_SUCCESSFUL = () => "Organization deleted successfully"; +export const DELETE_WORKSPACE_SUCCESSFUL = () => + "Organization deleted successfully"; // theming export const CHANGE_APP_THEME = (name: string) => `Theme ${name} Applied`; export const SAVE_APP_THEME = (name: string) => `Theme ${name} Saved`; @@ -1134,7 +1136,7 @@ export const END_TUTORIAL = () => "END TUTORIAL"; export const TITLE = () => "In this tutorial we’ll build a tool to display customer information"; export const DESCRIPTION = () => - "This tool has a table that displays customer data and a form to update a particular customer record. Try out the tool below before you start building this."; + "This tool has a table that displays customer data and a form to update a particular customer record. Try out the tool below before you start building."; export const BUTTON_TEXT = () => "Start Building"; // -- Rating -- export const RATING_TITLE = () => @@ -1174,7 +1176,7 @@ export const EMPTY_DATASOURCE_BUTTON_TEXT = () => "NEW DATASOURCE"; export const MORE = () => "MORE"; export const SHOW_LESS = () => "SHOW LESS"; export const CHOOSE_WHERE_TO_FORK = () => "Choose where to fork the template"; -export const SELECT_ORGANISATION = () => "Select Organization"; +export const SELECT_WORKSPACE = () => "Select Organization"; export const FORK_TEMPLATE = () => "FORK TEMPLATE"; export const TEMPLATES = () => "TEMPLATES"; export const FORK_THIS_TEMPLATE = () => "Fork this template"; diff --git a/app/client/src/ce/selectors/organizationSelectors.tsx b/app/client/src/ce/selectors/organizationSelectors.tsx deleted file mode 100644 index ad953a849d..0000000000 --- a/app/client/src/ce/selectors/organizationSelectors.tsx +++ /dev/null @@ -1,63 +0,0 @@ -import { createSelector } from "reselect"; -import { AppState } from "reducers"; -import { OrgRole } from "constants/orgConstants"; - -export const getRolesFromState = (state: AppState) => { - return state.ui.orgs.roles; -}; - -export const getOrgLoadingStates = (state: AppState) => { - return { - isFetchingOrg: state.ui.orgs.loadingStates.isFetchingOrg, - isFetchingAllUsers: state.ui.orgs.loadingStates.isFetchAllUsers, - isFetchingAllRoles: state.ui.orgs.loadingStates.isFetchAllRoles, - deletingUserInfo: state.ui.orgs.orgUsers.filter((el) => el.isDeleting)[0], - roleChangingUserInfo: state.ui.orgs.orgUsers.filter( - (el) => el.isChangingRole, - )[0], - }; -}; - -export const getCurrentOrgId = (state: AppState) => state.ui.orgs.currentOrg.id; -export const getOrgs = (state: AppState) => { - return state.ui.applications.userOrgs; -}; -export const getCurrentOrg = (state: AppState) => { - return state.ui.applications.userOrgs.map((el) => el.organization); -}; -export const getCurrentAppOrg = (state: AppState) => { - return state.ui.orgs.currentOrg; -}; -export const getAllUsers = (state: AppState) => state.ui.orgs.orgUsers; -export const getAllRoles = (state: AppState) => state.ui.orgs.orgRoles; - -export const getRoles = createSelector(getRolesFromState, (roles?: OrgRole[]): - | OrgRole[] - | undefined => { - return roles?.map((role) => ({ - id: role.id, - name: role.displayName || role.name, - isDefault: role.isDefault, - })); -}); - -export const getRolesForField = createSelector(getAllRoles, (roles?: any) => { - return Object.entries(roles).map((role) => { - return { - id: role[0], - name: role[0], - description: role[1], - }; - }); -}); - -export const getDefaultRole = createSelector(getRoles, (roles?: OrgRole[]) => { - return roles?.find((role) => role.isDefault); -}); -export const getCurrentError = (state: AppState) => { - return state.ui.errors.currentError; -}; - -export const getShowBrandingBadge = () => { - return true; -}; diff --git a/app/client/src/ce/selectors/workspaceSelectors.tsx b/app/client/src/ce/selectors/workspaceSelectors.tsx new file mode 100644 index 0000000000..7c1000587a --- /dev/null +++ b/app/client/src/ce/selectors/workspaceSelectors.tsx @@ -0,0 +1,72 @@ +import { createSelector } from "reselect"; +import { AppState } from "reducers"; +import { WorkspaceRole } from "constants/workspaceConstants"; + +export const getRolesFromState = (state: AppState) => { + return state.ui.workspaces.roles; +}; + +export const getWorkspaceLoadingStates = (state: AppState) => { + return { + isFetchingWorkspace: state.ui.workspaces.loadingStates.isFetchingWorkspace, + isFetchingAllUsers: state.ui.workspaces.loadingStates.isFetchAllUsers, + isFetchingAllRoles: state.ui.workspaces.loadingStates.isFetchAllRoles, + deletingUserInfo: state.ui.workspaces.workspaceUsers.filter( + (el) => el.isDeleting, + )[0], + roleChangingUserInfo: state.ui.workspaces.workspaceUsers.filter( + (el) => el.isChangingRole, + )[0], + }; +}; + +export const getCurrentWorkspaceId = (state: AppState) => + state.ui.workspaces.currentWorkspace.id; +export const getWorkspaces = (state: AppState) => { + return state.ui.applications.userWorkspaces; +}; +export const getCurrentWorkspace = (state: AppState) => { + return state.ui.applications.userWorkspaces.map((el) => el.workspace); +}; +export const getCurrentAppWorkspace = (state: AppState) => { + return state.ui.workspaces.currentWorkspace; +}; +export const getAllUsers = (state: AppState) => + state.ui.workspaces.workspaceUsers; +export const getAllRoles = (state: AppState) => + state.ui.workspaces.workspaceRoles; + +export const getRoles = createSelector( + getRolesFromState, + (roles?: WorkspaceRole[]): WorkspaceRole[] | undefined => { + return roles?.map((role) => ({ + id: role.id, + name: role.displayName || role.name, + isDefault: role.isDefault, + })); + }, +); + +export const getRolesForField = createSelector(getAllRoles, (roles?: any) => { + return Object.entries(roles).map((role) => { + return { + id: role[0], + name: role[0], + description: role[1], + }; + }); +}); + +export const getDefaultRole = createSelector( + getRoles, + (roles?: WorkspaceRole[]) => { + return roles?.find((role) => role.isDefault); + }, +); +export const getCurrentError = (state: AppState) => { + return state.ui.errors.currentError; +}; + +export const getShowBrandingBadge = () => { + return true; +}; diff --git a/app/client/src/comments/CommentsShowcaseCarousel/index.tsx b/app/client/src/comments/CommentsShowcaseCarousel/index.tsx index ac39acfe0f..8ebb000dbb 100644 --- a/app/client/src/comments/CommentsShowcaseCarousel/index.tsx +++ b/app/client/src/comments/CommentsShowcaseCarousel/index.tsx @@ -26,8 +26,8 @@ import { import { ASSETS_CDN_URL } from "constants/ThirdPartyConstants"; -import { getCurrentAppOrg } from "@appsmith/selectors/organizationSelectors"; -import useOrg from "utils/hooks/useOrg"; +import { getCurrentAppWorkspace } from "@appsmith/selectors/workspaceSelectors"; +import useWorkspace from "utils/hooks/useWorkspace"; import { getCanCreateApplications } from "utils/helpers"; import stepOneThumbnail from "assets/images/comments-onboarding/thumbnails/step-1.jpg"; @@ -232,9 +232,9 @@ export default function CommentsShowcaseCarousel() { dispatch(updateUserDetails({ name, email })); }; - const { id } = useSelector(getCurrentAppOrg) || {}; - const currentOrg = useOrg(id); - const canManage = getCanCreateApplications(currentOrg); + const { id } = useSelector(getCurrentAppWorkspace) || {}; + const currentWorkspace = useWorkspace(id); + const canManage = getCanCreateApplications(currentWorkspace); const [initialStep, finalStep] = getInitialAndFinalSteps(canManage); diff --git a/app/client/src/comments/inlineComments/AddCommentInput.tsx b/app/client/src/comments/inlineComments/AddCommentInput.tsx index 671250b117..4d2bfb973d 100644 --- a/app/client/src/comments/inlineComments/AddCommentInput.tsx +++ b/app/client/src/comments/inlineComments/AddCommentInput.tsx @@ -15,8 +15,8 @@ import styled from "styled-components"; import { EditorState, convertToRaw, Modifier, SelectionState } from "draft-js"; import { MentionData } from "@draft-js-plugins/mention"; -import { OrgUser } from "constants/orgConstants"; -import useOrgUsers from "./useOrgUsers"; +import { WorkspaceUser } from "constants/workspaceConstants"; +import useWorkspaceUsers from "./useWorkspaceUsers"; import { RawDraftContentState } from "draft-js"; @@ -32,7 +32,7 @@ import { setShowAppInviteUsersDialog } from "actions/applicationActions"; import { useDispatch, useSelector } from "react-redux"; import { change } from "redux-form"; -import { INVITE_USERS_TO_ORG_FORM } from "constants/forms"; +import { INVITE_USERS_TO_WORKSPACE_FORM } from "constants/forms"; import { isEmail } from "utils/formhelpers"; import TourTooltipWrapper from "components/ads/tour/TourTooltipWrapper"; @@ -42,8 +42,8 @@ import { commentsTourStepsEditModeTypes, commentsTourStepsPublishedModeTypes, } from "comments/tour/commentsTourSteps"; -import { getCurrentAppOrg } from "@appsmith/selectors/organizationSelectors"; -import useOrg from "utils/hooks/useOrg"; +import { getCurrentAppWorkspace } from "@appsmith/selectors/workspaceSelectors"; +import useWorkspace from "utils/hooks/useWorkspace"; import { getCanCreateApplications } from "utils/helpers"; import { getAppsmithConfigs } from "@appsmith/configs"; @@ -164,12 +164,12 @@ const sortMentionData = (filter = "") => (a: MentionData, b: MentionData) => { }; const useUserSuggestions = ( - users: Array, + users: Array, setSuggestions: Dispatch>>, ) => { - const { id } = useSelector(getCurrentAppOrg) || {}; - const currentOrg = useOrg(id); - const canManage = getCanCreateApplications(currentOrg); + const { id } = useSelector(getCurrentAppWorkspace) || {}; + const currentWorkspace = useWorkspace(id); + const canManage = getCanCreateApplications(currentWorkspace); useEffect(() => { const result: Array = users.map((user) => ({ @@ -206,7 +206,7 @@ function AddCommentInput({ }); const dispatch = useDispatch(); - const users = useOrgUsers(); + const users = useWorkspaceUsers(); const [suggestions, setSuggestions] = useState>([]); const [trigger, setTrigger] = useState(); useUserSuggestions(users, setSuggestions); @@ -296,7 +296,7 @@ function AddCommentInput({ ) { const email = mention.isSupport ? mention.user?.username : mention.name; dispatch(setShowAppInviteUsersDialog(true)); - dispatch(change(INVITE_USERS_TO_ORG_FORM, "users", email)); + dispatch(change(INVITE_USERS_TO_WORKSPACE_FORM, "users", email)); } else if (mention.isInviteTrigger && !isEmail(mention.name)) { Toaster.show({ text: createMessage(INVALID_EMAIL), diff --git a/app/client/src/comments/inlineComments/useOrgUsers.tsx b/app/client/src/comments/inlineComments/useOrgUsers.tsx deleted file mode 100644 index 8c6e1a1139..0000000000 --- a/app/client/src/comments/inlineComments/useOrgUsers.tsx +++ /dev/null @@ -1,41 +0,0 @@ -import { ReduxActionTypes } from "@appsmith/constants/ReduxActionConstants"; -import { - isPermitted, - PERMISSION_TYPE, -} from "pages/Applications/permissionHelpers"; -import { useEffect } from "react"; -import { useSelector, useDispatch } from "react-redux"; -import { - getAllUsers, - getCurrentAppOrg, - getCurrentOrgId, -} from "@appsmith/selectors/organizationSelectors"; -import useOrg from "utils/hooks/useOrg"; - -const useOrgUsers = () => { - const dispatch = useDispatch(); - const orgId = useSelector(getCurrentOrgId); - const orgUsers = useSelector(getAllUsers); - const { id } = useSelector(getCurrentAppOrg) || {}; - const currentOrg = useOrg(id); - - // to check if user is added to an org - const canInviteToOrg = isPermitted( - currentOrg?.userPermissions || [], - PERMISSION_TYPE.INVITE_USER_TO_ORGANIZATION, - ); - - useEffect(() => { - if ((!orgUsers || !orgUsers.length) && canInviteToOrg) { - dispatch({ - type: ReduxActionTypes.FETCH_ALL_USERS_INIT, - payload: { - orgId, - }, - }); - } - }, [orgId]); - return orgUsers; -}; - -export default useOrgUsers; diff --git a/app/client/src/comments/inlineComments/useWorkspaceUsers.tsx b/app/client/src/comments/inlineComments/useWorkspaceUsers.tsx new file mode 100644 index 0000000000..25c54b2593 --- /dev/null +++ b/app/client/src/comments/inlineComments/useWorkspaceUsers.tsx @@ -0,0 +1,41 @@ +import { ReduxActionTypes } from "@appsmith/constants/ReduxActionConstants"; +import { + isPermitted, + PERMISSION_TYPE, +} from "pages/Applications/permissionHelpers"; +import { useEffect } from "react"; +import { useSelector, useDispatch } from "react-redux"; +import { + getAllUsers, + getCurrentAppWorkspace, + getCurrentWorkspaceId, +} from "@appsmith/selectors/workspaceSelectors"; +import useWorkspace from "utils/hooks/useWorkspace"; + +const useWorkspaceUsers = () => { + const dispatch = useDispatch(); + const workspaceId = useSelector(getCurrentWorkspaceId); + const workspaceUsers = useSelector(getAllUsers); + const { id } = useSelector(getCurrentAppWorkspace) || {}; + const currentWorkspace = useWorkspace(id); + + // to check if user is added to a workspace + const canInviteToWorkspace = isPermitted( + currentWorkspace?.userPermissions || [], + PERMISSION_TYPE.INVITE_USER_TO_WORKSPACE, + ); + + useEffect(() => { + if ((!workspaceUsers || !workspaceUsers.length) && canInviteToWorkspace) { + dispatch({ + type: ReduxActionTypes.FETCH_ALL_USERS_INIT, + payload: { + workspaceId, + }, + }); + } + }, [workspaceId]); + return workspaceUsers; +}; + +export default useWorkspaceUsers; diff --git a/app/client/src/components/ads/Icon.tsx b/app/client/src/components/ads/Icon.tsx index 4415fe4642..681e021a0e 100644 --- a/app/client/src/components/ads/Icon.tsx +++ b/app/client/src/components/ads/Icon.tsx @@ -66,7 +66,7 @@ import { ReactComponent as GearIcon } from "assets/icons/ads/gear.svg"; import { ReactComponent as UserV2Icon } from "assets/icons/ads/user-v2.svg"; import { ReactComponent as SupportIcon } from "assets/icons/ads/support.svg"; import { ReactComponent as Snippet } from "assets/icons/ads/snippet.svg"; -import { ReactComponent as WorkspaceIcon } from "assets/icons/ads/organizationIcon.svg"; +import { ReactComponent as WorkspaceIcon } from "assets/icons/ads/workspaceIcon.svg"; import { ReactComponent as SettingIcon } from "assets/icons/control/settings.svg"; import { ReactComponent as DropdownIcon } from "assets/icons/ads/dropdown.svg"; import { ReactComponent as ChatIcon } from "assets/icons/ads/app-icons/chat.svg"; diff --git a/app/client/src/components/ads/Tooltip.tsx b/app/client/src/components/ads/Tooltip.tsx index 44408c9af4..88dbfd7d05 100644 --- a/app/client/src/components/ads/Tooltip.tsx +++ b/app/client/src/components/ads/Tooltip.tsx @@ -1,6 +1,6 @@ import React from "react"; import { CommonComponentProps } from "./common"; -import { Position, Tooltip, PopperBoundary } from "@blueprintjs/core"; +import { Tooltip, PopperBoundary, PopoverPosition } from "@blueprintjs/core"; import { GLOBAL_STYLE_TOOLTIP_CLASSNAME } from "globalStyles/tooltip"; import { Modifiers } from "popper.js"; import { noop } from "lodash"; @@ -10,7 +10,7 @@ type Variant = "dark" | "light"; export type TooltipProps = CommonComponentProps & { content: JSX.Element | string; disabled?: boolean; - position?: Position; + position?: PopoverPosition; children: JSX.Element | React.ReactNode; variant?: Variant; maxWidth?: string; @@ -60,7 +60,7 @@ function TooltipComponent(props: TooltipProps) { } TooltipComponent.defaultProps = { - position: Position.TOP, + position: PopoverPosition.TOP, variant: "dark", }; diff --git a/app/client/src/components/editorComponents/form/FormDialogComponent.tsx b/app/client/src/components/editorComponents/form/FormDialogComponent.tsx index b7e0e3f827..58c965038c 100644 --- a/app/client/src/components/editorComponents/form/FormDialogComponent.tsx +++ b/app/client/src/components/editorComponents/form/FormDialogComponent.tsx @@ -8,7 +8,7 @@ import { IconName } from "components/ads/Icon"; type FormDialogComponentProps = { isOpen?: boolean; canOutsideClickClose?: boolean; - orgId?: string; + workspaceId?: string; title: string; Form: any; trigger: ReactNode; @@ -69,7 +69,7 @@ export function FormDialogComponent(props: FormDialogComponentProps) { {...props.customProps} applicationId={props.applicationId} onCancel={() => setIsOpen(false)} - orgId={props.orgId} + workspaceId={props.workspaceId} /> ); diff --git a/app/client/src/components/editorComponents/form/fields/EmbeddedDatasourcePathField.tsx b/app/client/src/components/editorComponents/form/fields/EmbeddedDatasourcePathField.tsx index 92029a1226..cbc951e009 100644 --- a/app/client/src/components/editorComponents/form/fields/EmbeddedDatasourcePathField.tsx +++ b/app/client/src/components/editorComponents/form/fields/EmbeddedDatasourcePathField.tsx @@ -61,7 +61,7 @@ import { import { datasourcesEditorIdURL } from "RouteBuilder"; type ReduxStateProps = { - orgId: string; + workspaceId: string; datasource: Datasource | EmbeddedRestDatasource; datasourceList: Datasource[]; currentPageId?: string; @@ -199,14 +199,14 @@ class EmbeddedDatasourcePathComponent extends React.Component< } handleDatasourceUrlUpdate = (datasourceUrl: string) => { - const { datasource, orgId, pluginId } = this.props; + const { datasource, pluginId, workspaceId } = this.props; const urlHasUpdated = datasourceUrl !== datasource.datasourceConfiguration?.url; if (urlHasUpdated) { const isDatasourceRemoved = datasourceUrl.indexOf(datasource.datasourceConfiguration?.url) === -1; let newDatasource = isDatasourceRemoved - ? { ...DEFAULT_DATASOURCE(pluginId, orgId) } + ? { ...DEFAULT_DATASOURCE(pluginId, workspaceId) } : { ...datasource }; newDatasource = { ...newDatasource, @@ -551,7 +551,7 @@ const mapStateToProps = ( } return { - orgId: state.ui.orgs.currentOrg.id, + workspaceId: state.ui.workspaces.currentWorkspace.id, datasource: datasourceMerged, datasourceList: getDatasourcesByPluginId(state, ownProps.pluginId), currentPageId: state.entities.pageList.currentPageId, diff --git a/app/client/src/components/editorComponents/utils.test.ts b/app/client/src/components/editorComponents/utils.test.ts index c790fd7d42..e6f8f9f822 100644 --- a/app/client/src/components/editorComponents/utils.test.ts +++ b/app/client/src/components/editorComponents/utils.test.ts @@ -5,7 +5,7 @@ const TEST_JS_FUNCTION_ID = "627ccff468e1fa5185b7f901"; const TEST_JS_FUNCTION = { id: TEST_JS_FUNCTION_ID, applicationId: "627aaf637e9e9b75e43ad2ff", - organizationId: "61e52bb4847aa804d79fc7c1", + workspaceId: "61e52bb4847aa804d79fc7c1", pluginType: "JS", pluginId: "6138c786168857325f78ef3e", name: "myFun234y", @@ -14,7 +14,7 @@ const TEST_JS_FUNCTION = { userPermissions: [], name: "UNUSED_DATASOURCE", pluginId: "6138c786168857325f78ef3e", - organizationId: "61e52bb4847aa804d79fc7c1", + workspaceId: "61e52bb4847aa804d79fc7c1", messages: [], isValid: true, new: true, diff --git a/app/client/src/components/propertyControls/BorderRadiusOptionsControl.tsx b/app/client/src/components/propertyControls/BorderRadiusOptionsControl.tsx index 989664e0d2..2525a16308 100644 --- a/app/client/src/components/propertyControls/BorderRadiusOptionsControl.tsx +++ b/app/client/src/components/propertyControls/BorderRadiusOptionsControl.tsx @@ -1,7 +1,7 @@ import * as React from "react"; import TooltipComponent from "components/ads/Tooltip"; -import BaseControl, { ControlProps } from "./BaseControl"; +import BaseControl, { ControlData, ControlProps } from "./BaseControl"; import { borderRadiusOptions } from "constants/ThemeConstants"; import { ButtonTabComponent } from "components/ads"; @@ -36,6 +36,8 @@ const options = Object.keys(borderRadiusOptions).map((optionKey) => ({ value: borderRadiusOptions[optionKey], })); +const optionsValues = new Set(Object.values(borderRadiusOptions)); + /** * ---------------------------------------------------------------------------- * COMPONENT @@ -59,6 +61,10 @@ class BorderRadiusOptionsControl extends BaseControl< /> ); } + + static canDisplayValueInUI(config: ControlData, value: any): boolean { + return optionsValues.has(value); + } } export default BorderRadiusOptionsControl; diff --git a/app/client/src/components/propertyControls/BoxShadowOptionsControl.tsx b/app/client/src/components/propertyControls/BoxShadowOptionsControl.tsx index 562a426869..e240c4f2ab 100644 --- a/app/client/src/components/propertyControls/BoxShadowOptionsControl.tsx +++ b/app/client/src/components/propertyControls/BoxShadowOptionsControl.tsx @@ -1,6 +1,6 @@ import * as React from "react"; -import BaseControl, { ControlProps } from "./BaseControl"; +import BaseControl, { ControlData, ControlProps } from "./BaseControl"; import TooltipComponent from "components/ads/Tooltip"; import { boxShadowOptions } from "constants/ThemeConstants"; import CloseLineIcon from "remixicon-react/CloseLineIcon"; @@ -35,6 +35,8 @@ const options = Object.keys(boxShadowOptions).map((optionKey) => ({ value: boxShadowOptions[optionKey], })); +const optionsValues = new Set(Object.values(boxShadowOptions)); + class BoxShadowOptionsControl extends BaseControl< BoxShadowOptionsControlProps > { @@ -53,6 +55,10 @@ class BoxShadowOptionsControl extends BaseControl< /> ); } + + static canDisplayValueInUI(config: ControlData, value: any): boolean { + return optionsValues.has(value); + } } export default BoxShadowOptionsControl; diff --git a/app/client/src/components/propertyControls/DatePickerControl.tsx b/app/client/src/components/propertyControls/DatePickerControl.tsx index 640f14b71e..39c05ee96e 100644 --- a/app/client/src/components/propertyControls/DatePickerControl.tsx +++ b/app/client/src/components/propertyControls/DatePickerControl.tsx @@ -1,11 +1,12 @@ import React from "react"; -import BaseControl, { ControlProps } from "./BaseControl"; +import BaseControl, { ControlData, ControlProps } from "./BaseControl"; import moment from "moment-timezone"; import styled from "styled-components"; import { TimePrecision } from "@blueprintjs/datetime"; import { WidgetProps } from "widgets/BaseWidget"; import { ISO_DATE_FORMAT } from "constants/WidgetValidation"; import DatePickerComponent from "components/ads/DatePickerComponent"; +import { isDynamicValue } from "utils/DynamicBindingUtils"; const DatePickerControlWrapper = styled.div<{ isValid: boolean }>` display: flex; @@ -177,6 +178,10 @@ class DatePickerControl extends BaseControl< } }; + static canDisplayValueInUI(config: ControlData, value: any): boolean { + return !isDynamicValue(value); + } + static getControlType() { return "DATE_PICKER"; } diff --git a/app/client/src/components/propertyControls/OptionControl.tsx b/app/client/src/components/propertyControls/OptionControl.tsx index 3014e26ccb..90d3655a42 100644 --- a/app/client/src/components/propertyControls/OptionControl.tsx +++ b/app/client/src/components/propertyControls/OptionControl.tsx @@ -1,7 +1,8 @@ import React from "react"; -import BaseControl, { ControlProps } from "./BaseControl"; +import BaseControl, { ControlData, ControlProps } from "./BaseControl"; import { DropdownOption } from "components/constants"; import { KeyValueComponent } from "./KeyValueComponent"; +import { isDynamicValue } from "utils/DynamicBindingUtils"; export type DropDownOptionWithKey = DropdownOption & { key: string; @@ -24,6 +25,24 @@ class OptionControl extends BaseControl { static getControlType() { return "OPTION_INPUT"; } + + static canDisplayValueInUI(config: ControlData, value: any): boolean { + if (isDynamicValue(value)) return false; + + try { + const pairs: DropdownOption[] = JSON.parse(value); + for (const x of pairs) { + const keys = Object.keys(x); + if (!keys.includes("label") || !keys.includes("value")) { + return false; + } + } + } catch { + return false; + } + + return true; + } } export default OptionControl; diff --git a/app/client/src/components/propertyControls/PrimaryColumnColorPickerControl.tsx b/app/client/src/components/propertyControls/PrimaryColumnColorPickerControl.tsx new file mode 100644 index 0000000000..0ea14a41f0 --- /dev/null +++ b/app/client/src/components/propertyControls/PrimaryColumnColorPickerControl.tsx @@ -0,0 +1,58 @@ +import React from "react"; +import { + combineDynamicBindings, + getDynamicBindings, + isDynamicValue, +} from "utils/DynamicBindingUtils"; +import BaseControl, { ControlData, ControlProps } from "./BaseControl"; +import ColorPickerComponent from "components/ads/ColorPickerComponentV2"; + +class PrimaryColumnsColorPickerControl extends BaseControl< + PrimaryColumnColorPickerControlProps +> { + handleChangeColor = (color: string) => { + let computedColor = color; + + if (isDynamicValue(color)) { + const { jsSnippets, stringSegments } = getDynamicBindings(color); + + const js = combineDynamicBindings(jsSnippets, stringSegments); + computedColor = `{{${this.props.widgetProperties.widgetName}.sanitizedTableData.map((currentRow) => ( ${js}))}}`; + } + + this.updateProperty(this.props.propertyName, computedColor); + }; + + render() { + const computedEvaluatedValue = Array.isArray(this.props.evaluatedValue) + ? this.props.evaluatedValue[0] + : this.props.evaluatedValue; + + return ( + + ); + } + + static getControlType() { + return "PRIMARY_COLUMNS_COLOR_PICKER"; + } + + static canDisplayValueInUI(config: ControlData, value: any): boolean { + return !isDynamicValue(value); + } +} + +export interface PrimaryColumnColorPickerControlProps extends ControlProps { + defaultColor?: string; +} + +export default PrimaryColumnsColorPickerControl; diff --git a/app/client/src/components/propertyControls/StyledControls.tsx b/app/client/src/components/propertyControls/StyledControls.tsx index dd584dc00e..4dec625479 100644 --- a/app/client/src/components/propertyControls/StyledControls.tsx +++ b/app/client/src/components/propertyControls/StyledControls.tsx @@ -10,6 +10,7 @@ import { FormIcons } from "icons/FormIcons"; import Button from "components/ads/Button"; import TextInput, { TextInputProps } from "components/ads/TextInput"; import Dropdown from "components/ads/Dropdown"; +import { IconWrapper } from "constants/IconConstants"; import { InputWrapper } from "components/ads/TextInput"; type ControlWrapperProps = { @@ -57,23 +58,34 @@ export const ControlPropertyLabelContainer = styled.div` export const JSToggleButton = styled.button<{ active: boolean }>` margin: 4px; margin-top: 0px; - cursor: pointer; + + & ${IconWrapper} { + cursor: ${(props) => (props.disabled ? "not-allowed" : "pointer")}; + } + height: auto; width: 28px; height: 16px; - border: 0.5px solid ${Colors.BLACK}; + border: 0.5px solid + ${(props) => (props.disabled ? Colors.GRAY_400 : Colors.GRAY_700)}; background-color: ${(props) => - props.active ? Colors.GREY_10 : Colors.GREY_2}; + props.active + ? props.disabled + ? Colors.GRAY_400 + : Colors.GRAY_800 + : props.disabled + ? Colors.GRAY_200 + : Colors.WHITE}; &:hover { background-color: ${(props) => - props.active ? Colors.GREY_9 : Colors.GREY_3}; - - &&& svg { - path { - fill: ${(props) => (props.active ? Colors.GREY_2 : Colors.GREY_9)}; - } - } + props.disabled + ? props.active + ? Colors.GRAY_400 + : Colors.GRAY_200 + : props.active + ? Colors.GRAY_900 + : Colors.GRAY_200}; } & > div { @@ -93,8 +105,7 @@ export const JSToggleButton = styled.button<{ active: boolean }>` } path { - fill: ${(props) => - props.active ? props.theme.colors.GREY_2 : Colors.GREY_9}; + fill: ${(props) => (props.active ? Colors.WHITE : Colors.GRAY_700)}; } } `; diff --git a/app/client/src/components/propertyControls/index.ts b/app/client/src/components/propertyControls/index.ts index 80fc3d91b9..f91c90d701 100644 --- a/app/client/src/components/propertyControls/index.ts +++ b/app/client/src/components/propertyControls/index.ts @@ -30,6 +30,9 @@ import PrimaryColumnDropdownControl, { import ColorPickerControl, { ColorPickerControlProps, } from "components/propertyControls/ColorPickerControl"; +import PrimaryColumnColorPickerControl, { + PrimaryColumnColorPickerControlProps, +} from "components/propertyControls/PrimaryColumnColorPickerControl"; import ComputeTablePropertyControl, { ComputeTablePropertyControlProps, } from "components/propertyControls/ComputeTablePropertyControl"; @@ -87,6 +90,7 @@ export const PropertyControls = { ButtonControl, LabelAlignmentOptionsControl, NumericInputControl, + PrimaryColumnColorPickerControl, }; export type PropertyControlPropsType = @@ -102,7 +106,8 @@ export type PropertyControlPropsType = | ColorPickerControlProps | ComputeTablePropertyControlProps | PrimaryColumnDropdownControlProps - | NumericInputControlProps; + | NumericInputControlProps + | PrimaryColumnColorPickerControlProps; export const getPropertyControlTypes = (): { [key: string]: string } => { const _types: { [key: string]: string } = {}; diff --git a/app/client/src/constants/DefaultTheme.tsx b/app/client/src/constants/DefaultTheme.tsx index eb8096e4d0..e52763c03e 100644 --- a/app/client/src/constants/DefaultTheme.tsx +++ b/app/client/src/constants/DefaultTheme.tsx @@ -934,12 +934,12 @@ type ColorType = { applications: { bg: ShadeColor; textColor: ShadeColor; - orgColor: ShadeColor; + workspaceColor: ShadeColor; iconColor: ShadeColor; hover: { bg: ShadeColor; textColor: ShadeColor; - orgColor: ShadeColor; + workspaceColor: ShadeColor; }; cardMenuIcon: ShadeColor; }; @@ -1947,12 +1947,12 @@ export const dark: ColorType = { applications: { bg: darkShades[4], textColor: darkShades[7], - orgColor: darkShades[7], + workspaceColor: darkShades[7], iconColor: darkShades[7], hover: { bg: darkShades[5], textColor: darkShades[8], - orgColor: darkShades[9], + workspaceColor: darkShades[9], }, cardMenuIcon: darkShades[7], }, @@ -2587,12 +2587,12 @@ export const light: ColorType = { applications: { bg: lightShades[3], textColor: lightShades[7], - orgColor: lightShades[7], + workspaceColor: lightShades[7], iconColor: lightShades[7], hover: { bg: lightShades[5], textColor: lightShades[8], - orgColor: lightShades[9], + workspaceColor: lightShades[9], }, cardMenuIcon: lightShades[17], }, diff --git a/app/client/src/constants/forms.ts b/app/client/src/constants/forms.ts index 7f56669973..10b7c3232b 100644 --- a/app/client/src/constants/forms.ts +++ b/app/client/src/constants/forms.ts @@ -1,6 +1,6 @@ export const API_EDITOR_FORM_NAME = "ApiEditorForm"; export const CREATE_APPLICATION_FORM_NAME = "CreateApplicationForm"; -export const INVITE_USERS_TO_ORG_FORM = "InviteUsersToOrgForm"; +export const INVITE_USERS_TO_WORKSPACE_FORM = "InviteUsersToWorkspaceForm"; export const LOGIN_FORM_NAME = "LoginForm"; export const LOGIN_FORM_EMAIL_FIELD_NAME = "username"; @@ -12,7 +12,7 @@ export const FORGOT_PASSWORD_FORM_NAME = "ForgotPasswordForm"; export const RESET_PASSWORD_FORM_NAME = "ResetPasswordForm"; export const CREATE_PASSWORD_FORM_NAME = "CreatePasswordForm"; -export const CREATE_ORGANIZATION_FORM_NAME = "New Organization"; +export const CREATE_WORKSPACE_FORM_NAME = "New Organization"; export const CURL_IMPORT_FORM = "CurlImportForm"; export const QUERY_EDITOR_FORM_NAME = "QueryEditorForm"; diff --git a/app/client/src/constants/routes.ts b/app/client/src/constants/routes.ts index 441ed1c30d..44e11b59f2 100644 --- a/app/client/src/constants/routes.ts +++ b/app/client/src/constants/routes.ts @@ -7,7 +7,7 @@ export const PLACEHOLDER_APP_SLUG = "application"; export const PLACEHOLDER_PAGE_ID = "pageId"; export const PLACEHOLDER_PAGE_SLUG = "page"; export const BASE_URL = "/"; -export const ORG_URL = "/org"; +export const WORKSPACE_URL = "/workspace"; export const PAGE_NOT_FOUND_URL = "/404"; export const SERVER_ERROR_URL = "/500"; export const APPLICATIONS_URL = `/applications`; @@ -28,8 +28,8 @@ export const SIGN_UP_URL = `${USER_AUTH_URL}/signup`; export const BASE_LOGIN_URL = `/login`; export const AUTH_LOGIN_URL = `${USER_AUTH_URL}/login`; export const SIGNUP_SUCCESS_URL = `/signup-success`; -export const ORG_INVITE_USERS_PAGE_URL = `${ORG_URL}/invite`; -export const ORG_SETTINGS_PAGE_URL = `${ORG_URL}/settings`; +export const WORKSPACE_INVITE_USERS_PAGE_URL = `${WORKSPACE_URL}/invite`; +export const WORKSPACE_SETTINGS_PAGE_URL = `${WORKSPACE_URL}/settings`; export const BUILDER_PATH_DEPRECATED = `/applications/:applicationId/(pages)?/:pageId?/edit`; export const BUILDER_PATH = `/app/:applicationSlug/:pageSlug(.*\-):pageId/edit`; export const VIEWER_PATH = `/app/:applicationSlug/:pageSlug(.*\-):pageId`; diff --git a/app/client/src/constants/userConstants.ts b/app/client/src/constants/userConstants.ts index ee02bfc186..51d23132a8 100644 --- a/app/client/src/constants/userConstants.ts +++ b/app/client/src/constants/userConstants.ts @@ -9,7 +9,7 @@ export enum CommentsOnboardingState { export type User = { email: string; - organizationIds: string[]; + workspaceIds: string[]; username: string; name: string; gender: Gender; @@ -35,7 +35,7 @@ export const CurrentUserDetailsRequestPayload = { export const DefaultCurrentUserDetails: User = { name: ANONYMOUS_USERNAME, email: ANONYMOUS_USERNAME, - organizationIds: [], + workspaceIds: [], username: ANONYMOUS_USERNAME, gender: "MALE", isSuperUser: false, diff --git a/app/client/src/constants/orgConstants.ts b/app/client/src/constants/workspaceConstants.ts similarity index 73% rename from app/client/src/constants/orgConstants.ts rename to app/client/src/constants/workspaceConstants.ts index e200c3ff6c..c2fa78e6bd 100644 --- a/app/client/src/constants/orgConstants.ts +++ b/app/client/src/constants/workspaceConstants.ts @@ -1,13 +1,13 @@ import { ApplicationPayload } from "@appsmith/constants/ReduxActionConstants"; -export type OrgRole = { +export type WorkspaceRole = { id: string; name: string; displayName?: string; isDefault?: boolean; }; -export type Org = { +export type Workspace = { id: string; name: string; website?: string; @@ -17,7 +17,7 @@ export type Org = { userPermissions?: string[]; }; -export type OrgUser = { +export type WorkspaceUser = { username: string; name: string; roleName: string; @@ -25,8 +25,8 @@ export type OrgUser = { isChangingRole: boolean; }; -export type Organization = { +export type Workspaces = { applications: ApplicationPayload[]; - organization: Org; - userRoles: OrgUser[]; + workspace: Workspace; + userRoles: WorkspaceUser[]; }; diff --git a/app/client/src/ee/selectors/organizationSelectors.tsx b/app/client/src/ee/selectors/organizationSelectors.tsx deleted file mode 100644 index 49474f8ce5..0000000000 --- a/app/client/src/ee/selectors/organizationSelectors.tsx +++ /dev/null @@ -1 +0,0 @@ -export * from "ce/selectors/organizationSelectors"; diff --git a/app/client/src/ee/selectors/workspaceSelectors.tsx b/app/client/src/ee/selectors/workspaceSelectors.tsx new file mode 100644 index 0000000000..305f985583 --- /dev/null +++ b/app/client/src/ee/selectors/workspaceSelectors.tsx @@ -0,0 +1 @@ +export * from "ce/selectors/workspaceSelectors"; diff --git a/app/client/src/entities/Action/actionProperties.test.ts b/app/client/src/entities/Action/actionProperties.test.ts index 5e0898391f..f22680dae3 100644 --- a/app/client/src/entities/Action/actionProperties.test.ts +++ b/app/client/src/entities/Action/actionProperties.test.ts @@ -15,7 +15,7 @@ const DEFAULT_ACTION: Action = { isValid: false, jsonPathKeys: [], name: "", - organizationId: "", + workspaceId: "", pageId: "", pluginId: "", messages: [], diff --git a/app/client/src/entities/Action/index.ts b/app/client/src/entities/Action/index.ts index 749658413e..7772d9c786 100644 --- a/app/client/src/entities/Action/index.ts +++ b/app/client/src/entities/Action/index.ts @@ -79,7 +79,7 @@ export interface StoredDatasource { export interface BaseAction { id: string; name: string; - organizationId: string; + workspaceId: string; pageId: string; collectionId?: string; pluginId: string; diff --git a/app/client/src/entities/DataTree/dataTreeJSAction.test.ts b/app/client/src/entities/DataTree/dataTreeJSAction.test.ts index d710202429..7236cc0864 100644 --- a/app/client/src/entities/DataTree/dataTreeJSAction.test.ts +++ b/app/client/src/entities/DataTree/dataTreeJSAction.test.ts @@ -9,7 +9,7 @@ describe("generateDataTreeJSAction", () => { config: { id: "1234", applicationId: "app123", - organizationId: "org123", + workspaceId: "org123", name: "JSObject2", pageId: "page123", pluginId: "plugin123", @@ -20,7 +20,7 @@ describe("generateDataTreeJSAction", () => { { id: "abcd", applicationId: "app123", - organizationId: "org123", + workspaceId: "org123", pluginType: PluginType.JS, pluginId: "plugin123", name: "myFun2", @@ -29,7 +29,7 @@ describe("generateDataTreeJSAction", () => { userPermissions: [], name: "UNUSED_DATASOURCE", pluginId: "plugin123", - organizationId: "org123", + workspaceId: "org123", messages: [], isValid: true, new: true, @@ -67,7 +67,7 @@ describe("generateDataTreeJSAction", () => { { id: "623973054d9aea1b062af87b", applicationId: "app123", - organizationId: "org123", + workspaceId: "org123", pluginType: "JS", pluginId: "plugin123", name: "myFun1", @@ -76,7 +76,7 @@ describe("generateDataTreeJSAction", () => { userPermissions: [], name: "UNUSED_DATASOURCE", pluginId: "plugin123", - organizationId: "org123", + workspaceId: "org123", messages: [], isValid: true, new: true, @@ -195,7 +195,7 @@ describe("generateDataTreeJSAction", () => { config: { id: "1234", applicationId: "app123", - organizationId: "org123", + workspaceId: "org123", name: "JSObject2", pageId: "page123", pluginId: "plugin123", @@ -206,7 +206,7 @@ describe("generateDataTreeJSAction", () => { { id: "abcd", applicationId: "app123", - organizationId: "org123", + workspaceId: "org123", pluginType: PluginType.JS, pluginId: "plugin123", name: "myFun2", @@ -215,7 +215,7 @@ describe("generateDataTreeJSAction", () => { userPermissions: [], name: "UNUSED_DATASOURCE", pluginId: "plugin123", - organizationId: "org123", + workspaceId: "org123", messages: [], isValid: true, new: true, @@ -253,7 +253,7 @@ describe("generateDataTreeJSAction", () => { { id: "623973054d9aea1b062af87b", applicationId: "app123", - organizationId: "org123", + workspaceId: "org123", pluginType: "JS", pluginId: "plugin123", name: "myFun1", @@ -262,7 +262,7 @@ describe("generateDataTreeJSAction", () => { userPermissions: [], name: "UNUSED_DATASOURCE", pluginId: "plugin123", - organizationId: "org123", + workspaceId: "org123", messages: [], isValid: true, new: true, diff --git a/app/client/src/entities/Datasource/RestAPIForm.ts b/app/client/src/entities/Datasource/RestAPIForm.ts index 5481296413..ee9e567939 100644 --- a/app/client/src/entities/Datasource/RestAPIForm.ts +++ b/app/client/src/entities/Datasource/RestAPIForm.ts @@ -47,7 +47,7 @@ export interface Certificate { export interface ApiDatasourceForm { datasourceId: string; pluginId: string; - organizationId: string; + workspaceId: string; isValid: boolean; url: string; headers?: Property[]; diff --git a/app/client/src/entities/Datasource/index.ts b/app/client/src/entities/Datasource/index.ts index 46989346e9..881ea90166 100644 --- a/app/client/src/entities/Datasource/index.ts +++ b/app/client/src/entities/Datasource/index.ts @@ -59,7 +59,7 @@ export interface DatasourceTable { interface BaseDatasource { pluginId: string; name: string; - organizationId: string; + workspaceId: string; isValid: boolean; isConfigured?: boolean; } @@ -111,7 +111,7 @@ export interface MockDatasource { export const DEFAULT_DATASOURCE = ( pluginId: string, - organizationId: string, + workspaceId: string, ): EmbeddedRestDatasource => ({ name: "DEFAULT_REST_DATASOURCE", datasourceConfiguration: { @@ -120,6 +120,6 @@ export const DEFAULT_DATASOURCE = ( invalids: [], isValid: true, pluginId, - organizationId, + workspaceId, messages: [], }); diff --git a/app/client/src/entities/JSCollection/index.ts b/app/client/src/entities/JSCollection/index.ts index a74975f206..04031eafec 100644 --- a/app/client/src/entities/JSCollection/index.ts +++ b/app/client/src/entities/JSCollection/index.ts @@ -8,7 +8,7 @@ export type Variable = { export interface JSCollection { id: string; applicationId: string; - organizationId: string; + workspaceId: string; name: string; pageId: string; pluginId: string; diff --git a/app/client/src/icons/MenuIcons.tsx b/app/client/src/icons/MenuIcons.tsx index 1d92b2fbc4..bc158d3434 100644 --- a/app/client/src/icons/MenuIcons.tsx +++ b/app/client/src/icons/MenuIcons.tsx @@ -2,7 +2,7 @@ import React from "react"; import { IconProps, IconWrapper } from "constants/IconConstants"; import WidgetsIcon from "remixicon-react/FunctionLineIcon"; import { ReactComponent as ApisIcon } from "assets/icons/menu/api.svg"; -import { ReactComponent as OrgIcon } from "assets/icons/menu/org.svg"; +import { ReactComponent as WorkspaceIcon } from "assets/icons/menu/workspace.svg"; import PageIcon from "remixicon-react/PagesLineIcon"; import { ReactComponent as DataSourcesIcon } from "assets/icons/menu/data-sources.svg"; import { ReactComponent as QueriesIcon } from "assets/icons/menu/queries.svg"; @@ -80,9 +80,9 @@ export const MenuIcons: { ), - ORG_ICON: (props: IconProps) => ( + WORKSPACE_ICON: (props: IconProps) => ( - + ), PAGES_ICON: (props: IconProps) => ( diff --git a/app/client/src/mockResponses/ApplicationsNewMockResponse.json b/app/client/src/mockResponses/ApplicationsNewMockResponse.json index f6064a6753..79f13e422d 100644 --- a/app/client/src/mockResponses/ApplicationsNewMockResponse.json +++ b/app/client/src/mockResponses/ApplicationsNewMockResponse.json @@ -12,8 +12,8 @@ "email":"b1@appsmith.com", "source":"FORM", "isEnabled":true, - "currentOrganizationId":"6065e4b7034ece74b1481819", - "organizationIds":[ + "currentWorkspaceId":"6065e4b7034ece74b1481819", + "workspaceIds":[ "6065e4a8034ece74b1481818", "6065e4b7034ece74b1481819" ], @@ -37,17 +37,17 @@ }, "new":false }, - "organizationApplications":[ + "workspaceApplications":[ { - "organization":{ + "workspace":{ "id":"6065e4a8034ece74b1481818", "userPermissions":[ - "read:organizations", - "manage:orgApplications", - "manage:organizations", - "inviteUsers:organization", - "publish:orgApplications", - "read:orgApplications" + "read:workspaces", + "manage:workspaceApplications", + "manage:workspaces", + "inviteUsers:workspaces", + "publish:workspaceApplications", + "read:workspaceApplications" ], "name":"b1's apps", "email":"b1@appsmith.com", @@ -164,15 +164,15 @@ ] }, { - "organization":{ + "workspace":{ "id":"6065e4b7034ece74b1481819", "userPermissions":[ - "read:organizations", - "manage:orgApplications", - "manage:organizations", - "inviteUsers:organization", - "publish:orgApplications", - "read:orgApplications" + "read:workspaces", + "manage:workspaceApplications", + "manage:workspaces", + "inviteUsers:workspaces", + "publish:workspaceApplications", + "read:workspaceApplications" ], "name":"new org", "email":"b1@appsmith.com", diff --git a/app/client/src/mockResponses/CommentApiMockResponse.tsx b/app/client/src/mockResponses/CommentApiMockResponse.tsx index a8aaafae2f..a9e459f2e5 100644 --- a/app/client/src/mockResponses/CommentApiMockResponse.tsx +++ b/app/client/src/mockResponses/CommentApiMockResponse.tsx @@ -370,7 +370,7 @@ export const fetchPagesMockResponse = { success: true, }, data: { - organizationId: "605c433c91dea93f0eaf91b5", + workspaceId: "605c433c91dea93f0eaf91b5", pages: [ { id: "605c435a91dea93f0eaf91ba", diff --git a/app/client/src/mockResponses/CreateOrganisationMockResponse.json b/app/client/src/mockResponses/CreateWorkspaceMockResponse.json similarity index 100% rename from app/client/src/mockResponses/CreateOrganisationMockResponse.json rename to app/client/src/mockResponses/CreateWorkspaceMockResponse.json diff --git a/app/client/src/notifications/NotificationListItem.tsx b/app/client/src/notifications/NotificationListItem.tsx index e19008f3f9..7192612b38 100644 --- a/app/client/src/notifications/NotificationListItem.tsx +++ b/app/client/src/notifications/NotificationListItem.tsx @@ -18,7 +18,7 @@ import moment from "moment"; import styled from "styled-components"; import { APP_MODE } from "entities/App"; -import OrgApi from "api/OrgApi"; +import WorkspaceApi from "api/WorkspaceApi"; import { isPermitted, @@ -79,12 +79,14 @@ const UnreadIndicator = styled.div` props.theme.colors.notifications.unreadIndicator}; `; -const getModeFromUserRole = async (orgId: string) => { +const getModeFromUserRole = async (workspaceId: string) => { try { - const response = (await OrgApi.fetchOrg({ orgId })) as any; - const userOrgPermissions = response?.data?.userPermissions || []; + const response = (await WorkspaceApi.fetchWorkspace({ + workspaceId, + })) as any; + const userWorkspacePermissions = response?.data?.userPermissions || []; const canPublish = isPermitted( - userOrgPermissions, + userWorkspacePermissions, PERMISSION_TYPE.PUBLISH_APPLICATION, ); @@ -119,10 +121,10 @@ function CommentNotification(props: { notification: AppsmithNotification }) { authorUsername, branchName, mode: modeFromComment, - orgId, pageId, - // resolvedState, TODO get from comment thread threadId, + // resolvedState, TODO get from comment thread + workspaceId, } = comment; const _createdAt = createdAt || creationTime; @@ -135,7 +137,7 @@ function CommentNotification(props: { notification: AppsmithNotification }) { } const handleClick = async () => { - const modeFromRole = await getModeFromUserRole(orgId); + const modeFromRole = await getModeFromUserRole(workspaceId); const mode = getModeFromRoleAndDomain(modeFromRole, modeFromComment); const commentThreadUrl = getCommentThreadURL({ @@ -196,15 +198,15 @@ function CommentThreadNotification(props: { branchName, id, mode: modeFromThread, - orgId, pageId, resolvedState, + workspaceId, } = commentThread; const commentThreadId = _id || id; const handleClick = async () => { - const modeFromRole = await getModeFromUserRole(orgId); + const modeFromRole = await getModeFromUserRole(workspaceId); const mode = getModeFromRoleAndDomain(modeFromRole, modeFromThread); const commentThreadUrl = getCommentThreadURL({ diff --git a/app/client/src/pages/AppViewer/AppViewerHeader.tsx b/app/client/src/pages/AppViewer/AppViewerHeader.tsx index 8d93f22148..fcd992cb88 100644 --- a/app/client/src/pages/AppViewer/AppViewerHeader.tsx +++ b/app/client/src/pages/AppViewer/AppViewerHeader.tsx @@ -12,8 +12,8 @@ import { AppState } from "reducers"; import { getEditorURL } from "selectors/appViewSelectors"; import { getViewModePageList } from "selectors/editorSelectors"; import { FormDialogComponent } from "components/editorComponents/form/FormDialogComponent"; -import AppInviteUsersForm from "pages/organization/AppInviteUsersForm"; -import { getCurrentOrgId } from "@appsmith/selectors/organizationSelectors"; +import AppInviteUsersForm from "pages/workspace/AppInviteUsersForm"; +import { getCurrentWorkspaceId } from "@appsmith/selectors/workspaceSelectors"; import { getCurrentUser } from "selectors/usersSelectors"; import { ANONYMOUS_USERNAME, User } from "constants/userConstants"; @@ -119,7 +119,7 @@ type AppViewerHeaderProps = { url?: string; currentApplicationDetails?: ApplicationPayload; pages: PageListPayload; - currentOrgId: string; + currentWorkspaceId: string; currentUser?: User; lightTheme: Theme; }; @@ -128,7 +128,12 @@ export function AppViewerHeader(props: AppViewerHeaderProps) { const selectedTheme = useSelector(getSelectedAppTheme); const [isMenuOpen, setMenuOpen] = useState(false); const headerRef = useRef(null); - const { currentApplicationDetails, currentOrgId, currentUser, pages } = props; + const { + currentApplicationDetails, + currentUser, + currentWorkspaceId, + pages, + } = props; const { search } = useLocation(); const queryParams = new URLSearchParams(search); const isEmbed = queryParams.get("embed"); @@ -181,7 +186,6 @@ export function AppViewerHeader(props: AppViewerHeaderProps) { bgColor: "transparent", }} isOpen={showAppInviteUsersDialog} - orgId={currentOrgId} title={currentApplicationDetails.name} trigger={