Kind: Class
Source: atloria-monorepo/apps/screenshot-worker/test/helpers/batch-builder.ts
Builder for constructing test batch screenshot requests
Usage: const batch = new BatchRequestBuilder() .withProjectId('test-project') .withScreenshot({ url: 'http://localhost:3000', description: 'Test' }) .build();
Methods
| Method | Signature | Returns |
|---|---|---|
withProjectId | withProjectId(projectId: string) | this |
withOrganizationId | withOrganizationId(organizationId: string) | this |
withCapturedBy | withCapturedBy(capturedBy: string) | this |
withName | withName(name: string) | this |
withDescription | withDescription(description: string) | this |
withConfig | withConfig(config: Partial<BatchConfigDto>) | this |
withAuth | withAuth(auth: Partial<BatchAuthConfigDto>) | this |
withScreenshot | withScreenshot(screenshot: Partial<BatchScreenshotItemDto>) | this |
withScreenshots | withScreenshots(screenshots: Partial<BatchScreenshotItemDto>[]) | this |
build | build() | TakeBatchScreenshotsDto |
Where it refuses work
BatchRequestBuilderstops the work withErrorwhen!this.request.screenshots || this.request.screenshots.length === 0— “At least one screenshot is required”.
Was this page helpful?