feat: add Cypress end-to-end tests for login functionality and CI configuration

This commit is contained in:
2025-10-18 19:34:39 +02:00
parent 736d327050
commit 94ed954dc1
6 changed files with 1544 additions and 3 deletions

31
scripts/seed-test.js Normal file
View File

@@ -0,0 +1,31 @@
const { PrismaClient } = require('@prisma/client');
const bcrypt = require('bcryptjs');
const prisma = new PrismaClient();
async function main() {
// Create test user
const hashedPassword = await bcrypt.hash('password', 10);
await prisma.user.upsert({
where: { email: 'test@example.com' },
update: {},
create: {
email: 'test@example.com',
password: hashedPassword,
role: 'MEMBER',
firstName: 'Test',
lastName: 'User',
},
});
console.log('Test user created');
}
main()
.catch((e) => {
console.error(e);
process.exit(1);
})
.finally(async () => {
await prisma.$disconnect();
});