forked from podkrepi-bg/frontend
-
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.
Created basic POM for the Playwright tests - initial commit
Added method and configurations Additional refactoring - methods, specs and gitignore Implemented Support page for E2E tests Fixed tests for Support page New changes on the tests Fixes on E2E tests
- Loading branch information
1 parent
9db3a35
commit b18b16b
Showing
40 changed files
with
2,186 additions
and
740 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
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 |
---|---|---|
|
@@ -17,6 +17,9 @@ lerna-debug.log* | |
coverage | ||
.nyc_output | ||
|
||
# E2E | ||
e2e-reports/ | ||
|
||
# IDEs and editors | ||
.idea | ||
.project | ||
|
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,27 @@ | ||
name: Playwright Tests | ||
on: | ||
push: | ||
branches: [ main, master ] | ||
pull_request: | ||
branches: [ main, master ] | ||
jobs: | ||
test: | ||
timeout-minutes: 60 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
- name: Install dependencies | ||
run: npm ci | ||
- name: Install Playwright Browsers | ||
run: npx playwright install --with-deps | ||
- name: Run Playwright tests | ||
run: npx playwright test | ||
- uses: actions/upload-artifact@v3 | ||
if: always() | ||
with: | ||
name: playwright-report | ||
path: playwright-report/ | ||
retention-days: 30 |
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,5 @@ | ||
node_modules/ | ||
/playwright/.cache/ | ||
/playwright-report/ | ||
/playwright/.cache/ | ||
/e2e-reports/ |
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,14 @@ | ||
// This enum should be used as a parameter for methods in E2E tests | ||
|
||
// Check bgLocalizationOneTimeDonation["third-step"]["card-region"] | ||
export enum bgDonationRegions { | ||
EUROPE = "Европа", | ||
GREAT_BRITAIN = "Великобритания", | ||
OTHER = "други" | ||
} | ||
|
||
export enum enDonationRegions { | ||
EUROPE = "Europe", | ||
GREAT_BRITAIN = "Great Britain", | ||
OTHER = "other" | ||
} |
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,6 @@ | ||
// This enum should be used as a parameter for methods in E2E tests | ||
|
||
export enum LanguagesEnum { | ||
BG = 'BG', | ||
EN = 'EN' | ||
} |
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,37 @@ | ||
import bgLocalizationCommonJson from '../../public/locales/bg/common.json'; | ||
import enLocalizationCommonJson from '../../public/locales/en/common.json'; | ||
|
||
import bgLocalizationIndexJson from '../../public/locales/bg/index.json'; | ||
import enLocalizationIndexJson from '../../public/locales/en/index.json'; | ||
|
||
import bgLocalizationSupportJson from '../../public/locales/bg/support.json'; | ||
import enLocalizationSupportJson from '../../public/locales/en/support.json'; | ||
|
||
import bgLocalizationValidationJson from '../../public/locales/bg/validation.json'; | ||
import enLocalizationValidationJson from '../../public/locales/en/validation.json'; | ||
|
||
import bgLocalizationCampaignsJson from '../../public/locales/bg/campaigns.json'; | ||
import enLocalizationCampaignsJson from '../../public/locales/en/campaigns.json'; | ||
|
||
import bgLocalizationOneTimeDonationJson from '../../public/locales/bg/one-time-donation.json'; | ||
import enLocalizationOneTimeDonationJson from '../../public/locales/en/one-time-donation.json'; | ||
|
||
// All these constants are used in the E2E test pages to manipulate web elements in a respective language | ||
// Common localization terms | ||
export const bgLocalizationCommon = bgLocalizationCommonJson; | ||
export const enLocalizationCommon = enLocalizationCommonJson; | ||
// Home | ||
export const bgLocalizationIndex = bgLocalizationIndexJson; | ||
export const enLocalizationIndex = enLocalizationIndexJson; | ||
// Support page | ||
export const bgLocalizationSupport = bgLocalizationSupportJson; | ||
export const enLocalizationSupport = enLocalizationSupportJson; | ||
// Campaigns page | ||
export const bgLocalizationCampaigns = bgLocalizationCampaignsJson; | ||
export const enLocalizationCampaigns = enLocalizationCampaignsJson; | ||
// Donations | ||
export const bgLocalizationOneTimeDonation = bgLocalizationOneTimeDonationJson; | ||
export const enLocalizationOneTimeDonation = enLocalizationOneTimeDonationJson; | ||
// Validations | ||
export const bgLocalizationValidation = bgLocalizationValidationJson; | ||
export const enLocalizationValidation = enLocalizationValidationJson; |
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,15 @@ | ||
export const supportPageVolutneerTestData = { | ||
firstName: 'Test valid first name', | ||
lastName: 'Test valid last name', | ||
email: '[email protected]', | ||
phone: '+359888000000', | ||
comment: 'E2E Test comment' | ||
} | ||
|
||
export const anonDonationTestData = { | ||
cardNumber: '4242 4242 4242 4242', | ||
cardExpDate: '04 / 24', | ||
cardCvc: '424', | ||
billingName: 'E2E Test Anonymous Donation', | ||
country: 'BG' | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.