Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions clients/ruby/lib/vizzly.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ def screenshot(name, image_data, options = {})
payload = {
name: name,
image: image_base64,
type: 'base64',
buildId: ENV.fetch('VIZZLY_BUILD_ID', nil),
threshold: options[:threshold] || 0,
fullPage: options[:full_page] || false,
Expand Down
10 changes: 6 additions & 4 deletions clients/ruby/test/integration_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@ def test_screenshot_with_running_server
result = Vizzly.screenshot('test-screenshot', image_data,
properties: { browser: 'chrome', viewport: { width: 1920, height: 1080 } })

assert result
assert_equal true, result['success']
assert result, 'Expected result to be non-nil'
# TDD mode returns status: 'new' for first screenshot, 'match' for subsequent
assert %w[new match].include?(result['status']), "Expected status 'new' or 'match', got: #{result['status']}"
end

def test_screenshot_with_auto_discovery
Expand All @@ -57,8 +58,9 @@ def test_screenshot_with_auto_discovery
image_data = create_test_png
result = client.screenshot('auto-discovered', image_data)

assert result
assert_equal true, result['success']
assert result, 'Expected result to be non-nil'
# TDD mode returns status: 'new' for first screenshot, 'match' for subsequent
assert %w[new match].include?(result['status']), "Expected status 'new' or 'match', got: #{result['status']}"
end

private
Expand Down
1 change: 1 addition & 0 deletions clients/swift/Sources/Vizzly/VizzlyClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ public final class VizzlyClient {
var payload: [String: Any] = [
"name": name,
"image": imageBase64,
"type": "base64",
"threshold": threshold,
"fullPage": fullPage
]
Expand Down
1 change: 1 addition & 0 deletions clients/vitest/src/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ async function toMatchScreenshot(element, name, options = {}) {
body: JSON.stringify({
name: screenshotName,
image: screenshotPath, // Send file path directly
type: 'file-path',
buildId: buildId || null,
threshold,
fullPage,
Expand Down
1 change: 1 addition & 0 deletions src/sdk/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ export class VizzlySDK extends EventEmitter {
buildId,
name,
image: imageBase64,
type: 'base64',
properties: options.properties || {},
};

Expand Down