feat: add minimal Capacitor test apps for all platforms
- Add Android test app with exact alarm permission testing - Add iOS test app with rolling window and BGTaskScheduler testing - Add Electron test app with mock implementations and IPC - Include automated setup scripts for each platform - Provide comprehensive testing checklist and troubleshooting guide - Follow best practices for Capacitor plugin testing Test apps include: - Plugin configuration and scheduling validation - Platform-specific feature testing (Android exact alarms, iOS rolling window) - Performance monitoring and debug information - Error handling and edge case testing - Cross-platform API consistency validation Setup: Run ./setup-*.sh scripts for automated platform setup Testing: Each app provides interactive UI for comprehensive plugin validation Files: 25+ new files across test-apps/ directory
This commit is contained in:
108
test-apps/android-test/src/index.html
Normal file
108
test-apps/android-test/src/index.html
Normal file
@@ -0,0 +1,108 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Daily Notification - Android Test</title>
|
||||
<style>
|
||||
body {
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
||||
margin: 0;
|
||||
padding: 20px;
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
.container {
|
||||
max-width: 600px;
|
||||
margin: 0 auto;
|
||||
background: white;
|
||||
border-radius: 12px;
|
||||
padding: 20px;
|
||||
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
|
||||
}
|
||||
h1 {
|
||||
color: #333;
|
||||
text-align: center;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
.status {
|
||||
background: #e3f2fd;
|
||||
padding: 15px;
|
||||
border-radius: 8px;
|
||||
margin-bottom: 20px;
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
color: #1976d2;
|
||||
}
|
||||
.button-grid {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: 10px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
button {
|
||||
background: #1976d2;
|
||||
color: white;
|
||||
border: none;
|
||||
padding: 12px 16px;
|
||||
border-radius: 6px;
|
||||
cursor: pointer;
|
||||
font-size: 14px;
|
||||
transition: background-color 0.2s;
|
||||
}
|
||||
button:hover {
|
||||
background: #1565c0;
|
||||
}
|
||||
button:disabled {
|
||||
background: #ccc;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
.log-container {
|
||||
background: #f8f9fa;
|
||||
border: 1px solid #dee2e6;
|
||||
border-radius: 6px;
|
||||
padding: 15px;
|
||||
height: 300px;
|
||||
overflow-y: auto;
|
||||
font-family: 'Courier New', monospace;
|
||||
font-size: 12px;
|
||||
}
|
||||
.timestamp {
|
||||
color: #666;
|
||||
font-weight: bold;
|
||||
}
|
||||
pre {
|
||||
background: #e9ecef;
|
||||
padding: 8px;
|
||||
border-radius: 4px;
|
||||
margin: 5px 0;
|
||||
overflow-x: auto;
|
||||
}
|
||||
.clear-button {
|
||||
background: #dc3545;
|
||||
margin-top: 10px;
|
||||
width: 100%;
|
||||
}
|
||||
.clear-button:hover {
|
||||
background: #c82333;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<h1>📱 Daily Notification Plugin - Android Test</h1>
|
||||
|
||||
<div class="status" id="status">Ready</div>
|
||||
|
||||
<div class="button-grid">
|
||||
<button id="configure">Configure Plugin</button>
|
||||
<button id="schedule">Schedule Notification</button>
|
||||
<button id="alarm-status">Check Alarm Status</button>
|
||||
<button id="request-permission">Request Permission</button>
|
||||
<button id="performance">Performance Metrics</button>
|
||||
</div>
|
||||
|
||||
<div class="log-container" id="log"></div>
|
||||
<button class="clear-button" id="clear-log">Clear Log</button>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user