Skip to content

Commit

Permalink
Merge pull request #28 from collective/datakurre-rfbrowser
Browse files Browse the repository at this point in the history
Fix to support screenshots / images below sub directories
  • Loading branch information
datakurre authored Sep 9, 2023
2 parents bdd8bd0 + f0e57cf commit c2f7ac4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 35 deletions.
37 changes: 5 additions & 32 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,41 +8,14 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python: [python27, python36, python37, python38, python39]
robotframework: [2.8.2, 2.8.7, 2.9.2, 3.0.4, 3.1.2, 3.2.2, 4.0.3, 4.1.3, 5.0.0]
exclude:
- python: python27
robotframework: 5.0.0
- python: python36
robotframework: 2.8.2
- python: python36
robotframework: 2.8.7
- python: python36
robotframework: 2.9.2
- python: python37
robotframework: 2.8.2
- python: python37
robotframework: 2.8.7
- python: python37
robotframework: 2.9.2
- python: python38
robotframework: 2.8.2
- python: python38
robotframework: 2.8.7
- python: python38
robotframework: 2.9.2
- python: python39
robotframework: 2.8.2
- python: python39
robotframework: 2.8.7
- python: python39
robotframework: 2.9.2
python: [python38, python39]
robotframework: [3.2.2, 4.0.3, 4.1.3, 5.0.0]
steps:
- uses: actions/checkout@v3.0.2
- uses: cachix/install-nix-action@v17
- uses: actions/checkout@v4.0.0
- uses: cachix/install-nix-action@v22
with:
nix_path: nixpkgs=channel:nixos-unstable
- uses: cachix/cachix-action@v10
- uses: cachix/cachix-action@v12
with:
name: datakurre
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
Expand Down
9 changes: 6 additions & 3 deletions src/robotsuite/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -451,12 +451,15 @@ def runTest(self):
path = os.path.join(dirname, filename)
if os.path.isfile(path):
copy_filename = filename\
.replace(os.path.sep, '')\
.replace(os.path.sep, '_')\
.replace(os.pardir, '')
shutil.copyfile(path, "%s%s" % (prefix, copy_filename))
# Fix 'a' and 'img' tags to target the copied versions
data = re.sub(r'(href|src)="([^"]+\.png)"',
'\\1="%s\\2"' % prefix, data)
for attr, value in re.findall(r'(href|src)="([^"]+\.png)"', data):
data = data.replace(
attr + '="' + value + '"',
attr + '="' + prefix + value.replace(os.path.sep, '_') + '"',
)

# Try to merge the second 'output.xml' into the first one or into the
# final one from the previous test run when requested by setting
Expand Down

0 comments on commit c2f7ac4

Please sign in to comment.