-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test case and update trigger scenarios
- Loading branch information
Showing
2 changed files
with
36 additions
and
0 deletions.
There are no files selected for viewing
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
31 changes: 31 additions & 0 deletions
31
tests/e2e/tests/TimelineComponent/TimelineComponentNotClickable.ts
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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import test from '@playwright/test'; | ||
import { TriggerDataSet } from 'testData/testData.enum'; | ||
|
||
import { Components, Pages } from '../../helpers/interfaces'; | ||
|
||
export default ( | ||
pages: Partial<Pages>, | ||
components: Partial<Components>, | ||
disasterType: string, | ||
) => { | ||
test('[33066] Timeline Buttons are not clickable in floods', async () => { | ||
const { dashboard } = pages; | ||
const { userState, timeline } = components; | ||
|
||
if (!dashboard || !userState || !timeline) { | ||
throw new Error('pages and components not found'); | ||
} | ||
|
||
// Navigate to disaster type the data was mocked for | ||
await dashboard.navigateToDisasterType(disasterType); | ||
// Assertions | ||
await userState.headerComponentIsVisible({ | ||
countryName: TriggerDataSet.CountryName, | ||
}); | ||
await timeline.timelineIsInactive(); | ||
|
||
// Reload the page to prepare for next test | ||
await dashboard.page.goto('/'); | ||
await dashboard.page.waitForTimeout(1000); | ||
}); | ||
}; |