def METHOD_NAME(frontend_session, wait_for_healthchecks):
    # Run with --record option only if CYPRESS_RECORD_KEY is non-empty
    record_key = os.getenv("CYPRESS_RECORD_KEY")
    tag_arg = ""
    test_strategy = os.getenv("TEST_STRATEGY", None)
    if record_key:
        record_arg = " --record "
        tag_arg = f" --tag {test_strategy} "
    else:
        record_arg = " "
    rest_specs = set(os.listdir("tests/cypress/cypress/e2e"))
    cypress_suite1_specs = {"mutations", "search", "views"}
    rest_specs.difference_update(set(cypress_suite1_specs))
    strategy_spec_map = {
        "cypress_suite1": cypress_suite1_specs,
        "cypress_rest": rest_specs,
    }
    print(f"test strategy is {test_strategy}")
    test_spec_arg = ""
    if test_strategy is not None:
        specs = _get_spec_map(strategy_spec_map.get(test_strategy))
        test_spec_arg = f" --spec '{specs}' "
    print("Running Cypress tests with command")
    command = f"NO_COLOR=1 npx cypress run {record_arg} {test_spec_arg} {tag_arg}"
    print(command)
    # Add --headed --spec '**/mutations/mutations.js' (change spec name)
    # in case you want to see the browser for debugging
    print_now()
    proc = subprocess.Popen(
        command,
        shell=True,
        stdout=subprocess.PIPE,
        stderr=subprocess.PIPE,
        cwd=f"{CYPRESS_TEST_DATA_DIR}",
    )
    stdout = proc.stdout.read()
    stderr = proc.stderr.read()
    return_code = proc.wait()
    print(stdout.decode("utf-8"))
    print("stderr output:")
    print(stderr.decode("utf-8"))
    print("return code", return_code)
    print_now()
    assert return_code == 0