> For the complete documentation index, see [llms.txt](https://docs.decentraland.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.decentraland.org/contributor/contributor-ko/contributor-guides/testing-standards/testing-e2e.md).

# E2E 테스트

{% hint style="info" %}
이 섹션은 현재 작업 진행 중(WIP)입니다.
{% endhint %}

이 섹션은 개발자들이 e2e 테스트와 관련된 코드베이스를 어떻게 테스트할지 설명합니다.

## 테스트 스택

모든 UI 테스트는 반드시 다음을 사용해 수행해야 합니다. [Cypress](https://www.cypress.io/) 주요 테스트 프레임워크로, 다음과 함께 [Synpress](https://github.com/Synthetixio/synpress) 지갑 지원을 위해 사용합니다. 테스트 코드는 반드시 다음을 사용하여 작성해야 합니다. [TypeScript](https://www.typescriptlang.org/) 를 사용해 실행되어야 합니다. [ts-jest](https://github.com/kulshekhar/ts-jest) 를 사용하여 타입 검사 지원을 받아야 합니다.

## 디렉터리 구조

새 테스트는 반드시 다음 위치에 배치해야 합니다. `tests/e2e` 디렉터리의 루트 경로에 있어야 합니다. 파일 이름은 테스트할 흐름의 이름으로 지정되며, 즉 e2e 테스트 파일이 다음을 테스트하는 경우 `Collection Publication` 흐름이라면, 파일 이름은 반드시 다음이어야 합니다. `collection-publication.spec.cy.ts`.

## 실행 빈도

GitHub Actions를 통해 예약 실행됩니다. 빈도는 추후 결정됩니다.

## 무엇을 테스트할 것인가

* dApps에서 가장 관련성 높은 사용자 상호작용(아이템 발행, NFT 구매 등)

## 테스트 방법

모든 테스트는 반드시 다음의 반구조화된 스타일을 따라야 합니다. **Given-When-Then** (GWT).

다음 예시:

1. **Given** 사용자가 방문합니다 `https://example.cypress.io`
2. **When** 그들이 다음으로 표시된 링크를 클릭할 때 `유형`
3. 그리고 "<fake@email.com>"을 다음에 입력할 때 `[data-testid="action-email"]` 입력란
4. **그다음** URL에는 다음이 포함되어야 합니다 `/commands/actions`
5. 그리고 `[data-testid="action-email"]` 입력란의 값은 "<fake@email.com>"이어야 합니다

다음과 같이 작성해야 합니다:

```jsx
describe('사용자가 https://example.cypress.io를 방문할 때', () => {
  beforeEach(() => {
    cy.visit('https://example.cypress.io')
  })

  describe('type이라고 표시된 링크를 클릭할 때', () => {
    beforeEach(() => {
      cy.contains('type').click()
    })

    describe('action-email 입력란에 이메일을 입력할 때', () => {
      beforeEach(() => {
        // 입력란을 가져와 그 안에 입력합니다
        cy.get('.action-email').type('fake@email.com')
      })

      it('그런 다음 URL에 /commands/actions가 포함되어야 합니다', () => {
        // 새 URL이어야 하며
        // '/commands/actions'를 포함합니다
        cy.url().should('include', '/commands/actions')
      })

      it('그리고 action-email 입력란의 값에 입력한 이메일이 포함되어야 합니다', () => {
        // 값이 업데이트되었는지 확인합니다
        cy.get('.action-email').should('have.value', 'fake@email.com')
      })
    })
  })
})
```

## 계약 테스트

스마트 계약 테스트는 Solidity Standards 문서를 참조하세요.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.decentraland.org/contributor/contributor-ko/contributor-guides/testing-standards/testing-e2e.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
