From 42e1ff90c088e051bc5a4b024b02f2a1a007744a Mon Sep 17 00:00:00 2001 From: chsua Date: Thu, 26 Oct 2023 15:09:04 +0900 Subject: [PATCH] =?UTF-8?q?test:=20=EB=B9=84=ED=9A=8C=EC=9B=90=EC=9D=B4=20?= =?UTF-8?q?=EC=82=AC=EC=9A=A9=EA=B0=80=EB=8A=A5=ED=95=9C=20=EA=B8=B0?= =?UTF-8?q?=EB=8A=A5=20=ED=85=8C=EC=8A=A4=ED=8A=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 사이트 접근 - 게시글 목록 필터링 + 정렬 - 랭킹 페이지 접근 및 인기게시글 랭킹에서 상세페이지로 이동 - 공지페이지 접근 및 공지 목록에서 공지 상세 페이지로 이동 - 사용 안되는 기능은 토스트 띄우기 - 스크롤 후 상단으로 이동하는 버튼 기능 확인 - 검색하기 --- frontend/cypress/e2e/guestFeatureTest.cy.ts | 80 +++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 frontend/cypress/e2e/guestFeatureTest.cy.ts diff --git a/frontend/cypress/e2e/guestFeatureTest.cy.ts b/frontend/cypress/e2e/guestFeatureTest.cy.ts new file mode 100644 index 000000000..cb92935b5 --- /dev/null +++ b/frontend/cypress/e2e/guestFeatureTest.cy.ts @@ -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 ==== */ + }); +});