Frontend: Migrate Drawer.tsx from aria-label e2e selectors to data-testid (#79616)

* refactor: update aria-label to data-testid

* refactor: update aria-label to data-testid

* refactor: replace title

* refactor: update selector text

* feat: update translation file

* fix old phrases

---------

Co-authored-by: joshhunt <josh@trtr.co>
This commit is contained in:
Jamin 2024-01-10 11:20:51 +00:00 committed by GitHub
parent d768362a5d
commit 108c196d08
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 19 additions and 19 deletions

View File

@ -122,7 +122,7 @@ export function Drawer({
variant="secondary" variant="secondary"
onClick={onClose} onClick={onClose}
data-testid={selectors.components.Drawer.General.close} data-testid={selectors.components.Drawer.General.close}
tooltip={t(`drawer.close`, 'Close Drawer')} tooltip={t(`grafana-ui.drawer.close`, 'Close')}
/> />
</div> </div>
<div className={styles.titleWrapper}> <div className={styles.titleWrapper}>

View File

@ -413,9 +413,6 @@
"label": "Neue Datenquelle hinzufügen" "label": "Neue Datenquelle hinzufügen"
} }
}, },
"drawer": {
"close": ""
},
"explore": { "explore": {
"add-to-dashboard": "Zum Dashboard hinzufügen", "add-to-dashboard": "Zum Dashboard hinzufügen",
"rich-history": { "rich-history": {
@ -555,6 +552,9 @@
"loading": "Ordner werden geladen …" "loading": "Ordner werden geladen …"
}, },
"grafana-ui": { "grafana-ui": {
"drawer": {
"close": ""
},
"modal": { "modal": {
"close-tooltip": "Schließen" "close-tooltip": "Schließen"
}, },

View File

@ -413,9 +413,6 @@
"label": "Add new data source" "label": "Add new data source"
} }
}, },
"drawer": {
"close": "Close Drawer"
},
"explore": { "explore": {
"add-to-dashboard": "Add to dashboard", "add-to-dashboard": "Add to dashboard",
"rich-history": { "rich-history": {
@ -555,6 +552,9 @@
"loading": "Loading folders..." "loading": "Loading folders..."
}, },
"grafana-ui": { "grafana-ui": {
"drawer": {
"close": "Close"
},
"modal": { "modal": {
"close-tooltip": "Close" "close-tooltip": "Close"
}, },

View File

@ -418,9 +418,6 @@
"label": "Añadir nueva fuente de datos" "label": "Añadir nueva fuente de datos"
} }
}, },
"drawer": {
"close": ""
},
"explore": { "explore": {
"add-to-dashboard": "Añadir al tablero", "add-to-dashboard": "Añadir al tablero",
"rich-history": { "rich-history": {
@ -560,6 +557,9 @@
"loading": "Cargando carpetas..." "loading": "Cargando carpetas..."
}, },
"grafana-ui": { "grafana-ui": {
"drawer": {
"close": ""
},
"modal": { "modal": {
"close-tooltip": "Cerrar" "close-tooltip": "Cerrar"
}, },

View File

@ -418,9 +418,6 @@
"label": "Ajouter une nouvelle source de données" "label": "Ajouter une nouvelle source de données"
} }
}, },
"drawer": {
"close": ""
},
"explore": { "explore": {
"add-to-dashboard": "Ajouter au tableau de bord", "add-to-dashboard": "Ajouter au tableau de bord",
"rich-history": { "rich-history": {
@ -560,6 +557,9 @@
"loading": "Chargement des dossiers..." "loading": "Chargement des dossiers..."
}, },
"grafana-ui": { "grafana-ui": {
"drawer": {
"close": ""
},
"modal": { "modal": {
"close-tooltip": "Fermer" "close-tooltip": "Fermer"
}, },

View File

@ -413,9 +413,6 @@
"label": "Åđđ ʼnęŵ đäŧä şőūřčę" "label": "Åđđ ʼnęŵ đäŧä şőūřčę"
} }
}, },
"drawer": {
"close": "Cľőşę Đřäŵęř"
},
"explore": { "explore": {
"add-to-dashboard": "Åđđ ŧő đäşĥþőäřđ", "add-to-dashboard": "Åđđ ŧő đäşĥþőäřđ",
"rich-history": { "rich-history": {
@ -555,6 +552,9 @@
"loading": "Ŀőäđįʼnģ ƒőľđęřş..." "loading": "Ŀőäđįʼnģ ƒőľđęřş..."
}, },
"grafana-ui": { "grafana-ui": {
"drawer": {
"close": "Cľőşę"
},
"modal": { "modal": {
"close-tooltip": "Cľőşę" "close-tooltip": "Cľőşę"
}, },

View File

@ -408,9 +408,6 @@
"label": "添加新数据源" "label": "添加新数据源"
} }
}, },
"drawer": {
"close": ""
},
"explore": { "explore": {
"add-to-dashboard": "添加到仪表板", "add-to-dashboard": "添加到仪表板",
"rich-history": { "rich-history": {
@ -550,6 +547,9 @@
"loading": "正在加载文件夹..." "loading": "正在加载文件夹..."
}, },
"grafana-ui": { "grafana-ui": {
"drawer": {
"close": ""
},
"modal": { "modal": {
"close-tooltip": "关闭" "close-tooltip": "关闭"
}, },