diff --git a/.gitignore b/.gitignore index 7e60468342..8ddd744fb7 100644 --- a/.gitignore +++ b/.gitignore @@ -30,4 +30,5 @@ source/_data/banners.yml # source/ja source/zh-cn +source/pt-br diff --git a/_config.yml b/_config.yml index 4509cca7a1..a1a0bc12d4 100644 --- a/_config.yml +++ b/_config.yml @@ -13,6 +13,7 @@ language: - en - zh-cn - ja + - pt-br # URL ## If your site is put in a subdirectory, set url as 'http://yoursite.com/child' and root as '/child/' diff --git a/copy-english-docs.js b/copy-english-docs.js index 660d63ec8c..a174d2da0b 100644 --- a/copy-english-docs.js +++ b/copy-english-docs.js @@ -15,6 +15,7 @@ const getLanguageName = (short) => { const names = { ja: 'Japanese', 'zh-cn': 'Chinese', + 'pt-br': 'Portuguese Brazil', } if (!names[short]) { @@ -48,8 +49,9 @@ const findAllDocs = () => { const isJapaneseDoc = R.test(/\/ja\//) const isChineseDoc = R.test(/\/zh-cn\//) +const isPortugueseDoc = R.test(/\/pt-br\//) const isImage = R.test(/\/img\//) -const isTranslation = R.anyPass([isJapaneseDoc, isChineseDoc, isImage]) +const isTranslation = R.anyPass([isJapaneseDoc, isChineseDoc, isPortugueseDoc, isImage]) const translationsFilter = R.reject(isTranslation) @@ -60,7 +62,7 @@ const findAllEnglishDocs = () => { } /** - * @param {("ja" | "zh-cn")} shortName The short language name + * @param {("ja" | "zh-cn" | "pt-br")} shortName The short language name */ const findAllDocsFor = (shortName) => { const relativeSourceFolder = `source/${shortName}` @@ -69,7 +71,7 @@ const findAllDocsFor = (shortName) => { } /** - * @param {("ja" | "zh-cn")} targetLanguage + * @param {("ja" | "zh-cn" | "pt-br")} targetLanguage */ const copyAllEnglishDocsNotTranslatedTo = (targetLanguage) => { return Promise.all([ @@ -107,6 +109,8 @@ const copyUntranslatedDocs = () => { return copyAllEnglishDocsNotTranslatedTo('ja') .then(() => { return copyAllEnglishDocsNotTranslatedTo('zh-cn') + }).then(() => { + return copyAllEnglishDocsNotTranslatedTo('pt-br') }) } diff --git a/cypress/integration/main_spec.js b/cypress/integration/main_spec.js index af1353e5bf..43097ca026 100644 --- a/cypress/integration/main_spec.js +++ b/cypress/integration/main_spec.js @@ -15,6 +15,7 @@ describe('Main', () => { cy.request('/robots.txt').its('body') .should('include', 'Disallow: /ja/') .and('include', 'Disallow: /zh-cn/') + .and('include', 'Disallow: /pt-br/') }) } }) diff --git a/robots.txt b/robots.txt index 072afff0bc..36a3841eeb 100644 --- a/robots.txt +++ b/robots.txt @@ -1,4 +1,5 @@ User-agent: * Disallow: /ja/ Disallow: /zh-cn/ +Disallow: /pt-br/ Disallow: /fonts/ diff --git a/source/_data/languages.yml b/source/_data/languages.yml index f649846109..5bbf0b68a9 100644 --- a/source/_data/languages.yml +++ b/source/_data/languages.yml @@ -1,3 +1,4 @@ en: English ja: 日本語 zh-cn: 简体中文 +pt-br: Português Brazil diff --git a/source/pt-br/guides/overview/why-cypress.md b/source/pt-br/guides/overview/why-cypress.md new file mode 100644 index 0000000000..f29d8d7407 --- /dev/null +++ b/source/pt-br/guides/overview/why-cypress.md @@ -0,0 +1,95 @@ +--- +title: Por quê o Cypress? +--- + +{% note info %} +# {% fa fa-graduation-cap %} O que você aprenderá + +- O que é Cypress e por que você deve usá-lo +- Nossa missão e em que acreditamos +- Principais recursos do Cypress + +{% endnote %} + +# Breve definição + +Cypress é uma ferramenta de teste de última geração para front end criada para a web moderna. Abordamos os principais pontos problemáticos que os desenvolvedores e engenheiros de QA enfrentam ao testar aplicações modernas. + +Nós simplificamos: + +- {% urlHash 'Configurando os testes' Configurando-testes %} +- {% urlHash 'Escrevendo testes' Escrevendo-testes %} +- {% urlHash 'Executando testes' Executando-testes %} +- {% urlHash 'Debugando Testes' Debugando-testes %} + +Cypress é mais frequentemente comparado com o Selenium; no entanto, Cypress é fundamentalmente e arquiteturalmente diferente. Cypress não é limitado pelas mesmas restrições que o Selenium. + +Isso permite que você **escreva testes mais rápidos**, **mais fáceis** e **mais confiáveis**. + +# Quem usa o Cypress? + +Nossos usuários geralmente são desenvolvedores ou engenheiros de QA que criam aplicações web usando frameworks modernos de JavaScript. + +O Cypress permite que você escreva todos os tipos de teste: + +- Testes de ponta a ponta (E2E) +- Testes de Integração +- Testes Unitários + +Cypress pode testar qualquer coisa que seja executada em um navegador. + +# Ecossitema do Cypress + +Cypress consiste em um Test Runner gratuito, {% url "open source" https://github.com/cypress-io/cypress %}, {% url "locally installed" installing-cypress %} Test Runner **and** a Dashboard Service for {% url 'recording your tests' dashboard-introduction%}. + +- ***Em Primeiro Lugar:*** Cypress makes it easy to set up and start writing tests every day while you build your application locall. *TDD at its best!* +- ***Later:*** After building up a suite of tests and {% url "integrating Cypress" continuous-integration %} with your CI Provider, our {% url 'Dashboard Service' dashboard-introduction%} can record your test runs. You'll never have to wonder: *Why did this fail?* + +# Nossa missão + +Nossa missão é construir um ecossistema open source que aprimore a produtividade, torne o teste uma experiência agradável e gere a felicidade do desenvolvedor. +Nós nos responsabilizamos por defender um processo de teste que **realmente funciona**. + +Acreditamos que nossa documentação deve ser simples e acessível. Isso significa permitir que nossos leitores compreendem completamente não apenas o **porque** e o **como** também. + +Queremos ajudar os desenvolvedores a criar uma nova geração de aplicações modernas de maneira mais rápida, meljor esem o estresse e a ansiedade que associamos ao gerenciamento de testes. + +Sabemos que, para sermos bem-sucedidos, precisamos habilitar, nutrir e promover um ecossistema que cresça como open source. Cada linha de teste é um investimento no seu **código fonte**, nunca será associados a nós como um serviço pago ou empresa. Os testes serão capazes de executar e trabalhar independentemente *sempre*. + +Acreditamos que o teste precisa de {% fa fa-heart %} e estamos aqui para criar uma ferramenta, um serviço e uma comunidade na qual todos possam aprender e se beneficiar. Estamos resolvendo os pontos mais difícies compartilhados por todos os desenvolvedores que trabalham na web. Acreditamos nessa missão e esperamos que você se junte a nós para tornar o Cypress um ecossistema duradouro que faça todos felizes. + +# Recursos + +Cypress comes fully baked, batteries included. Here is a list of things it can do that no other testing framework can: + +- **Time Travel:** Cypress takes snapshots as your tests run. Hover over commands in the {% url 'Command Log' test-runner#Command-Log %} to see exactly what happened at each step. +- **Debuggability:** Stop guessing why your tests are failing. {% url 'Debug directly' debugging %} from familiar tools like Developer Tools. Our readable errors and stack traces make debugging lightning fast. +- **Automatic Waiting:** Never add waits or sleeps to your tests. Cypress {% url 'automatically waits' introduction-to-cypress#Cypress-is-Not-Like-jQuery %} for commands and assertions before moving on. No more async hell. +- **Spies, Stubs, and Clocks:** Verify and {% url 'control the behavior' stubs-spies-and-clocks %} of functions, server responses, or timers. The same functionality you love from unit testing is right at your fingertips. +- **Network Traffic Control:** Easily {% url 'control, stub, and test edge cases' network-requests %} without involving your server. You can stub network traffic however you like. +- **Resultados Consistentes:** Our architecture doesn’t use Selenium or WebDriver. Say hello to fast, consistent and reliable tests that are flake-free. +- **Screenshots e Vídeos:** View screenshots taken automatically on failure, or videos of your entire test suite when run from the CLI. + +## {% fa fa-cog %} Configurando testes + +Não há servidores, drivers ou nenhuma outra dependências para instalar ou configurar. Você pode escrever seu primeiro teste aprovado em 60 segundos. + +{% video local /img/snippets/installing-cli.mp4 %} + +## {% fa fa-code %} Escrevendo testes + +Tests written in Cypress are easy to read and understand. Our API comes fully baked, on top of tools you are familiar with already. + +{% video local /img/snippets/writing-tests.mp4 %} + +## {% fa fa-play-circle %} Executando testes + +Cypress runs as fast as your browser can render content. You can watch tests run in real time as you develop your applications. TDD FTW! + +{% video local /img/snippets/running-tests.mp4 %} + +## {% fa fa-bug %} Debugando testes + +Mensagens de erro legíveis ajudam você a debugar rapidamente. Você também tem acesso a todas as ferramentas de desenvolvedor que conhece e ama. + +{% video local /img/snippets/debugging.mp4 %} diff --git a/themes/cypress/languages/pt-br.yml b/themes/cypress/languages/pt-br.yml new file mode 100644 index 0000000000..e7c502b245 --- /dev/null +++ b/themes/cypress/languages/pt-br.yml @@ -0,0 +1,214 @@ +menu: + guides: Guias + api: API + plugins: Plugins + faq: FAQ + examples: Exemplos + search: Pesquisa + +index: + get-started: Introdução + +page: + contents: Conteúdo + back-to-top: Ir para o topo + improve: Melhorar este documento + prev: Anterior + next: Próximo + last-updated: "Última atualização: %s" + +sidebar: + guides: + overview: Visão Geral + why-cypress: Por que Cypress? + getting-started: Introdução + key-differences: Principais diferenças + installing-cypress: Instalando o Cypress + writing-your-first-test: Escrevendo seu primeiro teste + testing-your-app: Testando sua Aplicação + interacting-with-elements: Interagindo com Elementos + core-concepts: Principais Conceitos + introduction-to-cypress: Introdução ao Cypress + writing-and-organizing-tests: Escrevendo e Organizando seus Testes + conditional-testing: Testes Condicionais + test-runner: O Test Runner + dashboard: Dashboard + dashboard-introduction: Introdução + projects: Projetos + runs: Runs + organizations: Organizações + users: Usuários + github-integration: Integração com GitHub + debugging: Debugando + variables-and-aliases: Variáveis e Aliases + stubs-spies-and-clocks: Stubs, Spies e Clocks + network-requests: Network Requests + screenshots-and-videos: Screenshots e Vídeos + guides: Guias + command-line: Linha de Comando + continuous-integration: Integração Contínua + parallelization: Paralelização + environment-variables: Variáveis de Ambiente + launching-browsers: Iniciando navegadores + custom-commands: Comandos Customizados + web-security: Segurança Web + references: Referências + configuration: Configuração + proxy-configuration: Configuração de Proxy + error-messages: Mensagens de Erro + bundled-tools: Ferramentas incluídas + assertions: Asserções + best-practices: Boas Práticas + trade-offs: Trade-offs + changelog: Changelog + roadmap: Roteiro + tooling: Ferramentas + intelligent-code-completion: Conclusão Inteligente de Código + plugins-guide: Plugins + reporters: Reporters + typescript-support: TypeScript + module-api: Módulo de API + retry-ability: Capacidade de repetição + visual-testing: Teste Visual + code-coverage: Cobertura de Código + api: + api: API + table-of-contents: Índice + commands: Comandos + and: and + as: as + blur: blur + check: check + children: children + clear: clear + clearcookie: clearCookie + clearcookies: clearCookies + clearlocalstorage: clearLocalStorage + click: click + clock: clock + closest: closest + contains: contains + dblclick: dblclick + debug: debug + document: document + each: each + end: end + eq: eq + exec: exec + filter: filter + find: find + first: first + fixture: fixture + focus: focus + focused: focused + get: get + getcookie: getCookie + getcookies: getCookies + go: go + hash: hash + hover: hover + invoke: invoke + its: its + last: last + location: location + log: log + next: next + nextall: nextAll + nextuntil: nextUntil + not: not + parent: parent + parents: parents + parentsuntil: parentsUntil + pause: pause + prev: prev + prevall: prevAll + prevuntil: prevUntil + readfile: readFile + reload: reload + request: request + root: root + route: route + screenshot: screenshot + scrollintoview: scrollIntoView + scrollto: scrollTo + select: select + server: server + setcookie: setCookie + should: should + siblings: siblings + spread: spread + spy: spy + stub: stub + submit: submit + task: task + then: then + tick: tick + title: title + trigger: trigger + type: type + uncheck: uncheck + url: url + viewport: viewport + visit: visit + wait: wait + window: window + within: within + wrap: wrap + writefile: writeFile + events: Events + catalog-of-events: Catalogo de Eventos + assertions: Asserções + all-assertions: Todas Asserções + on: on + once: once + removelistener: removeListener + removealllisteners: removeAllListeners + utilities: Utilities + _: _ + $: $ + minimatch: minimatch + moment: moment + blob: Blob + promise: Promise + cypress-api: Cypress API + config: config + env: env + iscy: isCy + custom-commands: Commands + cookies: Cookies + dom: dom + cypress-log: log + cypress-server: Server + plugins: Plugins + writing-a-plugin: Escrevendo um Plugin + preprocessors-api: Pré-processadores + browser-launch-api: Browser Launching + configuration-api: Configuração + version: version + arch: arch + browser: browser + platform: platform + selector-playground-api: SelectorPlayground + screenshot-api: Screenshot + after-screenshot-api: After Screenshot + spec: spec + examples: + examples: Exemplos + recipes: Tutoriais + tutorials: Tutoriais em Vídeo + applications: Aplicações + docker: Docker + media: Media + courses-media: Cursos + webinars-media: Webinars + blogs-media: Blogs + talks-media: Palestras + podcasts-media: Podcasts + screencasts-media: Screencasts + workshop: Workshop + faq: + questions: FAQ + general-questions-faq: Perguntas gerais + using-cypress-faq: Usando Cypress + dashboard-faq: Dashboard + company-faq: Empresa