Let $f:X\to Y$ be a morphism of finite type between finite type schemes $X,Y$ over a field $k$. By the infinitesimal criterion for (formal) smoothness, f is smooth if given a commutative diagram
$$\begin{array}[c]{ccc} T& {\rightarrow}&X\\ \downarrow &&\downarrow\scriptstyle{f}\\ T'& {\rightarrow}&Y \end{array}$$
where $T⊂T′$ is a first order thickening of affine schemes, there exists a morphism $T'\to X$ that fits in the above diagram.
Question: Suppose that for any pair ($T', T$), where $T'$ is a trivial extension of $T$, i.e. $T'=T\times_{Spec k} Spec\ k[\epsilon]$ such that $\epsilon^2=0$, and any commutative diagram as above, there exists an arrow $T'\to X$ that fits in the diagram. Is it true that $f$ is smooth?