Skip to content

Commit

Permalink
applying shorten expression
Browse files Browse the repository at this point in the history
  • Loading branch information
azakrzewski-hy committed Nov 7, 2023
1 parent 6a92c97 commit e0e334d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ test.describe('Create file from template', () => {
});
});

test.describe('Folder created from template on Personal Files Libraries', () => {
test.describe('File created from template on Personal Files Libraries', () => {
const randomLibraryName = `playwright-library-${Utils.random()}`;

test.beforeAll(async ({ sitesApiAction, nodesApiAction }) => {
Expand Down
8 changes: 2 additions & 6 deletions projects/aca-playwright-shared/src/api/nodes-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -356,9 +356,7 @@ export class NodesApi {
}

async createLinkToFileName(originalFileName: string, originalFileParentId: string, destinationParentId?: string): Promise<NodeEntry> {
if (!destinationParentId) {
destinationParentId = originalFileParentId;
}
destinationParentId = destinationParentId ?? originalFileParentId;

try {
const nodeId = await this.getNodeIdFromParent(originalFileName, originalFileParentId);
Expand All @@ -371,9 +369,7 @@ export class NodesApi {
}

async createLinkToFolderName(originalFolderName: string, originalFolderParentId: string, destinationParentId?: string): Promise<NodeEntry> {
if (!destinationParentId) {
destinationParentId = originalFolderParentId;
}
destinationParentId = destinationParentId ?? originalFolderParentId;

try {
const nodeId = await this.getNodeIdFromParent(originalFolderName, originalFolderParentId);
Expand Down

0 comments on commit e0e334d

Please sign in to comment.