From 774f0a0d016fa6f32e51259e38f8484a053e9aef Mon Sep 17 00:00:00 2001 From: Uchechukwu Obasi Date: Mon, 6 Sep 2021 07:03:02 +0100 Subject: [PATCH] e2e guide: improves data-testid code snippet to be clear and understandable (#38791) --- contribute/style-guides/e2e.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/contribute/style-guides/e2e.md b/contribute/style-guides/e2e.md index 1e4961975ce..a603abaa2af 100644 --- a/contribute/style-guides/e2e.md +++ b/contribute/style-guides/e2e.md @@ -178,8 +178,8 @@ Prefix your selector string with "data-testid": ```typescript export const Components = { Login: { - openButton: 'data-testid-open', // this would look for a data-testid - closeButton: 'close-button', // this would look for an aria-label + openButton: 'open-button', // this would look for an aria-label + closeButton: 'data-testid modal-close-button', // this would look for a data-testid }, }; ``` @@ -187,5 +187,5 @@ export const Components = { and in your component, import the selectors and add the data test id: ``` -