Skip to content

Commit f2888c6

Browse files
committed
fix: lint errors on test cases
1 parent 8b01af3 commit f2888c6

File tree

8 files changed

+638
-408
lines changed

8 files changed

+638
-408
lines changed

.changeset/fresh-trainers-sleep.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"e2e-tests": patch
3+
---
4+
5+
Add end to end tests for `Event` type field report

.github/workflows/playwright.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
name: Playwright Tests
1+
name: Playwright
22

33
env:
4-
APP_BASE_URL: ${{ vars.APP_BASE_URL }}
4+
PLAYWRIGHT_APP_BASE_URL: ${{ vars.PLAYWRIGHT_APP_BASE_URL }}
5+
PLAYWRIGHT_USER_NAME: ${{ secrets.PLAYWRIGHT_USER_NAME }}
6+
PLAYWRIGHT_USER_PASSWORD: ${{ secrets.PLAYWRIGHT_USER_PASSWORD }}
57

68
on:
79
push:
@@ -23,7 +25,7 @@ concurrency:
2325

2426
jobs:
2527
test-e2e:
26-
name: Playwright e2e test
28+
name: E2E Tests
2729
environment: 'test'
2830
timeout-minutes: 60
2931
runs-on: ubuntu-latest
@@ -39,7 +41,7 @@ jobs:
3941
run: npm install -g yarn && yarn
4042
- name: Install Playwright Browsers
4143
run: yarn playwright install --with-deps
42-
- name: Run Playwright tests
44+
- name: Run Playwright Tests
4345
run: yarn playwright test
4446
- uses: actions/upload-artifact@v4
4547
id: playwright-report-artifact
@@ -54,7 +56,7 @@ jobs:
5456
name: github-pages
5557
path: ./packages/e2e-tests/playwright-report/
5658
deploy:
57-
name: Upload Playwright Report to GitHub Pages
59+
name: Deploy Playwright Test Report to GitHub Pages
5860
needs: test-e2e
5961
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
6062
permissions:
@@ -66,6 +68,6 @@ jobs:
6668
url: ${{ steps.deployment.outputs.page_url }}
6769
runs-on: ubuntu-latest
6870
steps:
69-
- name: Deploy to Github Pages
71+
- name: Deploy
7072
id: deployment
7173
uses: actions/deploy-pages@v4

packages/e2e-tests/.env.example

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
1-
#Playwright Base URL
2-
APP_BASE_URL=
1+
# Playwright Base URL
2+
PLAYWRIGHT_APP_BASE_URL=
3+
# User name of the test user for Playwright
4+
PLAYWRIGHT_USER_NAME=
5+
# Password of the test user for Playwright
6+
PLAYWRIGHT_USER_PASSWORD=

packages/e2e-tests/biome.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,11 @@
1515
"quoteStyle": "single",
1616
"indentWidth": 4
1717
}
18+
},
19+
"json": {
20+
"formatter": {
21+
"indentStyle": "space",
22+
"indentWidth": 4
23+
}
1824
}
1925
}

