Skip to content

Commit

Permalink
Merge branch 'main' into sauce-visual-espresso
Browse files Browse the repository at this point in the history
  • Loading branch information
Kerem Beygo committed Dec 6, 2024
2 parents 4b53967 + b5547ca commit c3a6bff
Show file tree
Hide file tree
Showing 14 changed files with 412 additions and 87 deletions.
34 changes: 9 additions & 25 deletions docs/dev/data-center-maint.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,31 +12,15 @@ Saucelabs.com and the Sauce Labs testing service in the US and EU will be down f

| Region | Date | Time |
| ---------- | ------------------ | ------------------------------ |
| US | January 6, 2024 | 10am - 12pm PST |
| EU | January 20, 2024 | 7pm - 9pm CET |
| US and EU | February 10, 2024 | 10am - 12pm PDT, 7pm - 9pm CEST|
| EU | February 24, 2024 | 7pm - 9pm CET |
| US | March 9, 2024 | 10am - 12pm PDT |
| US and EU | March 20, 2024 | 6:30am - 08:30am UTC |
| US | March 21, 2024 | 6:30am - 08:30am UTC |
| EU | March 23, 2024 | 7pm - 9pm CET |
| US and EU | April 20, 2024 | 10am - 12pm PDT, 7pm - 9pm CEST|
| US | May 18, 2024 | 10am - 12pm PDT |
| EU | May 25, 2024 | 7pm-9pm CEST |
| US | June 8, 2024 | 10am - 12pm PDT |
| EU | June 22, 2024 | 7pm-9pm CEST |
| US | July 9, 2024 | 9pm-1am PDT |
| EU | July 18, 2024 | 9pm-11pm CEST |
| US | August 10, 2024 | 10am - 12pm PDT |
| EU | August 24, 2024 | 7pm - 9pm CEST |
| US | September 14, 2024 | 10am - 12pm PDT |
| EU | September 21, 2024 | 7pm - 9pm CEST |
| US West | October 5, 2024 | 10am - 12pm PDT (1700-1900 UTC)|
| US East | October 12, 2024 | 1pm - 3pm EDT (1700-1900 UTC) |
| EU Central | October 19, 2024 | 7pm - 9pm CEST (1700-1900 UTC) |
| US West | November 2, 2024 | 10am - 12pm PDT (1700-1900 UTC)|
| US East and EU Central | November 9, 2024 | 1pm - 3pm EST (1800-2000 UTC) |
| US West and EU Central | December 14, 2024 | 10am - 12pm PDT (1800-2000 UTC)|
| US West and EU Central | December 14, 2024 | 10 AM - 12 PM PDT (1800-2000 UTC)|
| EU Central | January 11, 2025 | 7 PM - 9 PM CET (1800-2000 UTC) |
| US West | January 25, 2025 | 10 AM - 12 PM PST (1800-2000 UTC) |
| US East | February 1, 2025 | 10 AM - 12 PM PST (1800-2000 UTC) |
| US West | February 8, 2025 | 10 AM - 12 PM PST (1800-2000 UTC) |
| EU Central | February 15, 2025 | 7 PM - 9 PM CET (1800-2000 UTC) |
| US East | March 8, 2025 | 10 AM - 12 PM PST (1800-2000 UTC) |
| EU Central | March 15, 2025 | 7 PM - 9 PM CET (1800-2000 UTC) |
| US West | March 22, 2025 | 10 AM - 12 PM PST (1800-2000 UTC) |

### Backtrace - error reporting service updates are pushed Wednesdays 11am - 1pm ET across all data centers. Individual application servers may experience a short period of downtime within this window

Expand Down
33 changes: 14 additions & 19 deletions docs/error-reporting/platform-integrations/unreal/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,16 +138,7 @@ To configure the crash reporter for a packaged build:

