-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #33 from joomcode/feature/add-get-modules-graph
feat: add get modules graph
- Loading branch information
Showing
50 changed files
with
429 additions
and
270 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,31 @@ | ||
import {LogEventType} from '../constants/internal'; | ||
import {testController} from '../testController'; | ||
import {getLocatorFromSelector} from '../utils/locators'; | ||
import {getDescriptionFromSelector} from '../utils/locators'; | ||
import {log} from '../utils/log'; | ||
|
||
import {waitForInterfaceStabilization} from './waitFor'; | ||
|
||
import type {Selector, TestCafeSelector} from '../types/internal'; | ||
import type {Selector, TestCafeSelector, WithStabilizationInterval} from '../types/internal'; | ||
|
||
type Options = Parameters<typeof testController.click>[1]; | ||
type Options = Parameters<typeof testController.click>[1] & WithStabilizationInterval; | ||
|
||
/** | ||
* Clicks an element. | ||
*/ | ||
export const click = async (selector: Selector, options?: Options): Promise<void> => { | ||
const locator = getLocatorFromSelector(selector); | ||
export const click = async ( | ||
selector: Selector, | ||
{stabilizationInterval, ...options}: Options = {}, | ||
): Promise<void> => { | ||
const locator = getDescriptionFromSelector(selector); | ||
const withLocator = locator ? ` with locator ${locator}` : ''; | ||
|
||
log(`Click an element${withLocator}`, {options}, LogEventType.InternalAction); | ||
log( | ||
`Click an element${withLocator}`, | ||
{...options, stabilizationInterval}, | ||
LogEventType.InternalAction, | ||
); | ||
|
||
await testController.click(selector as TestCafeSelector, options); | ||
|
||
await waitForInterfaceStabilization(); | ||
await waitForInterfaceStabilization(stabilizationInterval); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,31 @@ | ||
import {LogEventType} from '../constants/internal'; | ||
import {testController} from '../testController'; | ||
import {getLocatorFromSelector} from '../utils/locators'; | ||
import {getDescriptionFromSelector} from '../utils/locators'; | ||
import {log} from '../utils/log'; | ||
|
||
import {waitForInterfaceStabilization} from './waitFor'; | ||
|
||
import type {Selector, TestCafeSelector} from '../types/internal'; | ||
import type {Selector, TestCafeSelector, WithStabilizationInterval} from '../types/internal'; | ||
|
||
type Options = Record<string, unknown>; | ||
type Options = Record<string, unknown> & WithStabilizationInterval; | ||
|
||
/** | ||
* Dispatches an event over a specified DOM element. | ||
*/ | ||
export const dispatchEvent = async ( | ||
selector: Selector, | ||
eventName: string, | ||
options?: Options, | ||
{stabilizationInterval, ...options}: Options = {}, | ||
): Promise<void> => { | ||
const locator = getLocatorFromSelector(selector); | ||
const locator = getDescriptionFromSelector(selector); | ||
|
||
log('Click an element', {locator, options}, LogEventType.InternalAction); | ||
log( | ||
'Dispatches an event over a specified element', | ||
{locator, ...options, stabilizationInterval}, | ||
LogEventType.InternalAction, | ||
); | ||
|
||
await testController.dispatchEvent(selector as TestCafeSelector, eventName, options); | ||
|
||
await waitForInterfaceStabilization(); | ||
await waitForInterfaceStabilization(stabilizationInterval); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,31 @@ | ||
import {LogEventType} from '../constants/internal'; | ||
import {testController} from '../testController'; | ||
import {getLocatorFromSelector} from '../utils/locators'; | ||
import {getDescriptionFromSelector} from '../utils/locators'; | ||
import {log} from '../utils/log'; | ||
|
||
import {waitForInterfaceStabilization} from './waitFor'; | ||
|
||
import type {Selector, TestCafeSelector} from '../types/internal'; | ||
import type {Selector, TestCafeSelector, WithStabilizationInterval} from '../types/internal'; | ||
|
||
type Options = Parameters<typeof testController.doubleClick>[1]; | ||
type Options = Parameters<typeof testController.doubleClick>[1] & WithStabilizationInterval; | ||
|
||
/** | ||
* Double-clicks an element. | ||
*/ | ||
export const doubleClick = async (selector: Selector, options?: Options): Promise<void> => { | ||
const locator = getLocatorFromSelector(selector); | ||
export const doubleClick = async ( | ||
selector: Selector, | ||
{stabilizationInterval, ...options}: Options = {}, | ||
): Promise<void> => { | ||
const locator = getDescriptionFromSelector(selector); | ||
const withLocator = locator ? ` with locator ${locator}` : ''; | ||
|
||
log(`Double-click an element${withLocator}`, {options}, LogEventType.InternalAction); | ||
log( | ||
`Double-click an element${withLocator}`, | ||
{...options, stabilizationInterval}, | ||
LogEventType.InternalAction, | ||
); | ||
|
||
await testController.doubleClick(selector as TestCafeSelector, options); | ||
|
||
await waitForInterfaceStabilization(); | ||
await waitForInterfaceStabilization(stabilizationInterval); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,30 @@ | ||
import {LogEventType} from '../constants/internal'; | ||
import {testController} from '../testController'; | ||
import {getLocatorFromSelector} from '../utils/locators'; | ||
import {getDescriptionFromSelector} from '../utils/locators'; | ||
import {log} from '../utils/log'; | ||
|
||
import {waitForInterfaceStabilization} from './waitFor'; | ||
|
||
import type {Selector, TestCafeSelector} from '../types/internal'; | ||
import type {Selector, TestCafeSelector, WithStabilizationInterval} from '../types/internal'; | ||
|
||
type Options = Parameters<typeof testController.hover>[1]; | ||
type Options = Parameters<typeof testController.hover>[1] & WithStabilizationInterval; | ||
|
||
/** | ||
* Hovers the mouse pointer over an element. | ||
*/ | ||
export const hover = async (selector: Selector, options?: Options): Promise<void> => { | ||
const locator = getLocatorFromSelector(selector); | ||
export const hover = async ( | ||
selector: Selector, | ||
{stabilizationInterval, ...options}: Options = {}, | ||
): Promise<void> => { | ||
const locator = getDescriptionFromSelector(selector); | ||
|
||
log('Hover the mouse pointer over an element', {locator, options}, LogEventType.InternalAction); | ||
log( | ||
'Hover the mouse pointer over an element', | ||
{locator, ...options, stabilizationInterval}, | ||
LogEventType.InternalAction, | ||
); | ||
|
||
await testController.hover(selector as TestCafeSelector, options); | ||
|
||
await waitForInterfaceStabilization(); | ||
await waitForInterfaceStabilization(stabilizationInterval); | ||
}; |
Oops, something went wrong.