Skip to content

In develop environment, when auto-run code is disabled clicking on run button makes nothing happens #244

@delca85

Description

@delca85

Bug Report 🐛

In https://develop.testing-playground.com/ if I disable auto-run code, then I insert a query and click on run button in Header nothing happens.
No element selected or event fired (in case of user-event method inserted).

Expected behavior 🤔

I expected that clicking run makes the query be executed.

Suggested solution 🔦

I think the right thing to do should be adding a field immediate set to true to the EVALUATE action dispatched by clicking on run.

      <button
            className="space-x-4 px-4"
            onClick={() => {
              if (status === 'evaluating') {
                return;
              }

              dispatch({ type: 'EVALUATE' });
            }}
          >
            {status === 'evaluating' ? (
              <SyncIcon size={12} className="spinner" />
            ) : (
              <PaperAirplaneIcon size={12} />
            )}

            <span>run</span>
          </button>

I am going to submit a pr with this change, hoping this is the right way to fix this issue.

Your Environment 💻

  • browser: Chrome
  • os: Mac

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions