forked from verdnatura/hedera-web
Add tests to account config lang change
This commit is contained in:
parent
dfc8096b19
commit
46b828bd0c
|
@ -60,7 +60,7 @@ const logoutSupplantedUser = async () => {
|
||||||
class="q-mr-md"
|
class="q-mr-md"
|
||||||
/>
|
/>
|
||||||
<img class="logo q-mr-lg" src="statics/logo-dark.svg" />
|
<img class="logo q-mr-lg" src="statics/logo-dark.svg" />
|
||||||
<QToolbarTitle>
|
<QToolbarTitle data-testid="headerTitle">
|
||||||
{{ customTitle || menuTitle }}
|
{{ customTitle || menuTitle }}
|
||||||
<div v-if="subtitle" class="subtitle text-caption">
|
<div v-if="subtitle" class="subtitle text-caption">
|
||||||
{{ subtitle }}
|
{{ subtitle }}
|
||||||
|
|
|
@ -128,6 +128,7 @@ onMounted(() => fetchLanguagesSql());
|
||||||
option-value="code"
|
option-value="code"
|
||||||
:options="langOptions"
|
:options="langOptions"
|
||||||
@update:model-value="updateConfigLang(data.lang)"
|
@update:model-value="updateConfigLang(data.lang)"
|
||||||
|
data-testid="configViewLang"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
<template #extraForm>
|
<template #extraForm>
|
||||||
|
|
|
@ -4,8 +4,16 @@ describe('Changes user nickname', () => {
|
||||||
cy.visit('/#/account/conf');
|
cy.visit('/#/account/conf');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('success', () => {
|
it('changes username', () => {
|
||||||
cy.changeUserNickname('Bruce Wayne', 'New test nickname');
|
cy.changeUserNickname('Bruce Wayne', 'New test nickname');
|
||||||
cy.resetDB();
|
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');
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue