Skip to content

Commit 9f4e796

Browse files
author
IT.DEV.Denny Setya Hermawan
committed
add portofolio
1 parent bdb9027 commit 9f4e796

File tree

15 files changed

+894
-0
lines changed

15 files changed

+894
-0
lines changed

.github/workflows/playwright.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Playwright Tests
2+
on:
3+
push:
4+
branches: [ main, master ]
5+
pull_request:
6+
branches: [ main, master ]
7+
jobs:
8+
test:
9+
timeout-minutes: 60
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
- uses: actions/setup-node@v4
14+
with:
15+
node-version: lts/*
16+
- name: Install dependencies
17+
run: npm ci
18+
- name: Install Playwright Browsers
19+
run: npx playwright install --with-deps
20+
- name: Run Playwright tests
21+
run: npx playwright test
22+
- uses: actions/upload-artifact@v4
23+
if: ${{ !cancelled() }}
24+
with:
25+
name: playwright-report
26+
path: playwright-report/
27+
retention-days: 30

.gitignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
2+
# Playwright
3+
node_modules/
4+
/test-results/
5+
/playwright-report/
6+
/blob-report/
7+
/playwright/.cache/
8+
/playwright/.auth/
9+
allure-results/
10+
allure-report/

fixtures/datas/managementKost.pdf

125 KB
Binary file not shown.

fixtures/datas/users.json

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"validUser": {
3+
"name": "jhon",
4+
"email": "[email protected]",
5+
"password": "jhon1230",
6+
"day": "1",
7+
"month": "1",
8+
"year": "2021",
9+
"firstName": "Jhon",
10+
"lastName": "Doe",
11+
"company": "PT Angkola International",
12+
"address1": "Jl. Perbaungan Blok A no.123",
13+
"address2": "JL. Tembung No. 456",
14+
"country": "Singapore",
15+
"state": "DKI Jakarta",
16+
"city": "Jakarta",
17+
"zipcode": "1990",
18+
"mobileNumber": "08123456891"
19+
},
20+
"registerUser": {
21+
"name": "Andre",
22+
"email": "[email protected]",
23+
"password": "andre123"
24+
},
25+
"invalidUser": {
26+
"name": "Andre",
27+
"email": "[email protected]",
28+
"password": "budi123"
29+
},
30+
"contactUsData": {
31+
"name": "Nicho",
32+
"email": "[email protected]",
33+
"subject": "Testing",
34+
"message": "Get the most recent updates from our site and be updated your self"
35+
}
36+
}

fixtures/helper/uploadFile.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
const { locator } = require("../locators")
2+
3+
export const uploadFile = (page) => {
4+
5+
const locators = locator
6+
7+
const sendFile = async(file) => {
8+
await page.locator(locators.uploadFile).setInputFiles(file)
9+
}
10+
11+
return {
12+
sendFile
13+
}
14+
}

fixtures/locators.js

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
2+
3+
export const locator = {
4+
home : 'a[href="/"]',
5+
6+
continueButton: '[data-qa="continue-button"]',
7+
8+
uploadFile: 'input[name="upload_file"]',
9+
10+
login: {
11+
loginMenu: 'a[href="/login"]',
12+
nameSignup: '[data-qa="signup-name"]',
13+
emailSignup: '[data-qa="signup-email"]',
14+
buttonSignup: '[data-qa="signup-button"]',
15+
emailLogin: '[data-qa="login-email"]',
16+
passwordLogin: '[data-qa="login-password"]',
17+
buttonLogin: '[data-qa="login-button"]'
18+
19+
},
20+
21+
logout: {
22+
logoutMenu: 'a[href="/logout"]'
23+
},
24+
25+
contactus: {
26+
contactUsMenu: 'a[href="/contact_us"]',
27+
name: '[data-qa="name"]',
28+
email: '[data-qa="email"]',
29+
subject: '[data-qa="subject"]',
30+
message: '[data-qa="message"]',
31+
buttonSubmit: '[data-qa="submit-button"]',
32+
buttonHome: '.btn-success',
33+
textSucces: "#success-subscribe"
34+
},
35+
36+
accountInformation: {
37+
title: '[data-qa="title"] input#id_gender1',
38+
password: '[data-qa="password"]',
39+
dateOfBirthDay: '[data-qa="days"]',
40+
dateOfBirthMonth: '[data-qa="months"]',
41+
dateOfBirthYear: '[data-qa="years"]',
42+
newsLetter: '#newsletter',
43+
receive: '#optin'
44+
},
45+
addressInformation: {
46+
firstName: '[data-qa="first_name"]',
47+
lastName: '[data-qa="last_name"]',
48+
company: '[data-qa="company"]',
49+
address1: '[data-qa="address"]',
50+
address2: '[data-qa="address2"]',
51+
country: '[data-qa="country"]',
52+
state: '[data-qa="state"]',
53+
city: '[data-qa="city"]',
54+
zipcode: '[data-qa="zipcode"]',
55+
mobileNumber: '[data-qa="mobile_number"]',
56+
buttonCreateAccount: '[data-qa="create-account"]'
57+
},
58+
deleteAccount: {
59+
deleteAccountMenu: 'a[href="/delete_account"]'
60+
},
61+
testCase: {
62+
testCaseMenu: '#header a[href="/test_cases"]'
63+
},
64+
product: {
65+
productMenu: 'a[href="/products"]',
66+
viewProduct: '.choose',
67+
detailProduct: '.product-information',
68+
searchProduct: '#search_product',
69+
buttonSearchProduct: '#submit_search',
70+
searchTitle: '.features_items'
71+
}
72+
}

0 commit comments

Comments
 (0)