Try latest ACS com to see if e2e are passing (#1248)

* use latest ACS com

* add workaround for REPO-4772

* due to the workaround done for REPO-4772, files now have an initial version set to MAJOR 1.0

* add workaround for REPO-4772 for bulk create files

* Get ACS log if something goes wrong

* wait for the dialog to close only in specific cases

* Import Custom Model into ACS. Update proxy to work with Share.
This commit is contained in:
Martin Muller 2019-11-18 18:08:32 +01:00 committed by GitHub
parent fd71e2daf4
commit b228ca2f64
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
22 changed files with 301 additions and 142 deletions

View File

@ -45,3 +45,8 @@ jobs:
script: npm run build.e2e && SUITE="--suite sharingContent" npm run e2e:docker script: npm run build.e2e && SUITE="--suite sharingContent" npm run e2e:docker
- name: Test Suite viewContent&metadata&extensions - name: Test Suite viewContent&metadata&extensions
script: npm run build.e2e && SUITE="--suite viewer,infoDrawer,extensions" npm run e2e:docker script: npm run build.e2e && SUITE="--suite viewer,infoDrawer,extensions" npm run e2e:docker
after_failure:
- alfrescoContainerId=$(docker ps -a | grep 'alfresco-content-repository-community' | awk '{print $1}')
- docker logs $alfrescoContainerId > alfresco.log
- cat alfresco.log

View File

@ -3,7 +3,7 @@ npm run build.e2e -- --base-href ./
node -e " node -e "
const fs = require('fs'); const fs = require('fs');
const config = require('./dist/app/app.config.json'); const config = require('./dist/app/app.config.json');
config.baseShareUrl = 'http://localhost:4000/content-app/#/preview/s/'; config.baseShareUrl = 'http://localhost:8080/content-app/#/preview/s/';
fs.writeFileSync( fs.writeFileSync(
'./dist/app/app.config.json', './dist/app/app.config.json',
JSON.stringify(config, null, 2) JSON.stringify(config, null, 2)

View File

@ -64,7 +64,8 @@
"denysvuika", "denysvuika",
"submenu", "submenu",
"submenus", "submenus",
"dateitem" "dateitem",
"versionable"
], ],
"dictionaries": ["html", "en-gb", "en_US"] "dictionaries": ["html", "en-gb", "en_US"]
} }

View File

@ -190,7 +190,7 @@ services:
- alfresco - alfresco
- share - share
ports: ports:
- 4000:80 - 8080:8080
auth: auth:
image: jboss/keycloak:4.8.3.Final image: jboss/keycloak:4.8.3.Final

View File

@ -2,10 +2,10 @@ version: '2'
services: services:
alfresco: alfresco:
image: alfresco/alfresco-content-repository-community:6.1.2-ga image: alfresco/alfresco-content-repository-community:latest
mem_limit: 1500m mem_limit: 1500m
depends_on: volumes:
- postgres - ./docker/acs-cm:/usr/local/tomcat/shared/classes/alfresco/extension
environment: environment:
JAVA_OPTS: ' JAVA_OPTS: '
-Ddb.driver=org.postgresql.Driver -Ddb.driver=org.postgresql.Driver
@ -17,51 +17,92 @@ services:
-Dsolr.secureComms=none -Dsolr.secureComms=none
-Dsolr.base.url=/solr -Dsolr.base.url=/solr
-Dindex.subsystem.name=solr6 -Dindex.subsystem.name=solr6
-Dshare.host=localhost -Dshare.host=127.0.0.1
-Dshare.port=8080
-Dalfresco.host=localhost
-Dalfresco.port=8080 -Dalfresco.port=8080
-Daos.baseUrlOverwrite=http://localhost:8080/alfresco/aos -Daos.baseUrlOverwrite=http://localhost:8080/alfresco/aos
-Dmessaging.broker.url="failover:(nio://activemq:61616)?timeout=3000&jms.useCompression=true" -Dmessaging.broker.url="failover:(nio://activemq:61616)?timeout=3000&jms.useCompression=true"
-Ddeployment.method=DOCKER_COMPOSE -Ddeployment.method=DOCKER_COMPOSE
-Dlocal.transform.service.enabled=true
-DlocalTransform.pdfrenderer.url=http://alfresco-pdf-renderer:8090/
-DlocalTransform.imagemagick.url=http://imagemagick:8090/
-DlocalTransform.libreoffice.url=http://libreoffice:8090/
-DlocalTransform.tika.url=http://tika:8090/
-DlocalTransform.misc.url=http://transform-misc:8090/
-Dlegacy.transform.service.enabled=true
-Dalfresco-pdf-renderer.url=http://alfresco-pdf-renderer:8090/
-Djodconverter.url=http://libreoffice:8090/
-Dimg.url=http://imagemagick:8090/
-Dtika.url=http://tika:8090/
-Dtransform.misc.url=http://transform-misc:8090/
-Dcsrf.filter.enabled=false -Dcsrf.filter.enabled=false
-Xms1g -Xmx1g -Xms1500m -Xmx1500m
' '
networks:
- internal alfresco-pdf-renderer:
image: alfresco/alfresco-pdf-renderer:2.1.0
mem_limit: 1g
environment:
JAVA_OPTS: ' -Xms256m -Xmx512m'
ports: ports:
- 8080:8080 #Browser port - 8090:8090
imagemagick:
image: alfresco/alfresco-imagemagick:2.1.0
mem_limit: 1g
environment:
JAVA_OPTS: ' -Xms256m -Xmx512m'
ports:
- 8091:8090
libreoffice:
image: alfresco/alfresco-libreoffice:2.1.0
mem_limit: 1g
environment:
JAVA_OPTS: ' -Xms256m -Xmx512m'
ports:
- 8092:8090
tika:
image: alfresco/alfresco-tika:2.1.0
mem_limit: 1g
environment:
JAVA_OPTS: ' -Xms256m -Xmx512m'
ports:
- 8093:8090
transform-misc:
image: alfresco/alfresco-transform-misc:2.1.0
mem_limit: 1g
environment:
JAVA_OPTS: ' -Xms256m -Xmx512m'
ports:
- 8094:8090
share: share:
image: alfresco/alfresco-share:6.1.0-RC3 image: alfresco/alfresco-share:6.2.0
mem_limit: 1g mem_limit: 1g
depends_on: depends_on:
- alfresco - alfresco
environment: environment:
- REPO_HOST=alfresco - REPO_HOST=alfresco
- REPO_PORT=8080 - REPO_PORT=8080
- 'CATALINA_OPTS= -Xms500m -Xmx500m'
networks:
- internal
ports:
- 8083:8080
postgres: postgres:
image: postgres:10.1 image: postgres:11.4
mem_limit: 1500m mem_limit: 512m
environment: environment:
- POSTGRES_PASSWORD=alfresco - POSTGRES_PASSWORD=alfresco
- POSTGRES_USER=alfresco - POSTGRES_USER=alfresco
- POSTGRES_DB=alfresco - POSTGRES_DB=alfresco
command: postgres -c max_connections=300 -c log_min_messages=LOG command: postgres -c max_connections=300 -c log_min_messages=LOG
networks:
- internal
ports: ports:
- 5432:5432 - 5432:5432
solr6: solr6:
image: alfresco/alfresco-search-services:1.3.0-RC2 image: alfresco/alfresco-search-services:1.4.0
mem_limit: 2500m mem_limit: 2g
depends_on:
- alfresco
environment: environment:
#Solr needs to know how to register itself with Alfresco #Solr needs to know how to register itself with Alfresco
- SOLR_ALFRESCO_HOST=alfresco - SOLR_ALFRESCO_HOST=alfresco
@ -71,17 +112,15 @@ services:
- SOLR_SOLR_PORT=8983 - SOLR_SOLR_PORT=8983
#Create the default alfresco and archive cores #Create the default alfresco and archive cores
- SOLR_CREATE_ALFRESCO_DEFAULTS=alfresco,archive - SOLR_CREATE_ALFRESCO_DEFAULTS=alfresco,archive
#HTTP by default
- ALFRESCO_SECURE_COMMS=none
- 'SOLR_JAVA_MEM=-Xms2g -Xmx2g' - 'SOLR_JAVA_MEM=-Xms2g -Xmx2g'
networks:
- internal
ports: ports:
- 8983:8983 #Browser port - 8083:8983 #Browser port
activemq: activemq:
image: alfresco/alfresco-activemq:5.15.6 image: alfresco/alfresco-activemq:5.15.8
mem_limit: 2048m mem_limit: 1g
networks:
- internal
ports: ports:
- 8161:8161 # Web Console - 8161:8161 # Web Console
- 5672:5672 # AMQP - 5672:5672 # AMQP
@ -93,24 +132,19 @@ services:
build: . build: .
depends_on: depends_on:
- alfresco - alfresco
networks:
- internal
ports: ports:
- 4001:8080 - 4001:8080
# volumes:
# - ./app.config.json:/usr/share/nginx/html/app.config.json
# - ./nginx.conf:/etc/nginx/conf.d/default.conf
proxy: proxy:
image: nginx:stable-alpine image: alfresco/acs-community-ngnix:1.0.0
mem_limit: 128m
depends_on: depends_on:
- content-app - alfresco
volumes: volumes:
- ./docker/proxy/nginx.conf:/etc/nginx/conf.d/default.conf - ./docker/proxy/nginx.conf:/etc/nginx/nginx.conf
networks:
- internal
ports: ports:
- 4000:80 - 8080:8080
links:
networks: - alfresco
internal: - share
- content-app

