web 3d图形渲染器
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
1.3 KiB

  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.findByTestId = exports.findAllByTestId = exports.getAllByTestId = exports.getByTestId = exports.queryAllByTestId = exports.queryByTestId = void 0;
  6. var _helpers = require("../helpers");
  7. var _queryHelpers = require("../query-helpers");
  8. var _allUtils = require("./all-utils");
  9. const getTestIdAttribute = () => (0, _allUtils.getConfig)().testIdAttribute;
  10. function queryAllByTestId(...args) {
  11. (0, _helpers.checkContainerType)(...args);
  12. return (0, _allUtils.queryAllByAttribute)(getTestIdAttribute(), ...args);
  13. }
  14. const getMultipleError = (c, id) => `Found multiple elements by: [${getTestIdAttribute()}="${id}"]`;
  15. const getMissingError = (c, id) => `Unable to find an element by: [${getTestIdAttribute()}="${id}"]`;
  16. const queryAllByTestIdWithSuggestions = (0, _queryHelpers.wrapAllByQueryWithSuggestion)(queryAllByTestId, queryAllByTestId.name, 'queryAll');
  17. exports.queryAllByTestId = queryAllByTestIdWithSuggestions;
  18. const [queryByTestId, getAllByTestId, getByTestId, findAllByTestId, findByTestId] = (0, _allUtils.buildQueries)(queryAllByTestId, getMultipleError, getMissingError);
  19. exports.findByTestId = findByTestId;
  20. exports.findAllByTestId = findAllByTestId;
  21. exports.getByTestId = getByTestId;
  22. exports.getAllByTestId = getAllByTestId;
  23. exports.queryByTestId = queryByTestId;