Skip to content

Commit

Permalink
test: 비회원이 사용가능한 기능 테스트
Browse files Browse the repository at this point in the history
- 사이트 접근
- 게시글 목록 필터링 + 정렬
- 랭킹 페이지 접근 및 인기게시글 랭킹에서 상세페이지로 이동
- 공지페이지 접근 및 공지 목록에서 공지 상세 페이지로 이동
- 사용 안되는 기능은 토스트 띄우기
- 스크롤 후 상단으로 이동하는 버튼 기능 확인
- 검색하기
  • Loading branch information
chsua committed Oct 26, 2023
1 parent 9878fd0 commit 42e1ff9
Showing 1 changed file with 80 additions and 0 deletions.
80 changes: 80 additions & 0 deletions frontend/cypress/e2e/guestFeatureTest.cy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
const visitUrl = 'http://localhost:3000/';

describe('guestFeatureTest', () => {
it('visitSite', () => {
cy.visit(visitUrl);
});

/* ==== Test Created with Cypress Studio ==== */
it('controlPostListFilteringOrSorting', function () {
/* ==== Generated with Cypress Studio ==== */
cy.visit('http://localhost:3000/');
cy.get(':nth-child(1) > .sc-gVpkOZ > .sc-fXmShK').click();
cy.get('.sc-gyMiQo > :nth-child(1)').click();
cy.get(':nth-child(2) > .sc-gVpkOZ > .sc-fXmShK').click();
cy.get('.sc-gyMiQo > :nth-child(1)').click();
//list 확인 필요
/* ==== End Cypress Studio ==== */
});

/* ==== Test Created with Cypress Studio ==== */
it('lookRankingAndGoPopularPost', function () {
/* ==== Generated with Cypress Studio ==== */
cy.visit('http://localhost:3000/');
cy.get('.sc-fWKGHs > .gHxHbZ > img').click();
cy.get('.cbweqh').click();
cy.get(':nth-child(1) > :nth-child(3) > a').click();
/* ==== End Cypress Studio ==== */
});

/* ==== Test Created with Cypress Studio ==== */
it('lookNoticeListAndNoticeDetail', function () {
/* ==== Generated with Cypress Studio ==== */
cy.visit('http://localhost:3000/');
cy.get('.sc-hmrlCG > .sc-iJSKBe > .sc-giQjdv > span').click();
//list 확인 필요
cy.get(':nth-child(1) > .sc-fGwJSW > .sc-hmftdN').click();
/* ==== End Cypress Studio ==== */
});

/* ==== Test Created with Cypress Studio ==== */
it('showToastForGuest', function () {
/* ==== Generated with Cypress Studio ==== */
cy.visit('http://localhost:3000/');
cy.get('.sc-fWKGHs > .sc-gSIKdN > .sc-iNyIUv > img').click();
cy.get('.sc-bdDrbm').should('exist').should('contain', '로그인 후 이용');
/* ==== End Cypress Studio ==== */
/* ==== Generated with Cypress Studio ==== */
cy.get(
'.sc-hmrlCG > .sc-iJSKBe > .sc-bYgGll > .sc-dILiZe > .sc-fKwBvW > .sc-dYlqv > .sc-hCcNSO > :nth-child(1) > .sc-fFCYnF > img'
).click();
cy.get('.sc-bdDrbm').should('exist').should('contain', '로그인 후 이용');
/* ==== End Cypress Studio ==== */
});

/* ==== Test Created with Cypress Studio ==== */
it('scrollTopScreen', function () {
/* ==== Generated with Cypress Studio ==== */
cy.visit('http://localhost:3000/');
cy.scrollTo('bottom');
cy.scrollTo('bottom');
cy.scrollTo('bottom');
cy.get('.sc-eEFsNM').click();
cy.get('html, body').should($el => {
expect($el.scrollTop()).to.equal(0);
});
/* ==== End Cypress Studio ==== */
});

/* ==== Test Created with Cypress Studio ==== */
it('searchAKeyword', function () {
/* ==== Generated with Cypress Studio ==== */
cy.visit('http://localhost:3000/');
cy.get('.sc-jePPIV').click();
cy.get('.sc-eIYifI').clear();
cy.get('.sc-eIYifI').type('a');
cy.get('.sc-otYyL > img').click();
//list
/* ==== End Cypress Studio ==== */
});
});

0 comments on commit 42e1ff9

Please sign in to comment.