Skip to content

Commit

Permalink
ci(test-frontend): Cypressのテストの失敗時、永遠に止まらない問題を回避 (MisskeyIO#434) (#13274
Browse files Browse the repository at this point in the history
)

失敗しないようタイムアウトの延長・15分で止まるように
  • Loading branch information
u1-liquid authored Feb 12, 2024
1 parent b95e250 commit 63c4396
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions .github/workflows/test-frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ jobs:
run: pnpm exec cypress install
- name: Cypress run
uses: cypress-io/github-action@v6
timeout-minutes: 15
with:
install: false
start: pnpm start:test
Expand Down
6 changes: 3 additions & 3 deletions cypress/e2e/basic.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,12 +162,12 @@ describe('After user signed in', () => {

it('successfully loads', () => {
// 表示に時間がかかるのでデフォルト秒数だとタイムアウトする
cy.get('[data-cy-user-setup-continue]', { timeout: 12000 }).should('be.visible');
cy.get('[data-cy-user-setup-continue]', { timeout: 30000 }).should('be.visible');
});

it('account setup wizard', () => {
// 表示に時間がかかるのでデフォルト秒数だとタイムアウトする
cy.get('[data-cy-user-setup-continue]', { timeout: 12000 }).click();
cy.get('[data-cy-user-setup-continue]', { timeout: 30000 }).click();

cy.get('[data-cy-user-setup-user-name] input').type('ありす');
cy.get('[data-cy-user-setup-user-description] textarea').type('ほげ');
Expand Down Expand Up @@ -205,7 +205,7 @@ describe('After user setup', () => {

// アカウント初期設定ウィザード
// 表示に時間がかかるのでデフォルト秒数だとタイムアウトする
cy.get('[data-cy-user-setup] [data-cy-modal-window-close]', { timeout: 12000 }).click();
cy.get('[data-cy-user-setup] [data-cy-modal-window-close]', { timeout: 30000 }).click();
cy.get('[data-cy-modal-dialog-ok]').click();
});

Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/router.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ describe('Router transition', () => {

// アカウント初期設定ウィザード
// 表示に時間がかかるのでデフォルト秒数だとタイムアウトする
cy.get('[data-cy-user-setup] [data-cy-modal-window-close]', { timeout: 12000 }).click();
cy.get('[data-cy-user-setup] [data-cy-modal-window-close]', { timeout: 30000 }).click();
cy.wait(500);
cy.get('[data-cy-modal-dialog-ok]').click();
});
Expand Down

0 comments on commit 63c4396

Please sign in to comment.