Skip to content

Commit

Permalink
fix: functional tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Mohamed-Hacene committed Mar 21, 2024
1 parent b05ef7d commit 1ef6bf6
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions frontend/tests/utils/test-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ export class TestContent {
dependency: vars.referenceControl.library,
build: {
reference_control: {
value: vars.referenceControl.name,
value: 'Global/' + vars.referenceControl.name,
category: vars.referenceControl.category,
request: {
url: 'reference-controls'
Expand All @@ -452,7 +452,7 @@ export class TestContent {
},
editParams: {
reference_control: {
value: vars.referenceControl2.name,
value: 'Global/' + vars.referenceControl2.name,
category: vars.referenceControl2.category,
request: {
url: 'reference-controls'
Expand Down Expand Up @@ -541,8 +541,8 @@ export class TestContent {
description: vars.description,
risk_assessment: `${vars.projectName}/${vars.riskAssessmentName}`,
threats: [
vars.threat.name,
vars.threat2.name
'Global/' + vars.threat.name,
'Global/' + vars.threat2.name
]
},
editParams: {
Expand Down Expand Up @@ -635,8 +635,8 @@ export function userFromUserGroupHasPermission(userGroup: string, permission: st
}

export function getObjectNameWithoutScope(name: string) {
const matches = name.match(/(?:\[[^\[\]]+\])+ (.+)/);
return matches ? matches[1] : name;
const scopeList = name.split('/');
return scopeList[scopeList.length - 1];
}

export { test as baseTest, type Page, type Locator } from '@playwright/test';

0 comments on commit 1ef6bf6

Please sign in to comment.