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:
@@ -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,
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user