Skip to content

Commit 378865e

Browse files
authored
test: add flaky test annotations for outdated notification tests (#22)
The Outdated Revision notification dialog sometimes doesn't appear immediately when switching tabs, which is a known flaky behavior. This commit adds annotations to mark the affected tests as flaky, ensuring better tracking and awareness of the issue.
1 parent ee8a106 commit 378865e

File tree

4 files changed

+70
-22
lines changed

4 files changed

+70
-22
lines changed

src/test-setup/annotations.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export const OUTDATED_NOTIFICATION_FLAKY_TEST_ANNOTATION = 'Sometimes the Outdated Revision notification dialog doesn\'t appear immediately when switching tabs, although by design it should appear instantly upon tab switching'

src/test-setup/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
export * from './annotations'
12
export * from './process'
23
export * from './timeouts'
34
export * from './urls'

src/tests/portal/13-revisions/13.1.1.2-package-revisions-notification.spec.ts

Lines changed: 34 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { test } from '@fixtures'
22
import { expect } from '@services/expect-decorator'
33
import { PortalPage } from '@portal/pages/PortalPage'
4-
import { SHORT_EXPECT, SHORT_TIMEOUT, TICKET_BASE_URL } from '@test-setup'
4+
import { OUTDATED_NOTIFICATION_FLAKY_TEST_ANNOTATION, SHORT_EXPECT, SHORT_TIMEOUT, TICKET_BASE_URL } from '@test-setup'
55
import { VERSION_OPERATIONS_TAB_REST } from '@portal/entities'
66
import { PK_REV_VAR, V_P_PKG_REV_1_N } from '@test-data/portal'
77

@@ -16,8 +16,11 @@ test.describe('13.1.1.2 Package revisions (Outdated revision notification)', ()
1616

1717
test('[P-COPR-3.1] Outdated revision notification on the "Operations" tab',
1818
{
19-
tag: '@smoke',
20-
annotation: { type: 'Test Case', description: `${TICKET_BASE_URL}TestCase-A-8412` },
19+
tag: ['@smoke', '@flaky'],
20+
annotation: [
21+
{ type: 'Test Case', description: `${TICKET_BASE_URL}TestCase-A-8412` },
22+
{ type: 'Flaky', description: OUTDATED_NOTIFICATION_FLAKY_TEST_ANNOTATION },
23+
],
2124
},
2225
async ({ sysadminPage: page, apihubTDM }) => {
2326

@@ -60,9 +63,12 @@ test.describe('13.1.1.2 Package revisions (Outdated revision notification)', ()
6063

6164
test.skip('[P-COPR-3.2] Outdated revision notification on the "API Changes" tab',
6265
{
66+
tag: ['@flaky'],
6367
annotation: [
6468
{ type: 'Test Case', description: `${TICKET_BASE_URL}TestCase-A-8412` },
65-
{ type: 'Issue', description: `${TICKET_BASE_URL}TestCase-B-977` }],
69+
{ type: 'Issue', description: `${TICKET_BASE_URL}TestCase-B-977` },
70+
{ type: 'Flaky', description: OUTDATED_NOTIFICATION_FLAKY_TEST_ANNOTATION },
71+
],
6672
},
6773
async ({ sysadminPage: page, apihubTDM }) => {
6874

@@ -105,9 +111,12 @@ test.describe('13.1.1.2 Package revisions (Outdated revision notification)', ()
105111

106112
test.skip('[P-COPR-3.3] Outdated revision notification on the "Deprecated" tab',
107113
{
114+
tag: ['@flaky'],
108115
annotation: [
109116
{ type: 'Test Case', description: `${TICKET_BASE_URL}TestCase-A-8412` },
110-
{ type: 'Issue', description: `${TICKET_BASE_URL}TestCase-B-976` }],
117+
{ type: 'Issue', description: `${TICKET_BASE_URL}TestCase-B-976` },
118+
{ type: 'Flaky', description: OUTDATED_NOTIFICATION_FLAKY_TEST_ANNOTATION },
119+
],
111120
},
112121
async ({ sysadminPage: page, apihubTDM }) => {
113122

@@ -150,7 +159,11 @@ test.describe('13.1.1.2 Package revisions (Outdated revision notification)', ()
150159

151160
test('[P-COPR-3.4] Outdated revision notification on the "Documents" tab',
152161
{
153-
annotation: { type: 'Test Case', description: `${TICKET_BASE_URL}TestCase-A-8412` },
162+
tag: ['@flaky'],
163+
annotation: [
164+
{ type: 'Test Case', description: `${TICKET_BASE_URL}TestCase-A-8412` },
165+
{ type: 'Flaky', description: OUTDATED_NOTIFICATION_FLAKY_TEST_ANNOTATION },
166+
],
154167
},
155168
async ({ sysadminPage: page, apihubTDM }) => {
156169

@@ -193,7 +206,11 @@ test.describe('13.1.1.2 Package revisions (Outdated revision notification)', ()
193206

194207
test('[P-COPR-3.5] Outdated revision notification on the "Overview" tab',
195208
{
196-
annotation: { type: 'Test Case', description: `${TICKET_BASE_URL}TestCase-A-8412` },
209+
tag: ['@flaky'],
210+
annotation: [
211+
{ type: 'Test Case', description: `${TICKET_BASE_URL}TestCase-A-8412` },
212+
{ type: 'Flaky', description: OUTDATED_NOTIFICATION_FLAKY_TEST_ANNOTATION },
213+
],
197214
},
198215
async ({ sysadminPage: page, apihubTDM }) => {
199216

@@ -246,8 +263,11 @@ test.describe('13.1.1.2 Package revisions (Outdated revision notification)', ()
246263

247264
test('[P-COPR-3.6] Outdated revision notification on the "Settings" page',
248265
{
249-
tag: '@smoke',
250-
annotation: { type: 'Test Case', description: `${TICKET_BASE_URL}TestCase-A-8412` },
266+
tag: ['@smoke', '@flaky'],
267+
annotation: [
268+
{ type: 'Test Case', description: `${TICKET_BASE_URL}TestCase-A-8412` },
269+
{ type: 'Flaky', description: OUTDATED_NOTIFICATION_FLAKY_TEST_ANNOTATION },
270+
],
251271
},
252272
async ({ sysadminPage: page, apihubTDM }) => {
253273

@@ -272,8 +292,11 @@ test.describe('13.1.1.2 Package revisions (Outdated revision notification)', ()
272292

273293
test('[P-COPR-3.7] Outdated revision notification on the "Comparison" page',
274294
{
275-
tag: '@smoke',
276-
annotation: { type: 'Test Case', description: `${TICKET_BASE_URL}TestCase-A-8412` },
295+
tag: ['@smoke', '@flaky'],
296+
annotation: [
297+
{ type: 'Test Case', description: `${TICKET_BASE_URL}TestCase-A-8412` },
298+
{ type: 'Flaky', description: OUTDATED_NOTIFICATION_FLAKY_TEST_ANNOTATION },
299+
],
277300
},
278301
async ({ sysadminPage: page, apihubTDM }) => {
279302

src/tests/portal/13-revisions/13.1.2.2-dashboard-revisions-notification.spec.ts

Lines changed: 34 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { test } from '@fixtures'
22
import { expect } from '@services/expect-decorator'
33
import { PortalPage } from '@portal/pages/PortalPage'
4-
import { SHORT_EXPECT, SHORT_TIMEOUT, TICKET_BASE_URL } from '@test-setup'
4+
import { OUTDATED_NOTIFICATION_FLAKY_TEST_ANNOTATION, SHORT_EXPECT, SHORT_TIMEOUT, TICKET_BASE_URL } from '@test-setup'
55
import { VERSION_OPERATIONS_TAB_REST } from '@portal/entities'
66
import { D_REV_VAR, V_P_DSH_REV_1_N } from '@test-data/portal'
77

@@ -12,8 +12,11 @@ test.describe('13.1.2.2 Dashboard revisions (Outdated revision notification)', (
1212

1313
test('[P-CODR-3.1] Outdated revision notification on the "Operations" tab',
1414
{
15-
tag: '@smoke',
16-
annotation: { type: 'Test Case', description: `${TICKET_BASE_URL}TestCase-A-8423` },
15+
tag: ['@smoke', '@flaky'],
16+
annotation: [
17+
{ type: 'Test Case', description: `${TICKET_BASE_URL}TestCase-A-8423` },
18+
{ type: 'Flaky', description: OUTDATED_NOTIFICATION_FLAKY_TEST_ANNOTATION },
19+
],
1720
},
1821
async ({ sysadminPage: page, apihubTDM }) => {
1922

@@ -56,9 +59,12 @@ test.describe('13.1.2.2 Dashboard revisions (Outdated revision notification)', (
5659

5760
test.skip('[P-CODR-3.2] Outdated revision notification on the "API Changes" tab',
5861
{
62+
tag: ['@flaky'],
5963
annotation: [
6064
{ type: 'Test Case', description: `${TICKET_BASE_URL}TestCase-A-8423` },
61-
{ type: 'Issue', description: `${TICKET_BASE_URL}TestCase-B-977` }],
65+
{ type: 'Issue', description: `${TICKET_BASE_URL}TestCase-B-977` },
66+
{ type: 'Flaky', description: OUTDATED_NOTIFICATION_FLAKY_TEST_ANNOTATION },
67+
],
6268
},
6369
async ({ sysadminPage: page, apihubTDM }) => {
6470

@@ -101,9 +107,12 @@ test.describe('13.1.2.2 Dashboard revisions (Outdated revision notification)', (
101107

102108
test.skip('[P-CODR-3.3] Outdated revision notification on the "Deprecated" tab',
103109
{
110+
tag: ['@flaky'],
104111
annotation: [
105112
{ type: 'Test Case', description: `${TICKET_BASE_URL}TestCase-A-8423` },
106-
{ type: 'Issue', description: `${TICKET_BASE_URL}TestCase-B-976` }],
113+
{ type: 'Issue', description: `${TICKET_BASE_URL}TestCase-B-976` },
114+
{ type: 'Flaky', description: OUTDATED_NOTIFICATION_FLAKY_TEST_ANNOTATION },
115+
],
107116
},
108117
async ({ sysadminPage: page, apihubTDM }) => {
109118

@@ -146,7 +155,11 @@ test.describe('13.1.2.2 Dashboard revisions (Outdated revision notification)', (
146155

147156
test('[P-CODR-3.4] Outdated revision notification on the "Documents" tab',
148157
{
149-
annotation: { type: 'Test Case', description: `${TICKET_BASE_URL}TestCase-A-8423` },
158+
tag: ['@flaky'],
159+
annotation: [
160+
{ type: 'Test Case', description: `${TICKET_BASE_URL}TestCase-A-8423` },
161+
{ type: 'Flaky', description: OUTDATED_NOTIFICATION_FLAKY_TEST_ANNOTATION },
162+
],
150163
},
151164
async ({ sysadminPage: page, apihubTDM }) => {
152165

@@ -189,7 +202,11 @@ test.describe('13.1.2.2 Dashboard revisions (Outdated revision notification)', (
189202

190203
test('[P-CODR-3.5] Outdated revision notification on the "Overview" tab',
191204
{
192-
annotation: { type: 'Test Case', description: `${TICKET_BASE_URL}TestCase-A-8423` },
205+
tag: ['@flaky'],
206+
annotation: [
207+
{ type: 'Test Case', description: `${TICKET_BASE_URL}TestCase-A-8423` },
208+
{ type: 'Flaky', description: OUTDATED_NOTIFICATION_FLAKY_TEST_ANNOTATION },
209+
],
193210
},
194211
async ({ sysadminPage: page, apihubTDM }) => {
195212

@@ -242,8 +259,11 @@ test.describe('13.1.2.2 Dashboard revisions (Outdated revision notification)', (
242259

243260
test('[P-CODR-3.6] Outdated revision notification on the "Settings" page',
244261
{
245-
tag: '@smoke',
246-
annotation: { type: 'Test Case', description: `${TICKET_BASE_URL}TestCase-A-8423` },
262+
tag: ['@smoke', '@flaky'],
263+
annotation: [
264+
{ type: 'Test Case', description: `${TICKET_BASE_URL}TestCase-A-8423` },
265+
{ type: 'Flaky', description: OUTDATED_NOTIFICATION_FLAKY_TEST_ANNOTATION },
266+
],
247267
},
248268
async ({ sysadminPage: page, apihubTDM }) => {
249269

@@ -268,8 +288,11 @@ test.describe('13.1.2.2 Dashboard revisions (Outdated revision notification)', (
268288

269289
test('[P-CODR-3.7] Outdated revision notification on the "Comparison" page',
270290
{
271-
tag: '@smoke',
272-
annotation: { type: 'Test Case', description: `${TICKET_BASE_URL}TestCase-A-8423` },
291+
tag: ['@smoke', '@flaky'],
292+
annotation: [
293+
{ type: 'Test Case', description: `${TICKET_BASE_URL}TestCase-A-8423` },
294+
{ type: 'Flaky', description: OUTDATED_NOTIFICATION_FLAKY_TEST_ANNOTATION },
295+
],
273296
},
274297
async ({ sysadminPage: page, apihubTDM }) => {
275298

0 commit comments

Comments
 (0)