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AChE,IAAI,cAAc,GAAG,EAAE,CAAC;QAExB,IAAI,KAAK,EAAE;YACT,cAAc,GAAG,KAAK,GAAG,GAAG,CAAC;YAC7B,OAAO,GAAG,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;SAC3B;QAED,cAAc;YACZ,OAAO,GAAG,GAAG,GAAG,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC;QAE/D,OAAO,cAAc,CAAC;IACxB,CAAC;IAED,SAAS,aAAa,CAAC,GAAW,EAAE,UAAmB;QACrD,IAAM,GAAG,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QAC1C,GAAG,CAAC,SAAS,GAAG,MAAM,CAAC;QACvB,GAAG,CAAC,SAAS,GAAG,GAAG,CAAC;QACpB,IAAM,IAAI,GAAG,GAAG,CAAC,iBAAkB,CAAC;QACpC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QACvB,IAAI,UAAU,EAAE;YACd,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;SAC5B;QACD,OAAO,IAAI,CAAC;IACd,CAAC","sourcesContent":["import { Executor } from '../executors/Executor';\nimport Reporter, { eventHandler, ReporterProperties } from './Reporter';\nimport Test from '../Test';\nimport Suite from '../Suite';\nimport {\n suitesIcon,\n passIcon,\n failIcon,\n testsIcon,\n skipIcon,\n timeIcon\n} from './html/icons';\n\n// Needs a URLSearchParams polyfill\n\n/**\n * The Html reporter displays an HTML report in the browser.\n */\nexport default class Html extends Reporter implements HtmlProperties {\n document: Document;\n\n location: Location;\n\n protected _reportContainer: Element | undefined;\n\n // Div element to hold buttons above the summary table\n protected _reportControls: Element | undefined;\n\n // tbody element to append report rows to\n protected _reportNode: Element | undefined;\n\n // tr element containing summary info\n protected _summaryNode: Element | undefined;\n\n // Array of td elements in 'summaryNode'\n protected _summaryNodes: Element[] = [];\n\n // Accumulator for total number of suites\n protected _suiteCount = 0;\n\n // Accumulator for total number of tests\n protected _testCount = 0;\n\n // Tests in the current suite\n protected _testsInSuite = 0;\n\n // Current test index\n protected _testIndex = 0;\n\n // ID's of tests that have been processed\n protected _processedTests: any = {};\n\n protected _passedFilter: any = null;\n protected _skippedFilter: any = null;\n\n protected _fragment: DocumentFragment;\n\n protected _indentLevel = 0;\n\n protected _runningSuites: any = {};\n\n constructor(executor: Executor, options: HtmlOptions = {}) {\n super(executor, options);\n this.document = options.document || window.document;\n this.location = options.location || window.location;\n this._fragment = this.document.createDocumentFragment();\n }\n\n /**\n * Generate the summary header at the top of the report.\n *\n * @param suite The root suite of the test session\n */\n protected _generateSummary(suite: Suite): void {\n const document = this.document;\n\n if (this._summaryNodes.length === 0) {\n return;\n }\n\n const duration = suite.timeElapsed!;\n const numSkippedTests =\n suite.numTests - (suite.numFailedTests + suite.numPassedTests);\n const percentPassed = Math.round(\n (1 - suite.numFailedTests / suite.numTests) * 100\n );\n let rowInfo = [\n this._suiteCount,\n this._testCount,\n formatDuration(duration),\n numSkippedTests,\n suite.numFailedTests,\n percentPassed + '%'\n ];\n\n for (let i = 0; i < rowInfo.length; ++i) {\n this._summaryNodes[i].appendChild(\n document.createTextNode(<string>rowInfo[i])\n );\n }\n\n // Create a toggle to only show failed tests\n if (suite.numFailedTests > 0) {\n this._passedFilter = this._createToggleFilter(\n 'hidePassed',\n 'Hide passed tests'\n );\n }\n\n // Create a toggle to hide skipped tests\n if (suite.numSkippedTests > 0) {\n this._skippedFilter = this._createToggleFilter(\n 'hideSkipped',\n 'Hide skipped tests'\n );\n }\n }\n\n private _createToggleFilter(className: string, label: string) {\n const document = this.document;\n\n const toggleFilter = document.createElement('div');\n toggleFilter.className = `toggleFilter`;\n\n const toggle = document.createElement('input');\n toggle.type = 'checkbox';\n\n const toggleLabel = document.createElement('label');\n toggleLabel.appendChild(toggle);\n toggleLabel.appendChild(document.createTextNode(label));\n\n toggleFilter.appendChild(toggleLabel);\n\n toggle.onclick = () => {\n if (toggle.checked) {\n addClass(document.body, className);\n } else {\n removeClass(document.body, className);\n }\n };\n\n return toggleFilter;\n }\n\n protected _injectCSS() {\n const document = this.document;\n // Prevent FOUC\n const style = document.createElement('style');\n style.innerHTML = 'body { visibility: hidden; }';\n\n const link = document.createElement('link');\n link.rel = 'stylesheet';\n link.href = `${this.executor.config.internPath}lib/reporters/html/html.css`;\n\n document.head!.appendChild(style);\n document.head!.appendChild(link);\n }\n\n protected _getIndentLevel(node: Element) {\n // second child always has a class of indentN\n const child: Element = node.children[1];\n\n // get the indentN class\n const indent = child.className.split(' ').filter(function(name: string) {\n return name.indexOf('indent') >= 0;\n })[0];\n\n return indent ? parseInt(indent.slice('indent'.length), 10) : 0;\n }\n\n /**\n * Set the collapsed state of a node and return the new state.\n *\n * @param {DOMNode} node A suite node\n * @param {boolean} collapsed Set the collapsed state, or toggle if\n * undefined\n */\n protected _setCollapsed(node: Element, shouldCollapse?: boolean) {\n let indentDelta: number;\n let initialIndent = this._getIndentLevel(node);\n\n const collapsed = containsClass(node, 'collapsed');\n if (shouldCollapse === collapsed) {\n // Don't do anything if the current collapse state is the the same\n // as the requested\n return;\n }\n\n // Use the given collapsed state or toggle the existing state\n shouldCollapse = shouldCollapse == null ? !collapsed : shouldCollapse;\n if (shouldCollapse) {\n addClass(node, 'collapsed');\n } else {\n removeClass(node, 'collapsed');\n }\n\n // node won't exist after the last test in a suite\n while ((node = <Element>node.nextSibling)) {\n indentDelta = this._getIndentLevel(node) - initialIndent;\n\n // Stop looping when we encounter a row that's not indented more\n // than the suite being updated\n if (indentDelta <= 0) {\n break;\n }\n\n // Child suites of the suite being updated should always be\n // collapsed\n if (containsClass(node, 'suite')) {\n addClass(node, 'collapsed');\n }\n\n // Only show children one level under the suite being updated when\n // expanding\n (<HTMLElement>node).style.display =\n !shouldCollapse && indentDelta === 1 ? '' : 'none';\n }\n }\n\n @eventHandler()\n error(error: Error) {\n const document = this.document;\n let htmlError = this.formatError(error)\n .replace(/&/g, '&amp;')\n .replace(/</g, '&lt;');\n let errorNode = document.createElement('pre');\n errorNode.style.cssText = 'color: red; font-family: sans-serif;';\n errorNode.innerHTML =\n '<h1>Fatal error</h1>' +\n '<pre style=\"padding: 1em; background-color: #f0f0f0;\">' +\n htmlError +\n '</pre>';\n document.body.appendChild(errorNode);\n }\n\n @eventHandler()\n runStart() {\n const document = this.document;\n this._reportContainer = document.createElement('div');\n const headerNode = document.createElement('h1');\n const summaryHeaders = [\n 'Suites',\n 'Tests',\n 'Duration',\n 'Skipped',\n 'Failed',\n 'Success Rate'\n ];\n const summaryIcons: { [key: string]: string } = {\n suites: suitesIcon,\n tests: testsIcon,\n duration: timeIcon,\n skipped: skipIcon,\n failed: failIcon\n };\n\n const fragment = this._fragment;\n\n // Page header\n const headerTitle = document.createElement('span');\n headerTitle.className = 'headerTitle';\n headerTitle.innerHTML = 'Intern Test Report';\n\n headerNode.className = 'reportHeader';\n const headerLogo = document.createElement('img');\n headerLogo.className = 'headerLogo';\n headerLogo.src =\n 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIIAAACACAMAAADwF' +\n 'UHEAAADAFBMVEUAAAAAAAAAAABVVVVAQEBmZmZVVVVtbW1gYGBVVVVmZmZdXV1q' +\n 'ampiYmJtbW1mZmZwcHBpaWljY2Nra2tmZmZtbW1oaGhvb29qampwcHBsbGxoaGh' +\n 'tbW1qampvb29ra2twcHBsbGxxcXFtbW1qampubm5ra2tvb29sbGxwcHBtbW1xcX' +\n 'Fubm5sbGxvb29tbW1wcHBtbW1wcHBubm5xcXFvb29tbW1vb29tbW1wcHBubm5wc' +\n 'HBvb29xcXFvb29tbW1wcHBubm5wcHBubm5xcXFvb29xcXFvb29ubm5wcHBubm5w' +\n 'cHBvb29xcXFvb29xcXFwcHBubm5wcHBwcHBvb29xcXFvb29ubm5xcXFwcHBvb29' +\n 'wcHBwcHBvb29xcXFwcHBubm5wcHBvb29wcHBvb29xcXFvb29xcXFwcHBvb29wcH'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KN36' +\n 'vBc8asQGE906eB88KWLm93Qvf6wBnuM3cl0t3apdNxyeYxi69Azd25ccCY/xv3P' +\n 'ZCbplyXshFh4TmbDuAt0qeT+xAzwlMD41z0x3Tm1KuskAjwl8ZEcJ9Z3LefmhLv' +\n 'C89oMn/mnzIRMdnM1dPfOujvAqY+y9z2V9UVx16KPX504Y0A4t9BN3u2Vcrggrb' +\n 'wAAAABJRU5ErkJggg==';\n\n headerNode.appendChild(headerLogo);\n headerNode.appendChild(headerTitle);\n fragment.appendChild(headerNode);\n\n // Report container\n this._reportContainer.className = 'internReportContainer';\n this._fragment.appendChild(this._reportContainer);\n\n // Summary table\n const summaryTableNode = document.createElement('div');\n summaryTableNode.className = 'summary';\n this._summaryNode = document.createElement('div');\n\n for (let i = 0; i < summaryHeaders.length; i++) {\n const cellNode = document.createElement('div');\n const cellName = summaryHeaders[i]\n .toLowerCase()\n .replace(/\\s(.)/g, (_, char) => char.toUpperCase());\n cellNode.className = 'summaryContent';\n addClass(cellNode, cellName);\n\n if (summaryIcons[cellName]) {\n const cellIcon = createSvgNode(summaryIcons[cellName], cellName);\n cellNode.appendChild(cellIcon);\n }\n\n const cellTitle = document.createElement('span');\n cellTitle.className = 'summaryTitle';\n cellTitle.appendChild(document.createTextNode(summaryHeaders[i]));\n\n const cellData = document.createElement('div');\n cellData.className = 'summaryData';\n\n this._summaryNodes[i] = document.createElement('span');\n this._summaryNode.appendChild(this._summaryNodes[i]);\n\n cellData.appendChild(this._summaryNodes[i]);\n cellNode.appendChild(cellTitle);\n cellNode.appendChild(cellData);\n summaryTableNode.appendChild(cellNode);\n }\n\n this._reportContainer.appendChild(summaryTableNode);\n\n // Controls\n this._reportControls = document.createElement('div');\n this._reportControls.className = 'reportControls';\n this._reportControls.appendChild(document.createElement('div'));\n this._reportControls.appendChild(document.createElement('div'));\n this._reportContainer.appendChild(this._reportControls);\n\n // Report table\n const reportTableNode = document.createElement('table');\n reportTableNode.className = 'report';\n this._reportNode = document.createElement('tbody');\n reportTableNode.appendChild(this._reportNode);\n this._reportContainer.appendChild(reportTableNode);\n\n // Handle clicks on table rows, which will expand or collapse rows\n this._reportNode.addEventListener('click', event => {\n let target: Element | null = <Element>event.target;\n if (!target || target.tagName === 'A') {\n return;\n }\n\n while (target && target!.tagName !== 'TR') {\n target = target!.parentElement;\n }\n if (target) {\n this._setCollapsed(target);\n }\n });\n }\n\n @eventHandler()\n suiteStart(suite: Suite) {\n // There's a top-level Suite that contains all user-created suites\n // We want to skip it\n if (!suite.hasParent) {\n return;\n }\n\n this._testsInSuite = suite.tests.length;\n this._testIndex = 0;\n this._processedTests = {};\n this._suiteCount++;\n\n const document = this.document;\n const rowNode = document.createElement('tr');\n rowNode.className = 'suite';\n\n const statusCell = document.createElement('td');\n addClass(statusCell, 'column-status');\n const statusContent = document.createElement('div');\n addClass(statusContent, 'statusContent');\n statusCell.appendChild(statusContent);\n rowNode.appendChild(statusCell);\n\n const idCell = document.createElement('td');\n idCell.className = 'column-id';\n addClass(idCell, 'title');\n\n const idText = document.createElement('div');\n idText.className = 'truncateText';\n idText.appendChild(this.createLinkNode(suite));\n idCell.appendChild(idText);\n rowNode.appendChild(idCell);\n\n this._reportNode!.appendChild(rowNode);\n\n if (this._indentLevel) {\n addClass(idCell, `indent${Math.min(this._indentLevel, 5)}`);\n addClass(rowNode, 'indent');\n }\n\n this._runningSuites[suite.id] = { node: rowNode };\n ++this._indentLevel;\n }\n\n @eventHandler()\n suiteEnd(suite: Suite) {\n const document = this.document;\n\n const numTests = suite.numTests;\n const numFailedTests = suite.numFailedTests;\n const numPassedTests = suite.numPassedTests;\n const numSkippedTests = numTests - (numFailedTests + numPassedTests);\n const hasSuiteFailures = suite.numSkippedTests !== numSkippedTests;\n const allTestsSkipped = numTests === numSkippedTests;\n\n if (!suite.hasParent) {\n this._generateSummary(suite);\n\n for (let i = 0; i < document.styleSheets.length; i++) {\n document.styleSheets[i].disabled = true;\n }\n\n // Load styles via webpack\n require('./html/html.styl');\n\n document.body.innerHTML = '';\n document.body.className = '';\n document.body.appendChild(this._fragment);\n\n const expandToggle = document.createElement('div');\n expandToggle.className = 'linkButton';\n expandToggle.textContent = 'Expand/collapse all';\n\n const reportControls = this._reportControls!;\n reportControls.firstElementChild!.appendChild(expandToggle);\n\n expandToggle.addEventListener('click', () => {\n const reportNode = this._reportNode!;\n const shouldExpand = reportNode.querySelector('.collapsed') != null;\n const suites = reportNode.querySelectorAll('.suite');\n for (let i = 0; i < suites.length; i++) {\n this._setCollapsed(suites[i], !shouldExpand);\n }\n });\n\n if (this._passedFilter) {\n reportControls.lastElementChild!.appendChild(this._passedFilter);\n } else {\n const failedNode = document.querySelector('.failed')!;\n addClass(failedNode, 'success');\n }\n\n if (this._skippedFilter) {\n reportControls.lastElementChild!.appendChild(this._skippedFilter);\n }\n\n const successRateNode = document.querySelector('.successRate')!;\n\n if (suite.numFailedTests > 0) {\n const icon = createSvgNode(failIcon);\n successRateNode.insertBefore(icon, successRateNode.firstChild);\n addClass(successRateNode, 'failed');\n } else {\n const icon = createSvgNode(passIcon);\n successRateNode.insertBefore(icon, successRateNode.firstChild);\n }\n\n if (hasSuiteFailures) {\n const skippedNode = document.querySelector('.summaryContent.skipped')!;\n addClass(skippedNode, 'failed');\n }\n\n return;\n }\n\n const rowNode = this._runningSuites[suite.id].node;\n const rowStatus = allTestsSkipped\n ? 'skipped'\n : numFailedTests > 0 || hasSuiteFailures\n ? 'failed'\n : 'passed';\n\n // Mark a suite as failed if any of its child tests failed, and\n addClass(rowNode, rowStatus);\n\n const icon = createSvgNode(rowStatus === 'skipped' ? skipIcon : suitesIcon);\n const statusCell = rowNode.querySelector('.column-status');\n const statusContent = statusCell.firstElementChild;\n statusContent.appendChild(icon);\n\n // Only suites with failed tests will be initially expanded\n this._setCollapsed(rowNode, numFailedTests === 0 && !hasSuiteFailures);\n\n let cellNode = document.createElement('td');\n\n if (numPassedTests > 0) {\n cellNode.appendChild(document.createTextNode('Passed: '));\n const testsPassed = document.createElement('span');\n testsPassed.className = 'success';\n testsPassed.innerHTML = `${numPassedTests}`;\n cellNode.appendChild(testsPassed);\n }\n\n if (numFailedTests > 0) {\n cellNode.appendChild(document.createTextNode('Failed: '));\n const testsFailed = document.createElement('span');\n testsFailed.className = 'failed';\n testsFailed.innerHTML = `${numFailedTests}`;\n cellNode.appendChild(testsFailed);\n }\n\n if (numSkippedTests > 0) {\n cellNode.appendChild(document.createTextNode('Skipped: '));\n const testsSkipped = document.createElement('span');\n testsSkipped.innerHTML = `${numSkippedTests}`;\n cellNode.appendChild(testsSkipped);\n }\n\n if (suite.error) {\n const suiteError = document.createElement('span');\n suiteError.className = 'failed';\n suiteError.innerHTML = 'Suite error!';\n cellNode.appendChild(suiteError);\n }\n\n cellNode.className = 'column-info';\n rowNode.appendChild(cellNode);\n\n // Duration cell\n cellNode = document.createElement('td');\n cellNode.className = 'column-time numeric duration';\n cellNode.appendChild(\n document.createTextNode(formatDuration(suite.timeElapsed!))\n );\n rowNode.appendChild(cellNode);\n\n --this._indentLevel;\n\n // Only update the global tracking variables for top-level suites\n if (!this._indentLevel) {\n this._testCount += numTests;\n }\n\n this._runningSuites[suite.id] = null;\n }\n\n @eventHandler()\n testEnd(test: Test) {\n if (test.id in this._processedTests) {\n return;\n }\n\n this._processedTests[test.id] = true;\n\n this._testIndex++;\n\n const document = this.document;\n const rowNode = document.createElement('tr');\n rowNode.className = 'testResult';\n\n const statusCell = document.createElement('td');\n statusCell.className = 'column-status';\n const statusContent = document.createElement('div');\n statusContent.className = 'statusContent';\n statusCell.appendChild(statusContent);\n rowNode.appendChild(statusCell);\n\n const idCell = document.createElement('td');\n idCell.className = 'column-id';\n if (this._indentLevel) {\n addClass(idCell, `indent${this._indentLevel}`);\n }\n\n const idText = document.createElement('div');\n idText.className = 'truncateText';\n idText.appendChild(this.createLinkNode(test));\n idCell.appendChild(idText);\n rowNode.appendChild(idCell);\n\n const infoCell = document.createElement('td');\n infoCell.className = 'column-info';\n\n let statusIcon: Element;\n\n if (test.error) {\n addClass(rowNode, 'failed');\n\n const errorNode = document.createElement('div');\n errorNode.className = 'testError';\n const errorText = document.createElement('pre');\n addClass(errorText, 'scrollText');\n errorText.textContent = this.formatError(test.error);\n errorNode.appendChild(errorText);\n infoCell.appendChild(errorNode);\n\n statusIcon = createSvgNode(failIcon);\n } else if (test.skipped != null) {\n addClass(rowNode, 'skipped');\n infoCell.appendChild(document.createTextNode(test.skipped || ''));\n statusIcon = createSvgNode(skipIcon);\n } else {\n addClass(rowNode, 'passed');\n statusIcon = createSvgNode(passIcon);\n }\n\n statusContent.appendChild(statusIcon);\n\n if (this._testIndex === this._testsInSuite) {\n addClass(rowNode, 'lastTest');\n }\n\n rowNode.appendChild(infoCell);\n\n const timeNode = document.createElement('td');\n timeNode.className = 'numeric';\n addClass(timeNode, 'duration');\n timeNode.appendChild(\n document.createTextNode(\n test.skipped ? 'Skipped' : formatDuration(test.timeElapsed!)\n )\n );\n rowNode.appendChild(timeNode);\n\n this._reportNode!.appendChild(rowNode);\n }\n\n private createLinkNode(obj: Suite | Test) {\n const document = this.document;\n const location = this.location;\n\n const params = new URLSearchParams(location.search.slice(1) || undefined);\n params.delete('grep');\n params.append('grep', obj.id);\n\n const a = document.createElement('a');\n a.href = location.origin + location.pathname + `?${params.toString()}`;\n a.title = obj.name!;\n a.appendChild(document.createTextNode(obj.name!));\n\n return a;\n }\n}\n\nexport interface HtmlProperties extends ReporterProperties {\n document: Document;\n location: Location;\n}\n\nexport type HtmlOptions = Partial<HtmlProperties>;\n\nfunction containsClass(node: Element, cls: string) {\n const classes = node.className.split(/\\s+/);\n return classes.indexOf(cls) !== -1;\n}\n\nfunction addClass(node: Element, cls: string) {\n if (node.classList) {\n node.classList.add(cls);\n } else {\n const classes = getClassName(node).split(/\\s+/);\n if (classes.indexOf(cls) !== -1) {\n return;\n }\n\n classes.push(cls);\n setClassName(node, classes.join(' '));\n }\n}\n\nfunction removeClass(node: Element, cls: string) {\n if (node.classList) {\n node.classList.remove(cls);\n } else {\n const classes = getClassName(node).split(/\\s+/);\n const index = classes.indexOf(cls);\n if (index === -1) {\n return;\n }\n\n classes.splice(index, 1);\n setClassName(node, classes.join(' '));\n }\n}\n\nfunction getClassName(node: Element) {\n return node.getAttribute('class') || '';\n}\n\nfunction setClassName(node: Element, cls: string) {\n node.setAttribute('class', cls);\n}\n\nfunction pad(value: string | number, size: number): string {\n let padded = String(value);\n\n while (padded.length < size) {\n padded = '0' + padded;\n }\n\n return padded;\n}\n\n// Format a millisecond value to m:ss.SSS\n// If duration is greater than 60 minutes, value will be HHHH:mm:ss.SSS\n// (the hours value will not be converted to days)\nfunction formatDuration(duration: number): string {\n let hours = Math.floor(duration / 3600000);\n let minutes: string | number = Math.floor(duration / 60000) - hours * 60;\n let seconds = Math.floor(duration / 1000) - hours * 3600 - minutes * 60;\n let milliseconds =\n duration - hours * 3600000 - minutes * 60000 - seconds * 1000;\n let formattedValue = '';\n\n if (hours) {\n formattedValue = hours + ':';\n minutes = pad(minutes, 2);\n }\n\n formattedValue +=\n minutes + ':' + pad(seconds, 2) + '.' + pad(milliseconds, 3);\n\n return formattedValue;\n}\n\nfunction createSvgNode(svg: string, extraClass?: string) {\n const div = document.createElement('div');\n div.className = 'icon';\n div.innerHTML = svg;\n const icon = div.firstElementChild!;\n addClass(icon, 'icon');\n if (extraClass) {\n addClass(icon, extraClass);\n }\n return icon;\n}\n"]}
\No newline at end of file