Skip to content
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

[FE] Chore/#363 main hotfixes 커밋 반영 #364

Merged
merged 1 commit into from
Aug 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions .github/workflows/fe-pull-request.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
name: Frontend CI For Test Validation
# 어떤 이벤트가 발생하면 실행할지 결정

on:
#pull request open과 reopen 시 실행한다.
# pull request open과 reopen 시 실행한다.
pull_request:
branches: [main, develop]
paths: frontend/**

defaults:
run:
working-directory: ./frontend

jobs:
jest:
runs-on: ubuntu-22.04
Expand All @@ -19,10 +21,18 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: "18"
node-version: '18'

- name: Install node modules
run: npm install

- name: Run Jest test
run: npm run test

- name: Start npm
run: npm run dev

- name: Run Cypress
uses: cypress-io/github-action@v5
with:
start: npm run cypress
22 changes: 20 additions & 2 deletions frontend/cypress/e2e/mapbefine.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,30 @@ describe('토픽 상세 페이지', () => {
if (index === 0) $el.click();
});

cy.get('li')
cy.wait(1000);

cy.get('span').each(($el, index) => {
if (index === 6) $el.click();
});

cy.contains('내 지도에 저장하기').should('be.visible');
});

it('핀 상세 페이지에서 내 지도에 저장하기 버튼 누르면 토스트 메시지가 나온다.', () => {
cy.get('[data-cy="topic-card"]')
.children()
.each(($el, index) => {
if (index === 0) $el.click();
});

cy.contains('내 지도에 저장하기').should('be.visible');
cy.wait(1000);

cy.get('span').each(($el, index) => {
if (index === 6) $el.click();
});

cy.contains('내 지도에 저장하기').click();

cy.contains('로그인 후 사용해주세요.').should('be.visible');
});
});