mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-31 17:38:28 +00:00
e2e api enhancements (part 1) (#1727)
* add typings, deprecate username wrapper * improve imports * unify admin actions for people * remove auth api wrapper * remove unused apis * remove unused apis * use admin api actions everywhere
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { SITE_VISIBILITY, LoginPage, BrowsingPage, Utils, RepoClient } from '@alfresco/aca-testing-shared';
|
||||
import { AdminActions, SITE_VISIBILITY, LoginPage, BrowsingPage, Utils, RepoClient } from '@alfresco/aca-testing-shared';
|
||||
|
||||
describe('Recent Files', () => {
|
||||
const username = `user-${Utils.random()}`;
|
||||
@@ -41,16 +41,16 @@ describe('Recent Files', () => {
|
||||
const fileSite = `file-${Utils.random()}.txt`;
|
||||
|
||||
const apis = {
|
||||
admin: new RepoClient(),
|
||||
user: new RepoClient(username, username)
|
||||
};
|
||||
|
||||
const loginPage = new LoginPage();
|
||||
const page = new BrowsingPage();
|
||||
const { dataTable, breadcrumb } = page;
|
||||
const adminApiActions = new AdminActions();
|
||||
|
||||
beforeAll(async (done) => {
|
||||
await apis.admin.people.createUser({ username });
|
||||
await adminApiActions.createUser({ username });
|
||||
folderId = (await apis.user.nodes.createFolders([folderName])).entry.id;
|
||||
await apis.user.nodes.createFiles([fileName1], folderName);
|
||||
file2Id = (await apis.user.nodes.createFiles([fileName2])).entry.id;
|
||||
|
Reference in New Issue
Block a user