|
1 | | -# Page Object Creation Prompt for HomePage and LoginPage |
| 1 | +# Page Object Creation Prompt — site pages and element id mappings |
2 | 2 |
|
3 | 3 | { |
4 | | - "pageObjects": [ |
5 | | - { |
6 | | - "className": "HomePage", |
7 | | - "fields": { |
8 | | - "isDashboardVisible": {"id": "Dashboard", "method": "isVisible"}, |
9 | | - "clickServiceLink": {"id": "service", "text": "Service", "method": "click"}, |
10 | | - "clickLoginMenu": {"id": "loginMenu", "text": "Login", "method": "click"}, |
11 | | - "clickRegisterMenu": {"id": "registerMenu", "text": "Register", "method": "click"} |
12 | | - } |
13 | | - }, |
14 | | - { |
15 | | - "className": "LoginPage", |
16 | | - "fields": { |
17 | | - "enterUsername": {"id": "username", "name": "username", "text": "Username", "method": "fill"}, |
18 | | - "enterPassword": {"id": "password", "name": "password", "text": "Password", "method": "fill"}, |
19 | | - "clickLogin": {"id": "login", "name": "login", "text": "Login", "method": "click"} |
20 | | - } |
| 4 | + "pages": { |
| 5 | + "frontend/app/home/page.js": { |
| 6 | + "container": { "id": "home-hero-section", "type": "section" }, |
| 7 | + "hero_bg": { "id": "home-hero-bg", "type": "background" }, |
| 8 | + "hero_content": { "id": "home-hero-content", "type": "container" }, |
| 9 | + "hero_grid": { "id": "home-hero-grid", "type": "layout" }, |
| 10 | + "hero_left": { "id": "home-hero-left", "type": "container" }, |
| 11 | + "hero_announcement": { "id": "home-hero-announcement", "type": "text" }, |
| 12 | + "hero_title": { "id": "home-hero-title", "type": "heading" }, |
| 13 | + "hero_description": { "id": "home-hero-description", "type": "text" }, |
| 14 | + "hero_actions": { "id": "home-hero-actions", "type": "container" }, |
| 15 | + "explore_services_btn": { "id": "home-explore-services-btn", "type": "link" }, |
| 16 | + "contact_btn": { "id": "home-contact-btn", "type": "link" }, |
| 17 | + "hero_benefits": { "id": "home-hero-benefits", "type": "list" }, |
| 18 | + "benefit_fast": { "id": "home-benefit-fast", "type": "badge" }, |
| 19 | + "benefit_scalable": { "id": "home-benefit-scalable", "type": "badge" }, |
| 20 | + "benefit_ai": { "id": "home-benefit-ai", "type": "badge" }, |
| 21 | + "hero_image_container": { "id": "home-hero-image-container", "type": "container" }, |
| 22 | + "hero_image": { "id": "home-hero-image", "type": "image" }, |
| 23 | + "quick_actions_section": { "id": "home-quick-actions-section", "type": "section" }, |
| 24 | + "quick_actions_container": { "id": "home-quick-actions-container", "type": "container" }, |
| 25 | + "quick_actions_header": { "id": "home-quick-actions-header", "type": "container" }, |
| 26 | + "quick_actions_header_content": { "id": "home-quick-actions-header-content", "type": "container" }, |
| 27 | + "quick_actions_title": { "id": "home-quick-actions-title", "type": "heading" }, |
| 28 | + "quick_actions_desc": { "id": "home-quick-actions-desc", "type": "text" }, |
| 29 | + "quick_actions_grid": { "id": "home-quick-actions-grid", "type": "grid" }, |
| 30 | + "dashboard_link": { "id": "home-dashboard-link", "type": "link" }, |
| 31 | + "dashboard_card": { "id": "home-dashboard-card", "type": "card" }, |
| 32 | + "dashboard_card_body": { "id": "home-dashboard-card-body", "type": "container" }, |
| 33 | + "dashboard_icon": { "id": "home-dashboard-icon", "type": "icon" }, |
| 34 | + "dashboard_content": { "id": "home-dashboard-content", "type": "container" }, |
| 35 | + "dashboard_title_row": { "id": "home-dashboard-title-row", "type": "container" }, |
| 36 | + "dashboard_title": { "id": "home-dashboard-title", "type": "heading" }, |
| 37 | + "dashboard_arrow": { "id": "home-dashboard-arrow", "type": "icon" }, |
| 38 | + "dashboard_desc": { "id": "home-dashboard-desc", "type": "text" }, |
| 39 | + "services_link": { "id": "home-services-link", "type": "link" }, |
| 40 | + "services_card": { "id": "home-services-card", "type": "card" }, |
| 41 | + "services_card_body": { "id": "home-services-card-body", "type": "container" }, |
| 42 | + "services_icon": { "id": "home-services-icon", "type": "icon" }, |
| 43 | + "services_content": { "id": "home-services-content", "type": "container" }, |
| 44 | + "services_title_row": { "id": "home-services-title-row", "type": "container" }, |
| 45 | + "services_title": { "id": "home-services-title", "type": "heading" }, |
| 46 | + "services_arrow": { "id": "home-services-arrow", "type": "icon" }, |
| 47 | + "services_desc": { "id": "home-services-desc", "type": "text" } |
| 48 | + }, |
| 49 | + "frontend/app/login/page.js": { |
| 50 | + "container": { "id": "login-container", "type": "form-container" }, |
| 51 | + "title": { "id": "login-title", "type": "heading" }, |
| 52 | + "error": { "id": "login-error", "type": "text" }, |
| 53 | + "form": { "id": "login-form", "type": "form" }, |
| 54 | + "username": { "id": "login-username", "type": "input" }, |
| 55 | + "password": { "id": "login-password", "type": "input" }, |
| 56 | + "forgot_password_link": { "id": "login-forgot-password-link", "type": "container" }, |
| 57 | + "forgot_link": { "id": "login-forgot-link", "type": "link" }, |
| 58 | + "submit": { "id": "login-submit", "type": "button" }, |
| 59 | + "register_link": { "id": "login-register-link", "type": "text" }, |
| 60 | + "register_here": { "id": "login-register-here", "type": "link" } |
| 61 | + }, |
| 62 | + "frontend/app/forgot-password/page.js": { |
| 63 | + "container": { "id": "forgot-password-container", "type": "form-container" }, |
| 64 | + "form": { "id": "forgot-password-form", "type": "form" }, |
| 65 | + "email": { "id": "forgot-password-email", "type": "input" }, |
| 66 | + "submit": { "id": "forgot-password-submit", "type": "button" }, |
| 67 | + "message": { "id": "forgot-password-message", "type": "text" }, |
| 68 | + "error": { "id": "forgot-password-error", "type": "text" } |
| 69 | + }, |
| 70 | + "frontend/app/reset-password/page.js": { |
| 71 | + "container": { "id": "reset-password-container", "type": "form-container" }, |
| 72 | + "title": { "id": "reset-password-title", "type": "heading" }, |
| 73 | + "message": { "id": "reset-password-message", "type": "text" }, |
| 74 | + "error": { "id": "reset-password-error", "type": "text" }, |
| 75 | + "form": { "id": "reset-password-form", "type": "form" }, |
| 76 | + "password": { "id": "reset-password-password", "type": "input" }, |
| 77 | + "confirm": { "id": "reset-password-confirm", "type": "input" }, |
| 78 | + "submit": { "id": "reset-password-submit", "type": "button" } |
| 79 | + }, |
| 80 | + "frontend/app/register/page.js": { |
| 81 | + "container": { "id": "register-container", "type": "form-container" }, |
| 82 | + "title": { "id": "register-title", "type": "heading" }, |
| 83 | + "error": { "id": "register-error", "type": "text" }, |
| 84 | + "success": { "id": "register-success", "type": "text" }, |
| 85 | + "form": { "id": "register-form", "type": "form" }, |
| 86 | + "username": { "id": "register-username", "type": "input" }, |
| 87 | + "email": { "id": "register-email", "type": "input" }, |
| 88 | + "password": { "id": "register-password", "type": "input" }, |
| 89 | + "subscription": { "id": "register-subscription", "type": "select" }, |
| 90 | + "submit": { "id": "register-submit", "type": "button" } |
| 91 | + }, |
| 92 | + "frontend/app/contact/page.js": { |
| 93 | + "container": { "id": "contact-container", "type": "form-container" }, |
| 94 | + "title": { "id": "contact-title", "type": "heading" }, |
| 95 | + "form": { "id": "contact-form", "type": "form" }, |
| 96 | + "name": { "id": "contact-name", "type": "input" }, |
| 97 | + "email": { "id": "contact-email", "type": "input" }, |
| 98 | + "message": { "id": "contact-message", "type": "textarea" }, |
| 99 | + "submit": { "id": "contact-submit", "type": "button" }, |
| 100 | + "sent": { "id": "contact-sent", "type": "text" } |
| 101 | + }, |
| 102 | + "frontend/app/services/page.js": { |
| 103 | + "container": { "id": "services-container", "type": "container" }, |
| 104 | + "title": { "id": "services-title", "type": "heading" } |
| 105 | + }, |
| 106 | + "frontend/app/about/page.js": { |
| 107 | + "container": { "id": "about-container", "type": "container" }, |
| 108 | + "title": { "id": "about-title", "type": "heading" } |
| 109 | + }, |
| 110 | + "frontend/app/insights/page.js": { |
| 111 | + "container": { "id": "insights-container", "type": "container" } |
| 112 | + }, |
| 113 | + "frontend/app/dashboard/page.js": { |
| 114 | + "container": { "id": "dashboard-container", "type": "container" }, |
| 115 | + "title": { "id": "dashboard-title", "type": "heading" }, |
| 116 | + "welcome": { "id": "dashboard-welcome", "type": "text" }, |
| 117 | + "email": { "id": "dashboard-email", "type": "text" }, |
| 118 | + "logout": { "id": "dashboard-logout", "type": "button" } |
21 | 119 | } |
22 | | - ] |
| 120 | + } |
23 | 121 | } |
24 | 122 |
|
25 | 123 | - Use id as the first preference, then name, then text for selectors. |
|
0 commit comments