-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[2단계 - 자주 가는 음식점] 엽토(김건엽) 미션 제출합니다. #71
Merged
Merged
Changes from all commits
Commits
Show all changes
51 commits
Select commit
Hold shift + click to select a range
946eb69
refactor: add 메서드 실행시에 localStorage 갱신해줬던 것을 새로고침 시 갱신해주도록 변경하다
yeopto 3f8bfd2
feat: 레스토랑 정보에 즐겨찾기 여부를 확인할 수 있는 key값을 추가하다
yeopto ad6b877
feat: 자주가는 음식점을 등록, 취소하는 기능을 구현하다
yeopto 316de3d
test: 음식점이 즐겨찾기 되어있는지 확인하는 테스트 코드를 작성하다
yeopto c9bfa44
feat: 자주가는 음식점 리스트 가져오는 기능을 구현하다
yeopto 96e7387
test: 즐겨찾기 된 음식점만 가져오는지 확인하는 테스트 코드를 작성하다
yeopto 1782ce6
feat: 음식점을 삭제하는 기능을 구현하다
yeopto 99e1565
test: 음식점을 삭제하는 테스트 코드를 작성하다
yeopto 52f1c3f
feat: tabbar 컴포넌트를 만들다
yeopto d667ee1
style: tabbar style을 지정하다
yeopto 39d6c26
refactor: 필터 템플릿 삽입 위치를 변경하다
yeopto 75bd7c6
feat: 탭바 이벤트를 설정하다
yeopto 9db32e7
feat: 필터를 열고 닫는 기능을 구현하다
yeopto 49c77c8
feat: 즐겨찾기 목록을 렌더링하는 기능을 구현하다
yeopto 05a6a30
style: 필터 스타일을 추가하다
yeopto 237a8b2
feat: 레스토랑 리스트 스타일을 변경하다
yeopto 0181c70
feat: 즐겨찾기 UI와 기능을 구현하다
yeopto b9a0e82
refactor: Modal 추상 클래스를 만들어서 상속하게 만들다
yeopto 01af69d
test: 로직 변경에 따라 테스트 코드를 수정하다
yeopto 4f3c661
refactor: 부모 클래스에 있는 메서드를 삭제하다
yeopto 2cc4c12
feat: 음식점 정보에 id값을 추가하다
yeopto 225c901
refactor: Header 이벤트를 수정하다
yeopto 7ba378f
feat: RestaurantItem 이벤트를 추가하다
yeopto e12a5a2
refactor: AddModal 렌더링 로직을 변경하다
yeopto afd8105
refactor: Modal 추상컴포넌트를 수정하다
yeopto 7ed61eb
feat: 음식점 정보 모달 컴포넌트를 생성하다
yeopto 3b723fa
style: 음식점 정보 스타일을 입히다
yeopto be7722e
feat: 이벤트 핸들링 로직을 추가하다
yeopto cc74d74
refactor: item 이벤트를 list로 옮기다
yeopto 6920ec8
refactor: 즐겨찾기 아이콘에 id를 추가하다
yeopto 2a99cb2
refactor: item 이벤트를 삭제하다
yeopto 6c78c6d
refactor: alt값을 id로 변경하다
yeopto d5c869d
refactor: itemEvent를 수정하다
yeopto 6c2fc95
feat: infoModal에서 즐겨찾기 기능을 만들다
yeopto 85d5125
refactor: 필요없는 모듈선언을 지우다
yeopto 3c10bc8
feat: 삭제하기 기능을 만들다
yeopto 7fa1d72
test: 테스트 코드를 수정하다
yeopto 05d40ab
test: e2e 테스트 코드를 작성하다
yeopto 4b60ab5
docs: 2단계 미션 정보를 작성하다
yeopto 2511636
chore: Mock 데이터를 만들다
yeopto c8fbfa3
refactor: 전체 로직을 수정하다
yeopto 50ea26a
style: 반복되는 선언 삭제하다
yeopto fb59a09
refactor: 필요없는 return문 삭제하다
yeopto a02e386
refactor: addModal로직을 수정하다
yeopto 1622f1a
refactor: InfoModal 로직을 수정하다
yeopto 120c9cd
refactor: RestaurantsList 로직을 수정하다
yeopto 180dfb6
refactor: RestaurantItem 로직을 수정하다
yeopto cce27b1
refactor: index.js를 수정하다
yeopto 68f4756
test: Test 코드를 수정하다
yeopto c68fd4e
refactor: alt값을 사용한 것을 id로 변경하다
yeopto 5faf628
refactor: 메서드명을 수정하다
yeopto File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { defineConfig } from "cypress"; | ||
|
||
export default defineConfig({ | ||
e2e: { | ||
setupNodeEvents(on, config) { | ||
// implement node event listeners here | ||
}, | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
describe('점심 뭐 먹지 e2e 테스트', () => { | ||
it('음식점 추가, 삭제, 필터링, 즐겨찾기 테스트', () => { | ||
cy.visit('http://localhost:8080'); | ||
cy.viewport(500, 1000); | ||
|
||
// 음식점 추가 | ||
cy.get('.gnb__button').click(); | ||
cy.get('#category').select('한식'); | ||
cy.get('#name').type('공원네 밥집'); | ||
cy.get('#distance').select('10분 내'); | ||
cy.get('#description').type('집 앞 분식점'); | ||
cy.get('form .button--primary').click(); | ||
|
||
cy.get('.gnb__button').click(); | ||
cy.get('#category').select('양식'); | ||
cy.get('#name').type('제레미 스파게티'); | ||
cy.get('#distance').select('20분 내'); | ||
cy.get('#description').type('야무짐'); | ||
cy.get('form .button--primary').click(); | ||
|
||
cy.get('.gnb__button').click(); | ||
cy.get('#category').select('중식'); | ||
cy.get('#name').type('사천성'); | ||
cy.get('#distance').select('15분 내'); | ||
cy.get('#description').type('얼큰함'); | ||
cy.get('form .button--primary').click(); | ||
|
||
// 음식점 삭제 | ||
cy.contains('공원네 밥집').click(); | ||
cy.contains('삭제하기').click(); | ||
|
||
// 음식점 필터링 | ||
cy.get('#sorting-filter').select('거리순'); | ||
|
||
// 리스트 확인 | ||
cy.get('.restaurant-list').first().should('contain.text', '사천성'); | ||
|
||
// 즐겨찾기 추가 | ||
cy.contains('사천성').parentsUntil('.restaurant-list').children('.favorite-icon').click(); | ||
cy.contains('자주 가는 음식점').click(); | ||
|
||
// 자주가는 음식점 리스트 확인 | ||
cy.get('.restaurant-list').first().should('contain.text', '사천성'); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"name": "Using fixtures to represent data", | ||
"email": "hello@cypress.io", | ||
"body": "Fixtures are a great way to mock data for responses to routes" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/// <reference types="cypress" /> | ||
// *********************************************** | ||
// This example commands.ts shows you how to | ||
// create various custom commands and overwrite | ||
// existing commands. | ||
// | ||
// For more comprehensive examples of custom | ||
// commands please read more here: | ||
// https://on.cypress.io/custom-commands | ||
// *********************************************** | ||
// | ||
// | ||
// -- This is a parent command -- | ||
// Cypress.Commands.add('login', (email, password) => { ... }) | ||
// | ||
// | ||
// -- This is a child command -- | ||
// Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, options) => { ... }) | ||
// | ||
// | ||
// -- This is a dual command -- | ||
// Cypress.Commands.add('dismiss', { prevSubject: 'optional'}, (subject, options) => { ... }) | ||
// | ||
// | ||
// -- This will overwrite an existing command -- | ||
// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... }) | ||
// | ||
// declare global { | ||
// namespace Cypress { | ||
// interface Chainable { | ||
// login(email: string, password: string): Chainable<void> | ||
// drag(subject: string, options?: Partial<TypeOptions>): Chainable<Element> | ||
// dismiss(subject: string, options?: Partial<TypeOptions>): Chainable<Element> | ||
// visit(originalFn: CommandOriginalFn, url: string, options: Partial<VisitOptions>): Chainable<Element> | ||
// } | ||
// } | ||
// } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// *********************************************************** | ||
// This example support/e2e.ts is processed and | ||
// loaded automatically before your test files. | ||
// | ||
// This is a great place to put global configuration and | ||
// behavior that modifies Cypress. | ||
// | ||
// You can change the location of this file or turn off | ||
// automatically serving support files with the | ||
// 'supportFile' configuration option. | ||
// | ||
// You can read more here: | ||
// https://on.cypress.io/configuration | ||
// *********************************************************** | ||
|
||
// Import commands.js using ES2015 syntax: | ||
import './commands' | ||
|
||
// Alternatively you can use CommonJS syntax: | ||
// require('./commands') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이 형식이 계속해서 반복으로 나타나는데 공통함수로 빼보는건 어떨까요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이 부분은 다음 미션때 적용해보겠습니다!