UNPKG

wix-style-react

Version:
28 lines 1.03 kB
import { baseUniDriverFactory } from '../../test-utils/utils/unidriver'; import DataHooks from './dataHooks'; export const adaptiveHeadingDriverFactory = base => { return { ...baseUniDriverFactory(base), /** Get short version of text */ getShortText: async () => { const short = await base.$(`[data-hook="${DataHooks.textInShort}"]`); if (await short.exists()) { const text = await short.text(); return text || null; } return null; }, /** Get long version of text */ getText: async () => { const long = await base.$(`[data-hook="${DataHooks.text}"]`); if (await long.exists()) { const text = await long.text(); return text || null; } return base.text(); }, /** Get tagName */ getAppearance: async () => base._prop('tagName'), }; }; //# sourceMappingURL=AdaptiveHeading.uni.driver.js.map