I'm replacing a single overhead light in a bedroom with recessed lights. In the junction box for the light were other junctions that fed electricity to the outlets in the room. The wire that came from the wall switch was a 3 stranded wire that went from the wall switch to the junction box for the light. When I dropped the light down there were other junctions which seem to feed the outlets in the room. So there were 3 things going on. Two white wires were connected and tape wrapped. Three Black wires were tape wrapped together with a long lead that connected to the black wire on the light. Then there was a white wire with red bands connected to the white lead of the light. The switch turns the light on and off but doesn't affect the outlets.
After cutting the power, I removed the light and disconnected the remaining wires. I cut the switch wire back as it had reached the middle of the room and I didn't need that much wire to reach the recessed lights. I installed the recessed lights and connected them together as instructions showed. I connected the switch wire with red-banded white going to the white quick connect (as it HAD been connected to the white on the old light), I put the black in the black quick connect. I also added a length of 14-2, putting the black wire in the quick connect, and wire nutted the remaining white wire from the switch inside the can light. I then took the wire to a new junction box and connected all the whites and all the blacks together to power the outlets.
When I energized the circuit, I got power to the outlets, and in testing with a circuit tester, everything else seem hot. I put a light in a can to test the switch but the light did not turn on. Everything else seems good. What's the best way to figure out what I did wrong?