Closed Nef10 closed 2 years ago
Coverage after merging timer into main
91.67% |
---|
File | Stmts | Funcs | Lines | Uncovered Lines |
---|---|---|---|---|
/Users/runner/work/SwiftScraper/SwiftScraper/Sources/SwiftScraper | ||||
Browser.swift | 75% | 65.38% | 76.51% | 130–138, 142, 163–164, 173–184, 197–198, 210–211, 235–236, 72, 79 |
JavaScriptGenerator.swift | 100% | 100% | 100% | |
StepRunner.swift | 95.80% | 90.91% | 96.30% | 136, 175–177 |
SwiftScraperError.swift | 100% | 100% | 100% | |
/Users/runner/work/SwiftScraper/SwiftScraper/Sources/SwiftScraper/Steps | ||||
AsyncProcessStep.swift | 100% | 100% | 100% | |
AsyncScriptStep.swift | 100% | 100% | 100% | |
OpenPageStep.swift | 96.55% | 100% | 96.15% | 28 |
PageChangeStep.swift | 92.68% | 80% | 94.44% | 48 |
ProcessStep.swift | 100% | 100% | 100% | |
ScriptStep.swift | 98.04% | 100% | 97.78% | 61 |
WaitForConditionStep.swift | 95.60% | 85.71% | 96.43% | 51, 65 |
WaitStep.swift | 100% | 100% | 100% | |
/Users/runner/work/SwiftScraper/SwiftScraper/Sources/SwiftScraper/Steps/Common | ||||
NavigableStep.swift | 100% | 100% | 100% | |
StepCompletionCallback.swift | 100% | 100% | 100% | |
StepFlowResult.swift | 100% | 100% | 100% |
Sometimes the evaluation of the check script takes more then the 0.1 sec between the runs, which means a second run is triggered while the first one is still running. If the first on is now successful, and the second one returns before the reset function is fully executed, the completion handler might be called multiple times, advancing more steps then it should.
To fix this, we now only trigger the javascript check function 0.1 sec after the last one returned.