Skip to content

Commit

Permalink
feat: upgrade pt-br translation with contexts (#3206)
Browse files Browse the repository at this point in the history
Co-authored-by: Danilo Lutz <danilo.souza_dextra@totalexpress.com.br>
  • Loading branch information
danilolutz and Danilo Lutz committed Jan 25, 2022
1 parent 4faf2c3 commit 7e5aa2f
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docs/translation.md
Expand Up @@ -57,7 +57,7 @@ To write your tests in portuguese you can enable the portuguese translation in c
Now you can write test like this:

```js
Scenario('Efetuar login', ({ Eu }) => {
Cenário('Efetuar login', ({ Eu }) => {
Eu.estouNaPagina('http://minhaAplicacao.com.br');
Eu.preenchoOCampo("login", "usuario@minhaAplicacao.com.br");
Eu.preenchoOCampo("senha", "123456");
Expand Down
8 changes: 8 additions & 0 deletions test/unit/container_test.js
Expand Up @@ -53,6 +53,14 @@ describe('Container', () => {
expect(container.translation().I).to.eql('Je');
expect(container.translation().value('contexts').Feature).to.eql('Fonctionnalité');
});

it('should create Portuguese translation', () => {
container.create({ translation: 'pt-BR' });
expect(container.translation()).to.be.instanceOf(Translation);
expect(container.translation().loaded).to.be.true;
expect(container.translation().I).to.eql('Eu');
expect(container.translation().value('contexts').Feature).to.eql('Funcionalidade');
});
});

describe('#helpers', () => {
Expand Down
8 changes: 8 additions & 0 deletions translations/pt-BR.js
@@ -1,5 +1,13 @@
module.exports = {
I: 'Eu',
contexts: {
Feature: 'Funcionalidade',
Scenario: 'Cenário',
Before: 'Antes',
After: 'Depois',
BeforeSuite: 'AntesDaSuite',
AfterSuite: 'DepoisDaSuite',
},
actions: {
amOutsideAngularApp: 'naoEstouEmAplicacaoAngular',
amInsideAngularApp: 'estouNaAplicacaoAngular',
Expand Down

0 comments on commit 7e5aa2f

Please sign in to comment.