Skip to content

Commit

Permalink
fix: converted arrow functions to allow this inside prototype methods
Browse files Browse the repository at this point in the history
  • Loading branch information
calebjclark committed Dec 22, 2021
1 parent 87a8f65 commit 6ff62f4
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions client/lib/DomExtender.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ for (const Item of [SuperElement, SuperNode, SuperHTMLElement, Element, Node, HT
enumerable: false,
configurable: false,
writable: false,
value: async (): Promise<void> => {
async value(): Promise<void> {
const { awaitedOptions } = getState(this);
const coreFrame: CoreFrameEnvironment = await awaitedOptions?.coreFrame;
await Interactor.run(coreFrame, [{ click: this }]);
Expand All @@ -49,10 +49,9 @@ for (const Item of [SuperElement, SuperNode, SuperHTMLElement, Element, Node, HT
enumerable: false,
configurable: false,
writable: false,
value: async (...typeInteractions: ITypeInteraction[]): Promise<void> => {
async value(...typeInteractions: ITypeInteraction[]): Promise<void> {
const { awaitedOptions } = getState(this);
const coreFrame: CoreFrameEnvironment = await awaitedOptions?.coreFrame;
// @ts-ignore
await this.$click();
await Interactor.run(
coreFrame,
Expand All @@ -65,7 +64,7 @@ for (const Item of [SuperElement, SuperNode, SuperHTMLElement, Element, Node, HT
enumerable: false,
configurable: false,
writable: false,
value: async (): Promise<void> => {
async value(): Promise<void> {
const { awaitedPath, awaitedOptions } = getState(this);
const coreFrame: CoreFrameEnvironment = await awaitedOptions?.coreFrame;
await coreFrame.waitForElement(awaitedPath.toJSON(), { waitForVisible: true });
Expand All @@ -76,7 +75,7 @@ for (const Item of [SuperElement, SuperNode, SuperHTMLElement, Element, Node, HT
enumerable: false,
configurable: false,
writable: false,
value: async (): Promise<void> => {
async value(): Promise<void> {
const { awaitedOptions } = getState(this);
const coreFrame: CoreFrameEnvironment = await awaitedOptions?.coreFrame;
await coreFrame.getComputedVisibility(this);
Expand Down

0 comments on commit 6ff62f4

Please sign in to comment.