Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix-part1-WEBUI-1432 : fix bulk_edit custom layout feature on CI pipe… #2150

Open
wants to merge 14 commits into
base: maintenance-3.0.x
Choose a base branch
from
Open
73 changes: 40 additions & 33 deletions .github/workflows/a11y.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ on:
PACKAGES_AUTH_USER:
description: 'PACKAGES_AUTH_USER'
required: true
PACKAGES_AUTH_TOKEN:
PACKAGES_AUTH_TOKEN:
description: 'PACKAGES_AUTH_TOKEN'
required: true

Expand All @@ -31,42 +31,49 @@ jobs:
a11y:
runs-on: [self-hosted, master]
steps:
- uses: actions/checkout@v2
with:
ref: ${{ env.BRANCH_NAME }}
- uses: actions/checkout@v2
with:
ref: ${{ env.BRANCH_NAME }}

- run: git config user.name "nuxeo-webui-jx-bot" && git config user.email "webui@hyland.com"
- run: git config user.name "nuxeo-webui-jx-bot" && git config user.email "webui@hyland.com"

- uses: actions/setup-node@v3
with:
registry-url: ${{ env.NPM_REPOSITORY }}
node-version: 14
scope: '@nuxeo'
- uses: actions/setup-node@v3
with:
registry-url: ${{ env.NPM_REPOSITORY }}
node-version: 18
scope: '@nuxeo'

- uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: '11'
- name: Install Web UI
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PACKAGES_TOKEN }}
run: |
npm install
pushd packages/nuxeo-web-ui-ftest
npm install
popd
pushd packages/nuxeo-designer-catalog
npm install
popd

- name: Install google chrome
run: |
wget https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_114.0.5735.90-1_amd64.deb
apt install -y --allow-downgrades ./google-chrome-stable_114.0.5735.90-1_amd64.deb
- uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: '11'

- name: 'Update settings.xml with server configuration'
run: |
echo '<settings>
<servers>
<server>
<id>maven-internal</id>
<username>${{ secrets.PACKAGES_AUTH_USER }}</username>
<password>${{ secrets.PACKAGES_AUTH_TOKEN }}</password>
</server>
</servers>
</settings>' > ~/.m2/settings.xml
- name: 'Update settings.xml with server configuration'
run: |
echo '<settings>
<servers>
<server>
<id>maven-internal</id>
<username>${{ secrets.PACKAGES_AUTH_USER }}</username>
<password>${{ secrets.PACKAGES_AUTH_TOKEN }}</password>
</server>
</servers>
</settings>' > ~/.m2/settings.xml

- name: Web UI build
run: mvn -B -ntp install
- name: Web UI build
run: mvn -B -ntp install

- name: A11y checks
run: mvn -B -ntp -f plugin/a11y install
- name: A11y checks
run: mvn -B -ntp -f plugin/a11y install
19 changes: 14 additions & 5 deletions .github/workflows/ftest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,13 @@ jobs:
with:
registry-url: ${{ env.NPM_REPOSITORY }}
scope: '@nuxeo'
node-version: 18

- uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: '11'

- name: Install google chrome
run: |
wget -q https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_114.0.5735.90-1_amd64.deb
apt install -y --allow-downgrades ./google-chrome-stable_114.0.5735.90-1_amd64.deb

- name: Determine nuxeo-elements branch to link
id: pick_nuxeo_elements_branch
run: |
Expand Down Expand Up @@ -99,6 +95,19 @@ jobs:
popd
popd

- name: add .npmrc
run: |
pushd /tmp/_temp/
ls
rm .npmrc
touch .npmrc
popd
echo '
packages.nuxeo.com/repository/npm-public/:_auth=${NODE_AUTH_TOKEN}
@nuxeo:registry=https://packages.nuxeo.com/repository/npm-public/
always-auth=true
' >> /tmp/_temp/.npmrc

- name: Link elements to Web UI
run: |
npm install --no-package-lock --@nuxeo:registry="${{ env.NPM_REPOSITORY }}" nuxeo-elements/core/${ELEMENTS_CORE}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- uses: actions/setup-node@v3
with:
registry-url: 'https://packages.nuxeo.com/repository/npm-public/'
node-version: 14
node-version: 18
scope: '@nuxeo'

