Skip to content

Commit

Permalink
Fix: shift.cy.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
ckrb63 committed Mar 2, 2024
1 parent 0e00f9c commit 771b655
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions cypress/e2e/shift.cy.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
function login(pass?: boolean) {
function login() {
cy.findByText('로그인').click();
cy.findByText('카카오 계정으로 시작하기').click();

Expand All @@ -9,25 +9,22 @@ function login(pass?: boolean) {
'#mainContent > div > div > form > div.confirm_btn > button.btn_g.highlight.submit'
).click();
});
if (pass) {
cy.wait(2000);
cy.findByText('건너뛰기').click();
}
}

function keyDownEvent(key: string, count: number, ctrl?: boolean, shift?: boolean) {
Array(count)
.fill(1)
.forEach(() => cy.get('body').trigger('keydown', { key, ctrlKey: ctrl, shiftKey: shift }));
}

describe('근무 제작 페이지', () => {
beforeEach(() => {
cy.visit(Cypress.env('host'));
login(true);
});

it('근무표 작성', () => {
cy.findAllByText('근무표 작성 체험하기').first().click();
cy.wait(2000);
cy.findByText('건너뛰기').click();
cy.findByText('다음달 근무표 만들기').click();
cy.get('#cell_sample').click();

Expand Down

0 comments on commit 771b655

Please sign in to comment.