Skip to content

Commit

Permalink
modified test 1
Browse files Browse the repository at this point in the history
  • Loading branch information
alokhyland committed Oct 24, 2024
1 parent a655257 commit 857651d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -232,17 +232,18 @@ Then('I can publish selection to {string}', async function(target) {
});

Then(/^I can perform the following publications$/, async function(table) {
let page = await this.ui.browser.documentPage(this.doc.type);
const browser = await this.ui.browser;
await browser.waitForVisible();
const page = await browser.documentPage(this.doc.type);
await page.waitForVisible();
let pubCount = await page.publicationsCount;
pubCount.should.not.be.NaN;
const rows = table.hashes();
for (let i = 0; i < rows.length; i++) {
const { target, rendition, version, override } = rows[i];
const dialog = await this.ui.browser.publishDialog;
const dialog = await browser.publishDialog;
const isdocumentPublished = await dialog.publish(target, rendition, version, override);
isdocumentPublished.should.be.true;
page = await this.ui.browser.documentPage(this.doc.type);
const newCount = await page.publicationsCount;
let check;
const bar = await page.isVisible('#versionInfoBar');
Expand Down
3 changes: 0 additions & 3 deletions packages/nuxeo-web-ui-ftest/pages/ui/admin/cloudServices.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,12 +158,9 @@ export default class CloudServices extends BasePage {

async deleteClient(clientId) {
const rows = await browser.$$('nuxeo-data-table[name="table"] nuxeo-data-table-row:not([header])');
await driver.pause(4000);
const deleted = await browser
.$$('nuxeo-data-table[name="table"] nuxeo-data-table-row:not([header])')
.map((img) => img.$('nuxeo-data-table-cell span[name="id"]').getText());
console.log('deleteddeleteddeleted', deleted)
console.log('rowsrowsrowsrows', rows)
const index = deleted.findIndex((currenTitle) => currenTitle === clientId);
if (index !== -1) {
const rowEle = await rows[index].$('[name="delete"]');
Expand Down
2 changes: 1 addition & 1 deletion packages/nuxeo-web-ui-ftest/wdio.conf.js
Original file line number Diff line number Diff line change
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/*.feature')],
specs: [path.join(process.cwd(), './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

0 comments on commit 857651d

Please sign in to comment.