packages/e2e-tests/playwright.config.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export default defineConfig({
2525
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
2626
use: {
2727
/* Base URL to use in actions like `await page.goto('/')`. */
28-
baseURL: process.env.APP_BASE_URL,
28+
baseURL: process.env.PLAYWRIGHT_APP_BASE_URL,
2929
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
3030
trace: 'on-first-retry',
3131
},
@@ -43,11 +43,11 @@ export default defineConfig({
4343
use: { ...devices['Desktop Firefox'] },
4444
},
4545

46-
{
47-
name: 'webkit',
48-
use: { ...devices['Desktop Safari'] },
49-
},
50-
46+
// FIXME: tests not working in webkit
47+
// {
48+
// name: 'webkit',
49+
// use: { ...devices['Desktop Safari'] },
50+
// },
5151
/* Test against mobile viewports. */
5252
// {
5353
// name: 'Mobile Chrome',
Lines changed: 67 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -1,69 +1,69 @@
11
{
2-
"formName": "Create Field Report",
3-
"country": "Albania",
4-
"district": "Berat",
5-
"disasterType": "Biological Emergency",
6-
"date": "2023-06-20",
7-
"title": "bio hazard",
8-
"govRequest": "Yes",
9-
"nationalsocietyRequest": "No",
10-
"num_injured": "8000",
11-
"gov_num_injured": "4000",
12-
"other_num_injured": "5000",
13-
"num_dead": "1200",
14-
"gov_num_dead": "800",
15-
"other_num_dead": "500",
16-
"num_missing": "6000",
17-
"gov_num_missing": "3000",
18-
"other_num_missing": "2500",
19-
"num_affected": "12000",
20-
"gov_num_affected": "8000",
21-
"other_num_affected": "4000",
22-
"num_displaced": "18000",
23-
"gov_num_displaced": "14000",
24-
"other_num_displaced": "11000",
25-
"other_sources":"The English-Quotient (EQ) test measures your proficiency in the English language, including vocabulary, grammar, and comprehension. Designed for learners and professionals, it provides a benchmark for assessing language skills. ",
26-
"gov_num_assisted": "8000",
27-
"num_assisted": "7000",
28-
"num_localstaff": "6000",
29-
"num_volunteers": "5000",
30-
"num_expats_delegates": "4000",
31-
"actionHuman": "Human remains management and identification",
32-
"actionEvacuation": "Evacuation",
33-
"actionHealth": "Health",
34-
"actionShelter": "Shelter",
35-
"actionCamp": "Camp management",
36-
"actionFirst": "First Aid",
37-
"actionPsychosocial": "Psychosocial support services",
38-
"actionFood": "Food aid",
39-
"nationalSocietySummary":"Evacuation is the urgent removal of people from dangerous areas to safety, often during natural disasters or emergencies",
40-
"federationSummary":"A shelter provides safety and protection, offering a secure place for people or animals, often during emergencies or harsh conditions",
41-
"rcrcSummary":"Food sustains life, providing essential nutrients and energy. It can be a source of pleasure, culture, and community, nourishing body and soul",
42-
"informationBulletin": "Planned",
43-
"actionOther": "Who else was involved? UN agencies? NGOs? Government? Describe what other actors did. Also mention who the other actors are.",
44-
"interventionOptionOne":"Requested",
45-
"interventionOptionTwo":"Planned",
46-
"interventionOptionThree":"Completed",
47-
"drefRequested":"500000",
48-
"emergencyAppeal":"600000",
49-
"rapidResponse":"400000",
50-
"emergencyResponse":"90000",
51-
"originatorName":"Uday",
52-
"originatorTitle":"Project Manager",
53-
"originatorEmail":"[email protected]",
54-
"originatorPhone":"9802556314",
55-
"nationalName":"Navin",
56-
"nationalTitle":"Network Engineer",
57-
"nationalEmail":"[email protected]",
58-
"nationalPhone":"9804115777",
59-
"ifrcName":"Ankit",
60-
"ifrcTitle":"CEO",
61-
"ifrcEmail":"[email protected]",
62-
"ifrcPhone":"9801447523",
63-
"mediaName":"Shreya",
64-
"mediaTitle":"Shreya uffu",
65-
"mediaEmail":"[email protected]",
66-
"mediaPhone":"9805441239",
67-
"visibiltyOptOne":"RCRC Movement",
68-
"visibiltyOptTwo":"Public"
2+
"formName": "Create Field Report",
3+
"country": "Albania",
4+
"district": "Berat",
5+
"disasterType": "Biological Emergency",
6+
"date": "2023-06-20",
7+
"title": "bio hazard",
8+
"govRequest": "Yes",
9+
"nationalsocietyRequest": "No",
10+
"num_injured": "8000",
11+
"gov_num_injured": "4000",
12+
"other_num_injured": "5000",
13+
"num_dead": "1200",
14+
"gov_num_dead": "800",
15+
"other_num_dead": "500",
16+
"num_missing": "6000",
17+
"gov_num_missing": "3000",
18+
"other_num_missing": "2500",
19+
"num_affected": "12000",
20+
"gov_num_affected": "8000",
21+
"other_num_affected": "4000",
22+
"num_displaced": "18000",
23+
"gov_num_displaced": "14000",
24+
"other_num_displaced": "11000",
25+
"other_sources": "The English-Quotient (EQ) test measures your proficiency in the English language, including vocabulary, grammar, and comprehension. Designed for learners and professionals, it provides a benchmark for assessing language skills. ",
26+
"gov_num_assisted": "8000",
27+
"num_assisted": "7000",
28+
"num_localstaff": "6000",
29+
"num_volunteers": "5000",
30+
"num_expats_delegates": "4000",
31+
"actionHuman": "Human remains management and identification",
32+
"actionEvacuation": "Evacuation",
33+
"actionHealth": "Health",
34+
"actionShelter": "Shelter",
35+
"actionCamp": "Camp management",
36+
"actionFirst": "First Aid",
37+
"actionPsychosocial": "Psychosocial support services",
38+
"actionFood": "Food aid",
39+
"nationalSocietySummary": "Evacuation is the urgent removal of people from dangerous areas to safety, often during natural disasters or emergencies",
40+
"federationSummary": "A shelter provides safety and protection, offering a secure place for people or animals, often during emergencies or harsh conditions",
41+
"rcrcSummary": "Food sustains life, providing essential nutrients and energy. It can be a source of pleasure, culture, and community, nourishing body and soul",
42+
"informationBulletin": "Planned",
43+
"actionOther": "Who else was involved? UN agencies? NGOs? Government? Describe what other actors did. Also mention who the other actors are.",
44+
"interventionOptionOne": "Requested",
45+
"interventionOptionTwo": "Planned",
46+
"interventionOptionThree": "Completed",
47+
"drefRequested": "500000",
48+
"emergencyAppeal": "600000",
49+
"rapidResponse": "400000",
50+
"emergencyResponse": "90000",
51+
"originatorName": "Uday",
52+
"originatorTitle": "Project Manager",
53+
"originatorEmail": "[email protected]",
54+
"originatorPhone": "9802556314",
55+
"nationalName": "Navin",
56+
"nationalTitle": "Network Engineer",
57+
"nationalEmail": "[email protected]",
58+
"nationalPhone": "9804115777",
59+
"ifrcName": "Ankit",
60+
"ifrcTitle": "CEO",
61+
"ifrcEmail": "[email protected]",
62+
"ifrcPhone": "9801447523",
63+
"mediaName": "Shreya",
64+
"mediaTitle": "Shreya uffu",
65+
"mediaEmail": "[email protected]",
66+
"mediaPhone": "9805441239",
67+
"visibiltyOptOne": "RCRC Movement",
68+
"visibiltyOptTwo": "Public"
6969
}

0 commit comments

Comments
 (0)