@atomic-testing/core
Advanced tools
Comparing version 0.37.0 to 0.38.0
import { Optional } from '../dataTypes'; | ||
import { ClickOption, HoverOption, Interactor, MouseDownOption, MouseMoveOption, MouseUpOption } from '../interactor'; | ||
import { ClickOption, HoverOption, Interactor, MouseDownOption, MouseEnterOption, MouseLeaveOption, MouseMoveOption, MouseOutOption, MouseUpOption } from '../interactor'; | ||
import { LocatorRelativePosition, PartLocator } from '../locators'; | ||
@@ -76,2 +76,6 @@ import { IComponentDriver, IComponentDriverOption, PartName, ScenePart, ScenePartDriver } from '../partTypes'; | ||
mouseUp(option?: Partial<MouseUpOption>): Promise<void>; | ||
mouseOver(option?: Partial<HoverOption>): Promise<void>; | ||
mouseOut(option?: Partial<MouseOutOption>): Promise<void>; | ||
mouseEnter(option?: Partial<MouseEnterOption>): Promise<void>; | ||
mouseLeave(option?: Partial<MouseLeaveOption>): Promise<void>; | ||
/** | ||
@@ -78,0 +82,0 @@ * Whether the component is visible. Visibility is defined |
@@ -171,2 +171,22 @@ "use strict"; | ||
} | ||
mouseOver(option) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
return this.interactor.mouseOver(this.locator, option); | ||
}); | ||
} | ||
mouseOut(option) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
return this.interactor.mouseOut(this.locator, option); | ||
}); | ||
} | ||
mouseEnter(option) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
return this.interactor.mouseEnter(this.locator, option); | ||
}); | ||
} | ||
mouseLeave(option) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
return this.interactor.mouseLeave(this.locator, option); | ||
}); | ||
} | ||
/** | ||
@@ -173,0 +193,0 @@ * Whether the component is visible. Visibility is defined |
@@ -84,10 +84,15 @@ "use strict"; | ||
// @ts-ignore | ||
for (var _d = true, _e = __asyncValues(listHelper.getListItemIterator(this, this._itemLocator, driverClass)), _f; _f = yield _e.next(), _a = _f.done, !_a; _d = true) { | ||
for (var _d = true, _e = __asyncValues(listHelper.getListItemIterator(this, this._itemLocator, driverClass)), _f; _f = yield _e.next(), _a = _f.done, !_a;) { | ||
_c = _f.value; | ||
_d = false; | ||
const item = _c; | ||
const itemText = yield item.getText(); | ||
if ((itemText === null || itemText === void 0 ? void 0 : itemText.trim()) === text) { | ||
return item; | ||
try { | ||
const item = _c; | ||
const itemText = yield item.getText(); | ||
if ((itemText === null || itemText === void 0 ? void 0 : itemText.trim()) === text) { | ||
return item; | ||
} | ||
} | ||
finally { | ||
_d = true; | ||
} | ||
} | ||
@@ -117,7 +122,12 @@ } | ||
// @ts-ignore | ||
for (var _d = true, _e = __asyncValues(listHelper.getListItemIterator(this, this._itemLocator, driverClass)), _f; _f = yield _e.next(), _a = _f.done, !_a; _d = true) { | ||
for (var _d = true, _e = __asyncValues(listHelper.getListItemIterator(this, this._itemLocator, driverClass)), _f; _f = yield _e.next(), _a = _f.done, !_a;) { | ||
_c = _f.value; | ||
_d = false; | ||
const item = _c; | ||
result.push(item); | ||
try { | ||
const item = _c; | ||
result.push(item); | ||
} | ||
finally { | ||
_d = true; | ||
} | ||
} | ||
@@ -124,0 +134,0 @@ } |
@@ -5,3 +5,3 @@ import { Optional } from '../dataTypes'; | ||
import { EnterTextOption } from './EnterTextOption'; | ||
import { ClickOption, HoverOption, MouseDownOption, MouseMoveOption, MouseUpOption } from './MouseOption'; | ||
import { ClickOption, HoverOption, MouseDownOption, MouseEnterOption, MouseLeaveOption, MouseMoveOption, MouseOutOption, MouseUpOption } from './MouseOption'; | ||
export interface Interactor { | ||
@@ -15,3 +15,3 @@ /** | ||
/** | ||
* Mouse move on the desired | ||
* Mouse move on the desired element | ||
* @param locator | ||
@@ -23,2 +23,6 @@ * @param option | ||
mouseUp(locator: PartLocator, option?: Partial<MouseUpOption>): Promise<void>; | ||
mouseOver(locator: PartLocator, option?: Partial<HoverOption>): Promise<void>; | ||
mouseOut(locator: PartLocator, option?: Partial<MouseOutOption>): Promise<void>; | ||
mouseEnter(locator: PartLocator, option?: Partial<MouseEnterOption>): Promise<void>; | ||
mouseLeave(locator: PartLocator, option?: Partial<MouseLeaveOption>): Promise<void>; | ||
/** | ||
@@ -25,0 +29,0 @@ * Type text into the desired element |
@@ -20,1 +20,7 @@ import { Point } from '../geometry'; | ||
} | ||
export interface MouseOutOption { | ||
} | ||
export interface MouseEnterOption { | ||
} | ||
export interface MouseLeaveOption { | ||
} |
@@ -16,3 +16,3 @@ "use strict"; | ||
LocatorRelativePosition["Same"] = "Same"; | ||
})(LocatorRelativePosition || (exports.LocatorRelativePosition = LocatorRelativePosition = {})); | ||
})(LocatorRelativePosition = exports.LocatorRelativePosition || (exports.LocatorRelativePosition = {})); | ||
//# sourceMappingURL=LocatorRelativePosition.js.map |
{ | ||
"name": "@atomic-testing/core", | ||
"version": "0.37.0", | ||
"version": "0.38.0", | ||
"description": "Core library for atomic-testing", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
import { Optional } from '../dataTypes'; | ||
import { MissingPartError } from '../errors/MissingPartError'; | ||
import { WaitForFailureError } from '../errors/WaitForFailureError'; | ||
import { ClickOption, HoverOption, Interactor, MouseDownOption, MouseMoveOption, MouseUpOption } from '../interactor'; | ||
import { | ||
ClickOption, | ||
HoverOption, | ||
Interactor, | ||
MouseDownOption, | ||
MouseEnterOption, | ||
MouseLeaveOption, | ||
MouseMoveOption, | ||
MouseOutOption, | ||
MouseUpOption, | ||
} from '../interactor'; | ||
import { LocatorRelativePosition, PartLocator } from '../locators'; | ||
@@ -161,2 +171,18 @@ import { IComponentDriver, IComponentDriverOption, PartName, ScenePart, ScenePartDriver } from '../partTypes'; | ||
async mouseOver(option?: Partial<HoverOption>): Promise<void> { | ||
return this.interactor.mouseOver(this.locator, option); | ||
} | ||
async mouseOut(option?: Partial<MouseOutOption>): Promise<void> { | ||
return this.interactor.mouseOut(this.locator, option); | ||
} | ||
async mouseEnter(option?: Partial<MouseEnterOption>): Promise<void> { | ||
return this.interactor.mouseEnter(this.locator, option); | ||
} | ||
async mouseLeave(option?: Partial<MouseLeaveOption>): Promise<void> { | ||
return this.interactor.mouseLeave(this.locator, option); | ||
} | ||
/** | ||
@@ -163,0 +189,0 @@ * Whether the component is visible. Visibility is defined |
@@ -5,3 +5,12 @@ import { Optional } from '../dataTypes'; | ||
import { EnterTextOption } from './EnterTextOption'; | ||
import { ClickOption, HoverOption, MouseDownOption, MouseMoveOption, MouseUpOption } from './MouseOption'; | ||
import { | ||
ClickOption, | ||
HoverOption, | ||
MouseDownOption, | ||
MouseEnterOption, | ||
MouseLeaveOption, | ||
MouseMoveOption, | ||
MouseOutOption, | ||
MouseUpOption, | ||
} from './MouseOption'; | ||
@@ -18,3 +27,3 @@ export interface Interactor { | ||
/** | ||
* Mouse move on the desired | ||
* Mouse move on the desired element | ||
* @param locator | ||
@@ -29,2 +38,10 @@ * @param option | ||
mouseOver(locator: PartLocator, option?: Partial<HoverOption>): Promise<void>; | ||
mouseOut(locator: PartLocator, option?: Partial<MouseOutOption>): Promise<void>; | ||
mouseEnter(locator: PartLocator, option?: Partial<MouseEnterOption>): Promise<void>; | ||
mouseLeave(locator: PartLocator, option?: Partial<MouseLeaveOption>): Promise<void>; | ||
/** | ||
@@ -31,0 +48,0 @@ * Type text into the desired element |
@@ -21,1 +21,7 @@ import { Point } from '../geometry'; | ||
export interface HoverOption extends MouseOption {} | ||
export interface MouseOutOption {} | ||
export interface MouseEnterOption {} | ||
export interface MouseLeaveOption {} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
195399
3825