-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: items under trip existence (#948)
- Loading branch information
Showing
2 changed files
with
10,431 additions
and
12 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,31 @@ | ||
import { test } from './utils' | ||
import { test, expect } from './utils' | ||
test.describe('Trip Existence Page Tests', () => { | ||
test.beforeEach(({ advancedRouteFromHAR }) => { | ||
advancedRouteFromHAR('tests/HAR/tripExistence.har', { | ||
updateContent: 'embed', | ||
update: false, | ||
notFound: 'abort', | ||
url: /stride-api/, | ||
}) | ||
}) | ||
|
||
test('choosing params in "קיום נסיעות" and organize by date/hour ', async ({ page }) => { | ||
await page.goto('/') | ||
await page.getByRole('link', { name: 'קיום נסיעות' }).click() | ||
await page.getByLabel('התחלה').click() | ||
await page.getByLabel('התחלה').fill('02/6/2024') | ||
await page.getByLabel('סיום').click() | ||
await page.getByLabel('סיום').fill('02/6/2024') | ||
await page.getByLabel('חברה מפעילה').click() | ||
await page.getByRole('option', { name: 'דן', exact: true }).click() | ||
await page.getByText('קיבוץ לפי שעה').click() | ||
await page.getByText('קיבוץ לפי יום').click() | ||
test('Trip Existence page items', async ({ page }) => { | ||
await page.goto('/') | ||
await page.getByRole('link', { name: 'קיום נסיעות' }).click() | ||
const itemsInOrder = ['קיום נסיעות', 'הקווים הגרועים ביותר', 'אחוזי יציאה מסך הנסיעות לפי יום'] | ||
await expect(page.locator('h2')).toContainText(itemsInOrder) | ||
}) | ||
|
||
test('choosing params in "קיום נסיעות" and organize by date/hour ', async ({ page }) => { | ||
await page.goto('/') | ||
await page.getByRole('link', { name: 'קיום נסיעות' }).click() | ||
await page.getByLabel('התחלה').click() | ||
await page.getByLabel('התחלה').fill('02/6/2024') | ||
await page.getByLabel('סיום').click() | ||
await page.getByLabel('סיום').fill('02/6/2024') | ||
await page.getByLabel('חברה מפעילה').click() | ||
await page.getByRole('option', { name: 'דן', exact: true }).click() | ||
await page.getByText('קיבוץ לפי שעה').click() | ||
await page.getByText('קיבוץ לפי יום').click() | ||
}) | ||
}) |