-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: wip user-flows with puppeteer replay
- Loading branch information
Guilherme Mangabeira Gregio
committed
Feb 16, 2024
1 parent
b20e4c2
commit 1361389
Showing
4 changed files
with
48 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
FROM node:iron-alpine | ||
|
||
RUN npm install -g puppeteer @puppeteer/replay | ||
|
||
COPY entrypoint.sh /entrypoint.sh | ||
|
||
ENTRYPOINT ["/entrypoint.sh"] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/sh -l | ||
|
||
read -d '' COMMAND <<-EOF | ||
if [ -f "$HOME/ignore" ] && grep "^ignore:$BUILD_DIR" "$HOME/ignore"; then | ||
echo "$BUILD_DIR didn't change" | ||
else | ||
${BUILD_COMMAND:-echo} && npx @puppeteer/replay $* | ||
fi | ||
EOF | ||
|
||
OUTPUT=$(sh -c "$COMMAND") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"title": "creditas-site navigation", | ||
"steps": [ | ||
{ | ||
"type": "navigate", | ||
"url": "<https://www.creditas.com/?experiment=CRMIT-015b>" | ||
}, | ||
{ | ||
"type": "waitForElement", | ||
"target": "main", | ||
"selectors": [ | ||
"aria/Use seu carro, imóvel ou salário e tenha o melhor crédito" | ||
], | ||
"visible": true | ||
}, | ||
{ | ||
"type": "click", | ||
"target": "main", | ||
"selectors": [["xpath///*[@data-testid=\"button-cta\"]"]], | ||
"offsetY": 18, | ||
"offsetX": 111 | ||
} | ||
] | ||
} |