We demonstrate that the streamline-upwind/Petrov-Galerkin (SUPG) formulation enhanced with YZ beta discontinuity-capturing, that is, the SUPG-YZ beta formulation, is an efficient and robust method for computing 2D shallow-water equations (SWEs). The SUPG-stabilized semi-discrete formulation is discretized in time by employing the backward Euler time-integration scheme. The nonlinear equation systems arising from the space and time discretizations are handled using the Newton-Raphson (N-R) method at each time step. The resulting linear equation systems are solved directly at each nonlinear iteration. Two challenging test problems are provided to examine the performance of the proposed formulation and techniques. To that end, we consider a full dam-break and a partial dam-break problem. We develop the solvers in the FEniCS environment. Test computations reveal that the SUPG-YZ beta formulation successfully eliminates spurious oscillations that cannot be captured with the SUPG-stabilized formulation alone in narrow regions where steep gradients occur.