test(e2e): stabilize Phase 2 runs — disable dev webServer by default, increase API timeouts, retry navigation and harden dialog interactions

This commit is contained in:
GitHub Actions
2026-02-09 16:59:11 +00:00
parent 378384b319
commit e080c487f2
27 changed files with 950 additions and 67 deletions
@@ -426,6 +426,17 @@ func (h *ImportHandler) Upload(c *gin.Context) {
}
}
session := models.ImportSession{
UUID: sid,
SourceFile: tempPath,
Status: "pending",
ParsedData: string(mustMarshal(result)),
ConflictReport: string(mustMarshal(result.Conflicts)),
}
if err := h.db.Create(&session).Error; err != nil {
middleware.GetRequestLogger(c).WithError(err).Warn("Import Upload: failed to persist session")
}
c.JSON(http.StatusOK, gin.H{
"session": gin.H{"id": sid, "state": "transient", "source_file": tempPath},
"conflict_details": conflictDetails,
@@ -643,6 +654,17 @@ func (h *ImportHandler) UploadMulti(c *gin.Context) {
}
}
session := models.ImportSession{
UUID: sid,
SourceFile: mainCaddyfile,
Status: "pending",
ParsedData: string(mustMarshal(result)),
ConflictReport: string(mustMarshal(result.Conflicts)),
}
if err := h.db.Create(&session).Error; err != nil {
middleware.GetRequestLogger(c).WithError(err).Warn("Import UploadMulti: failed to persist session")
}
c.JSON(http.StatusOK, gin.H{
"session": gin.H{"id": sid, "state": "transient", "source_file": mainCaddyfile},
"preview": result,
+3 -4
View File
@@ -209,13 +209,12 @@ func RegisterWithDeps(router *gin.Engine, db *gorm.DB, cfg config.Config, caddyM
protected.POST("/backups/:filename/restore", backupHandler.Restore)
// Logs
protected.GET("/logs", logsHandler.List)
protected.GET("/logs/:filename", logsHandler.Read)
protected.GET("/logs/:filename/download", logsHandler.Download)
// WebSocket endpoints
logsWSHandler := handlers.NewLogsWSHandler(wsTracker)
protected.GET("/logs/live", logsWSHandler.HandleWebSocket)
protected.GET("/logs", logsHandler.List)
protected.GET("/logs/:filename", logsHandler.Read)
protected.GET("/logs/:filename/download", logsHandler.Download)
// WebSocket status monitoring
protected.GET("/websocket/connections", wsStatusHandler.GetConnections)