Skip to content

Commit 0cd071c

Browse files
author
Bc. Jakub Hejda
committed
build: update Angular to v17
1 parent dc23a8b commit 0cd071c

File tree

74 files changed

+17667
-23720
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+17667
-23720
lines changed

.env

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Nx 18 enables using plugins to infer targets by default
2+
# This is disabled for existing workspaces to maintain compatibility
3+
# For more info, see: https://nx.dev/concepts/inferred-tasks
4+
NX_ADD_PLUGINS=false

apps/admin-gui-e2e/cypress.config.ts

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { defineConfig } from 'cypress';
22
import { nxE2EPreset } from '@nx/cypress/plugins/cypress-preset';
33

44
export default defineConfig({
5+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
56
e2e: {
67
...nxE2EPreset(__filename),
78
fileServerFolder: '.',

apps/admin-gui-e2e/project.json

-3
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@
1919
},
2020
"lint": {
2121
"executor": "@nx/eslint:lint",
22-
"options": {
23-
"lintFilePatterns": ["apps/admin-gui-e2e/**/*.{js,ts}"]
24-
},
2522
"outputs": ["{options.outputFile}"]
2623
}
2724
},

apps/admin-gui-e2e/src/e2e/admin/perun-admin.cy.js

+69-65
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ describe('Perun admin management with role Perun admin', () => {
3434
it('test attribute detail', () => {
3535
cy.get('[data-cy=filter-input]')
3636
.type(dbAttrFriendlyName, {force: true})
37-
.get(`[data-cy=${dbAttrFriendlyName.toLowerCase()}-friendly-name]`)
37+
cy.get(`[data-cy=${dbAttrFriendlyName.toLowerCase()}-friendly-name]`)
3838
.click()
39-
.get('[data-cy=display-name-input]')
39+
cy.get('[data-cy=display-name-input]')
4040
.should('have.value', dbAttrFriendlyName);
4141
});
4242

@@ -47,39 +47,39 @@ describe('Perun admin management with role Perun admin', () => {
4747
.as('getAttributesDefinition')
4848
.get('[data-cy=new-attr-definition-button]')
4949
.click({force: true})
50-
.get('[data-cy=attribute-entity-input]')
50+
cy.get('[data-cy=attribute-entity-input]')
5151
.click()
52-
.get('mat-option')
52+
cy.get('mat-option')
5353
.contains('facility')
5454
.click()
55-
.get('[data-cy=attribute-value-type-input]')
55+
cy.get('[data-cy=attribute-value-type-input]')
5656
.click()
57-
.get('mat-option')
57+
cy.get('mat-option')
5858
.contains('Integer')
5959
.click()
60-
.get('[data-cy=attribute-definition-type-input]')
60+
cy.get('[data-cy=attribute-definition-type-input]')
6161
.click()
62-
.get('mat-option')
62+
cy.get('mat-option')
6363
.contains('def')
6464
.click()
65-
.get('[data-cy=attribute-friendly-name-input]')
65+
cy.get('[data-cy=attribute-friendly-name-input]')
6666
.type('testAttrE2E', {force: true})
67-
.get('[data-cy=attribute-display-name-input]')
67+
cy.get('[data-cy=attribute-display-name-input]')
6868
.type('testAttrE2E', {force: true})
69-
.get('[data-cy=attribute-description-input]')
69+
cy.get('[data-cy=attribute-description-input]')
7070
.type('test attribute for E2E tests', {force: true})
71-
.get('[data-cy=checkbox-read-operation]')
71+
cy.get('[data-cy=checkbox-read-operation]')
7272
.click()
73-
.get('[data-cy=checkbox-read-critical]')
73+
cy.get('[data-cy=checkbox-read-critical]')
7474
.click()
75-
.get('[data-cy=create-attr-definition-button]')
75+
cy.get('[data-cy=create-attr-definition-button]')
7676
.click()
77-
.wait('@createAttribute')
77+
cy.wait('@createAttribute')
7878
.wait('@getAttributesDefinition')
7979
// assert that attribute exists
8080
.get('[data-cy=filter-input]')
8181
.type('testAttrE2E', {force: true})
82-
.get('[data-cy=testattre2e-checkbox]')
82+
cy.get('[data-cy=testattre2e-checkbox]')
8383
.should('exist');
8484
});
8585

@@ -90,13 +90,13 @@ describe('Perun admin management with role Perun admin', () => {
9090
.as('getAttributesDefinition')
9191
.get('[data-cy=filter-input]')
9292
.type('e2eTestAttrFromDb', {force: true})
93-
.get('[data-cy=e2e-test-attr-from-db-checkbox]')
93+
cy.get('[data-cy=e2e-test-attr-from-db-checkbox]')
9494
.click()
95-
.get('[data-cy=delete-attr-definition-button]')
95+
cy.get('[data-cy=delete-attr-definition-button]')
9696
.click()
97-
.get('[data-cy=confirm-delete-attr-definition-button]')
97+
cy.get('[data-cy=confirm-delete-attr-definition-button]')
9898
.click()
99-
.wait('@deleteAttributes')
99+
cy.wait('@deleteAttributes')
100100
.wait('@getAttributesDefinition')
101101
// assert that attribute doesn't exist
102102
.get(`[data-cy=e2e-test-attr-from-db-checkbox]`)
@@ -111,21 +111,23 @@ describe('Perun admin management with role Perun admin', () => {
111111
.as('getUserById')
112112
.get('[data-cy=users]')
113113
.click()
114-
.get('[data-cy=filter-input]')
114+
cy.get('[data-cy=filter-input]')
115115
.type('test5', {force: true})
116-
.intercept('**/usersManager/getUsersPage')
116+
cy.intercept('**/usersManager/getUsersPage')
117117
.as('getUsers')
118118
.wait('@getUsers')
119119
.get('[data-cy=test5-td]')
120120
.click({force: true})
121-
.get('[data-cy=edit-user-button]')
121+
cy.get('[data-cy=edit-user-button]')
122122
.click({force: true})
123-
.get('[data-cy=user-first-name-input]')
123+
cy.get('[data-cy=user-first-name-input]')
124+
.as('firstNameInput')
124125
.clear()
126+
cy.get('@firstNameInput')
125127
.type('Test555', {force: true})
126-
.get('[data-cy=user-save-button]')
128+
cy.get('[data-cy=user-save-button]')
127129
.click()
128-
.wait('@updateUser')
130+
cy.wait('@updateUser')
129131
.wait('@getUserById')
130132
// assert that the name changed
131133
.get('[data-cy=user-name-link]')
@@ -145,18 +147,18 @@ describe('Perun admin management with role Perun admin', () => {
145147
.as('getServices')
146148
.get('[data-cy=service-create-button]')
147149
.click({force: true})
148-
.get('[data-cy=service-name-input]')
150+
cy.get('[data-cy=service-name-input]')
149151
.type('e2e_test_service', {force: true})
150-
.get('[data-cy=service-description-input]')
152+
cy.get('[data-cy=service-description-input]')
151153
.type('testing service', {force: true})
152-
.get('[data-cy=service-create-edit-dialog-button]')
154+
cy.get('[data-cy=service-create-edit-dialog-button]')
153155
.click()
154-
.wait('@createService')
156+
cy.wait('@createService')
155157
.wait('@getServices')
156158
// assert that service exists
157159
.get('[data-cy=filter-input]')
158160
.type('e2e_test_service', {force: true})
159-
.get('[data-cy=e2e_test_service-checkbox]')
161+
cy.get('[data-cy=e2e_test_service-checkbox]')
160162
.should('exist');
161163
});
162164

@@ -167,13 +169,13 @@ describe('Perun admin management with role Perun admin', () => {
167169
.as('getServices')
168170
.get('[data-cy=filter-input]')
169171
.type(dbServiceName, {force: true})
170-
.get(`[data-cy=${dbServiceName.toLowerCase()}-checkbox]`)
172+
cy.get(`[data-cy=${dbServiceName.toLowerCase()}-checkbox]`)
171173
.click()
172-
.get('[data-cy=service-delete-button]')
174+
cy.get('[data-cy=service-delete-button]')
173175
.click({force: true})
174-
.get('[data-cy=delete-button-dialog]')
176+
cy.get('[data-cy=delete-button-dialog]')
175177
.click()
176-
.wait('@deleteService')
178+
cy.wait('@deleteService')
177179
.wait('@getServices')
178180
// assert that service doesn't exist
179181
.get(`[data-cy=${dbServiceName.toLowerCase()}-checkbox]`)
@@ -187,16 +189,18 @@ describe('Perun admin management with role Perun admin', () => {
187189
.as('getServiceById')
188190
.get('[data-cy=filter-input]')
189191
.type(dbServiceName2, {force: true})
190-
.get(`[data-cy=${dbServiceName2.toLowerCase()}-name-td]`)
192+
cy.get(`[data-cy=${dbServiceName2.toLowerCase()}-name-td]`)
191193
.click()
192-
.get('[data-cy=service-edit-button]')
194+
cy.get('[data-cy=service-edit-button]')
193195
.click({force: true})
194-
.get('[data-cy=service-name-input]')
196+
cy.get('[data-cy=service-name-input]')
197+
.as('serviceNameInput')
195198
.clear()
199+
cy.get('@serviceNameInput')
196200
.type(dbServiceName2 + 'edit', {force: true})
197-
.get('[data-cy=service-create-edit-dialog-button]')
201+
cy.get('[data-cy=service-create-edit-dialog-button]')
198202
.click()
199-
.wait('@updateService')
203+
cy.wait('@updateService')
200204
.wait('@getServiceById')
201205
// assert that service is renamed
202206
.get(`[data-cy=service-name-link]`)
@@ -213,7 +217,7 @@ describe('Perun admin management with role Perun admin', () => {
213217
it("test get blocked login", () => {
214218
cy.get('[data-cy=filter-input]')
215219
.type(dbBlockedLoginListOnly, {force: true})
216-
.get(`[data-cy=${dbBlockedLoginListOnly}-checkbox]`)
220+
cy.get(`[data-cy=${dbBlockedLoginListOnly}-checkbox]`)
217221
.should('exist');
218222
})
219223

@@ -224,16 +228,16 @@ describe('Perun admin management with role Perun admin', () => {
224228
.as('getBlockedLogins')
225229
.get('[data-cy=block-logins-button]')
226230
.click({force: true})
227-
.get('[data-cy=logins-input]')
231+
cy.get('[data-cy=logins-input]')
228232
.type(loginToBlock, {force: true})
229-
.get('[data-cy=submit-blocked-logins-button]')
233+
cy.get('[data-cy=submit-blocked-logins-button]')
230234
.click()
231-
.wait('@blockLogin')
235+
cy.wait('@blockLogin')
232236
.wait('@getBlockedLogins')
233237
// assert that the login is listed as blocked
234-
.get('[data-cy=filter-input]')
238+
cy.get('[data-cy=filter-input]')
235239
.type(loginToBlock, {force: true})
236-
.get(`[data-cy=${loginToBlock}-checkbox]`)
240+
cy.get(`[data-cy=${loginToBlock}-checkbox]`)
237241
.should('exist');
238242
});
239243

@@ -244,13 +248,13 @@ describe('Perun admin management with role Perun admin', () => {
244248
.as('getBlockedLogins')
245249
.get('[data-cy=filter-input]')
246250
.type(dbBlockedLogin, {force: true})
247-
.get(`[data-cy=${dbBlockedLogin}-checkbox]`)
251+
cy.get(`[data-cy=${dbBlockedLogin}-checkbox]`)
248252
.click()
249-
.get('[data-cy=unblock-logins-button]')
253+
cy.get('[data-cy=unblock-logins-button]')
250254
.click({force: true})
251-
.get('[data-cy=unblock-button-dialog]')
255+
cy.get('[data-cy=unblock-button-dialog]')
252256
.click()
253-
.wait('@unblockLogins')
257+
cy.wait('@unblockLogins')
254258
.wait('@getBlockedLogins')
255259
// assert that the login is no longer listed as blocked
256260
.get(`[data-cy=${dbBlockedLogin}-checkbox]`)
@@ -261,57 +265,57 @@ describe('Perun admin management with role Perun admin', () => {
261265
it('test list ext sources', () => {
262266
cy.get('[data-cy=external-sources]')
263267
.click()
264-
.get('[data-cy=filter-input]')
268+
cy.get('[data-cy=filter-input]')
265269
.type(dbExtSourceName, {force: true})
266-
.get(`[data-cy=${dbExtSourceName.toLowerCase()}-name-td]`)
270+
cy.get(`[data-cy=${dbExtSourceName.toLowerCase()}-name-td]`)
267271
.should('exist');
268272
});
269273

270274
it('test audit message detail', () => {
271275
cy.get('[data-cy=audit-log]')
272276
.click()
273-
.get(`[data-cy=audit-message-detail-button]`)
277+
cy.get(`[data-cy=audit-message-detail-button]`)
274278
.first()
275279
.click({force: true})
276-
.get('#mat-tab-label-0-1') // click on Message tab
280+
cy.get('#mat-tab-label-0-1') // click on Message tab
277281
.click()
278-
.get(`[data-cy=audit-message-text]`)
282+
cy.get(`[data-cy=audit-message-text]`)
279283
.should('not.be.empty');
280284
});
281285

282286
it('test list consent hubs', () => {
283287
cy.get('[data-cy=consent-hubs]')
284288
.click()
285-
.get('[data-cy=filter-input]')
289+
cy.get('[data-cy=filter-input]')
286290
.type(dbConsentHubName, {force: true})
287-
.get(`[data-cy=${dbConsentHubName.toLowerCase()}-name-td]`)
291+
cy.get(`[data-cy=${dbConsentHubName.toLowerCase()}-name-td]`)
288292
.should('exist');
289293
});
290294

291295
it('test search attribute', () => {
292296
cy.get('[data-cy=searcher]')
293297
.click()
294-
.get(`[data-cy=filter-input]`)
298+
cy.get(`[data-cy=filter-input]`)
295299
.type(dbSearcherAttrValue, {force: true})
296-
.get(`[data-cy=search-select-input]`)
300+
cy.get(`[data-cy=search-select-input]`)
297301
.click()
298-
.get('[data-cy=find-input] > div > div > input')
302+
cy.get('[data-cy=find-input] > div > div > input')
299303
.type(dbSearcherAttrDisplayName, {force: true})
300-
.get('mat-option')
304+
cy.get('mat-option')
301305
.contains(dbSearcherAttrDisplayName)
302306
.click()
303-
.get('[data-cy=searcher-search-button]')
307+
cy.get('[data-cy=searcher-search-button]')
304308
.click()
305-
.get(`[data-cy=${dbSearcherUserFirstName.toLowerCase()}-firstName-td]`)
309+
cy.get(`[data-cy=${dbSearcherUserFirstName.toLowerCase()}-firstName-td]`)
306310
.should('exist');
307311
});
308312

309313
it('test list owners', () => {
310314
cy.get('[data-cy=owners]')
311315
.click()
312-
.get('[data-cy=filter-input]')
316+
cy.get('[data-cy=filter-input]')
313317
.type(dbOwnerName, {force: true})
314-
.get(`[data-cy=${dbOwnerName}]`)
318+
cy.get(`[data-cy=${dbOwnerName}]`)
315319
.should('exist');
316320
});
317321
});

0 commit comments

Comments
 (0)