Sha256: 3410b7f646ced873553e3814d1cb7387b95e3f7785fde2a57f46d5d9a58e4d85
Contents?: true
Size: 533 Bytes
Versions: 30
Compression:
Stored size: 533 Bytes
Contents
# frozen_string_literal: true module Ariadne # Module to allow components to deal with the `test_selector` argument. # It will only add the selector if env is not Production. # # test_selector: "foo" => data-test-selector="foo" module TestSelectorHelper TEST_SELECTOR_TAG = :test_selector def add_test_selector(args) if args.key?(TEST_SELECTOR_TAG) args[:data] ||= {} args[:data][TEST_SELECTOR_TAG] = args[TEST_SELECTOR_TAG] end args.except(TEST_SELECTOR_TAG) end end end
Version data entries
30 entries across 30 versions & 1 rubygems