Brunobkr/llama.cpp_AlgMor24_github
ΩFFFΣLLIa • llama.cpp • AlgMor24 ██████╗ ███████╗███████╗███████╗██╗ ██╗ ██╗ █████╗ ██╔═══██╗██╔════╝██╔════╝██╔════╝██║ ██║ ██║██╔══██╗ ██║ ██║█████╗ █████╗ █████╗ ██║ ██║ ██║███████║ ██║ ██║██╔══╝ ██╔══╝ ██╔══╝ ██║ ██║ ██║██╔══██║ ╚██████╔╝██║ ██║ ███████╗███████╗███████╗██║██║ ██║ ╚═════╝ ╚═╝ ╚═╝ ╚══════╝╚══════╝╚══════╝╚═╝╚═╝ ╚═╝ High-Performance LLM / VLM Inference & Autonomous Agentic Ecosystem… See the full description on the dataset page: https://huggingface.co/datasets/Brunobkr/llama.cpp_AlgMor24_github.
03.1k
1import { selectorEngine, getByTitleSelector, getByTextSelector, getByPlaceholderSelector, getByAltTextSelector, getByTestIdSelector, getByRoleSelector, getByLabelSelector, Locator, processTimeoutOptions, getIframeScale } from '@vitest/browser/locators';2import { page, server } from 'vitest/browser';3import { __INTERNAL } from 'vitest/internal/browser';4 5class PlaywrightLocator extends Locator {6 constructor(selector, _container) {7 super();8 this.selector = selector;9 this._container = _container;10 }11 click(options) {12 return super.click(processTimeoutOptions(processClickOptions(options)));13 }14 dblClick(options) {15 return super.dblClick(processTimeoutOptions(processClickOptions(options)));16 }17 tripleClick(options) {18 return super.tripleClick(processTimeoutOptions(processClickOptions(options)));19 }20 selectOptions(value, options) {21 return super.selectOptions(value, processTimeoutOptions(options));22 }23 clear(options) {24 return super.clear(processTimeoutOptions(options));25 }26 hover(options) {27 return super.hover(processTimeoutOptions(processHoverOptions(options)));28 }29 upload(files, options) {30 return super.upload(files, processTimeoutOptions(options));31 }32 fill(text, options) {33 return super.fill(text, processTimeoutOptions(options));34 }35 dropTo(target, options) {36 return super.dropTo(target, processTimeoutOptions(processDragAndDropOptions(options)));37 }38 locator(selector) {39 return new PlaywrightLocator(`${this.selector} >> ${selector}`, this._container);40 }41 elementLocator(element) {42 return new PlaywrightLocator(selectorEngine.generateSelectorSimple(element), element);43 }44}45page.extend({46 getByLabelText(text, options) {47 return new PlaywrightLocator(getByLabelSelector(text, options));48 },49 getByRole(role, options) {50 return new PlaywrightLocator(getByRoleSelector(role, options));51 },52 getByTestId(testId) {53 return new PlaywrightLocator(getByTestIdSelector(server.config.browser.locators.testIdAttribute, testId));54 },55 getByAltText(text, options) {56 return new PlaywrightLocator(getByAltTextSelector(text, options));57 },58 getByPlaceholder(text, options) {59 return new PlaywrightLocator(getByPlaceholderSelector(text, options));60 },61 getByText(text, options) {62 return new PlaywrightLocator(getByTextSelector(text, options));63 },64 getByTitle(title, options) {65 return new PlaywrightLocator(getByTitleSelector(title, options));66 },67 elementLocator(element) {68 return new PlaywrightLocator(selectorEngine.generateSelectorSimple(element), element);69 },70 frameLocator(locator) {71 return new PlaywrightLocator(`${locator.selector} >> internal:control=enter-frame`);72 }73});74__INTERNAL._createLocator = (selector) => new PlaywrightLocator(selector);75function processDragAndDropOptions(options) {76 if (!options) {77 return options;78 }79 if (options.sourcePosition) {80 options.sourcePosition = processPlaywrightPosition(options.sourcePosition);81 }82 if (options.targetPosition) {83 options.targetPosition = processPlaywrightPosition(options.targetPosition);84 }85 return options;86}87function processHoverOptions(options) {88 if (!options) {89 return options;90 }91 if (options.position) {92 options.position = processPlaywrightPosition(options.position);93 }94 return options;95}96function processClickOptions(options) {97 if (!options) {98 return options;99 }100 if (options.position) {101 options.position = processPlaywrightPosition(options.position);102 }103 return options;104}105function processPlaywrightPosition(position) {106 const scale = getIframeScale();107 if (position.x != null) {108 position.x *= scale;109 }110 if (position.y != null) {111 position.y *= scale;112 }113 return position;114}115 