Changed beforeEach, small 'random' cleanup (#3728)

This commit is contained in:
Katarzyna Kita
2024-03-25 11:51:38 +01:00
committed by GitHub
parent 0d6ca1a356
commit b44beeb877
3 changed files with 5 additions and 16 deletions

View File

@@ -138,18 +138,8 @@ test.describe('Library actions ', () => {
}); });
test.beforeEach(async ({ loginPage, myLibrariesPage }) => { test.beforeEach(async ({ loginPage, myLibrariesPage }) => {
try { await Utils.tryLoginUser(loginPage, username2, username2, 'beforeEach failed');
await loginPage.loginUser(
{ username: username2, password: username2 },
{
withNavigation: true,
waitForLoading: true
}
);
await myLibrariesPage.navigate(); await myLibrariesPage.navigate();
} catch (error) {
console.error(`Main beforeEach failed : ${error}`);
}
}); });
test.afterAll(async () => { test.afterAll(async () => {

View File

@@ -30,9 +30,8 @@ test.describe('Search Results - General', () => {
let nodesApi: NodesApi; let nodesApi: NodesApi;
let sitesApi: SitesApi; let sitesApi: SitesApi;
const username = `user1-${Utils.random()}`;
const random = Utils.random(); const random = Utils.random();
const username = `user1-${random}`;
const file = `test-file-${random}.txt`; const file = `test-file-${random}.txt`;
const folder = `test-folder-${random}`; const folder = `test-folder-${random}`;
const site = `test-site-${random}`; const site = `test-site-${random}`;

View File

@@ -42,9 +42,9 @@ test.describe('Search Results - General', () => {
let sitesAdminApi: SitesApi; let sitesAdminApi: SitesApi;
let fileActionsApi: FileActionsApi; let fileActionsApi: FileActionsApi;
const username = `user-${Utils.random()}`;
const random = Utils.random(); const random = Utils.random();
const randomDescription = Utils.random() + '-' + Utils.random(); const username = `user-${random}`;
const randomDescription = random + '-' + random;
const site1 = { const site1 = {
name: `lib-${random}-1`, name: `lib-${random}-1`,