ngxsmk-tel-input
Version:
Angular international telephone input (intl-tel-input UI + libphonenumber-js validation). ControlValueAccessor. SSR-safe.
116 lines • 2.79 kB
TypeScript
/**
* E2E testing helpers for ngxsmk-tel-input
*/
type ElementFinder = any;
/**
* E2E selectors
*/
export declare const E2E_SELECTORS: {
phoneInput: string;
phoneInputWrapper: string;
countryDropdown: string;
countryList: string;
clearButton: string;
errorMessage: string;
hint: string;
label: string;
};
/**
* Get phone input element
*/
export declare function getPhoneInput(): ElementFinder;
/**
* Get phone input wrapper
*/
export declare function getPhoneInputWrapper(): ElementFinder;
/**
* Type phone number
*/
export declare function typePhoneNumber(value: string): Promise<void>;
/**
* Clear phone input
*/
export declare function clearPhoneInput(): Promise<void>;
/**
* Get phone input value
*/
export declare function getPhoneInputValue(): Promise<string>;
/**
* Click country dropdown
*/
export declare function clickCountryDropdown(): Promise<void>;
/**
* Select country from dropdown
*/
export declare function selectCountryFromDropdown(countryCode: string): Promise<void>;
/**
* Click clear button
*/
export declare function clickClearButton(): Promise<void>;
/**
* Get error message
*/
export declare function getErrorMessage(): Promise<string>;
/**
* Check if error is displayed
*/
export declare function isErrorDisplayed(): Promise<boolean>;
/**
* Get hint text
*/
export declare function getHintText(): Promise<string>;
/**
* Get label text
*/
export declare function getLabelText(): Promise<string>;
/**
* Check if input is disabled
*/
export declare function isInputDisabled(): Promise<boolean>;
/**
* Focus phone input
*/
export declare function focusPhoneInput(): Promise<void>;
/**
* Blur phone input
*/
export declare function blurPhoneInput(): Promise<void>;
/**
* Wait for validation
*/
export declare function waitForValidation(timeout?: number): Promise<void>;
/**
* Check if country dropdown is open
*/
export declare function isCountryDropdownOpen(): Promise<boolean>;
/**
* Search for country in dropdown
*/
export declare function searchCountryInDropdown(searchTerm: string): Promise<void>;
/**
* Get selected country code
*/
export declare function getSelectedCountryCode(): Promise<string>;
/**
* E2E test scenarios
*/
export declare const E2E_SCENARIOS: {
/**
* Test valid phone number input
*/
testValidPhoneInput(phoneNumber: string, countryCode?: string): Promise<void>;
/**
* Test invalid phone number input
*/
testInvalidPhoneInput(phoneNumber: string, countryCode?: string): Promise<void>;
/**
* Test country selection
*/
testCountrySelection(countryCode: string): Promise<void>;
/**
* Test clear button
*/
testClearButton(): Promise<void>;
};
export {};
//# sourceMappingURL=e2e-helpers.d.ts.map