Skip to content

Commit

Permalink
added console 2
Browse files Browse the repository at this point in the history
  • Loading branch information
alokhyland committed Oct 24, 2024
1 parent 6ac3c93 commit d3c829d
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 8 deletions.
1 change: 0 additions & 1 deletion ftest/features/publication.feature
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ Feature: Internal Publication
| path | rendition | version |
| /default-domain/sections/section1/my_document | | 1.0 |
When I browse to the document
And This document has file "sample.png" for content
Then I can perform the following publications
| target | rendition | version | override |
| section1 | None | | true |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,10 +189,11 @@ Then(/^I can see the document has (\d+) publications$/, async function (nbPublic
});

Then(/^I can see the document has the following publication$/, async function (table) {
const rows = table.rows();
const rows = await table.rows();
for (let i = 0; i < rows.length; i++) {
const row = rows[i];
const publication = await this.ui.browser.publicationView;
const browser = await this.ui.browser;
const publication = await browser.publicationView;
const isRowPresent = await publication.hasPublication(row[0], row[1], row[2]);
await isRowPresent.should.be.true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ export default class DocumentPublications extends BasePage {
let index;
for (let i = 0; i < rows.length; i++) {
const row = rows[i];
if (row.isVisible('nuxeo-data-table-cell a.path')) {
const isRowVisible = await row.isVisible('nuxeo-data-table-cell a.path')
if (isRowVisible) {
const foundPathEle = await row.$('nuxeo-data-table-cell a.path');
const foundPath = await foundPathEle.getText();
const foundPathLowerCase = await foundPath.trim().toLowerCase();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ export default class DocumentVersions extends BasePage {
return true;
}
const listItems = await this.listItems;
await listItems.$('div[name="version-item"] .title').waitForVisible();
const versionItem = await listItems.$('div[name="version-item"] .title')
await versionItem.waitForVisible();
const listItems1 = await this.listItems.$$('div[name="version-item"]');
const itemsTitle = await browser.$$('div[name="version-item"]').map((img) => img.$('.title').getText());
const index = itemsTitle.findIndex((currenTitle) => currenTitle === label);
Expand Down
6 changes: 3 additions & 3 deletions packages/nuxeo-web-ui-ftest/wdio.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const capability = {
// grid with only 5 firefox instance available you can make sure that not more than
// 5 instance gets started at a time.
maxInstances: 1,
browserName: process.env.BROWSER,
browserName: 'chrome',
acceptInsecureCerts: true,
browserVersion: 'stable',
};
Expand Down Expand Up @@ -101,7 +101,7 @@ exports.config = {
// WebdriverIO allows it to run your tests in arbitrary locations (e.g. locally or
// on a remote machine).
runner: 'local',
specs: [path.join(process.cwd(), './features/publication.feature')],
specs: ['../../ftest/features/publication.feature'],
// check http://webdriver.io/guide/testrunner/debugging.html for more info on debugging with wdio
debug: process.env.DEBUG,
execArgv: process.env.DEBUG ? ['--inspect'] : [],
Expand Down Expand Up @@ -151,7 +151,7 @@ exports.config = {
//
// Set a base URL in order to shorten url command calls. If your url parameter starts
// with "/", then the base url gets prepended.
baseUrl: process.env.NUXEO_WEB_UI_URL || process.env.NUXEO_URL || 'http://localhost:8080/nuxeo/',
baseUrl: process.env.NUXEO_WEB_UI_URL || process.env.NUXEO_URL || 'http://127.0.0.1:8080/nuxeo/',
//
// Default timeout for all waitFor* commands.
waitforTimeout: TIMEOUT,
Expand Down

0 comments on commit d3c829d

Please sign in to comment.