import { ArrowRightOutlined, CheckOutlined, ClockCircleOutlined, CloseOutlined, LogoutOutlined, MinusOutlined, WarningOutlined, } from '@ant-design/icons'; import { Alert } from 'antd'; import type React from 'react'; import ShinyText from '../shiny-text'; export function timeCostStrElement(timeCost?: number) { let str: string; if (typeof timeCost !== 'number') { str = '-'; } else { str = `${(timeCost / 1000).toFixed(2)}s`; } return ( {str} ); } export const iconForStatus = (status: string) => { switch (status) { case 'finished': case 'passed': case 'success': case 'connected': return ( ); case 'finishedWithWarning': return ( ); case 'failed': case 'closed': case 'timedOut': case 'interrupted': return ( ); case 'pending': return ; case 'cancelled': case 'skipped': return ( ); case 'running': return ; default: return ; } }; // server not ready error message export const errorMessageServerNotReady = ( Don't worry, just one more step to launch the playground server.
Please run one of the commands under the midscene project directory:
a. npx midscene-playground
b. npx --yes @midscene/web
); // server launch tip export const serverLaunchTip = ( notReadyMessage: React.ReactNode | string = errorMessageServerNotReady, ) => (
); // empty result tip export const emptyResultTip = (
);