Skip to content

Commit

Permalink
move nodesApi initialize and delete
Browse files Browse the repository at this point in the history
  • Loading branch information
azakrzewski-hy committed Dec 19, 2023
1 parent 771f3b3 commit af83219
Showing 1 changed file with 2 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ test.describe('Create file from template', () => {
await nodesApiAction.createContent(templates, `Data Dictionary/Node Templates`);
await nodesApiAction.removeUserAccessOnNodeTemplate(restrictedTemplateFolder);
fileLink = (await nodesApiAction.createLinkToFileName(template2InRoot, await nodesApiAction.getNodeTemplatesFolderId())).entry.name;
nodesApi = await NodesApi.initialize(username, username);
} catch (error) {
console.error(`Main beforeAll failed: ${error}`);
}
Expand Down Expand Up @@ -137,16 +138,13 @@ test.describe('Create file from template', () => {
template1InRoot,
template2InRoot
]);
await nodesApi.deleteCurrentUserNodes();
} catch (error) {
console.error(`Main afterAll failed: ${error}`);
}
});

test.describe('Personal Files page', () => {
test.beforeAll(async () => {
nodesApi = await NodesApi.initialize(username, username);
});

test.beforeEach(async ({ personalFiles }) => {
try {
selectFileTemplateDialog = personalFiles.contentNodeSelector;
Expand All @@ -159,14 +157,6 @@ test.describe('Create file from template', () => {
}
});

test.afterAll(async () => {
try {
await nodesApi.deleteCurrentUserNodes();
} catch (error) {
console.error(`Personal Files page, afterAll failed: ${error}`);
}
});

test.describe('Select Template dialog', () => {
test('[C325043] Select template - dialog UI - with existing templates', async () => {
await expect.soft(selectFileTemplateDialog.getDialogTitle(selectDialogTitle)).toBeVisible();
Expand Down

0 comments on commit af83219

Please sign in to comment.