chore(i18n,docs): processed translations (#44964)

This commit is contained in:
camperbot
2022-02-04 03:55:42 +05:30
committed by GitHub
parent 1d76032484
commit a2a1c62953
27 changed files with 1213 additions and 1213 deletions

View File

@@ -1,77 +1,77 @@
# How to add Cypress tests
# Cypress テストを追加する方法
When making changes to JavaScript, CSS, or HTML which could change the functionality or layout of a page, it's important to add corresponding [Cypress](https://docs.cypress.io) integration tests.
ページの機能やレイアウトを変更する可能性がある JavaScriptCSS、または HTML を変更する際には、対応する [Cypress](https://docs.cypress.io) 統合テストを追加することが重要です。
To learn how to write Cypress tests, or 'specs', please see Cypress' official [documentation](https://docs.cypress.io/guides/getting-started/writing-your-first-test.html).
Cypress テストもしくは「specs」の書き方については、Cypress の公式 [ドキュメント ](https://docs.cypress.io/guides/getting-started/writing-your-first-test.html) をご覧ください。
## Where to add a test
## テストを追加する場所
- Cypress tests are in the `./cypress` directory.
- Cypress テストは `./cypress` ディレクトリにあります。
- Cypress tests for a curriculum module are in the corresponding curriculum directory, i.e. `cypress/integration/learn/responsive-web-design/basic-css/index.js`.
- カリキュラムモジュールの Cypress テストは、対応するカリキュラムディレクトリ、すなわち `cypress/integration/learn/responsive-web-design/basic-css/index.js` にあります。
## How to run tests
## テストを実行する方法
> [!NOTE] If using GitPod, please see [Cypress-GitPod Setup](/how-to-add-cypress-tests#cypress-gitpod-setup)
> [!NOTE] GitPod を使用している場合は、[CypressGitPod の設定](/how-to-add-cypress-tests#cypress-gitpod-setup) を参照してください。
### 1. Ensure that MongoDB and client applications are running
### 1. MongoDB とクライアントアプリケーションが動作していることを確認する
- [Start MongoDB and seed the database](/how-to-setup-freecodecamp-locally#step-3-start-mongodb-and-seed-the-database)
- [MongoDB を起動し、データベースをシードします。](/how-to-setup-freecodecamp-locally#step-3-start-mongodb-and-seed-the-database)
- [Start the freeCodeCamp client application and API server](/how-to-setup-freecodecamp-locally#step-4-start-the-freecodecamp-client-application-and-api-server)
- [freeCodeCamp クライアントアプリケーションと API サーバーを起動します。](/how-to-setup-freecodecamp-locally#step-4-start-the-freecodecamp-client-application-and-api-server)
### 2. Run the cypress tests
### 2. Cypress テストを実行する
To run tests against production builds, replace `dev` with `prd` below.
`dev` `prd` に置き換えて本番ビルドに対するテストを実行します。
- To run all tests in the `./cypress` directory:
- `./cypress` ディレクトリで、すべてのテストを実行します。
```console
npm run cypress:dev:run
```
- To run a single test:
- 単一のテストを実行します。
```console
npm run cypress:dev:run -- --spec=cypress/pathToYourSpec/youSpecFileName.js
```
- To create a development build, start the development server, and run all existing cypress end-to-end tests:
- 開発ビルドを作成するには、開発サーバーを起動し、既存の cypress エンドツーエンドテストをすべて実行します。
```console
npm run e2e:dev:run
```
## Cypress-GitPod Setup
## CypressGitPod の設定
### 1. Ensure Development Environment is Running
### 1. 開発環境が稼働していることを確認する
If starting the GitPod environment did not automatically develop the environment:
GitPod 環境を起動しても自動的に環境が構築されない場合は、以下を実行します。
- Start the database
- データベースを起動します。
```console
mongod
```
- Seed the database
- データベースをシードします。
```console
npm run seed
```
- Develop the server and client
- サーバーとクライアントを構築します。
```console
npm run develop
```
### 2. Install Cypress Build Tools
### 2. Cypress ビルドツールをインストールする
```console
npm run cypress:install-build-tools
```
- When prompted in the terminal, select your keyboard layout by language/area
- 端末でプロンプトが表示されたら、言語/エリアでキーボードのレイアウトを選択してください。
Now, [Cypress can be run](/how-to-add-cypress-tests#_2-run-the-cypress-tests)
これで、[Cypress を実行することができます ](/how-to-add-cypress-tests#_2-run-the-cypress-tests)