cal.com icon indicating copy to clipboard operation
cal.com copied to clipboard

The "Save Workflow" button is not visible on development environment

Open mhetreayush opened this issue 1 year ago • 1 comments

Issue Summary

On the development environment, the "Save" is not visible on the development environment.

Steps to Reproduce

  1. Click on "Workflows" in the sidebar
  2. Click "+ Create a workflow" or edit a workflow.
  3. On the top right corner, the "Save" button is not present which is supposed to be present.

Any other relevant information. For example, why do you consider this a bug and what did you expect to happen instead? This prevents the developers to test the create / edit workflow flow using the client app.

Actual Results

Save workflow button is absent

Expected Results

Save workflow button should be present.

Evidence

Screenshot 2024-05-07 at 11 15 14 AM

mhetreayush avatar May 07 '24 06:05 mhetreayush

It seems like the issue with the "Save Workflow" button not being visible could be due to a few key factors related to the application's logic and state management. Here's a breakdown of potential causes and areas to investigate:

  1. Conditional Rendering and User Permissions: The visibility of the "Save Workflow" button might be controlled by conditions related to user permissions or roles. If the user's role is set to a read-only state (MembershipRole.MEMBER), the button will not be rendered. This is determined by checking the user's role within the workflow's team against session data. Ensure the user has the correct permissions to view and interact with the "Save Workflow" button.

  2. Environment-Specific Configurations: There could be configurations or feature toggles specific to the development environment that affect the visibility of the "Save Workflow" button. This includes checks for a valid license (session.data?.hasValidLicense) and whether all necessary data has been loaded (isAllDataLoaded). Verify these conditions are met in your development environment.

  3. Asynchronous Loading Issues: If elements on the page, including the "Save Workflow" button, are loaded asynchronously, there might be a timing issue where the script attempts to interact with the button before it's rendered. Ensure that your script waits for the button to be available before attempting to click it.

  4. UI Bugs or Regression: A recent change in the codebase might have inadvertently affected the visibility of the "Save Workflow" button. Review recent commits or changes to the UI components related to workflow creation or editing to identify any potential regressions.

  5. Incorrect Test Identifiers or Selectors: If the data-testid attribute of the "Save Workflow" button has been changed or is incorrect, the script will not be able to find and interact with the button. Confirm that the data-testid attribute matches what's expected in the script.

  6. Potential Code Issues: Ensure there are no missing await statements for asynchronous operations, check for undefined values that could lead to runtime errors, and verify that elements are present and in the expected state before interacting with them. Adding error handling can also help identify and troubleshoot issues more effectively.

By focusing on these areas, you should be able to diagnose and resolve the issue with the "Save Workflow" button not being visible in the development environment.

Details

Sources


About Dosu This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

To continue the conversation, mention @dosu.

dosubot[bot] avatar May 07 '24 06:05 dosubot[bot]