Skip to content
代码片段 群组 项目
提交 98d712af 编辑于 作者: Justin Ho Tuan Duong's avatar Justin Ho Tuan Duong
浏览文件

Merge branch 'chore/add-qa-selector-for-language-switcher' into 'master'

No related branches found
No related tags found
无相关合并请求
...@@ -25,6 +25,9 @@ export default { ...@@ -25,6 +25,9 @@ export default {
setCookie(PREFERRED_LANGUAGE_COOKIE_KEY, code); setCookie(PREFERRED_LANGUAGE_COOKIE_KEY, code);
window.location.reload(); window.location.reload();
}, },
itemTestSelector(locale) {
return `language_switcher_lang_${locale}`;
},
}, },
}; };
</script> </script>
...@@ -41,7 +44,10 @@ export default { ...@@ -41,7 +44,10 @@ export default {
@select="onLanguageSelected" @select="onLanguageSelected"
> >
<template #list-item="{ item: locale }"> <template #list-item="{ item: locale }">
<span :data-testid="`language_switcher_lang_${locale.value}`"> <span
:data-testid="itemTestSelector(locale.value)"
:data-qa-selector="itemTestSelector(locale.value)"
>
{{ locale.text }} {{ locale.text }}
</span> </span>
</template> </template>
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册