20
docker/acs-cm/Readme.md Normal file
View File

@ -0,0 +1,20 @@
# Custom Node creation instruction
Use the v1 POST node/{nodeId}/children for creating the custom node with a payload like:
```
{
"name":"acme document2.txt",
"nodeType":"acme:document",
"properties": {
"acme:documentId": "DOC001",
"acme:securityClassification":"Public",
"cm:title":"My text"
},
"aspectNames": [
"acme:securityClassified"
]
}
```
Tip: You could use the api explorer with <host-url>/api-explorer/

View File

@ -0,0 +1,13 @@
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
<beans>
<bean id="acme.extension.dictionaryBootstrap"
parent="dictionaryModelBootstrap"
depends-on="dictionaryBootstrap">
<property name="models">
<list>
<value>alfresco/extension/acme-content-model.xml</value>
</list>
</property>
</bean>
</beans>

View File

@ -0,0 +1,66 @@
<?xml version="1.0" encoding="UTF-8"?>
<model name="acme:contentModel" xmlns="http://www.alfresco.org/model/dictionary/1.0">
<description>Sample Document Model</description>
<author>My Name</author>
<version>1.0</version>
<imports>
<import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d"/>
<import uri="http://www.alfresco.org/model/content/1.0" prefix="cm"/>
<import uri="http://www.alfresco.org/model/system/1.0" prefix="sys"/>
</imports>
<namespaces>
<namespace uri="http://www.acme.org/model/content/1.0" prefix="acme"/>
</namespaces>
<constraints>
<constraint name="acme:securityClassificationOptions" type="LIST">
<parameter name="allowedValues">
<list>
<value></value>
<value>Public</value>
<value>Client Confidential</value>
<value>Company Confidential</value>
<value>Strictly Confidential</value>
</list>
</parameter>
</constraint>
</constraints>
<types>
<type name="acme:document">
<title>Sample Document Type</title>
<parent>cm:content</parent>
<properties>
<property name="acme:documentId">
<title>Document Identification Number</title>
<type>d:text</type>
</property>
</properties>
<mandatory-aspects>
<aspect>acme:securityClassified</aspect>
</mandatory-aspects>
</type>
</types>
<aspects>
<aspect name="acme:securityClassified">
<title>ACME Security Classified</title>
<description>Content has been security classified</description>
<properties>
<property name="acme:securityClassification">
<type>d:text</type>
<index enabled="true">
<atomic>true</atomic>
<stored>false</stored>
<tokenised>false</tokenised>
</index>
<constraints>
<constraint ref="acme:securityClassificationOptions"/>
</constraints>
</property>
</properties>
</aspect>
</aspects>
</model>

View File

@ -1,33 +1,44 @@
server { worker_processes 1;
listen *:80;
set $allowOriginSite *; events {
proxy_pass_request_headers on; worker_connections 1024;
proxy_pass_header Set-Cookie; }
access_log off; http {
server {
listen *:8080;
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504; client_max_body_size 0;
proxy_redirect off;
proxy_buffering off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass_header Set-Cookie;
location / { set $allowOriginSite *;
proxy_pass http://content-app:8080; proxy_pass_request_headers on;
} proxy_pass_header Set-Cookie;
location /alfresco/ { # External settings, do not remove
proxy_pass http://alfresco:8080; #ENV_ACCESS_LOG
}
location /api-explorer/ { proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
proxy_pass http://alfresco:8080/api-explorer; proxy_redirect off;
} proxy_buffering off;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass_header Set-Cookie;
location /share/ { location / {
proxy_pass http://share:8080; proxy_pass http://content-app:8080;
}
location /alfresco/ {
proxy_pass http://alfresco:8080;
}
location /api-explorer/ {
proxy_pass http://alfresco:8080/api-explorer/;
}
location /share/ {
proxy_pass http://share:8080;
}
} }
} }

View File

@ -91,7 +91,7 @@ services:
networks: networks:
- internal - internal
ports: ports:
- 4000:80 - 8080:80
networks: networks:
? internal internal:

View File

@ -20,7 +20,7 @@ npm run build
npm run start:docker npm run start:docker
``` ```
The ACA runs on port `4000` when served from within container. The ACA runs on port `8080` when served from within container.
Use the following command to stop all the containers: Use the following command to stop all the containers:

View File

