@playwright-testing-library/test
Version:
playwright + dom-testing-library
63 lines • 1.8 kB
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.queryNames = exports.configureTestingLibraryScript = void 0;
const configureTestingLibraryScript = (script, { testIdAttribute, asyncUtilTimeout }) => {
const withTestId = testIdAttribute
? script.replace(/testIdAttribute: (['|"])data-testid(['|"])/g, `testIdAttribute: $1${testIdAttribute}$2`)
: script;
return asyncUtilTimeout
? withTestId.replace(/asyncUtilTimeout: \d+/g, `asyncUtilTimeout: ${asyncUtilTimeout}`)
: withTestId;
};
exports.configureTestingLibraryScript = configureTestingLibraryScript;
exports.queryNames = [
'queryByPlaceholderText',
'queryAllByPlaceholderText',
'getByPlaceholderText',
'getAllByPlaceholderText',
'findByPlaceholderText',
'findAllByPlaceholderText',
'queryByText',
'queryAllByText',
'getByText',
'getAllByText',
'findByText',
'findAllByText',
'queryByLabelText',
'queryAllByLabelText',
'getByLabelText',
'getAllByLabelText',
'findByLabelText',
'findAllByLabelText',
'queryByAltText',
'queryAllByAltText',
'getByAltText',
'getAllByAltText',
'findByAltText',
'findAllByAltText',
'queryByTestId',
'queryAllByTestId',
'getByTestId',
'getAllByTestId',
'findByTestId',
'findAllByTestId',
'queryByTitle',
'queryAllByTitle',
'getByTitle',
'getAllByTitle',
'findByTitle',
'findAllByTitle',
'queryByRole',
'queryAllByRole',
'getByRole',
'getAllByRole',
'findByRole',
'findAllByRole',
'queryByDisplayValue',
'queryAllByDisplayValue',
'getByDisplayValue',
'getAllByDisplayValue',
'findByDisplayValue',
'findAllByDisplayValue',
];
//# sourceMappingURL=common.js.map
;