0
1
Fork 0

Add tests to account config lang change

This commit is contained in:
William Buezas 2024-11-13 18:50:18 -03:00
parent dfc8096b19
commit 46b828bd0c
3 changed files with 11 additions and 2 deletions

View File

@ -60,7 +60,7 @@ const logoutSupplantedUser = async () => {
class="q-mr-md"
/>
<img class="logo q-mr-lg" src="statics/logo-dark.svg" />
<QToolbarTitle>
<QToolbarTitle data-testid="headerTitle">
{{ customTitle || menuTitle }}
<div v-if="subtitle" class="subtitle text-caption">
{{ subtitle }}

View File

@ -128,6 +128,7 @@ onMounted(() => fetchLanguagesSql());
option-value="code"
:options="langOptions"
@update:model-value="updateConfigLang(data.lang)"
data-testid="configViewLang"
/>
</template>
<template #extraForm>

View File

@ -4,8 +4,16 @@ describe('Changes user nickname', () => {
cy.visit('/#/account/conf');
});
it('success', () => {
it('changes username', () => {
cy.changeUserNickname('Bruce Wayne', 'New test nickname');
cy.resetDB();
});
it('changes site lang when changing user lang', () => {
cy.dataCy('configViewLang').should('exist');
cy.selectOption('[data-testid="configViewLang"]', 'Español');
cy.dataCy('headerTitle').should('contain', 'Configuración');
cy.selectOption('[data-testid="configViewLang"]', 'English');
cy.dataCy('headerTitle').should('contain', 'Configuration');
});
});