  We solve the center-focus problem in a class of piecewise quadratic
polynomial differential systems with an invariant straight line. The separation
curve is also a straight line which is not invariant. We provide families
having at the origin a weak-foci of maximal order. In the continuous class, the
cyclicity problem is also solved, being $3$ such maximal number. Moreover, for
the discontinuous class but without sliding segment, we prove the existence of
$7$ limit cycles of small amplitude.
