fix lint issues
This commit is contained in:
parent
e6bab209d6
commit
7ccb006b01
|
|
@ -117,27 +117,6 @@ export const UIModeView: React.FC<{}> = ({
|
||||||
});
|
});
|
||||||
}, [reloadTests]);
|
}, [reloadTests]);
|
||||||
|
|
||||||
React.useEffect(() => {
|
|
||||||
const onShortcutEvent = (e: KeyboardEvent) => {
|
|
||||||
if (e.code === 'KeyR' && (e.metaKey || e.ctrlKey)){
|
|
||||||
e.preventDefault();
|
|
||||||
runTests('bounce-if-busy', visibleTestIds)
|
|
||||||
} else if (e.code === 'KeyS' && (e.metaKey || e.ctrlKey)) {
|
|
||||||
e.preventDefault();
|
|
||||||
sendMessageNoReply('stop')
|
|
||||||
} else if (e.code === 'KeyU' && (e.metaKey || e.ctrlKey)) {
|
|
||||||
e.preventDefault();
|
|
||||||
reloadTests()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
addEventListener("keydown", onShortcutEvent);
|
|
||||||
|
|
||||||
return () => {
|
|
||||||
removeEventListener("keydown", onShortcutEvent)
|
|
||||||
}
|
|
||||||
}, [visibleTestIds]);
|
|
||||||
|
|
||||||
updateRootSuite = React.useCallback((config: reporterTypes.FullConfig, rootSuite: reporterTypes.Suite, loadErrors: reporterTypes.TestError[], newProgress: Progress | undefined) => {
|
updateRootSuite = React.useCallback((config: reporterTypes.FullConfig, rootSuite: reporterTypes.Suite, loadErrors: reporterTypes.TestError[], newProgress: Progress | undefined) => {
|
||||||
const selectedProjects = config.configFile ? settings.getObject<string[] | undefined>(config.configFile + ':projects', undefined) : undefined;
|
const selectedProjects = config.configFile ? settings.getObject<string[] | undefined>(config.configFile + ':projects', undefined) : undefined;
|
||||||
for (const projectName of projectFilters.keys()) {
|
for (const projectName of projectFilters.keys()) {
|
||||||
|
|
@ -198,6 +177,27 @@ export const UIModeView: React.FC<{}> = ({
|
||||||
});
|
});
|
||||||
}, [projectFilters, runningState, testModel]);
|
}, [projectFilters, runningState, testModel]);
|
||||||
|
|
||||||
|
React.useEffect(() => {
|
||||||
|
const onShortcutEvent = (e: KeyboardEvent) => {
|
||||||
|
if (e.code === 'KeyR' && (e.metaKey || e.ctrlKey)){
|
||||||
|
e.preventDefault();
|
||||||
|
runTests('bounce-if-busy', visibleTestIds);
|
||||||
|
} else if (e.code === 'KeyS' && (e.metaKey || e.ctrlKey)) {
|
||||||
|
e.preventDefault();
|
||||||
|
sendMessageNoReply('stop');
|
||||||
|
} else if (e.code === 'KeyU' && (e.metaKey || e.ctrlKey)) {
|
||||||
|
e.preventDefault();
|
||||||
|
reloadTests();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
addEventListener('keydown', onShortcutEvent);
|
||||||
|
|
||||||
|
return () => {
|
||||||
|
removeEventListener('keydown', onShortcutEvent);
|
||||||
|
};
|
||||||
|
}, [runTests, reloadTests, visibleTestIds]);
|
||||||
|
|
||||||
const isRunningTest = !!runningState;
|
const isRunningTest = !!runningState;
|
||||||
const dialogRef = React.useRef<HTMLDialogElement>(null);
|
const dialogRef = React.useRef<HTMLDialogElement>(null);
|
||||||
const openInstallDialog = React.useCallback((e: React.MouseEvent) => {
|
const openInstallDialog = React.useCallback((e: React.MouseEvent) => {
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ const basicTestTree = {
|
||||||
test('test 2', async () => { await new Promise(() => {}); });
|
test('test 2', async () => { await new Promise(() => {}); });
|
||||||
test('test 3', async () => {});
|
test('test 3', async () => {});
|
||||||
`
|
`
|
||||||
}
|
};
|
||||||
|
|
||||||
test('should run on Meta(command) with R', async ({ runUITest }) => {
|
test('should run on Meta(command) with R', async ({ runUITest }) => {
|
||||||
const { page } = await runUITest(basicTestTree);
|
const { page } = await runUITest(basicTestTree);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue