1
1
import { test , expect } from '@playwright/test' ;
2
+ import { plugins } from '../../support/testData/dynamic-plugins-info' ;
2
3
3
- const plugins = [
4
- {
5
- name : 'backstage-plugin-catalog-backend-module-github-dynamic' ,
6
- version : '0.4.4' ,
7
- platform : 'node' ,
8
- role : 'backend-plugin-module' ,
9
- } ,
10
- {
11
- name : 'backstage-plugin-catalog-backend-module-github-org-dynamic' ,
12
- version : '0.1.0' ,
13
- platform : 'node' ,
14
- role : 'backend-plugin-module' ,
15
- } ,
16
- {
17
- name : 'backstage-plugin-github-actions' ,
18
- version : '0.6.6' ,
19
- role : 'frontend-plugin' ,
20
- platform : 'web' ,
21
- } ,
22
- {
23
- name : 'backstage-plugin-github-issues' ,
24
- version : '0.2.14' ,
25
- role : 'frontend-plugin' ,
26
- platform : 'web' ,
27
- } ,
28
- {
29
- name : 'backstage-plugin-kubernetes-backend-dynamic' ,
30
- version : '0.13.0' ,
31
- platform : 'node' ,
32
- role : 'backend-plugin-module' ,
33
- } ,
34
- {
35
- name : 'roadiehq-scaffolder-backend-module-utils-dynamic' ,
36
- version : '1.10.4' ,
37
- platform : 'node' ,
38
- role : 'backend-plugin-module' ,
39
- } ,
40
- {
41
- name : '@janus-idp/backstage-plugin-keycloak-backend-dynamic' ,
42
- version : '1.7.9' ,
43
- platform : 'node' ,
44
- role : 'backend-plugin-module' ,
45
- } ,
46
- {
47
- name : '@janus-idp/backstage-plugin-ocm' ,
48
- version : '3.5.9' ,
49
- role : 'frontend-plugin' ,
50
- platform : 'web' ,
51
- } ,
52
- {
53
- name : '@janus-idp/backstage-plugin-ocm-backend-dynamic' ,
54
- version : '3.4.10' ,
55
- platform : 'node' ,
56
- role : 'backend-plugin' ,
57
- } ,
58
- {
59
- name : '@janus-idp/backstage-plugin-quay' ,
60
- version : '1.4.16' ,
61
- role : 'frontend-plugin' ,
62
- platform : 'web' ,
63
- } ,
64
- {
65
- name : '@janus-idp/backstage-scaffolder-backend-module-quay-dynamic' ,
66
- version : '1.2.4' ,
67
- platform : 'node' ,
68
- role : 'backend-plugin-module' ,
69
- } ,
70
- {
71
- name : '@janus-idp/backstage-scaffolder-backend-module-regex-dynamic' ,
72
- version : '1.2.4' ,
73
- platform : 'node' ,
74
- role : 'backend-plugin-module' ,
75
- } ,
76
- {
77
- name : 'roadiehq-backstage-plugin-github-pull-requests' ,
78
- version : '2.5.18' ,
79
- role : 'frontend-plugin' ,
80
- platform : 'web' ,
81
- } ,
82
- ] ;
83
-
84
- test . describe . skip ( 'dynamic-plugins-info backend plugin' , ( ) => {
4
+ test . describe ( 'dynamic-plugins-info backend plugin' , ( ) => {
85
5
test ( 'should lists all the dynamic plugins installed' , async ( {
86
6
request,
87
7
} ) => {
@@ -90,6 +10,15 @@ test.describe.skip('dynamic-plugins-info backend plugin', () => {
90
10
) ;
91
11
const body = await response . json ( ) ;
92
12
93
- expect ( body ) . toEqual ( expect . arrayContaining ( plugins ) ) ;
13
+ for ( const plugin of plugins ) {
14
+ const isPluginIncluded = body . find (
15
+ resPlugin =>
16
+ resPlugin . name === plugin . name &&
17
+ resPlugin . role === plugin . role &&
18
+ resPlugin . platform === plugin . platform ,
19
+ ) ;
20
+
21
+ expect ( isPluginIncluded ) . toBeTruthy ( ) ;
22
+ }
94
23
} ) ;
95
24
} ) ;
0 commit comments