Skip to content
This repository was archived by the owner on Jan 15, 2024. It is now read-only.

test: 💍 英語表示のE2Eテストを簡易的に書いた #423

Merged
merged 1 commit into from
Jun 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions cypress/e2e/events-in-event.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,22 @@ describe('総選挙内企画のページ', () => {
})
})
})

describe('総選挙内企画のページ(英語版)', () => {
beforeEach(() => {
cy.visit('/en/events-in-event')
})

it('ページタイトルが期待どおりであること', () => {
cy.url().should('equal', 'http://localhost:3100/en/events-in-event')

cy.get('title').should('have.text', 'Projects - Gensosenkyo 2022')
})

it('h1 タグ が期待どおりであること', () => {
cy.url().should('equal', 'http://localhost:3100/en/events-in-event')

cy.get('h1').should('have.length', 1)
cy.get('h1').eq(0).should('have.text', 'Projects')
})
})
14 changes: 14 additions & 0 deletions cypress/e2e/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,17 @@ describe('ホームページ(投票期間中)', () => {
})
})
})

describe('ホームページ(英語版)', () => {
beforeEach(() => {
cy.visit('/en')
})

it('ページタイトルが期待どおりであること', () => {
cy.url().should('equal', 'http://localhost:3100/en')

cy.get('title').should('have.text', 'Home - Gensosenkyo 2022')

cy.get('body').contains('What is the "Gensosenkyo" ?')
})
})