Skip to content

Commit

Permalink
~오타수정 및 리뷰반영
Browse files Browse the repository at this point in the history
  • Loading branch information
chojooyoung committed Oct 17, 2023
1 parent fff981d commit 7514b1d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 19 deletions.
2 changes: 1 addition & 1 deletion src/hooks/result/useCategoryFilterList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ type ReturnType = {
onCheckItem(name: string): void
}

const cateGoryList = [
export const cateGoryList = [
{
code: '전체',
name: '전체',
Expand Down
28 changes: 12 additions & 16 deletions src/tests/e2e/feature/main/main.cy.ts
Original file line number Diff line number Diff line change
@@ -1,37 +1,33 @@
export {}
import { cateGoryList } from '@hooks/result/useCategoryFilterList'

const resultPage = (): void => {
const visitMainPage = (): void => {
const URL = 'http://localhost:3000'
cy.visit(URL)
}

describe('첫 진입 페이지 ', () => {
beforeEach(() => {
resultPage()
visitMainPage()
})
it('배너가 텍스트가 보인다.', () => {
it('배너의 텍스트가 보인다.', () => {
cy.contains('처치곤란한 물건이 있다면?').should('be.visible')
})

it('카테고리가 들이 보인다', () => {
cy.contains('남성패션/잡화').should('be.visible')
cy.contains('여성패션/잡화').should('be.visible')
cy.contains('게임').should('be.visible')
cy.contains('스포츠/레저').should('be.visible')
cy.contains('장난감/취미').should('be.visible')
cy.contains('디지털기기').should('be.visible')
cy.contains('자동차/공구').should('be.visible')
cy.contains('생활가전').should('be.visible')
cy.contains('가구/인테리어').should('be.visible')
cy.contains('도서/티켓/음반').should('be.visible')
it('카테고리 들이 보인다', () => {
cateGoryList.forEach(category => {
if (category.name == '전체' || category.name === '반려동물') {
return
}
cy.contains(category.name).should('be.visible')
})
})

it('카테고리를 오른쪽으로 끝까지 하면 더보기 카테고리가 보인다', () => {
cy.get('[data-test-id="category_scroll_area"]').scrollTo('right')
cy.contains('더보기').should('be.visible')
})

it('페이지리를 아래로 내리면 상품이 보인다', () => {
it('페이지를 아래로 내리면 상품이 보인다', () => {
cy.scrollTo(0, 1000)
cy.contains('시작가').should('be.visible')
})
Expand Down
2 changes: 0 additions & 2 deletions src/tests/e2e/support/e2e.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
export {}

import './commands'

0 comments on commit 7514b1d

Please sign in to comment.