Let $\Omega$ be an open bounded domain with a boundary $\partial\Omega$. Consider the following Neumann eigenvalue problem for Laplacian: find $(\phi_n,\lambda_n)\in H^1(\Omega)\times \mathbb{R}$ \begin{align*} -\Delta \phi_n& = \lambda_n \phi_n\quad \mbox{in }\Omega,\\ \frac{\partial \phi_n}{\partial \nu} & = 0 \quad \mbox{on }\partial\Omega. \end{align*}
Now by spectral theory (see the notes at here https://faculty.math.illinois.edu/~laugesen/595Lectures.pdf), it is known that the sequence of eigenfunctions $\phi_n$ (ordered nondecreasingly by the eigenvalues, with multiplicity counted) can be taken to be a complete orthonormal basis in $L^2(\Omega)$, and also forms a complete orthogonal basis in $H^1(\Omega)$. Thus any function $u\in H^1(\Omega)$ can be expanded into \begin{equation*} u = \sum_{n=1}^\infty (u,\phi_n)_{L^2(\Omega)}\phi_n\quad \mbox{in } L^2(\Omega), \end{equation*} and this expansion holds also in $H^1(\Omega)$, since $u\in H^1(\Omega)$ by assumption.
I am puzzled over the fact that all the eigenfunctions $\phi_n$ have zero Neumann boundary condition, so any $n$-term truncation $u_n$ $$ u_n = \sum_{i=1}^n(u,\phi_n)_{L^2(\Omega)}\phi_n $$ has a zero Neumann boundary condition. However, a function $u$ in $H^1(\Omega)$ may not have a zero Neumann boundary condition. How shall one understand the convergence in $H^1(\Omega)$ ?