Skip to content

Commit e72e4c8

Browse files
committed
chore: merge branch 'develop' for apihub release 1.5.0
2 parents 9302de9 + 0662f0e commit e72e4c8

File tree

492 files changed

+4025
-11419
lines changed

Some content is hidden

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

492 files changed

+4025
-11419
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"name": "@netcracker/qubership-apihub-ui-tests",
33
"version": "2.36.1-dev.0",
44
"license": "Apache-2.0",
5+
"type": "module",
56
"scripts": {
67
"html-report": "playwright show-report reports/playwright",
78
"debug": "playwright test --project=Portal --debug",

playwright.config.ts

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,3 @@
1-
/**
2-
* Copyright 2024-2025 NetCracker Technology Corporation
3-
*
4-
* Licensed under the Apache License, Version 2.0 (the "License");
5-
* you may not use this file except in compliance with the License.
6-
* You may obtain a copy of the License at
7-
*
8-
* http://www.apache.org/licenses/LICENSE-2.0
9-
*
10-
* Unless required by applicable law or agreed to in writing, software
11-
* distributed under the License is distributed on an "AS IS" BASIS,
12-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
* See the License for the specific language governing permissions and
14-
* limitations under the License.
15-
*/
16-
171
import type { Fixtures } from '@fixtures'
182
import { defineConfig, devices } from '@playwright/test'
193
import 'dotenv/config'
@@ -23,7 +7,6 @@ import process from 'node:process'
237
* Read environment variables from file.
248
* https://github.com/motdotla/dotenv
259
*/
26-
// require('dotenv').config();
2710

2811
/**
2912
* See https://playwright.dev/docs/test-configuration.
@@ -61,7 +44,7 @@ export default defineConfig<Fixtures>({
6144
['list'],
6245
['./src/services/custom-reporter/CustomReporter.ts', { reportType: 'apihub-styled-html' }],
6346
],
64-
globalSetup: require.resolve('./src/tests/global-setup'),
47+
globalSetup: './src/tests/global-setup.ts',
6548
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
6649
use: {
6750
/* Maximum time each action such as `click()` can take. Defaults to 0 (no limit). */

src/fixtures/fixtures.ts

Lines changed: 11 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,10 @@
1-
/**
2-
* Copyright 2024-2025 NetCracker Technology Corporation
3-
*
4-
* Licensed under the Apache License, Version 2.0 (the "License");
5-
* you may not use this file except in compliance with the License.
6-
* You may obtain a copy of the License at
7-
*
8-
* http://www.apache.org/licenses/LICENSE-2.0
9-
*
10-
* Unless required by applicable law or agreed to in writing, software
11-
* distributed under the License is distributed on an "AS IS" BASIS,
12-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
* See the License for the specific language governing permissions and
14-
* limitations under the License.
15-
*/
16-
171
/* eslint-disable no-empty-pattern */
182
import { type Page, test as base } from '@playwright/test'
19-
import { getAuthDataFromStorageStateFile } from '@services/auth'
20-
import { SS_SYSADMIN_PATH, SS_USER1_PATH } from '@services/storage-state'
21-
import { createRest, type Rest } from '@services/rest'
22-
import {
23-
type AgentTestDataManager,
24-
type ApihubTestDataManager,
25-
createAgentTDM,
26-
createApihubTDM,
27-
createUsersTDM,
28-
type UsersTestDataManager,
29-
} from '@services/test-data-manager'
30-
import { BASE_ORIGIN } from '@test-setup'
3+
import { createRestWithCredentials, type Rest } from '@services/rest'
4+
import { type AgentTestDataManager, type ApihubTestDataManager, createAgentTDM, createApihubTDM, createUsersTDM, type UsersTestDataManager } from '@services/test-data-manager'
5+
import { BASE_URL } from '@test-setup'
6+
import { SYSADMIN, TEST_USER_1 } from '@test-data'
7+
import { createUserStorageStateWithAuthCookieFromApi } from '@services/storage-state/save'
318

329
export type Fixtures = {
3310

@@ -45,23 +22,22 @@ export type Fixtures = {
4522
export const test = base.extend<Fixtures>({
4623

4724
restApihub: async ({}, use) => {
48-
const authData = await getAuthDataFromStorageStateFile(SS_SYSADMIN_PATH)
49-
const rest = await createRest(BASE_ORIGIN, authData.token)
25+
const rest = await createRestWithCredentials(BASE_URL, SYSADMIN)
5026
await use(rest)
5127
},
5228

5329
usersTDM: async ({}, use) => {
54-
const creator = await createUsersTDM(SS_SYSADMIN_PATH)
30+
const creator = await createUsersTDM(SYSADMIN)
5531
await use(creator)
5632
},
5733

5834
apihubTDM: async ({}, use) => {
59-
const creator = await createApihubTDM(SS_SYSADMIN_PATH)
35+
const creator = await createApihubTDM(SYSADMIN)
6036
await use(creator)
6137
},
6238

6339
apihubTdmLongTimeout: async ({}, use) => {
64-
const creator = await createApihubTDM(SS_SYSADMIN_PATH, 600000)
40+
const creator = await createApihubTDM(SYSADMIN, 600000)
6541
await use(creator)
6642
},
6743

@@ -71,14 +47,14 @@ export const test = base.extend<Fixtures>({
7147
},
7248

7349
sysadminPage: async ({ browser }, use) => {
74-
const context = await browser.newContext({ storageState: SS_SYSADMIN_PATH })
50+
const context = await browser.newContext({ storageState: await createUserStorageStateWithAuthCookieFromApi(SYSADMIN) })
7551
const page = await context.newPage()
7652
await use(page)
7753
await context.close()
7854
},
7955

8056
user1Page: async ({ browser }, use) => {
81-
const context = await browser.newContext({ storageState: SS_USER1_PATH })
57+
const context = await browser.newContext({ storageState: await createUserStorageStateWithAuthCookieFromApi(TEST_USER_1) })
8258
const page = await context.newPage()
8359
await use(page)
8460
await context.close()

src/fixtures/index.ts

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1 @@
1-
/**
2-
* Copyright 2024-2025 NetCracker Technology Corporation
3-
*
4-
* Licensed under the Apache License, Version 2.0 (the "License");
5-
* you may not use this file except in compliance with the License.
6-
* You may obtain a copy of the License at
7-
*
8-
* http://www.apache.org/licenses/LICENSE-2.0
9-
*
10-
* Unless required by applicable law or agreed to in writing, software
11-
* distributed under the License is distributed on an "AS IS" BASIS,
12-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
* See the License for the specific language governing permissions and
14-
* limitations under the License.
15-
*/
16-
171
export * from './fixtures'

src/packages/agent/entities/configs.ts

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,3 @@
1-
/**
2-
* Copyright 2024-2025 NetCracker Technology Corporation
3-
*
4-
* Licensed under the Apache License, Version 2.0 (the "License");
5-
* you may not use this file except in compliance with the License.
6-
* You may obtain a copy of the License at
7-
*
8-
* http://www.apache.org/licenses/LICENSE-2.0
9-
*
10-
* Unless required by applicable law or agreed to in writing, software
11-
* distributed under the License is distributed on an "AS IS" BASIS,
12-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
* See the License for the specific language governing permissions and
14-
* limitations under the License.
15-
*/
16-
171
import type { AgentVersionStatusTitles } from './statuses'
182

193
export interface SnapshotConfig {
Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1 @@
1-
/**
2-
* Copyright 2024-2025 NetCracker Technology Corporation
3-
*
4-
* Licensed under the Apache License, Version 2.0 (the "License");
5-
* you may not use this file except in compliance with the License.
6-
* You may obtain a copy of the License at
7-
*
8-
* http://www.apache.org/licenses/LICENSE-2.0
9-
*
10-
* Unless required by applicable law or agreed to in writing, software
11-
* distributed under the License is distributed on an "AS IS" BASIS,
12-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
* See the License for the specific language governing permissions and
14-
* limitations under the License.
15-
*/
16-
171
export const NO_PREVIOUS_VERSION_OPTION = '[ No previous version ]'

src/packages/agent/entities/filters.ts

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,3 @@
1-
/**
2-
* Copyright 2024-2025 NetCracker Technology Corporation
3-
*
4-
* Licensed under the Apache License, Version 2.0 (the "License");
5-
* you may not use this file except in compliance with the License.
6-
* You may obtain a copy of the License at
7-
*
8-
* http://www.apache.org/licenses/LICENSE-2.0
9-
*
10-
* Unless required by applicable law or agreed to in writing, software
11-
* distributed under the License is distributed on an "AS IS" BASIS,
12-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
* See the License for the specific language governing permissions and
14-
* limitations under the License.
15-
*/
16-
171
export const BWC_ERRORS_FILTER = 'bwc-errors'
182
export const NO_BWC_ERRORS_FILTER = 'no-bwc-errors'
193
export const NO_BASELINE_FILTER = 'no-baseline'

src/packages/agent/entities/index.ts

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,3 @@
1-
/**
2-
* Copyright 2024-2025 NetCracker Technology Corporation
3-
*
4-
* Licensed under the Apache License, Version 2.0 (the "License");
5-
* you may not use this file except in compliance with the License.
6-
* You may obtain a copy of the License at
7-
*
8-
* http://www.apache.org/licenses/LICENSE-2.0
9-
*
10-
* Unless required by applicable law or agreed to in writing, software
11-
* distributed under the License is distributed on an "AS IS" BASIS,
12-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
* See the License for the specific language governing permissions and
14-
* limitations under the License.
15-
*/
16-
171
export * from './configs'
182
export * from './consts'
193
export * from './filters'

src/packages/agent/entities/messages.ts

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,3 @@
1-
/**
2-
* Copyright 2024-2025 NetCracker Technology Corporation
3-
*
4-
* Licensed under the Apache License, Version 2.0 (the "License");
5-
* you may not use this file except in compliance with the License.
6-
* You may obtain a copy of the License at
7-
*
8-
* http://www.apache.org/licenses/LICENSE-2.0
9-
*
10-
* Unless required by applicable law or agreed to in writing, software
11-
* distributed under the License is distributed on an "AS IS" BASIS,
12-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
* See the License for the specific language governing permissions and
14-
* limitations under the License.
15-
*/
16-
171
export const COMPLETE_PUBLISH_STATUS = 'Published successfully'
182
export const ERROR_PUBLISH_STATUS = 'Publication failed'
193

src/packages/agent/entities/statuses.ts

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,3 @@
1-
/**
2-
* Copyright 2024-2025 NetCracker Technology Corporation
3-
*
4-
* Licensed under the Apache License, Version 2.0 (the "License");
5-
* you may not use this file except in compliance with the License.
6-
* You may obtain a copy of the License at
7-
*
8-
* http://www.apache.org/licenses/LICENSE-2.0
9-
*
10-
* Unless required by applicable law or agreed to in writing, software
11-
* distributed under the License is distributed on an "AS IS" BASIS,
12-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
* See the License for the specific language governing permissions and
14-
* limitations under the License.
15-
*/
16-
171
import type {
182
DRAFT_VERSION_STATUS,
193
DRAFT_VERSION_STATUS_TITLE,

0 commit comments

Comments
 (0)