Skip to content

Commit 05ff848

Browse files
authored
test: items under trip existence (#948)
1 parent 670df7a commit 05ff848

File tree

2 files changed

+10431
-12
lines changed

2 files changed

+10431
-12
lines changed

tests/HAR/tripExistence.har

Lines changed: 10402 additions & 0 deletions
Large diffs are not rendered by default.

tests/tripExistence.spec.ts

Lines changed: 29 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,31 @@
1-
import { test } from './utils'
1+
import { test, expect } from './utils'
2+
test.describe('Trip Existence Page Tests', () => {
3+
test.beforeEach(({ advancedRouteFromHAR }) => {
4+
advancedRouteFromHAR('tests/HAR/tripExistence.har', {
5+
updateContent: 'embed',
6+
update: false,
7+
notFound: 'abort',
8+
url: /stride-api/,
9+
})
10+
})
211

3-
test('choosing params in "קיום נסיעות" and organize by date/hour ', async ({ page }) => {
4-
await page.goto('/')
5-
await page.getByRole('link', { name: 'קיום נסיעות' }).click()
6-
await page.getByLabel('התחלה').click()
7-
await page.getByLabel('התחלה').fill('02/6/2024')
8-
await page.getByLabel('סיום').click()
9-
await page.getByLabel('סיום').fill('02/6/2024')
10-
await page.getByLabel('חברה מפעילה').click()
11-
await page.getByRole('option', { name: 'דן', exact: true }).click()
12-
await page.getByText('קיבוץ לפי שעה').click()
13-
await page.getByText('קיבוץ לפי יום').click()
12+
test('Trip Existence page items', async ({ page }) => {
13+
await page.goto('/')
14+
await page.getByRole('link', { name: 'קיום נסיעות' }).click()
15+
const itemsInOrder = ['קיום נסיעות', 'הקווים הגרועים ביותר', 'אחוזי יציאה מסך הנסיעות לפי יום']
16+
await expect(page.locator('h2')).toContainText(itemsInOrder)
17+
})
18+
19+
test('choosing params in "קיום נסיעות" and organize by date/hour ', async ({ page }) => {
20+
await page.goto('/')
21+
await page.getByRole('link', { name: 'קיום נסיעות' }).click()
22+
await page.getByLabel('התחלה').click()
23+
await page.getByLabel('התחלה').fill('02/6/2024')
24+
await page.getByLabel('סיום').click()
25+
await page.getByLabel('סיום').fill('02/6/2024')
26+
await page.getByLabel('חברה מפעילה').click()
27+
await page.getByRole('option', { name: 'דן', exact: true }).click()
28+
await page.getByText('קיבוץ לפי שעה').click()
29+
await page.getByText('קיבוץ לפי יום').click()
30+
})
1431
})

0 commit comments

Comments
 (0)