mirror of
https://github.com/velocitatem/PHANTOM.git
synced 2026-05-31 16:43:36 +00:00
feat: integration of pipeline hooks into testing
This commit is contained in:
@@ -7,6 +7,7 @@ import {
|
||||
verifySessionConsistency,
|
||||
} from '../helpers/interactions';
|
||||
import { waitForInteractionEvent, countProductViews } from '../helpers/kafka';
|
||||
import { runSurgePricing } from '../helpers/airflow';
|
||||
|
||||
test.describe('SimpleSurgePricer E2E', () => {
|
||||
const STORE_TYPE = 'hotel';
|
||||
@@ -29,7 +30,7 @@ test.describe('SimpleSurgePricer E2E', () => {
|
||||
|
||||
await rapidViewProductViaFlow(page, 5, 200, STORE_TYPE);
|
||||
|
||||
await page.waitForTimeout(2000);
|
||||
await page.waitForTimeout(1000);
|
||||
|
||||
const evt = await waitForInteractionEvent(backendUrl, sessionId, 'view_item_page');
|
||||
expect(evt).not.toBeNull();
|
||||
@@ -37,6 +38,8 @@ test.describe('SimpleSurgePricer E2E', () => {
|
||||
const viewCount = await countProductViews(backendUrl, productId);
|
||||
expect(viewCount).toBeGreaterThanOrEqual(5);
|
||||
|
||||
await runSurgePricing(STORE_TYPE, 3, 1);
|
||||
|
||||
await page.goto(`/products/${productId}`);
|
||||
await page.waitForLoadState('networkidle');
|
||||
const surgedPrice = await getPriceFromDOM(page);
|
||||
@@ -72,7 +75,9 @@ test.describe('SimpleSurgePricer E2E', () => {
|
||||
|
||||
await rapidViewProductViaFlow(page, 5, 150, STORE_TYPE);
|
||||
|
||||
await page.waitForTimeout(1500);
|
||||
await page.waitForTimeout(1000);
|
||||
|
||||
await runSurgePricing(STORE_TYPE, 3, 1);
|
||||
|
||||
await page.goto(`/products/${productId}`);
|
||||
await page.waitForLoadState('networkidle');
|
||||
@@ -81,6 +86,8 @@ test.describe('SimpleSurgePricer E2E', () => {
|
||||
|
||||
await page.waitForTimeout(12000);
|
||||
|
||||
await runSurgePricing(STORE_TYPE, 3, 1);
|
||||
|
||||
await page.goto(`/products/${productId}`);
|
||||
await page.waitForLoadState('networkidle');
|
||||
const decayedPrice = await getPriceFromDOM(page);
|
||||
|
||||
Reference in New Issue
Block a user