-
Notifications
You must be signed in to change notification settings - Fork 0
/
version-no-retry.spec.ts
60 lines (52 loc) · 1.7 KB
/
version-no-retry.spec.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
import { expect, test } from '@playwright/test';
import {
createTemporalClient,
getWorkflowHandle,
} from '../utils/temporal';
import { EppPage } from './page-objects/epp-page';
import { setupClientAndScheduleStores, setupTemporal, trashTemporal } from '../utils/setup-temporal';
test.describe('version no retry', () => {
const name = 'version-no-retry';
const {
minioClient,
scheduleIds,
scheduleHandles,
workflowIds,
} = setupClientAndScheduleStores();
test.beforeEach(async () => {
const {
scheduleId,
scheduleHandle,
workflowId,
} = await setupTemporal({
name,
s3Client: minioClient,
duration: '1 minute',
docMapThreshold: 1,
});
scheduleIds[name] = scheduleId;
scheduleHandles[name] = scheduleHandle;
workflowIds[name] = workflowId;
});
test.afterEach(async () => {
await trashTemporal({
name,
s3Client: minioClient,
scheduleId: scheduleIds[name],
});
});
test('version 2 and 3 are published, even if no retryable error triggered for version 1', async ({ page }) => {
const workflowHandle = getWorkflowHandle(workflowIds[name], await createTemporalClient());
await expect(async () => {
const workflowStatus = await workflowHandle.describe().then((wf) => wf.status.name);
expect(workflowStatus).toBe('COMPLETED');
}).toPass();
const eppPage = new EppPage(page, name);
await eppPage.gotoArticlePage({ version: 2 });
await eppPage.reloadAndAssertStatus(200);
await eppPage.gotoArticlePage({ version: 3 });
await eppPage.reloadAndAssertStatus(200);
await eppPage.gotoArticlePage({ version: 1 });
await eppPage.reloadAndAssertStatus(404);
});
});