UNPKG

wix-style-react

Version:
42 lines (35 loc) 1.13 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.createTestStoryUrl = exports.createStoryUrl = void 0; var _protractor = require("wix-ui-test-utils/protractor"); var _storiesHierarchy = require("../../stories/storiesHierarchy"); var createStoryUrl = function createStoryUrl(_ref) { var kind = _ref.kind, story = _ref.story, withExamples = _ref.withExamples, rtl = _ref.rtl; var baseUrl = (0, _protractor.createStoryUrl)({ kind: kind, story: story, withExamples: withExamples }); return rtl ? "".concat(baseUrl, "&").concat(_storiesHierarchy.RTL_QUERY_PARAM_NAME, "=true") : baseUrl; }; exports.createStoryUrl = createStoryUrl; var createTestStoryUrl = function createTestStoryUrl(_ref2) { var testName = _ref2.testName, category = _ref2.category, storyName = _ref2.storyName, rtl = _ref2.rtl; return createStoryUrl({ kind: (0, _storiesHierarchy.getTestStoryKind)({ category: category, storyName: storyName }), story: testName, rtl: rtl }); }; exports.createTestStoryUrl = createTestStoryUrl;