diff --git a/tests/e2e/tests/AggregatesSection/AggregatesHasDynamicTitle.spec.ts b/tests/e2e/tests/AggregatesSection/AggregatesHasDynamicTitle.spec.ts index 8c2dc9a849..bc059eee98 100644 --- a/tests/e2e/tests/AggregatesSection/AggregatesHasDynamicTitle.spec.ts +++ b/tests/e2e/tests/AggregatesSection/AggregatesHasDynamicTitle.spec.ts @@ -37,6 +37,7 @@ test.beforeEach(async ({ page }) => { // The bug is that the marker of glofas stations cannot be disabled with the first chebox click (needs several) and it is failing on flood disaster type // https://github.com/rodekruis/IBF-system/issues/1657 // When the bug is fixed, the test should be unskipped +// https://app.qase.io/project/IBF?case=12&previewMode=side&suite=7 test.skip( qase( 12, diff --git a/tests/e2e/tests/AggregatesSection/AggregatesShouldNotBeZeroInTriggerState.spec.ts b/tests/e2e/tests/AggregatesSection/AggregatesShouldNotBeZeroInTriggerState.spec.ts new file mode 100644 index 0000000000..a6144f8c89 --- /dev/null +++ b/tests/e2e/tests/AggregatesSection/AggregatesShouldNotBeZeroInTriggerState.spec.ts @@ -0,0 +1,55 @@ +import { expect, test } from '@playwright/test'; +import AggregatesComponent from 'Pages/AggregatesComponent'; +import DashboardPage from 'Pages/DashboardPage'; +import UserStateComponent from 'Pages/UserStateComponent'; +import { qase } from 'playwright-qase-reporter'; +import { TriggerDataSet } from 'testData/testData.enum'; + +import { + getAccessToken, + mockFloods, + resetDB, +} from '../../helpers/utility.helper'; +import LoginPage from '../../Pages/LoginPage'; + +let accessToken: string; + +test.beforeEach(async ({ page }) => { + // Login + const loginPage = new LoginPage(page); + + accessToken = await getAccessToken(); + await resetDB(accessToken); + // We should maybe create one mock for all different disaster types for now we can just use floods + await mockFloods( + TriggerDataSet.TriggerScenario, + TriggerDataSet.CountryCode, + accessToken, + ); + + await page.goto('/'); + await loginPage.login(TriggerDataSet.UserMail, TriggerDataSet.UserPassword); +}); + +// https://app.qase.io/project/IBF?case=39&previewMode=side&suite=7 +test( + qase(39, '[Trigger] Aggregated number of events should be non-zero'), + async ({ page }) => { + const aggregates = new AggregatesComponent(page); + const dashboard = new DashboardPage(page); + const userState = new UserStateComponent(page); + + // Navigate to disaster type the data was mocked for + await dashboard.navigateToFloodDisasterType(); + // Assertions + await userState.headerComponentIsVisible({ + countryName: TriggerDataSet.CountryName, + }); + + // get the number of warning events and aggregated events + const aggregatesEventCount = await aggregates.getNumberOfPredictedEvents(); + + // check if the number of warning events is equal to the number of aggregated events + expect(aggregatesEventCount).toBeGreaterThan(0); + }, +); diff --git a/tests/e2e/tests/AggregatesSection/AllAggregatesComponentsPresentNotrigger.spec.ts b/tests/e2e/tests/AggregatesSection/AllAggregatesComponentsPresentNotrigger.spec.ts index 1611c0e7e4..232a459b75 100644 --- a/tests/e2e/tests/AggregatesSection/AllAggregatesComponentsPresentNotrigger.spec.ts +++ b/tests/e2e/tests/AggregatesSection/AllAggregatesComponentsPresentNotrigger.spec.ts @@ -32,7 +32,7 @@ test.beforeEach(async ({ page }) => { NoTriggerDataSet.UserPassword, ); }); - +// https://app.qase.io/project/IBF?case=6&previewMode=side&suite=7 test( qase(6, 'All Aggregate elements are present in no-trigger mode'), async ({ page }) => { diff --git a/tests/e2e/tests/AggregatesSection/ValidateAggregatesInfoButtons.spec.ts b/tests/e2e/tests/AggregatesSection/ValidateAggregatesInfoButtons.spec.ts index 5472f41aae..7924650204 100644 --- a/tests/e2e/tests/AggregatesSection/ValidateAggregatesInfoButtons.spec.ts +++ b/tests/e2e/tests/AggregatesSection/ValidateAggregatesInfoButtons.spec.ts @@ -32,7 +32,7 @@ test.beforeEach(async ({ page }) => { NoTriggerDataSet.UserPassword, ); }); - +// https://app.qase.io/project/IBF?case=13&previewMode=side&suite=7 test( qase(13, 'All Aggregate info buttons show on click information'), async ({ page }) => { diff --git a/tests/e2e/tests/ChatSection/AllChatActionButtonsActiveInNoTrigger.spec.ts b/tests/e2e/tests/ChatSection/AllChatActionButtonsActiveInNoTrigger.spec.ts index 9d65d0e10e..c07dfa888d 100644 --- a/tests/e2e/tests/ChatSection/AllChatActionButtonsActiveInNoTrigger.spec.ts +++ b/tests/e2e/tests/ChatSection/AllChatActionButtonsActiveInNoTrigger.spec.ts @@ -33,7 +33,7 @@ test.beforeEach(async ({ page }) => { NoTriggerDataSet.UserPassword, ); }); - +// https://app.qase.io/project/IBF?case=11&previewMode=side&suite=6 test( qase( 11, diff --git a/tests/e2e/tests/ChatSection/AllChatComponentsPresentNotrigger.spec.ts b/tests/e2e/tests/ChatSection/AllChatComponentsPresentNotrigger.spec.ts index f012356aa2..db60209c4d 100644 --- a/tests/e2e/tests/ChatSection/AllChatComponentsPresentNotrigger.spec.ts +++ b/tests/e2e/tests/ChatSection/AllChatComponentsPresentNotrigger.spec.ts @@ -33,7 +33,7 @@ test.beforeEach(async ({ page }) => { NoTriggerDataSet.UserPassword, ); }); - +// https://app.qase.io/project/IBF?case=5&previewMode=side&suite=6 test( qase(5, 'All Chat section elements are present in no-trigger mode'), async ({ page }) => { diff --git a/tests/e2e/tests/ChatSection/ChatPredictionButtonActive.spec.ts b/tests/e2e/tests/ChatSection/ChatPredictionButtonActive.spec.ts index 78bcf7fb70..19ea98a386 100644 --- a/tests/e2e/tests/ChatSection/ChatPredictionButtonActive.spec.ts +++ b/tests/e2e/tests/ChatSection/ChatPredictionButtonActive.spec.ts @@ -30,7 +30,7 @@ test.beforeEach(async ({ page }) => { await page.goto('/'); await loginPage.login(TriggerDataSet.UserMail, TriggerDataSet.UserPassword); }); - +// https://app.qase.io/project/IBF?case=44&previewMode=side&suite=6 test( qase(44, '[Trigger] Show prediction button is clickable'), async ({ page }) => { diff --git a/tests/e2e/tests/ChatSection/TriggerStateShouldHaveWarningEvents.spec.ts b/tests/e2e/tests/ChatSection/TriggerStateShouldHaveWarningEvents.spec.ts index 91d9d85830..1f90a702b3 100644 --- a/tests/e2e/tests/ChatSection/TriggerStateShouldHaveWarningEvents.spec.ts +++ b/tests/e2e/tests/ChatSection/TriggerStateShouldHaveWarningEvents.spec.ts @@ -31,7 +31,7 @@ test.beforeEach(async ({ page }) => { await page.goto('/'); await loginPage.login(TriggerDataSet.UserMail, TriggerDataSet.UserPassword); }); - +// https://app.qase.io/project/IBF?case=43&previewMode=side&suite=6 test( qase(43, '[Trigger] Amount of events should equal the aggregate number'), async ({ page }) => { diff --git a/tests/e2e/tests/Dashboard/AllElementsPresentNoTrigger.spec.ts b/tests/e2e/tests/Dashboard/AllElementsPresentNoTrigger.spec.ts index 618e1f7d13..b9cba93039 100644 --- a/tests/e2e/tests/Dashboard/AllElementsPresentNoTrigger.spec.ts +++ b/tests/e2e/tests/Dashboard/AllElementsPresentNoTrigger.spec.ts @@ -36,7 +36,7 @@ test.beforeEach(async ({ page }) => { NoTriggerDataSet.UserPassword, ); }); - +// https://app.qase.io/project/IBF?case=1&previewMode=side&suite=2 test( qase(1, 'All Dashboard elements are present in no-trigger mode'), async ({ page }) => { diff --git a/tests/e2e/tests/DisasterType/AllDisasterTypeComponentsPresentNotrigger.spec.ts b/tests/e2e/tests/DisasterType/AllDisasterTypeComponentsPresentNotrigger.spec.ts index 58a393eda2..d27b663fe4 100644 --- a/tests/e2e/tests/DisasterType/AllDisasterTypeComponentsPresentNotrigger.spec.ts +++ b/tests/e2e/tests/DisasterType/AllDisasterTypeComponentsPresentNotrigger.spec.ts @@ -33,7 +33,7 @@ test.beforeEach(async ({ page }) => { NoTriggerDataSet.UserPassword, ); }); - +// https://app.qase.io/project/IBF?case=4&previewMode=side&suite=5 test( qase(4, 'All Disaster Type elements are present in no-trigger mode'), async ({ page }) => { diff --git a/tests/e2e/tests/DisasterType/SwitchBetweenDisasterType.spec.ts b/tests/e2e/tests/DisasterType/SwitchBetweenDisasterType.spec.ts index 4d07b11c00..1e0cd157b4 100644 --- a/tests/e2e/tests/DisasterType/SwitchBetweenDisasterType.spec.ts +++ b/tests/e2e/tests/DisasterType/SwitchBetweenDisasterType.spec.ts @@ -34,6 +34,7 @@ test.beforeEach(async ({ page }) => { }); // Test is skipped because it was flaky and more invastigation is needed to fix it // Logged in PBI: https://dev.azure.com/redcrossnl/IBF/_workitems/edit/32127/ +// https://app.qase.io/project/IBF?case=4&previewMode=side&suite=5 test.skip( qase(10, 'All Disaster Types can be selected in no-trigger mode'), async ({ page }) => { diff --git a/tests/e2e/tests/Map/AlertThresholdIsVisibleInLegend.spec.ts b/tests/e2e/tests/Map/AlertThresholdIsVisibleInLegend.spec.ts index 6817f97798..9efc16e1ea 100644 --- a/tests/e2e/tests/Map/AlertThresholdIsVisibleInLegend.spec.ts +++ b/tests/e2e/tests/Map/AlertThresholdIsVisibleInLegend.spec.ts @@ -34,7 +34,7 @@ test.beforeEach(async ({ page }) => { NoTriggerDataSet.UserPassword, ); }); - +// https://app.qase.io/project/IBF?case=29&previewMode=side&suite=3 test( qase(29, '[No-trigger] Alert Threshold Reached is visible on the legend'), async ({ page }) => { diff --git a/tests/e2e/tests/Map/AlertThresholdLinesAreNotVisibleNoTrigger.spec.ts b/tests/e2e/tests/Map/AlertThresholdLinesAreNotVisibleNoTrigger.spec.ts index bc36c047bc..d864a74aa4 100644 --- a/tests/e2e/tests/Map/AlertThresholdLinesAreNotVisibleNoTrigger.spec.ts +++ b/tests/e2e/tests/Map/AlertThresholdLinesAreNotVisibleNoTrigger.spec.ts @@ -34,7 +34,7 @@ test.beforeEach(async ({ page }) => { NoTriggerDataSet.UserPassword, ); }); - +// https://app.qase.io/project/IBF?case=30&previewMode=side&suite=3 test( qase(30, '[No-trigger] No "Alert Threshold Reached" lines are visible'), async ({ page }) => { diff --git a/tests/e2e/tests/Map/AllMapComponentsPresentNotrigger.spec.ts b/tests/e2e/tests/Map/AllMapComponentsPresentNotrigger.spec.ts index 08d45e1ee7..bae95fc963 100644 --- a/tests/e2e/tests/Map/AllMapComponentsPresentNotrigger.spec.ts +++ b/tests/e2e/tests/Map/AllMapComponentsPresentNotrigger.spec.ts @@ -33,7 +33,7 @@ test.beforeEach(async ({ page }) => { NoTriggerDataSet.UserPassword, ); }); - +// https://app.qase.io/project/IBF?case=2&previewMode=side&suite=3 test( qase(2, 'All Map elements are present in no-trigger mode'), async ({ page }) => { diff --git a/tests/e2e/tests/Map/AssertAllSelectedCheckboxesLayersArePresent.spec.ts b/tests/e2e/tests/Map/AssertAllSelectedCheckboxesLayersArePresent.spec.ts index af1b75a861..d58e844f31 100644 --- a/tests/e2e/tests/Map/AssertAllSelectedCheckboxesLayersArePresent.spec.ts +++ b/tests/e2e/tests/Map/AssertAllSelectedCheckboxesLayersArePresent.spec.ts @@ -35,7 +35,7 @@ test.beforeEach(async ({ page }) => { NoTriggerDataSet.UserPassword, ); }); - +// https://app.qase.io/project/IBF?case=32&previewMode=side&suite=3 test( qase(32, 'Check if (default) checked checkbox-layers show in map'), async ({ page }) => { diff --git a/tests/e2e/tests/Map/AssertMapFunctionalitiesNotrigger.spec.ts b/tests/e2e/tests/Map/AssertMapFunctionalitiesNotrigger.spec.ts index 8565a8b5e9..b1da139e89 100644 --- a/tests/e2e/tests/Map/AssertMapFunctionalitiesNotrigger.spec.ts +++ b/tests/e2e/tests/Map/AssertMapFunctionalitiesNotrigger.spec.ts @@ -34,7 +34,7 @@ test.beforeEach(async ({ page }) => { NoTriggerDataSet.UserPassword, ); }); - +// https://app.qase.io/project/IBF?case=7&previewMode=side&suite=3 test( qase(7, 'Verify Map functionality for no-triggered mode'), async ({ page }) => { diff --git a/tests/e2e/tests/Map/AssertNoMaxWarningGlofasMarkersVisible.spec.ts b/tests/e2e/tests/Map/AssertNoMaxWarningGlofasMarkersVisible.spec.ts index c7560c9086..b901d59b41 100644 --- a/tests/e2e/tests/Map/AssertNoMaxWarningGlofasMarkersVisible.spec.ts +++ b/tests/e2e/tests/Map/AssertNoMaxWarningGlofasMarkersVisible.spec.ts @@ -34,7 +34,7 @@ test.beforeEach(async ({ page }) => { NoTriggerDataSet.UserPassword, ); }); - +// https://app.qase.io/project/IBF?case=31&previewMode=side&suite=3 test( qase( 31, diff --git a/tests/e2e/tests/Map/DefaultMarkersVisibleFloodsTrigger.spec.ts b/tests/e2e/tests/Map/DefaultMarkersVisibleFloodsTrigger.spec.ts index 74f69a452b..6aec51d1c6 100644 --- a/tests/e2e/tests/Map/DefaultMarkersVisibleFloodsTrigger.spec.ts +++ b/tests/e2e/tests/Map/DefaultMarkersVisibleFloodsTrigger.spec.ts @@ -31,7 +31,7 @@ test.beforeEach(async ({ page }) => { await page.goto('/'); await loginPage.login(TriggerDataSet.UserMail, TriggerDataSet.UserPassword); }); - +// https://app.qase.io/project/IBF?case=38&previewMode=side&suite=3 test( qase( 38, diff --git a/tests/e2e/tests/Map/GlofasStationsVisibleNoTrigger.spec.ts b/tests/e2e/tests/Map/GlofasStationsVisibleNoTrigger.spec.ts index 4f5b999796..77ca2f4393 100644 --- a/tests/e2e/tests/Map/GlofasStationsVisibleNoTrigger.spec.ts +++ b/tests/e2e/tests/Map/GlofasStationsVisibleNoTrigger.spec.ts @@ -34,7 +34,7 @@ test.beforeEach(async ({ page }) => { NoTriggerDataSet.UserPassword, ); }); - +// https://app.qase.io/project/IBF?case=28&previewMode=side&suite=3 test( qase( 28, diff --git a/tests/e2e/tests/Timeline/TimelineComponentPresentNotrigger.spec.ts b/tests/e2e/tests/Timeline/TimelineComponentPresentNotrigger.spec.ts index f5dfaf317e..ca10e333ec 100644 --- a/tests/e2e/tests/Timeline/TimelineComponentPresentNotrigger.spec.ts +++ b/tests/e2e/tests/Timeline/TimelineComponentPresentNotrigger.spec.ts @@ -33,7 +33,7 @@ test.beforeEach(async ({ page }) => { NoTriggerDataSet.UserPassword, ); }); - +// https://app.qase.io/project/IBF?case=15&previewMode=side&suite=9 test(qase(15, 'Timeline present in no trigger mode'), async ({ page }) => { const dashboard = new DashboardPage(page); const userState = new UserStateComponent(page); diff --git a/tests/e2e/tests/Timeline/TimelineInactiveInNotrigger.spec.ts b/tests/e2e/tests/Timeline/TimelineInactiveInNotrigger.spec.ts index b04df880cf..9b1d1fa3a5 100644 --- a/tests/e2e/tests/Timeline/TimelineInactiveInNotrigger.spec.ts +++ b/tests/e2e/tests/Timeline/TimelineInactiveInNotrigger.spec.ts @@ -33,7 +33,7 @@ test.beforeEach(async ({ page }) => { NoTriggerDataSet.UserPassword, ); }); - +// https://app.qase.io/project/IBF?case=14&previewMode=side&suite=9 test( qase(14, 'Timeline is deactivated in no-trigger mode'), async ({ page }) => { diff --git a/tests/e2e/tests/UserState/AllUserStateComponentsPresentNotrigger.spec.ts b/tests/e2e/tests/UserState/AllUserStateComponentsPresentNotrigger.spec.ts index 2d7582dd7a..0f20ce9bda 100644 --- a/tests/e2e/tests/UserState/AllUserStateComponentsPresentNotrigger.spec.ts +++ b/tests/e2e/tests/UserState/AllUserStateComponentsPresentNotrigger.spec.ts @@ -32,7 +32,7 @@ test.beforeEach(async ({ page }) => { NoTriggerDataSet.UserPassword, ); }); - +// https://app.qase.io/project/IBF?case=3&previewMode=side&suite=4 test( qase(3, 'All User State elements are present in no-trigger mode'), async ({ page }) => { diff --git a/tests/e2e/tests/UserState/SuccessfullyLogOut.spec.ts b/tests/e2e/tests/UserState/SuccessfullyLogOut.spec.ts index 3848aec161..002719b889 100644 --- a/tests/e2e/tests/UserState/SuccessfullyLogOut.spec.ts +++ b/tests/e2e/tests/UserState/SuccessfullyLogOut.spec.ts @@ -32,8 +32,8 @@ test.beforeEach(async ({ page }) => { NoTriggerDataSet.UserPassword, ); }); - -test(qase(8, 'Log out from IBF-system'), async ({ page }) => { +// https://app.qase.io/project/IBF?case=8&previewMode=side&suite=4 +test(qase(4, 'Log out from IBF-system'), async ({ page }) => { const loginPage = new LoginPage(page); const dashboard = new DashboardPage(page); const userState = new UserStateComponent(page);