chore(docs): improve examples to use better APIs

This commit is contained in:
Michał Pierzchała
2019-06-11 13:32:26 +02:00
parent 8778012ed8
commit fb8a6fc7e2
3 changed files with 17 additions and 8 deletions
+2 -2
View File
@@ -44,8 +44,8 @@ function setAnswer(question, answer) {
}
test('should verify two questions', () => {
const { getAllByType, getByText } = render(<QuestionsBoard {...props} />);
const allQuestions = getAllByType(Question);
const { getAllByA11yRole, getByText } = render(<QuestionsBoard {...props} />);
const allQuestions = getAllByA11yRole('header');
setAnswer(allQuestions[0], 'a1');
setAnswer(allQuestions[1], 'a2');