@ -7,7 +7,7 @@ nav: ja
ACA には ACS 6.0 Community 版が事前構成されています。 ACA には ACS 6.0 Community 版が事前構成されています。
アプリケーションは2つのモードで実行されます: アプリケーションは 2 つのモードで実行されます:
- Development (最新のソースコードを実行し、アプリケーションのビルドが必要) - Development (最新のソースコードを実行し、アプリケーションのビルドが必要)
- Preview (最新の公開されたコンテナー、マスターブランチで実行) - Preview (最新の公開されたコンテナー、マスターブランチで実行)
@ -21,7 +21,7 @@ npm run build
npm run start:docker npm run start:docker
``` ```
コンテナ内から提供される場合、ACA は `4000` ポートで実行されます。 コンテナ内から提供される場合、ACA は `8080` ポートで実行されます。
次のコマンドを使用して、すべてのコンテナを停止します: 次のコマンドを使用して、すべてのコンテナを停止します:

View File

@ -100,7 +100,6 @@ export class UploadNewVersionDialog extends Component {
async clickUpload() { async clickUpload() {
await this.uploadButton.click(); await this.uploadButton.click();
await this.waitForDialogToClose();
} }

View File

@ -52,6 +52,8 @@ describe('Upload new version', () => {
const parentFav = `parentFav-${Utils.random()}`; let parentFavId; const parentFav = `parentFav-${Utils.random()}`; let parentFavId;
const parentSearch = `parentSearch-${Utils.random()}`; let parentSearchId; const parentSearch = `parentSearch-${Utils.random()}`; let parentSearchId;
const nameConflictMessage = 'New version not uploaded, another file with the same name already exists';
const file = FILES.pdfFile; let fileId; const file = FILES.pdfFile; let fileId;
const fileToUpload1 = FILES.docxFile; const fileToUpload1 = FILES.docxFile;
const fileToUpload2 = FILES.xlsxFile; const fileToUpload2 = FILES.xlsxFile;
@ -116,7 +118,7 @@ describe('Upload new version', () => {
}); });
afterEach(async (done) => { afterEach(async (done) => {
// await Utils.pressEscape(); await Utils.pressEscape();
await page.refresh(); await page.refresh();
done(); done();
}); });
@ -147,10 +149,11 @@ describe('Upload new version', () => {
await uploadNewVersionDialog.clickMajor(); await uploadNewVersionDialog.clickMajor();
await uploadNewVersionDialog.enterDescription('new major version description'); await uploadNewVersionDialog.enterDescription('new major version description');
await uploadNewVersionDialog.clickUpload(); await uploadNewVersionDialog.clickUpload();
await uploadNewVersionDialog.waitForDialogToClose();
expect(await dataTable.isItemPresent(fileToUpload1)).toBe(true, 'File not updated'); expect(await dataTable.isItemPresent(fileToUpload1)).toBe(true, 'File not updated');
expect(await apis.user.nodes.getFileVersionType(file1Id)).toEqual('MAJOR', 'File has incorrect version type'); expect(await apis.user.nodes.getFileVersionType(file1Id)).toEqual('MAJOR', 'File has incorrect version type');
expect(await apis.user.nodes.getFileVersionLabel(file1Id)).toEqual('1.0', 'File has incorrect version label'); expect(await apis.user.nodes.getFileVersionLabel(file1Id)).toEqual('2.0', 'File has incorrect version label');
}); });
it('file is updated after uploading a new version - minor - [C297546]', async () => { it('file is updated after uploading a new version - minor - [C297546]', async () => {
@ -163,10 +166,11 @@ describe('Upload new version', () => {
await uploadNewVersionDialog.clickMinor(); await uploadNewVersionDialog.clickMinor();
await uploadNewVersionDialog.enterDescription('new minor version description'); await uploadNewVersionDialog.enterDescription('new minor version description');
await uploadNewVersionDialog.clickUpload(); await uploadNewVersionDialog.clickUpload();
await uploadNewVersionDialog.waitForDialogToClose();
expect(await dataTable.isItemPresent(fileToUpload2)).toBe(true, 'File not updated'); expect(await dataTable.isItemPresent(fileToUpload2)).toBe(true, 'File not updated');
expect(await apis.user.nodes.getFileVersionType(file2Id)).toEqual('MINOR', 'File has incorrect version type'); expect(await apis.user.nodes.getFileVersionType(file2Id)).toEqual('MINOR', 'File has incorrect version type');
expect(await apis.user.nodes.getFileVersionLabel(file2Id)).toEqual('0.1', 'File has incorrect version label'); expect(await apis.user.nodes.getFileVersionLabel(file2Id)).toEqual('1.1', 'File has incorrect version label');
}); });
it('file is not updated when clicking Cancel - [C297547]', async () => { it('file is not updated when clicking Cancel - [C297547]', async () => {
@ -181,8 +185,8 @@ describe('Upload new version', () => {
await uploadNewVersionDialog.clickCancel(); await uploadNewVersionDialog.clickCancel();
expect(await dataTable.isItemPresent(file3)).toBe(true, 'File was updated'); expect(await dataTable.isItemPresent(file3)).toBe(true, 'File was updated');
expect(await apis.user.nodes.getFileVersionType(file3Id)).toEqual('', 'File has incorrect version type'); expect(await apis.user.nodes.getFileVersionType(file3Id)).toEqual('MAJOR', 'File has incorrect version type');
expect(await apis.user.nodes.getFileVersionLabel(file3Id)).toEqual('', 'File has incorrect version label'); expect(await apis.user.nodes.getFileVersionLabel(file3Id)).toEqual('1.0', 'File has incorrect version label');
}); });
it('upload new version fails when new file name already exists - [C297548]', async () => { it('upload new version fails when new file name already exists - [C297548]', async () => {
@ -196,11 +200,12 @@ describe('Upload new version', () => {
await uploadNewVersionDialog.enterDescription('new version description'); await uploadNewVersionDialog.enterDescription('new version description');
await uploadNewVersionDialog.clickUpload(); await uploadNewVersionDialog.clickUpload();
await page.refresh(); const message = await page.getSnackBarMessage();
expect(message).toContain(nameConflictMessage);
expect(await dataTable.isItemPresent(file4)).toBe(true, 'File was updated'); expect(await dataTable.isItemPresent(file4)).toBe(true, 'File was updated');
expect(await apis.user.nodes.getFileVersionType(file4Id)).toEqual('', 'File has incorrect version type'); expect(await apis.user.nodes.getFileVersionType(file4Id)).toEqual('MAJOR', 'File has incorrect version type');
expect(await apis.user.nodes.getFileVersionLabel(file4Id)).toEqual('', 'File has incorrect version label'); expect(await apis.user.nodes.getFileVersionLabel(file4Id)).toEqual('1.0', 'File has incorrect version label');
}); });
it('file is unlocked after uploading a new version - [C297549]', async () => { it('file is unlocked after uploading a new version - [C297549]', async () => {
@ -213,11 +218,12 @@ describe('Upload new version', () => {
await uploadNewVersionDialog.clickMinor(); await uploadNewVersionDialog.clickMinor();
await uploadNewVersionDialog.enterDescription('new version description'); await uploadNewVersionDialog.enterDescription('new version description');
await uploadNewVersionDialog.clickUpload(); await uploadNewVersionDialog.clickUpload();
await uploadNewVersionDialog.waitForDialogToClose();
expect(await dataTable.isItemPresent(fileToUpload4)).toBe(true, 'File name was not changed'); expect(await dataTable.isItemPresent(fileToUpload4)).toBe(true, 'File name was not changed');
expect(await apis.user.nodes.isFileLockedWrite(fileLocked1Id)).toBe(false, `${fileLocked1} is still locked`); expect(await apis.user.nodes.isFileLockedWrite(fileLocked1Id)).toBe(false, `${fileLocked1} is still locked`);
expect(await apis.user.nodes.getFileVersionType(fileLocked1Id)).toEqual('MINOR', 'File has incorrect version type'); expect(await apis.user.nodes.getFileVersionType(fileLocked1Id)).toEqual('MINOR', 'File has incorrect version type');
expect(await apis.user.nodes.getFileVersionLabel(fileLocked1Id)).toEqual('0.1', 'File has incorrect version label'); expect(await apis.user.nodes.getFileVersionLabel(fileLocked1Id)).toEqual('1.1', 'File has incorrect version label');
}); });
it('file remains locked after canceling of uploading a new version - [C297550]', async () => { it('file remains locked after canceling of uploading a new version - [C297550]', async () => {
@ -294,10 +300,11 @@ describe('Upload new version', () => {
await uploadNewVersionDialog.clickMajor(); await uploadNewVersionDialog.clickMajor();
await uploadNewVersionDialog.enterDescription('new major version description'); await uploadNewVersionDialog.enterDescription('new major version description');
await uploadNewVersionDialog.clickUpload(); await uploadNewVersionDialog.clickUpload();
await uploadNewVersionDialog.waitForDialogToClose();
expect(await dataTable.isItemPresent(fileToUpload1)).toBe(true, 'File not updated'); expect(await dataTable.isItemPresent(fileToUpload1)).toBe(true, 'File not updated');
expect(await apis.user.nodes.getFileVersionType(file1Id)).toEqual('MAJOR', 'File has incorrect version type'); expect(await apis.user.nodes.getFileVersionType(file1Id)).toEqual('MAJOR', 'File has incorrect version type');
expect(await apis.user.nodes.getFileVersionLabel(file1Id)).toEqual('1.0', 'File has incorrect version label'); expect(await apis.user.nodes.getFileVersionLabel(file1Id)).toEqual('2.0', 'File has incorrect version label');
}); });
it('file is updated after uploading a new version - minor - [C297553]', async () => { it('file is updated after uploading a new version - minor - [C297553]', async () => {
@ -310,10 +317,11 @@ describe('Upload new version', () => {
await uploadNewVersionDialog.clickMinor(); await uploadNewVersionDialog.clickMinor();
await uploadNewVersionDialog.enterDescription('new minor version description'); await uploadNewVersionDialog.enterDescription('new minor version description');
await uploadNewVersionDialog.clickUpload(); await uploadNewVersionDialog.clickUpload();
await uploadNewVersionDialog.waitForDialogToClose();
expect(await dataTable.isItemPresent(fileToUpload2)).toBe(true, 'File not updated'); expect(await dataTable.isItemPresent(fileToUpload2)).toBe(true, 'File not updated');
expect(await apis.user.nodes.getFileVersionType(file2Id)).toEqual('MINOR', 'File has incorrect version type'); expect(await apis.user.nodes.getFileVersionType(file2Id)).toEqual('MINOR', 'File has incorrect version type');
expect(await apis.user.nodes.getFileVersionLabel(file2Id)).toEqual('0.1', 'File has incorrect version label'); expect(await apis.user.nodes.getFileVersionLabel(file2Id)).toEqual('1.1', 'File has incorrect version label');
}); });
it('file is not updated when clicking Cancel - [C297554]', async () => { it('file is not updated when clicking Cancel - [C297554]', async () => {
@ -328,8 +336,8 @@ describe('Upload new version', () => {
await uploadNewVersionDialog.clickCancel(); await uploadNewVersionDialog.clickCancel();
expect(await dataTable.isItemPresent(file3)).toBe(true, 'File was updated'); expect(await dataTable.isItemPresent(file3)).toBe(true, 'File was updated');
expect(await apis.user.nodes.getFileVersionType(file3Id)).toEqual('', 'File has incorrect version type'); expect(await apis.user.nodes.getFileVersionType(file3Id)).toEqual('MAJOR', 'File has incorrect version type');
expect(await apis.user.nodes.getFileVersionLabel(file3Id)).toEqual('', 'File has incorrect version label'); expect(await apis.user.nodes.getFileVersionLabel(file3Id)).toEqual('1.0', 'File has incorrect version label');
}); });
it('upload new version fails when new file name already exists - [C297555]', async () => { it('upload new version fails when new file name already exists - [C297555]', async () => {
@ -343,11 +351,12 @@ describe('Upload new version', () => {
await uploadNewVersionDialog.enterDescription('new version description'); await uploadNewVersionDialog.enterDescription('new version description');
await uploadNewVersionDialog.clickUpload(); await uploadNewVersionDialog.clickUpload();
await page.refresh(); const message = await page.getSnackBarMessage();
expect(message).toContain(nameConflictMessage);
expect(await dataTable.isItemPresent(file4)).toBe(true, 'File was updated'); expect(await dataTable.isItemPresent(file4)).toBe(true, 'File was updated');
expect(await apis.user.nodes.getFileVersionType(file4Id)).toEqual('', 'File has incorrect version type'); expect(await apis.user.nodes.getFileVersionType(file4Id)).toEqual('MAJOR', 'File has incorrect version type');
expect(await apis.user.nodes.getFileVersionLabel(file4Id)).toEqual('', 'File has incorrect version label'); expect(await apis.user.nodes.getFileVersionLabel(file4Id)).toEqual('1.0', 'File has incorrect version label');
}); });
it('file is unlocked after uploading a new version - [C297556]', async () => { it('file is unlocked after uploading a new version - [C297556]', async () => {
@ -360,11 +369,12 @@ describe('Upload new version', () => {
await uploadNewVersionDialog.clickMinor(); await uploadNewVersionDialog.clickMinor();
await uploadNewVersionDialog.enterDescription('new version description'); await uploadNewVersionDialog.enterDescription('new version description');
await uploadNewVersionDialog.clickUpload(); await uploadNewVersionDialog.clickUpload();
await uploadNewVersionDialog.waitForDialogToClose();
expect(await dataTable.isItemPresent(fileToUpload4)).toBe(true, 'File name was not changed'); expect(await dataTable.isItemPresent(fileToUpload4)).toBe(true, 'File name was not changed');
expect(await apis.user.nodes.isFileLockedWrite(fileLocked1Id)).toBe(false, `${fileLocked1} is still locked`); expect(await apis.user.nodes.isFileLockedWrite(fileLocked1Id)).toBe(false, `${fileLocked1} is still locked`);
expect(await apis.user.nodes.getFileVersionType(fileLocked1Id)).toEqual('MINOR', 'File has incorrect version type'); expect(await apis.user.nodes.getFileVersionType(fileLocked1Id)).toEqual('MINOR', 'File has incorrect version type');
expect(await apis.user.nodes.getFileVersionLabel(fileLocked1Id)).toEqual('0.1', 'File has incorrect version label'); expect(await apis.user.nodes.getFileVersionLabel(fileLocked1Id)).toEqual('1.1', 'File has incorrect version label');
}); });
it('file remains locked after canceling of uploading a new version - [C297557]', async () => { it('file remains locked after canceling of uploading a new version - [C297557]', async () => {
@ -440,10 +450,11 @@ describe('Upload new version', () => {
await uploadNewVersionDialog.clickMajor(); await uploadNewVersionDialog.clickMajor();
await uploadNewVersionDialog.enterDescription('new major version description'); await uploadNewVersionDialog.enterDescription('new major version description');
await uploadNewVersionDialog.clickUpload(); await uploadNewVersionDialog.clickUpload();
await uploadNewVersionDialog.waitForDialogToClose();
expect(await dataTable.isItemPresent(fileToUpload1, parentRF)).toBe(true, 'File not updated'); expect(await dataTable.isItemPresent(fileToUpload1, parentRF)).toBe(true, 'File not updated');
expect(await apis.user.nodes.getFileVersionType(file1Id)).toEqual('MAJOR', 'File has incorrect version type'); expect(await apis.user.nodes.getFileVersionType(file1Id)).toEqual('MAJOR', 'File has incorrect version type');
expect(await apis.user.nodes.getFileVersionLabel(file1Id)).toEqual('1.0', 'File has incorrect version label'); expect(await apis.user.nodes.getFileVersionLabel(file1Id)).toEqual('2.0', 'File has incorrect version label');
}); });
it('file is updated after uploading a new version - minor - [C297560]', async () => { it('file is updated after uploading a new version - minor - [C297560]', async () => {
@ -456,10 +467,11 @@ describe('Upload new version', () => {
await uploadNewVersionDialog.clickMinor(); await uploadNewVersionDialog.clickMinor();
await uploadNewVersionDialog.enterDescription('new minor version description'); await uploadNewVersionDialog.enterDescription('new minor version description');
await uploadNewVersionDialog.clickUpload(); await uploadNewVersionDialog.clickUpload();
await uploadNewVersionDialog.waitForDialogToClose();
expect(await dataTable.isItemPresent(fileToUpload2, parentRF)).toBe(true, 'File not updated'); expect(await dataTable.isItemPresent(fileToUpload2, parentRF)).toBe(true, 'File not updated');
expect(await apis.user.nodes.getFileVersionType(file2Id)).toEqual('MINOR', 'File has incorrect version type'); expect(await apis.user.nodes.getFileVersionType(file2Id)).toEqual('MINOR', 'File has incorrect version type');
expect(await apis.user.nodes.getFileVersionLabel(file2Id)).toEqual('0.1', 'File has incorrect version label'); expect(await apis.user.nodes.getFileVersionLabel(file2Id)).toEqual('1.1', 'File has incorrect version label');
}); });
it('file is not updated when clicking Cancel - [C297561]', async () => { it('file is not updated when clicking Cancel - [C297561]', async () => {
@ -474,8 +486,8 @@ describe('Upload new version', () => {
await uploadNewVersionDialog.clickCancel(); await uploadNewVersionDialog.clickCancel();
expect(await dataTable.isItemPresent(file3, parentRF)).toBe(true, 'File was updated'); expect(await dataTable.isItemPresent(file3, parentRF)).toBe(true, 'File was updated');
expect(await apis.user.nodes.getFileVersionType(file3Id)).toEqual('', 'File has incorrect version type'); expect(await apis.user.nodes.getFileVersionType(file3Id)).toEqual('MAJOR', 'File has incorrect version type');
expect(await apis.user.nodes.getFileVersionLabel(file3Id)).toEqual('', 'File has incorrect version label'); expect(await apis.user.nodes.getFileVersionLabel(file3Id)).toEqual('1.0', 'File has incorrect version label');
}); });
it('upload new version fails when new file name already exists - [C297562]', async () => { it('upload new version fails when new file name already exists - [C297562]', async () => {
@ -489,11 +501,12 @@ describe('Upload new version', () => {
await uploadNewVersionDialog.enterDescription('new version description'); await uploadNewVersionDialog.enterDescription('new version description');
await uploadNewVersionDialog.clickUpload(); await uploadNewVersionDialog.clickUpload();
await page.refresh(); const message = await page.getSnackBarMessage();
expect(message).toContain(nameConflictMessage);
expect(await dataTable.isItemPresent(file4, parentRF)).toBe(true, 'File was updated'); expect(await dataTable.isItemPresent(file4, parentRF)).toBe(true, 'File was updated');
expect(await apis.user.nodes.getFileVersionType(file4Id)).toEqual('', 'File has incorrect version type'); expect(await apis.user.nodes.getFileVersionType(file4Id)).toEqual('MAJOR', 'File has incorrect version type');
expect(await apis.user.nodes.getFileVersionLabel(file4Id)).toEqual('', 'File has incorrect version label'); expect(await apis.user.nodes.getFileVersionLabel(file4Id)).toEqual('1.0', 'File has incorrect version label');
}); });
it('file is unlocked after uploading a new version - [C297563]', async () => { it('file is unlocked after uploading a new version - [C297563]', async () => {
@ -506,11 +519,12 @@ describe('Upload new version', () => {
await uploadNewVersionDialog.clickMinor(); await uploadNewVersionDialog.clickMinor();
await uploadNewVersionDialog.enterDescription('new version description'); await uploadNewVersionDialog.enterDescription('new version description');
await uploadNewVersionDialog.clickUpload(); await uploadNewVersionDialog.clickUpload();
await uploadNewVersionDialog.waitForDialogToClose();
expect(await dataTable.isItemPresent(fileToUpload4, parentRF)).toBe(true, 'File name was not changed'); expect(await dataTable.isItemPresent(fileToUpload4, parentRF)).toBe(true, 'File name was not changed');
expect(await apis.user.nodes.isFileLockedWrite(fileLocked1Id)).toBe(false, `${fileLocked1} is still locked`); expect(await apis.user.nodes.isFileLockedWrite(fileLocked1Id)).toBe(false, `${fileLocked1} is still locked`);
expect(await apis.user.nodes.getFileVersionType(fileLocked1Id)).toEqual('MINOR', 'File has incorrect version type'); expect(await apis.user.nodes.getFileVersionType(fileLocked1Id)).toEqual('MINOR', 'File has incorrect version type');
expect(await apis.user.nodes.getFileVersionLabel(fileLocked1Id)).toEqual('0.1', 'File has incorrect version label'); expect(await apis.user.nodes.getFileVersionLabel(fileLocked1Id)).toEqual('1.1', 'File has incorrect version label');
}); });
it('file remains locked after canceling of uploading a new version - [C297564]', async () => { it('file remains locked after canceling of uploading a new version - [C297564]', async () => {
@ -587,10 +601,11 @@ describe('Upload new version', () => {
await uploadNewVersionDialog.clickMajor(); await uploadNewVersionDialog.clickMajor();
await uploadNewVersionDialog.enterDescription('new major version description'); await uploadNewVersionDialog.enterDescription('new major version description');
await uploadNewVersionDialog.clickUpload(); await uploadNewVersionDialog.clickUpload();
await uploadNewVersionDialog.waitForDialogToClose();
expect(await dataTable.isItemPresent(fileToUpload1)).toBe(true, 'File not updated'); expect(await dataTable.isItemPresent(fileToUpload1)).toBe(true, 'File not updated');
expect(await apis.user.nodes.getFileVersionType(file1Id)).toEqual('MAJOR', 'File has incorrect version type'); expect(await apis.user.nodes.getFileVersionType(file1Id)).toEqual('MAJOR', 'File has incorrect version type');
expect(await apis.user.nodes.getFileVersionLabel(file1Id)).toEqual('1.0', 'File has incorrect version label'); expect(await apis.user.nodes.getFileVersionLabel(file1Id)).toEqual('2.0', 'File has incorrect version label');
}); });
it('file is updated after uploading a new version - minor - [C297567]', async () => { it('file is updated after uploading a new version - minor - [C297567]', async () => {
@ -603,10 +618,11 @@ describe('Upload new version', () => {
await uploadNewVersionDialog.clickMinor(); await uploadNewVersionDialog.clickMinor();
await uploadNewVersionDialog.enterDescription('new minor version description'); await uploadNewVersionDialog.enterDescription('new minor version description');
await uploadNewVersionDialog.clickUpload(); await uploadNewVersionDialog.clickUpload();
await uploadNewVersionDialog.waitForDialogToClose();
expect(await dataTable.isItemPresent(fileToUpload2)).toBe(true, 'File not updated'); expect(await dataTable.isItemPresent(fileToUpload2)).toBe(true, 'File not updated');
expect(await apis.user.nodes.getFileVersionType(file2Id)).toEqual('MINOR', 'File has incorrect version type'); expect(await apis.user.nodes.getFileVersionType(file2Id)).toEqual('MINOR', 'File has incorrect version type');
expect(await apis.user.nodes.getFileVersionLabel(file2Id)).toEqual('0.1', 'File has incorrect version label'); expect(await apis.user.nodes.getFileVersionLabel(file2Id)).toEqual('1.1', 'File has incorrect version label');
}); });
it('file is not updated when clicking Cancel - [C297568]', async () => { it('file is not updated when clicking Cancel - [C297568]', async () => {
@ -621,8 +637,8 @@ describe('Upload new version', () => {
await uploadNewVersionDialog.clickCancel(); await uploadNewVersionDialog.clickCancel();
expect(await dataTable.isItemPresent(file3)).toBe(true, 'File was updated'); expect(await dataTable.isItemPresent(file3)).toBe(true, 'File was updated');
expect(await apis.user.nodes.getFileVersionType(file3Id)).toEqual('', 'File has incorrect version type'); expect(await apis.user.nodes.getFileVersionType(file3Id)).toEqual('MAJOR', 'File has incorrect version type');
expect(await apis.user.nodes.getFileVersionLabel(file3Id)).toEqual('', 'File has incorrect version label'); expect(await apis.user.nodes.getFileVersionLabel(file3Id)).toEqual('1.0', 'File has incorrect version label');
}); });
it('upload new version fails when new file name already exists - [C297569]', async () => { it('upload new version fails when new file name already exists - [C297569]', async () => {
@ -636,11 +652,12 @@ describe('Upload new version', () => {
await uploadNewVersionDialog.enterDescription('new version description'); await uploadNewVersionDialog.enterDescription('new version description');
await uploadNewVersionDialog.clickUpload(); await uploadNewVersionDialog.clickUpload();
await page.refresh(); const message = await page.getSnackBarMessage();
expect(message).toContain(nameConflictMessage);
expect(await dataTable.isItemPresent(file4)).toBe(true, 'File was updated'); expect(await dataTable.isItemPresent(file4)).toBe(true, 'File was updated');
expect(await apis.user.nodes.getFileVersionType(file4Id)).toEqual('', 'File has incorrect version type'); expect(await apis.user.nodes.getFileVersionType(file4Id)).toEqual('MAJOR', 'File has incorrect version type');
expect(await apis.user.nodes.getFileVersionLabel(file4Id)).toEqual('', 'File has incorrect version label'); expect(await apis.user.nodes.getFileVersionLabel(file4Id)).toEqual('1.0', 'File has incorrect version label');
}); });
it('file is unlocked after uploading a new version - [C297570]', async () => { it('file is unlocked after uploading a new version - [C297570]', async () => {
@ -653,11 +670,12 @@ describe('Upload new version', () => {
await uploadNewVersionDialog.clickMinor(); await uploadNewVersionDialog.clickMinor();
await uploadNewVersionDialog.enterDescription('new version description'); await uploadNewVersionDialog.enterDescription('new version description');
await uploadNewVersionDialog.clickUpload(); await uploadNewVersionDialog.clickUpload();
await uploadNewVersionDialog.waitForDialogToClose();
expect(await dataTable.isItemPresent(fileToUpload4)).toBe(true, 'File name was not changed'); expect(await dataTable.isItemPresent(fileToUpload4)).toBe(true, 'File name was not changed');
expect(await apis.user.nodes.isFileLockedWrite(fileLocked1Id)).toBe(false, `${fileLocked1} is still locked`); expect(await apis.user.nodes.isFileLockedWrite(fileLocked1Id)).toBe(false, `${fileLocked1} is still locked`);
expect(await apis.user.nodes.getFileVersionType(fileLocked1Id)).toEqual('MINOR', 'File has incorrect version type'); expect(await apis.user.nodes.getFileVersionType(fileLocked1Id)).toEqual('MINOR', 'File has incorrect version type');
expect(await apis.user.nodes.getFileVersionLabel(fileLocked1Id)).toEqual('0.1', 'File has incorrect version label'); expect(await apis.user.nodes.getFileVersionLabel(fileLocked1Id)).toEqual('1.1', 'File has incorrect version label');
}); });
it('file remains locked after canceling of uploading a new version - [C297571]', async () => { it('file remains locked after canceling of uploading a new version - [C297571]', async () => {
@ -738,11 +756,12 @@ describe('Upload new version', () => {
await uploadNewVersionDialog.clickMajor(); await uploadNewVersionDialog.clickMajor();
await uploadNewVersionDialog.enterDescription('new major version description'); await uploadNewVersionDialog.enterDescription('new major version description');
await uploadNewVersionDialog.clickUpload(); await uploadNewVersionDialog.clickUpload();
await uploadNewVersionDialog.waitForDialogToClose();
// TODO: enable when ACA-2329 is fixed // TODO: enable when ACA-2329 is fixed
// expect(await dataTable.isItemPresent(fileToUpload1, parentSearch)).toBe(true, 'File not updated'); // expect(await dataTable.isItemPresent(fileToUpload1, parentSearch)).toBe(true, 'File not updated');
expect(await apis.user.nodes.getFileVersionType(fileSearch1Id)).toEqual('MAJOR', 'File has incorrect version type'); expect(await apis.user.nodes.getFileVersionType(fileSearch1Id)).toEqual('MAJOR', 'File has incorrect version type');
expect(await apis.user.nodes.getFileVersionLabel(fileSearch1Id)).toEqual('1.0', 'File has incorrect version label'); expect(await apis.user.nodes.getFileVersionLabel(fileSearch1Id)).toEqual('2.0', 'File has incorrect version label');
}); });
it('file is updated after uploading a new version - minor - [C307005]', async () => { it('file is updated after uploading a new version - minor - [C307005]', async () => {
@ -759,11 +778,12 @@ describe('Upload new version', () => {
await uploadNewVersionDialog.clickMinor(); await uploadNewVersionDialog.clickMinor();
await uploadNewVersionDialog.enterDescription('new minor version description'); await uploadNewVersionDialog.enterDescription('new minor version description');
await uploadNewVersionDialog.clickUpload(); await uploadNewVersionDialog.clickUpload();
await uploadNewVersionDialog.waitForDialogToClose();
// TODO: enable when ACA-2329 is fixed // TODO: enable when ACA-2329 is fixed
// expect(await dataTable.isItemPresent(fileToUpload2, parentSearch)).toBe(true, 'File not updated'); // expect(await dataTable.isItemPresent(fileToUpload2, parentSearch)).toBe(true, 'File not updated');
expect(await apis.user.nodes.getFileVersionType(fileSearch2Id)).toEqual('MINOR', 'File has incorrect version type'); expect(await apis.user.nodes.getFileVersionType(fileSearch2Id)).toEqual('MINOR', 'File has incorrect version type');
expect(await apis.user.nodes.getFileVersionLabel(fileSearch2Id)).toEqual('0.1', 'File has incorrect version label'); expect(await apis.user.nodes.getFileVersionLabel(fileSearch2Id)).toEqual('1.1', 'File has incorrect version label');
}); });
it('file is not updated when clicking Cancel - [C307006]', async () => { it('file is not updated when clicking Cancel - [C307006]', async () => {
@ -782,8 +802,8 @@ describe('Upload new version', () => {
await uploadNewVersionDialog.clickCancel(); await uploadNewVersionDialog.clickCancel();
expect(await dataTable.isItemPresent(fileSearch3, parentSearch)).toBe(true, 'File was updated'); expect(await dataTable.isItemPresent(fileSearch3, parentSearch)).toBe(true, 'File was updated');
expect(await apis.user.nodes.getFileVersionType(fileSearch3Id)).toEqual('', 'File has incorrect version type'); expect(await apis.user.nodes.getFileVersionType(fileSearch3Id)).toEqual('MAJOR', 'File has incorrect version type');
expect(await apis.user.nodes.getFileVersionLabel(fileSearch3Id)).toEqual('', 'File has incorrect version label'); expect(await apis.user.nodes.getFileVersionLabel(fileSearch3Id)).toEqual('1.0', 'File has incorrect version label');
}); });
it('upload new version fails when new file name already exists - [C307007]', async () => { it('upload new version fails when new file name already exists - [C307007]', async () => {
@ -801,11 +821,12 @@ describe('Upload new version', () => {
await uploadNewVersionDialog.enterDescription('new version description'); await uploadNewVersionDialog.enterDescription('new version description');
await uploadNewVersionDialog.clickUpload(); await uploadNewVersionDialog.clickUpload();
await page.refresh(); const message = await page.getSnackBarMessage();
expect(message).toContain(nameConflictMessage);
expect(await dataTable.isItemPresent(fileSearch4, parentSearch)).toBe(true, 'File was updated'); expect(await dataTable.isItemPresent(fileSearch4, parentSearch)).toBe(true, 'File was updated');
expect(await apis.user.nodes.getFileVersionType(fileSearch4Id)).toEqual('', 'File has incorrect version type'); expect(await apis.user.nodes.getFileVersionType(fileSearch4Id)).toEqual('MAJOR', 'File has incorrect version type');
expect(await apis.user.nodes.getFileVersionLabel(fileSearch4Id)).toEqual('', 'File has incorrect version label'); expect(await apis.user.nodes.getFileVersionLabel(fileSearch4Id)).toEqual('1.0', 'File has incorrect version label');
}); });
it('file is unlocked after uploading a new version - [C307008]', async () => { it('file is unlocked after uploading a new version - [C307008]', async () => {
@ -822,12 +843,13 @@ describe('Upload new version', () => {
await uploadNewVersionDialog.clickMinor(); await uploadNewVersionDialog.clickMinor();
await uploadNewVersionDialog.enterDescription('new version description'); await uploadNewVersionDialog.enterDescription('new version description');
await uploadNewVersionDialog.clickUpload(); await uploadNewVersionDialog.clickUpload();
await uploadNewVersionDialog.waitForDialogToClose();
// TODO: enable when ACA-2329 is fixed // TODO: enable when ACA-2329 is fixed
// expect(await dataTable.isItemPresent(fileToUpload4, parentSearch)).toBe(true, 'File name was not changed'); // expect(await dataTable.isItemPresent(fileToUpload4, parentSearch)).toBe(true, 'File name was not changed');
expect(await apis.user.nodes.isFileLockedWrite(fileLockedSearch1Id)).toBe(false, `${fileLockedSearch1} is still locked`); expect(await apis.user.nodes.isFileLockedWrite(fileLockedSearch1Id)).toBe(false, `${fileLockedSearch1} is still locked`);
expect(await apis.user.nodes.getFileVersionType(fileLockedSearch1Id)).toEqual('MINOR', 'File has incorrect version type'); expect(await apis.user.nodes.getFileVersionType(fileLockedSearch1Id)).toEqual('MINOR', 'File has incorrect version type');
expect(await apis.user.nodes.getFileVersionLabel(fileLockedSearch1Id)).toEqual('0.1', 'File has incorrect version label'); expect(await apis.user.nodes.getFileVersionLabel(fileLockedSearch1Id)).toEqual('1.1', 'File has incorrect version label');
}); });
it('file remains locked after canceling of uploading a new version - [C307009]', async () => { it('file remains locked after canceling of uploading a new version - [C307009]', async () => {

View File

@ -33,6 +33,7 @@ export class NodeBodyCreate {
public name: string, public name: string,
public nodeType: string, public nodeType: string,
public relativePath: string = '/', public relativePath: string = '/',
public aspectNames?: string[], // workaround for REPO-4772
public properties?: any[] public properties?: any[]
) {} ) {}
} }

View File

@ -35,6 +35,7 @@ export interface NodeContentTree {
export function flattenNodeContentTree(content: NodeContentTree, relativePath: string = '/'): NodeBodyCreate[] { export function flattenNodeContentTree(content: NodeContentTree, relativePath: string = '/'): NodeBodyCreate[] {
const { name, files, folders, title, description } = content; const { name, files, folders, title, description } = content;
const aspectNames: string[] = ['cm:versionable'];
let data: NodeBodyCreate[] = []; let data: NodeBodyCreate[] = [];
let properties: any; let properties: any;
@ -75,7 +76,8 @@ export function flattenNodeContentTree(content: NodeContentTree, relativePath: s
.map((filename: string): NodeBodyCreate => ({ .map((filename: string): NodeBodyCreate => ({
nodeType: NODE_TYPE_FILE, nodeType: NODE_TYPE_FILE,
name: filename, name: filename,
relativePath relativePath,
aspectNames
})); }));
data = data.concat(filesData); data = data.concat(filesData);

View File

@ -222,7 +222,8 @@ export class NodesApi extends RepoApi {
'cm:title': title, 'cm:title': title,
'cm:description': description, 'cm:description': description,
'cm:author': author 'cm:author': author
} },
aspectNames: ['cm:versionable'] // workaround for REPO-4772
}; };
if (imageProps) { if (imageProps) {
nodeBody.properties = Object.assign(nodeBody.properties, imageProps); nodeBody.properties = Object.assign(nodeBody.properties, imageProps);

View File

@ -17,9 +17,9 @@
"lint": "ng lint && npm run spellcheck && npm run format:check && npm run e2e.typecheck", "lint": "ng lint && npm run spellcheck && npm run format:check && npm run e2e.typecheck",
"wd:update": "webdriver-manager update --gecko=false $VERSION_CHROME", "wd:update": "webdriver-manager update --gecko=false $VERSION_CHROME",
"e2e.typecheck": "tsc -p ./e2e/tsconfig.e2e.typecheck.json", "e2e.typecheck": "tsc -p ./e2e/tsconfig.e2e.typecheck.json",
"e2e": "npm run wd:update && protractor --baseUrl=${TEST_BASE_URL:-http://localhost:4000} $SUITE", "e2e": "npm run wd:update && protractor --baseUrl=${TEST_BASE_URL:-http://localhost:8080} $SUITE",
"e2e.local": "npm run wd:update && protractor --baseUrl=http://localhost:4200 $SUITE", "e2e.local": "npm run wd:update && protractor --baseUrl=http://localhost:4200 $SUITE",
"wait:app": "wait-on http://localhost:8080 && wait-on http://localhost:4000", "wait:app": "wait-on http://localhost:8080/alfresco/ -t 1000000 && wait-on http://localhost:8080 -t 400000",
"start:docker": "docker-compose up -d --build && npm run wait:app", "start:docker": "docker-compose up -d --build && npm run wait:app",
"stop:docker": "docker-compose stop", "stop:docker": "docker-compose stop",
"e2e:docker": "npm run start:docker && npm run e2e && npm run stop:docker", "e2e:docker": "npm run start:docker && npm run e2e && npm run stop:docker",
@ -29,7 +29,7 @@
"format:fix": "prettier --write \"src/{app,environments}/**/*.{ts,js,css,scss,html}\"", "format:fix": "prettier --write \"src/{app,environments}/**/*.{ts,js,css,scss,html}\"",
"build.tomcat": "npm run build.shared && npm run build.extensions && npm run build.app -- --prod --base-href ./ && jar -cvf docker/tomcat/artifacts/content-app.war -C dist/app/ .", "build.tomcat": "npm run build.shared && npm run build.extensions && npm run build.app -- --prod --base-href ./ && jar -cvf docker/tomcat/artifacts/content-app.war -C dist/app/ .",
"build.tomcat.e2e": "./build-tomcat-e2e.sh", "build.tomcat.e2e": "./build-tomcat-e2e.sh",
"e2e.tomcat": "npm run wd:update && protractor --baseUrl=http://localhost:4000/content-app/ $SUITE", "e2e.tomcat": "npm run wd:update && protractor --baseUrl=http://localhost:8080/content-app/ $SUITE",
"docker.tomcat.start": "cd docker/tomcat && docker-compose up -d --build && npm run wait:app", "docker.tomcat.start": "cd docker/tomcat && docker-compose up -d --build && npm run wait:app",
"docker.tomcat.stop": "cd docker/tomcat && docker-compose stop", "docker.tomcat.stop": "cd docker/tomcat && docker-compose stop",
"docker.tomcat.e2e": "npm run docker.tomcat.start && npm run e2e.tomcat" "docker.tomcat.e2e": "npm run docker.tomcat.start && npm run e2e.tomcat"

View File

@ -120,7 +120,7 @@ exports.config = {
directConnect: true, directConnect: true,
// baseUrl: 'http://localhost:4000', // baseUrl: 'http://localhost:8080',
getPageTimeout: 50000, getPageTimeout: 50000,
framework: 'jasmine', framework: 'jasmine',

View File

@ -85,18 +85,6 @@ describe('InfoDrawerComponent', () => {
); );
}); });
it('should set displayNode when node is from personal list', () => {
spyOn(contentApiService, 'getNodeInfo');
const nodeMock = <any>{ entry: { id: 'nodeId', aspectNames: [] } };
component.node = nodeMock;
fixture.detectChanges();
component.ngOnChanges();
expect(component.displayNode).toBe(nodeMock.entry);
expect(contentApiService.getNodeInfo).not.toHaveBeenCalled();
});
it('should set displayNode when node is library', async(() => { it('should set displayNode when node is library', async(() => {
spyOn(contentApiService, 'getNodeInfo'); spyOn(contentApiService, 'getNodeInfo');
const nodeMock = <any>{ const nodeMock = <any>{

View File

@ -71,12 +71,8 @@ export class InfoDrawerComponent implements OnChanges, OnInit, OnDestroy {
const entry: any = this.node.entry; const entry: any = this.node.entry;
if (!entry.aspectNames) { const id = entry.nodeId || entry.id;
const id = entry.nodeId || entry.id; return this.loadNodeInfo(id);
return this.loadNodeInfo(id);
}
this.setDisplayNode(entry);
} }
} }

View File

@ -1,5 +1,5 @@
export HOST_IP=$(ifconfig | grep -E "([0-9]{1,3}\.){3}[0-9]{1,3}" | grep -v 127.0.0.1 | awk '{ print $2 }' | cut -f2 -d: | head -n1) export HOST_IP=$(ifconfig | grep -E "([0-9]{1,3}\.){3}[0-9]{1,3}" | grep -v 127.0.0.1 | awk '{ print $2 }' | cut -f2 -d: | head -n1)
export APP_URL="http://${HOST_IP}:4000" export APP_URL="http://${HOST_IP}:8080"
export APP_CONFIG_AUTH_TYPE="OAUTH" export APP_CONFIG_AUTH_TYPE="OAUTH"
export APP_CONFIG_OAUTH2_HOST="http://${HOST_IP}:8085/auth/realms/alfresco" export APP_CONFIG_OAUTH2_HOST="http://${HOST_IP}:8085/auth/realms/alfresco"