If you are a NYS resident, then all your income is included on your resident return and you get a credit for income tax paid to another state for wages sourced from that state. However, you will need to file that non-resident return as well.
If you worked for the same employer and were a part-year resident of two states, then you would have to file two part-year returns.
The first thing you want to do is make sure you've filled out the Personal Info section correctly:
If you are filing a NYS resident return and a non-resident return of another state, it is recommended that you complete the non-resident return first to ensure accurate calculations.