diff --git a/preview/playwright.config.ts b/preview/playwright.config.ts index 87d563bf..1fb845a1 100644 --- a/preview/playwright.config.ts +++ b/preview/playwright.config.ts @@ -21,7 +21,7 @@ const config: PlaywrightTestConfig = { timeout: 5000, toHaveScreenshot: { - maxDiffPixelRatio: 0.01, + maxDiffPixelRatio: 0.02, }, }, /* Run test in files in parallel */ diff --git a/preview/test/widget.spec.ts-snapshots/widget-expanded-chromium.png b/preview/test/widget.spec.ts-snapshots/widget-expanded-chromium.png index f85d2edc..096e97b5 100644 Binary files a/preview/test/widget.spec.ts-snapshots/widget-expanded-chromium.png and b/preview/test/widget.spec.ts-snapshots/widget-expanded-chromium.png differ diff --git a/preview/test/widget.spec.ts-snapshots/widget-expanded-firefox.png b/preview/test/widget.spec.ts-snapshots/widget-expanded-firefox.png index b057399f..4c56b615 100644 Binary files a/preview/test/widget.spec.ts-snapshots/widget-expanded-firefox.png and b/preview/test/widget.spec.ts-snapshots/widget-expanded-firefox.png differ diff --git a/preview/test/widget.spec.ts-snapshots/widget-expanded-webkit.png b/preview/test/widget.spec.ts-snapshots/widget-expanded-webkit.png index 9ea61580..c48fed82 100644 Binary files a/preview/test/widget.spec.ts-snapshots/widget-expanded-webkit.png and b/preview/test/widget.spec.ts-snapshots/widget-expanded-webkit.png differ diff --git a/preview/test/widget.spec.ts-snapshots/widget-invalid-locale-chromium.png b/preview/test/widget.spec.ts-snapshots/widget-invalid-locale-chromium.png index 095407cf..35df9437 100644 Binary files a/preview/test/widget.spec.ts-snapshots/widget-invalid-locale-chromium.png and b/preview/test/widget.spec.ts-snapshots/widget-invalid-locale-chromium.png differ diff --git a/preview/test/widget.spec.ts-snapshots/widget-invalid-locale-firefox.png b/preview/test/widget.spec.ts-snapshots/widget-invalid-locale-firefox.png index 3d94b42d..3cdd100d 100644 Binary files a/preview/test/widget.spec.ts-snapshots/widget-invalid-locale-firefox.png and b/preview/test/widget.spec.ts-snapshots/widget-invalid-locale-firefox.png differ diff --git a/preview/test/widget.spec.ts-snapshots/widget-invalid-locale-webkit.png b/preview/test/widget.spec.ts-snapshots/widget-invalid-locale-webkit.png index 96c6e955..bd305714 100644 Binary files a/preview/test/widget.spec.ts-snapshots/widget-invalid-locale-webkit.png and b/preview/test/widget.spec.ts-snapshots/widget-invalid-locale-webkit.png differ diff --git a/preview/test/widget.spec.ts-snapshots/widget-minimized-chromium.png b/preview/test/widget.spec.ts-snapshots/widget-minimized-chromium.png index 4525813b..4b7cb1ce 100644 Binary files a/preview/test/widget.spec.ts-snapshots/widget-minimized-chromium.png and b/preview/test/widget.spec.ts-snapshots/widget-minimized-chromium.png differ diff --git a/preview/test/widget.spec.ts-snapshots/widget-minimized-firefox.png b/preview/test/widget.spec.ts-snapshots/widget-minimized-firefox.png index 684a6fa3..d0eb9cff 100644 Binary files a/preview/test/widget.spec.ts-snapshots/widget-minimized-firefox.png and b/preview/test/widget.spec.ts-snapshots/widget-minimized-firefox.png differ diff --git a/preview/test/widget.spec.ts-snapshots/widget-minimized-webkit.png b/preview/test/widget.spec.ts-snapshots/widget-minimized-webkit.png index 475167e6..1faf5b63 100644 Binary files a/preview/test/widget.spec.ts-snapshots/widget-minimized-webkit.png and b/preview/test/widget.spec.ts-snapshots/widget-minimized-webkit.png differ diff --git a/preview/test/widget.spec.ts-snapshots/widget-slot-default-content-chromium.png b/preview/test/widget.spec.ts-snapshots/widget-slot-default-content-chromium.png index a05144fc..073f2ee8 100644 Binary files a/preview/test/widget.spec.ts-snapshots/widget-slot-default-content-chromium.png and b/preview/test/widget.spec.ts-snapshots/widget-slot-default-content-chromium.png differ diff --git a/preview/test/widget.spec.ts-snapshots/widget-slot-default-content-firefox.png b/preview/test/widget.spec.ts-snapshots/widget-slot-default-content-firefox.png index 71ad744b..4e03223b 100644 Binary files a/preview/test/widget.spec.ts-snapshots/widget-slot-default-content-firefox.png and b/preview/test/widget.spec.ts-snapshots/widget-slot-default-content-firefox.png differ diff --git a/preview/test/widget.spec.ts-snapshots/widget-slot-default-content-webkit.png b/preview/test/widget.spec.ts-snapshots/widget-slot-default-content-webkit.png index 67b45bdf..14205de2 100644 Binary files a/preview/test/widget.spec.ts-snapshots/widget-slot-default-content-webkit.png and b/preview/test/widget.spec.ts-snapshots/widget-slot-default-content-webkit.png differ diff --git a/preview/test/widget.spec.ts-snapshots/widget-truncated-chromium.png b/preview/test/widget.spec.ts-snapshots/widget-truncated-chromium.png index 8a3068fe..93617ddf 100644 Binary files a/preview/test/widget.spec.ts-snapshots/widget-truncated-chromium.png and b/preview/test/widget.spec.ts-snapshots/widget-truncated-chromium.png differ diff --git a/preview/test/widget.spec.ts-snapshots/widget-truncated-firefox.png b/preview/test/widget.spec.ts-snapshots/widget-truncated-firefox.png index c40ded3d..b432c63f 100644 Binary files a/preview/test/widget.spec.ts-snapshots/widget-truncated-firefox.png and b/preview/test/widget.spec.ts-snapshots/widget-truncated-firefox.png differ diff --git a/preview/test/widget.spec.ts-snapshots/widget-truncated-webkit.png b/preview/test/widget.spec.ts-snapshots/widget-truncated-webkit.png index 207f209a..ea155b9a 100644 Binary files a/preview/test/widget.spec.ts-snapshots/widget-truncated-webkit.png and b/preview/test/widget.spec.ts-snapshots/widget-truncated-webkit.png differ diff --git a/preview/test/widget.spec.ts-snapshots/widget-without-experiment-chromium.png b/preview/test/widget.spec.ts-snapshots/widget-without-experiment-chromium.png index dc9f1cd6..48ab3bf0 100644 Binary files a/preview/test/widget.spec.ts-snapshots/widget-without-experiment-chromium.png and b/preview/test/widget.spec.ts-snapshots/widget-without-experiment-chromium.png differ diff --git a/preview/test/widget.spec.ts-snapshots/widget-without-experiment-firefox.png b/preview/test/widget.spec.ts-snapshots/widget-without-experiment-firefox.png index afd58d71..f4294a2a 100644 Binary files a/preview/test/widget.spec.ts-snapshots/widget-without-experiment-firefox.png and b/preview/test/widget.spec.ts-snapshots/widget-without-experiment-firefox.png differ diff --git a/preview/test/widget.spec.ts-snapshots/widget-without-experiment-webkit.png b/preview/test/widget.spec.ts-snapshots/widget-without-experiment-webkit.png index f272e552..a4db9677 100644 Binary files a/preview/test/widget.spec.ts-snapshots/widget-without-experiment-webkit.png and b/preview/test/widget.spec.ts-snapshots/widget-without-experiment-webkit.png differ diff --git a/preview/test/widget.spec.ts-snapshots/widget-without-locale-chromium.png b/preview/test/widget.spec.ts-snapshots/widget-without-locale-chromium.png index 4d8e4ff2..100867f0 100644 Binary files a/preview/test/widget.spec.ts-snapshots/widget-without-locale-chromium.png and b/preview/test/widget.spec.ts-snapshots/widget-without-locale-chromium.png differ diff --git a/preview/test/widget.spec.ts-snapshots/widget-without-locale-firefox.png b/preview/test/widget.spec.ts-snapshots/widget-without-locale-firefox.png index b9adbc66..301b5613 100644 Binary files a/preview/test/widget.spec.ts-snapshots/widget-without-locale-firefox.png and b/preview/test/widget.spec.ts-snapshots/widget-without-locale-firefox.png differ diff --git a/preview/test/widget.spec.ts-snapshots/widget-without-locale-webkit.png b/preview/test/widget.spec.ts-snapshots/widget-without-locale-webkit.png index d05dffce..990111e7 100644 Binary files a/preview/test/widget.spec.ts-snapshots/widget-without-locale-webkit.png and b/preview/test/widget.spec.ts-snapshots/widget-without-locale-webkit.png differ diff --git a/preview/test/widget.spec.ts-snapshots/widget-without-variant-chromium.png b/preview/test/widget.spec.ts-snapshots/widget-without-variant-chromium.png index b9ff3f7c..4de52078 100644 Binary files a/preview/test/widget.spec.ts-snapshots/widget-without-variant-chromium.png and b/preview/test/widget.spec.ts-snapshots/widget-without-variant-chromium.png differ diff --git a/preview/test/widget.spec.ts-snapshots/widget-without-variant-firefox.png b/preview/test/widget.spec.ts-snapshots/widget-without-variant-firefox.png index a47948ac..e7bf4d6c 100644 Binary files a/preview/test/widget.spec.ts-snapshots/widget-without-variant-firefox.png and b/preview/test/widget.spec.ts-snapshots/widget-without-variant-firefox.png differ diff --git a/preview/test/widget.spec.ts-snapshots/widget-without-variant-webkit.png b/preview/test/widget.spec.ts-snapshots/widget-without-variant-webkit.png index ed92e4fc..b3362741 100644 Binary files a/preview/test/widget.spec.ts-snapshots/widget-without-variant-webkit.png and b/preview/test/widget.spec.ts-snapshots/widget-without-variant-webkit.png differ diff --git a/src/plug.ts b/src/plug.ts index b1d87678..e940dce4 100644 --- a/src/plug.ts +++ b/src/plug.ts @@ -137,7 +137,9 @@ export class GlobalPlug implements Plug { throw new Error( 'The specified app ID and the auto-detected app ID are conflicting. ' + 'There is no need to specify an app ID when using an application-specific tag. ' - + 'Please try again omitting the "appId" option.', + + 'Please try again omitting the "appId" option. ' + + 'Read more on https://croct.help/sdk/js/conflicting-app-id', + ); } @@ -146,7 +148,8 @@ export class GlobalPlug implements Plug { if (appId === null) { throw new Error( 'The app ID must be specified when it cannot be auto-detected. ' - + 'Please try again specifying the "appId" option.', + + 'Please try again specifying the "appId" option.' + + 'Read more on https://croct.help/sdk/js/missing-app-id', ); } @@ -295,7 +298,7 @@ export class GlobalPlug implements Plug { private get sdk(): SdkFacade { if (this.instance === undefined) { - throw new Error('Croct is not plugged in.'); + throw new Error('Croct is not plugged in. Read more on https://croct.help/sdk/js/not-plugged-in'); } return this.instance; @@ -331,7 +334,7 @@ export class GlobalPlug implements Plug { public identify(userId: string): void { if (typeof userId !== 'string') { - throw new Error('The user ID must be a string. Read more on https://croct.help/plug-js/id-conversion'); + throw new Error('The user ID must be a string. Read more on https://croct.help/sdk/js/invalid-user-id'); } this.sdk.identify(userId);