Integrate the [backtrace-android](https://github.com/backtrace-labs/backtrace-android) error reporting library with your Unreal Engine game for Android written in Java or Kotlin.

1. Download [BacktraceAndroid_UPL.xml](https://gist.github.com/ianrice07/36d8731f0d1af10af4803288c7c86c10).
1. In the `BacktraceAndroid_UPL.xml` file, provide the name of your [subdomain and a submission token](/error-reporting/platform-integrations/unreal/setup/#what-youll-need) for `BacktraceCredentials`.
- Java:
```java
BacktraceCredentials credentials = new BacktraceCredentials("https://submit.backtrace.io/{subdomain}/{submission-token}/json");
```
- Kotlin:
```java
val backtraceCredentials = BacktraceCredentials("https://submit.backtrace.io/{subdomain}/{submission-token}/json")
```
1. Download [BacktraceWrapper](https://github.com/backtrace-labs/backtrace-unreal-android/releases) package.
1. In the directory for your Unreal Engine project, locate your app or game's `Build.cs` file.
1. Place the `BacktraceAndroid_UPL.xml` file in the same directory with the `Build.cs` file.
1. In the `Build.cs` file, add the following lines at the end of the `ModuleRules` class constructor:
Expand All @@ -160,23 +151,27 @@ Integrate the [backtrace-android](https://github.com/backtrace-labs/backtrace-an
}
```

1. Download the [BacktraceWrapper.h](https://gist.github.com/lysannep/6c09a572baffede96cd250dbdf01279a#file-backtracewrapper-h) header file and add it to your GameInstance.
1. To initialize the Backtrace client, use `BacktraceIO::FInitializeBacktraceClient`.
:::note
It's recommended to initialize the client from the `GameInstance::OnStart()` method. However, if the method is not available, you can initialize the client with any method you use to start your app or game process.
:::
:::note
Optionally, you can specify custom attributes and file attachment paths to submit with your error reports. If you choose to specify file attachment paths, they must be specified as Android paths. For example, to specify a file attachment path for your `ProjectSavedDir()`, use:
1. Place the `BacktraceWrapper.h` and `BacktraceWrapper.cpp` files in the same directory and add BacktraceWrapper to your GameInstance.
1. To initialize the Backtrace client, use `BacktraceIO::FInitializeBacktraceClient` with the name of your [subdomain and a submission token](/error-reporting/platform-integrations/unreal/setup/#what-youll-need) as a SubmissionUrl.
```cpp
FString SubmissionUrl = TEXT("https://submit.backtrace.io/{subdomain}/{submission-token}/json");
BacktraceIO::FInitializeBacktraceClient(SubmissionUrl, Attributes, Attachments);
```

>**Note:**
>It's recommended to initialize the client from the `GameInstance::OnStart()` method. However, if the method is not available, you can initialize the client with any method you use to start your app or game process.
>
>Optionally, you can specify custom attributes and file attachment paths to submit with your error reports. If you choose to specify file attachment paths, they must be specified as Android paths. For example, to specify a file attachment path for your `ProjectSavedDir()`, use:
```
if (Target.Platform == UnrealTargetPlatform.Android)
#include "Misc/App.h"
#if PLATFORM_ANDROID
extern FString GFilePathBase;
FString FileAttachmentPath = GFilePathBase + FString("/UE4Game/") + FApp::GetName() + TEXT("/") + FApp::GetName() + TEXT("/Saved") + TEXT("MyFileName.txt");
FString FileName = TEXT("MyFileName.txt");
FilePath = GFilePathBase + FString("/UE5Game/") + FApp::GetName() + TEXT("/") + FApp::GetName() + TEXT("/Saved/") + FileName;
#endif
```
For more details on how to convert your Unreal Engine paths to Android paths, see the conversion functions for `FAndroidPlatformFile::PathToAndroidPaths` in the `AndroidPlatformFile.cpp` file.
:::

To change the default configuration settings for the Backtrace client, you can change the settings in the `BacktraceAndroid_UPL.xml` file. For more information, see [Configuring Backtrace for Android](/error-reporting/platform-integrations/android/configuration/) for the backtrace-android library.

Expand Down
14 changes: 1 addition & 13 deletions docs/visual-testing/_partials/_fullpage-description.md
Original file line number Diff line number Diff line change
@@ -1,13 +1 @@
By default, only the current viewport is captured when `.sauceVisualCheck` is used. You can opt in to capturing the entire page by using the `fullPage` option. It will capture everything by scrolling and stitching multiple screenshots together.

:::note
It's recommended to use the `hideAfterFirstScroll` option for fixed or sticky position elements such as sticky headers or consent banners.
:::

Options:

- `delayAfterScrollMs`: Delay in ms after scrolling and before taking screenshots. The default value is 0. We recommend using this option for lazy loading content.
- `disableCSSAnimation`: Disable CSS animations and the input caret in the app. The default value is true.
- `hideAfterFirstScroll`: One or more CSS selectors that we should remove from the page after the first scroll. Useful for hiding fixed elements such as headers, cookie banners, etc.
- `hideScrollBars`: Hide all scrollbars in the app. The default value is true.
- `scrollLimit`: Limit the number of screenshots taken for scrolling and stitching. The default value is 10. The value needs to be between 1 and 10.
Full Page Screenshots capture the entire webpage, including content beyond the visible viewport, to ensure comprehensive visual testing. This feature helps teams identify layout or rendering issues across the full page and ensures consistency across devices and browsers.
145 changes: 140 additions & 5 deletions docs/visual-testing/_partials/_fullpage-js.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,39 @@
import FullPageDescription from './_fullpage-description.md';
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

import FullPageLimit from './_fullpage-limit.md';
import FullPageLimitation from './_fullpage-limitation.md';
import FullPageDescription from './_fullpage-description.md';

<FullPageDescription/>
By default, only the viewport is captured when `.sauceVisualCheck` is used. You can opt in to capturing the entire page by using the `fullPage` option. It will capture everything by scrolling and stitching multiple screenshots together.

<FullPageLimit />

#### Web

Options:

<FullPageDescription />
- `delayAfterScrollMs`: Delay in ms after scrolling and before taking screenshots. The default value is 0. We recommend using this option for lazy loading content.
- `disableCSSAnimation`: Disable CSS animations and the input caret in the app. The default value is true.
- `hideAfterFirstScroll`: One or more CSS selectors that we should remove from the page after the first scroll. Useful for hiding fixed elements such as headers, cookie banners, etc.
- `hideScrollBars`: Hide all scrollbars in the app. The default value is true.
- `scrollLimit`: Limit the number of screenshots taken for scrolling and stitching. The default value is 10. The value needs to be between 1 and 10.

:::note
It's recommended to use the `hideAfterFirstScroll` option for fixed or sticky position elements such as sticky headers or consent banners.
:::

Example:

```ts
await browser.sauceVisualCheck('Long content page', {
// Enable full page screenshots using the default options
// Enable full page screenshot using the default options
fullPage: true,
});

await browser.sauceVisualCheck('Long content page', {
// Enable full page screenshots and customize the behavior
// Enable full page screenshot and customize the behavior
fullPage: {
delayAfterScrollMs: 500,
disableCSSAnimation: false,
Expand All @@ -23,4 +44,118 @@ await browser.sauceVisualCheck('Long content page', {
});
```

<FullPageLimit />
#### Mobile Native (beta)

Options:

- `delayAfterScrollMs`: Delay in ms after scrolling and before taking screenshots. The default value is 0. We recommend using this option for lazy loading content.
- `nativeClipSelector`: Selector used to identify the first element to which clipping will be applied.
- `scrollElement`: Scrollable element used for scrolling. The default is root element.
- `scrollLimit`: Limit the number of screenshots taken for scrolling and stitching. The default value is 10. The value needs to be between 1 and 10.

:::note
It is recommended to set `scrollElement` to the appropriate scrollable container.
:::

<Tabs>
<TabItem value="ios" label="iOS">
```ts
await browser.sauceVisualCheck('Long content page', {
// Enable full page screenshot and customize the behavior
fullPage: {
scrollElement: $('//XCUIElementTypeCollectionView'),
scrollLimit: 5
},
});
```
</TabItem>
<TabItem value="android" label="Android">
```ts
await browser.sauceVisualCheck('Long content page', {
// Enable full page screenshot and customize the behavior
fullPage: {
scrollElement: $('//androidx.recyclerview.widget.RecyclerView'),
scrollLimit: 5
},
});
```
</TabItem>
</Tabs>

Use only XPath selectors for ignore regions and clipping to an element.

:::note
On iOS, selectors must be contained within the `scrollElement`.
:::

<Tabs>
<TabItem value="ios" label="iOS">
```ts
await browser.sauceVisualCheck('Ignore regions - Long content page', {
// Enable full page screenshot and ignore elements
ignore: [
{
selector: {
value: '//XCUIElementTypeStaticText[@name="Product Price"]',
type: 'XPATH'
}
}
],
fullPage: {
scrollElement: $('//XCUIElementTypeCollectionView'),
},
});
```
</TabItem>
<TabItem value="android" label="Android">
```ts
await browser.sauceVisualCheck('Ignore regions - Long content page', {
// Enable full page screenshot and ignore elements
ignore: [
{
selector: {
value: '//android.widget.TextView[@content-desc="Product Price"]',
type: 'XPATH'
}
}
],
fullPage: {
scrollElement: $('//androidx.recyclerview.widget.RecyclerView'),
},
});
```
</TabItem>
</Tabs>

<Tabs>
<TabItem value="ios" label="iOS">
```ts
await browser.sauceVisualCheck('Clip - Long content page', {
// Enable full page screenshot and clip to an element
fullPage: {
scrollElement: $('//XCUIElementTypeCollectionView'),
nativeClipSelector: {
value: '//XCUIElementTypeCollectionView/XCUIElementTypeOther',
type: 'XPATH'
}
},
});
```
</TabItem>
<TabItem value="android" label="Android">
```ts
await browser.sauceVisualCheck('Clip - Long content page', {
// Enable full page screenshot and clip to an element
fullPage: {
scrollElement: $('//androidx.recyclerview.widget.RecyclerView'),
nativeClipSelector: {
value: '//androidx.recyclerview.widget.RecyclerView[@content-desc="Displays all products of catalog"]',
type: 'XPATH'
}
},
});
```
</TabItem>
</Tabs>

<FullPageLimitation/>
4 changes: 3 additions & 1 deletion docs/visual-testing/_partials/_fullpage-limit.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
:::note
The maximum number of scrolls and stitches in a full page screenshot is 10.

:::note
Use full page screenshots only when necessary, as they slow down test execution.
:::
3 changes: 3 additions & 0 deletions docs/visual-testing/_partials/_fullpage-limitation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
:::note
Full page screenshot for mobile native testing is in beta. Read more about [mobile native limitation](/visual-testing/mobile-native-testing/)
:::
2 changes: 1 addition & 1 deletion docs/visual-testing/integrations/csharp.md
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ VisualClient.CaptureDom = true;

### Full page screenshots

By default, only the current viewport is captured when `.VisualCheck` is used. You can opt in to capturing the entire page by using the `FullPage` option. It will capture everything by scrolling and stitching multiple screenshots together.
By default, only the viewport is captured when `.VisualCheck` is used. You can opt in to capturing the entire page by using the `FullPage` option. It will capture everything by scrolling and stitching multiple screenshots together.
Additionally, you have the option to configure full page settings using the `FullPageConfig` option.

:::note
Expand Down
Loading

0 comments on commit c3a6bff

Please sign in to comment.