Skip to content

Commit e58264d

Browse files
🔖 Release v1.0.1 (#61)
* sdk release * readme * ubuntu fix * ubuntu fix * ubuntu fix
1 parent a6c06de commit e58264d

3 files changed

Lines changed: 19 additions & 5 deletions

File tree

‎.github/workflows/test.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ jobs:
1313
name: Test
1414
strategy:
1515
matrix:
16-
python: [3.7, 3.8, 3.9]
17-
runs-on: ${{ matrix.python == 3.7 && 'ubuntu-20.04' || 'ubuntu-latest' }}
16+
python: ["3.8", "3.9", "3.10"]
17+
runs-on: ubuntu-latest
1818

1919
steps:
2020
- uses: actions-ecosystem/action-regex-match@v2

‎README.md‎

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ percy_screenshot(page, name = 'Screenshot 1')
124124
- `right` (int): Right coordinate of the consider region.
125125
- `regions` parameter that allows users to apply snapshot options to specific areas of the page. This parameter is an array where each object defines a custom region with configurations.
126126
- Parameters:
127-
- `elementSelector` (optional)
127+
- `elementSelector` (optional, only one of the following must be provided, if this is not provided then full page will be considered as region)
128128
- `boundingBox` (object): Defines the coordinates and size of the region.
129129
- `x` (number): X-coordinate of the region.
130130
- `y` (number): Y-coordinate of the region.
@@ -168,7 +168,21 @@ obj1 = {
168168
}
169169
};
170170
171-
percy_snapshot(page, name="Homepage", regions: [obj1]);
171+
# we can use the createRegion function
172+
173+
from percy import percy_snapshot
174+
from percy.screenshot import (create_region)
175+
176+
obj2 = create_region(
177+
algorithm="intellignore",
178+
diffSensitivity=2,
179+
imageIgnoreThreshold=0.2,
180+
carouselsEnabled=True,
181+
adsEnabled=True,
182+
diffIgnoreThreshold=0.4
183+
)
184+
185+
percy_snapshot(page, name="Homepage", regions=[obj1]);
172186
```
173187

174188

‎percy/version.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "1.0.1-beta.0"
1+
__version__ = "1.0.1"

0 commit comments

Comments
 (0)