- name: Install
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/preview.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
steps:
- uses: actions/setup-node@v3
with:
node-version: 14
node-version: 18
registry-url: 'https://packages.nuxeo.com/repository/npm-public/'
scope: '@nuxeo'

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/promote.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
steps:
- uses: actions/setup-node@v3
with:
node-version: 14
node-version: 18
registry-url: 'https://packages.nuxeo.com/repository/npm-public/'
scope: '@nuxeo'

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
with:
registry-url: 'https://packages.nuxeo.com/repository/npm-public/'
scope: '@nuxeo'
node-version: 14
node-version: 18

- name: Install
env:
Expand Down
28 changes: 0 additions & 28 deletions addons/nuxeo-csv/ftest/features/step_definitions/csv-import.js

This file was deleted.

This file was deleted.

62 changes: 47 additions & 15 deletions addons/nuxeo-spreadsheet/ftest/pages/spreadsheet.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,55 +8,87 @@ export default class Spreadsheet {
}

get table() {
return this.element('table.htCore');
return (async () => {
const tableEle = await this.element('table.htCore');
return tableEle;
})();
}

get headers() {
return this.table.elements('thead span').value.map((e) => e.getText());
return (async () => {
try {
const table = await this.table;
const headerElements = await table.elements('thead span');
const headerElementArray = Array.from(headerElements);
const header = await Promise.all(headerElementArray.map(async (e) => e.getText()));
return header;
} catch (error) {
console.error('Error fetching headers:', error);
return [];
}
})();
}

get rows() {
return this.table.elements('tbody tr');
return (async () => {
const tableEle = await this.table.elements('tbody tr');
return tableEle;
})();
}

get console() {
return this.element('#console');
return (async () => {
const consoleEle = await this.element('#console');
return consoleEle;
})();
}

/**
* Set data at given row and cell
*/
setData(row, cell, data) {
this._callHandsontable('setDataAtCell', row, cell, data);
async setData(row, cell, data) {
await this._callHandsontable('setDataAtCell', row, cell, data);
}

/**
* Get data at given row and cell
*/
getData(row, cell) {
return this._callHandsontable('getDataAtCell', row, cell);
async getData(row, cell) {
return (async () => {
const getDataCell = await this._callHandsontable('getDataAtCell', row, cell);
return getDataCell;
})();
}

/**
* Save the data
*/
save() {
// click() was resulting "no element reference returned by script"
driver.execute((el) => el.click(), this.element('#save').value);
async save() {
const saveButton = await this.element('#save');
if (saveButton) {
await saveButton.click();
} else {
console.error('Save button not found!!');
}
}

/**
* Close the spreadsheet
*/
close() {
driver.execute((el) => el.click(), this.element('#close').value);
async close() {
const closeButton = await this.element('#close');
if (closeButton) {
await closeButton.click();
} else {
console.error('Close button not found!!');
}
}

/**
* Call a Handsontable method
*/
_callHandsontable(method, ...params) {
async _callHandsontable(method, ...params) {
// eslint-disable-next-line no-undef, no-shadow
driver.execute((method, ...params) => window.spreadsheet.ht[method](...params), method, ...params);
await driver.execute((method, ...params) => window.spreadsheet.ht[method](...params), method, ...params);
}
}
18 changes: 17 additions & 1 deletion ftest/features/create_doc.feature
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Feature: Create Document
And I have permission ReadWrite for this document
And I browse to the document

Scenario Outline: Create <doctype>
Scenario Outline: Create <doctype> and verify metadata properties
When I click the Create Document button
And I select <doctype> from the Document Type menu
And I create a document with the following properties:
Expand All @@ -33,6 +33,22 @@ Feature: Create Document
| doctype |
| Note |
| File |

Scenario Outline: Create <doctype>
When I click the Create Document button
And I select <doctype> from the Document Type menu
And I create a document with the following properties:
| name | value |
| title | my title |
| description | my description |
| nature | Application |
| subjects | Gastronomy,Comics |
| expired | February 28, 2018 |

Then I see the <doctype> page

Examples:
| doctype |
| Folder |
| Workspace |
| Collection |
Expand Down
Loading
Loading