Let $Y = {\rm{Spec}}(R)$ for a local ring $R$ with nonzero maximal ideal $m$ satisfying $m^2 = m$ (e.g., a valuation ring with algebraically closed fraction field). Note that the noetherian $R$ can satisfy this condition, due to the Krull Intersection Theorem.
Let $X = {\rm{Spec}}(R/(r))$ for a nonzero $r \in m$. Then the natural map $f:X \rightarrow Y$ is finitely presented but not flat (since it corresponds to a non-injective local map between local rings), so it is not smooth.
However, the "infinitesimal criterion" restricted to artin local rings is satisfied. Indeed, every functorial point of $Y$ supported at the closed point and valued in an artinian local ring $A$ uniquely factors through $X$ (as any local homomorphism $R \rightarrow A$ carries $m = m^2 = \dots = m^n$ into
$\mathfrak{m}_A^n = 0$ for $n$ large, so such a homomorphism kills $r$).