given that the title of this PR is "make sure legend text is updated with new commands", and that this test actually tests BOTH that the the legend is there on the first pass AND that it's updated when the chart() command is re-run, it would be better to split out the second half to its own test. Apart from that this looks good.