Skip to content

Commit 63a8556

Browse files
fix: update Slack notification message for Playwright test failures and correct email validation error message in form tests
1 parent f120c42 commit 63a8556

File tree

2 files changed

+6
-11
lines changed

2 files changed

+6
-11
lines changed

.github/workflows/e2e.yml

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,9 @@ jobs:
2727
path: playwright-report/
2828
retention-days: 7
2929

30-
- name: GitHub Notification
30+
- name: Slack Notification on Failure
3131
if: failure()
32-
uses: actions/github-script@v6
33-
with:
34-
script: |
35-
github.issues.createComment({
36-
issue_number: 1,
37-
owner: context.repo.owner,
38-
repo: context.repo.repo,
39-
body: "🚨 Playwright tests failed after deployment!"
40-
});
32+
run: |
33+
curl -X POST -H 'Content-type: application/json' \
34+
--data '{"text":"🚨 Playwright tests failed after deployment to '${{ github.event.deployment_status.environment }}'. Check the reports for details."}' \
35+
${{ secrets.SLACK_WEBHOOK_URL }}

tests/form.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ test.describe("Form Submission Tests", () => {
7777
await page.click('button[type="submit"]');
7878

7979
// Expect email validation error
80-
await expect(page.locator("#error")).toHaveText("Invalid email format");
80+
await expect(page.locator("#error")).toHaveText("Invalid email formats");
8181
});
8282

8383
test("🔄 Reset button clears the form", async ({ page }) => {

0 commit comments

Comments
 (0)