feat: enhance README and TODO documentation, implement mobile menu functionality in Header component
- Updated README.md with project details, quick start instructions, and tech stack. - Expanded TODO.md to reflect current project status and backlog items, including Linear ticket synchronization. - Added mobile menu toggle functionality in Header component with corresponding tests for user interactions. - Configured Next.js for Docker deployment and optimized build settings.
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
// Global setup for integration tests
|
||||
module.exports = async () => {
|
||||
console.log('🔧 Setting up integration test environment...')
|
||||
|
||||
// Wait for Docker services to be ready
|
||||
const maxWaitTime = 60000 // 1 minute
|
||||
const checkInterval = 2000 // 2 seconds
|
||||
let waitTime = 0
|
||||
|
||||
const checkServices = async () => {
|
||||
try {
|
||||
const { fetch } = require('undici')
|
||||
|
||||
// Check if Next.js app is ready
|
||||
const response = await fetch('http://localhost:3000/api/health', {
|
||||
timeout: 5000
|
||||
})
|
||||
|
||||
if (response.ok) {
|
||||
console.log('✅ Docker services are ready!')
|
||||
return true
|
||||
}
|
||||
} catch (error) {
|
||||
// Services not ready yet
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// Only check services if INTEGRATION_TESTS is enabled
|
||||
if (process.env.INTEGRATION_TESTS === '1' || process.env.E2E_TESTS === '1') {
|
||||
console.log('⏳ Waiting for Docker services to be ready...')
|
||||
|
||||
while (waitTime < maxWaitTime) {
|
||||
if (await checkServices()) {
|
||||
break
|
||||
}
|
||||
|
||||
await new Promise(resolve => setTimeout(resolve, checkInterval))
|
||||
waitTime += checkInterval
|
||||
|
||||
if (waitTime % 10000 === 0) {
|
||||
console.log(`⏳ Still waiting... (${waitTime / 1000}s elapsed)`)
|
||||
}
|
||||
}
|
||||
|
||||
if (waitTime >= maxWaitTime) {
|
||||
console.warn('⚠️ Docker services may not be fully ready. Tests might fail.')
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user