Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: woowacourse-teams/2023-hang-log
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 8d9be53226bdd65364d8579390e695babfc685b8
Choose a base ref
..
head repository: woowacourse-teams/2023-hang-log
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 6dac141af3e564c10a80fc91d16af199d10a0b08
Choose a head ref
Showing with 13 additions and 7 deletions.
  1. +13 −7 frontend/cypress/e2e/createTrip.cy.ts
20 changes: 13 additions & 7 deletions frontend/cypress/e2e/createTrip.cy.ts
Original file line number Diff line number Diff line change
@@ -44,13 +44,17 @@ describe('여행 생성 페이지', () => {
cy.get('#date').click();

const currentMonth = String(new Date().getMonth() + 1).padStart(2, '0');
const currentYear = String(new Date().getFullYear());

cy.get(`span[aria-label="2024년 ${currentMonth}월 1일"]`).click();
cy.get(`span[aria-label="2024년 ${currentMonth}월 12일"]`).click();
cy.get(`span[aria-label="${currentYear} ${currentMonth}월 1일"]`).click();
cy.get(`span[aria-label="${currentYear} ${currentMonth}월 12일"]`).click();

cy.get('#date').click();

cy.get('#date').should('have.value', `2024.${currentMonth}.01 - 2024.${currentMonth}.12`);
cy.get('#date').should(
'have.value',
`${currentYear}.${currentMonth}.01 - ${currentYear}.${currentMonth}.12`
);
});

it('도시와 기간이 채워졌을 때만 기록하기 버튼을 누를 수 있다.', () => {
@@ -64,9 +68,10 @@ describe('여행 생성 페이지', () => {
cy.get('#date').click();

const currentMonth = String(new Date().getMonth() + 1).padStart(2, '0');
const currentYear = String(new Date().getFullYear());

cy.get(`span[aria-label="2024년 ${currentMonth}월 1일"]`).click();
cy.get(`span[aria-label="2024년 ${currentMonth}월 12일"]`).click();
cy.get(`span[aria-label="${currentYear} ${currentMonth}월 1일"]`).click();
cy.get(`span[aria-label="${currentYear} ${currentMonth}월 12일"]`).click();

cy.get('#date').click();

@@ -85,9 +90,10 @@ describe('여행 생성 페이지', () => {
cy.get('#date').click();

const currentMonth = String(new Date().getMonth() + 1).padStart(2, '0');
const currentYear = String(new Date().getFullYear());

cy.get(`span[aria-label="2024년 ${currentMonth}월 1일"]`).click();
cy.get(`span[aria-label="2024년 ${currentMonth}월 12일"]`).click();
cy.get(`span[aria-label="${currentYear} ${currentMonth}월 1일"]`).click();
cy.get(`span[aria-label="${currentYear} ${currentMonth}월 12일"]`).click();

cy.get('#date').click();