Skip to content

Commit

Permalink
WEBUI-1455: Analysis on retention cicd ftest failure
Browse files Browse the repository at this point in the history
  • Loading branch information
rahuljain-dev committed Feb 28, 2024
1 parent f70c760 commit 4d7228d
Show file tree
Hide file tree
Showing 51 changed files with 98 additions and 52 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
"workboxCli": "3.6.3"
},
"devDependencies": {
"@cucumber/cucumber": "^9.5.1",
"@nuxeo/nuxeo-web-ui-ftest": "file:./packages/nuxeo-web-ui-ftest",
"@nuxeo/testing-helpers": "~3.0.31-rc.0",
"@open-wc/eslint-config": "^0.3.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Given, Then, When } from '../../node_modules/@cucumber/cucumber';
// eslint-disable-next-line import/no-extraneous-dependencies
import { Given, Then, When } from '@cucumber/cucumber';

Then('I can see the administration menu', async function() {
const { drawer } = this.ui;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Then } from '../../node_modules/@cucumber/cucumber';
// eslint-disable-next-line import/no-extraneous-dependencies
import { Then } from '@cucumber/cucumber';

Then('I can see the audit table', async function() {
const isAuditTableDisplay = await this.ui.administration.audit.isAuditTableDisplayed;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* eslint-disable no-await-in-loop */
import { Then, When } from '../../node_modules/@cucumber/cucumber';
// eslint-disable-next-line import/no-extraneous-dependencies
import { Then, When } from '@cucumber/cucumber';

Then('I can see the {word} tree', async function(tab) {
const drawer = await this.ui.drawer;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Then } from '../../node_modules/@cucumber/cucumber';
// eslint-disable-next-line import/no-extraneous-dependencies
import { Then } from '@cucumber/cucumber';

Then('I click the bulk edit button with {string} layout', async function(layoutName) {
const browser = await this.ui.browser;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* eslint-disable no-await-in-loop */
import { Then, When } from '../../node_modules/@cucumber/cucumber';
// eslint-disable-next-line import/no-extraneous-dependencies
import { Then, When } from '@cucumber/cucumber';

When('I click remove button for {string} document', async function(title) {
const drawer = await this.ui.drawer;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Given, Then, When } from '../../node_modules/@cucumber/cucumber';
// eslint-disable-next-line import/no-extraneous-dependencies
import { Given, Then, When } from '@cucumber/cucumber';

Given('provider {string} exists in providers', async (provider) =>
fixtures.providers.create({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Then } from '../../node_modules/@cucumber/cucumber';
// eslint-disable-next-line import/no-extraneous-dependencies
import { Then } from '@cucumber/cucumber';

Then('I can see the {string} collection', async function(name) {
const collection = await this.ui.drawer.collections.waitForHasCollection(name);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* eslint-disable no-await-in-loop */
import { Given, When, Then } from '../../node_modules/@cucumber/cucumber';
// eslint-disable-next-line import/no-extraneous-dependencies
import { Given, When, Then } from '@cucumber/cucumber';

Given('I have the following comment thread:', function(table) {
/*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Then, When } from '../../node_modules/@cucumber/cucumber';
// eslint-disable-next-line import/no-extraneous-dependencies
import { Then, When } from '@cucumber/cucumber';

When('I can click on the compare button', async function() {
await this.ui.browser.waitForVisible();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Then, When } from '../../node_modules/@cucumber/cucumber';
// eslint-disable-next-line import/no-extraneous-dependencies
import { Then, When } from '@cucumber/cucumber';

let currentDocType;
let selectedTabName;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { When } from '../../node_modules/@cucumber/cucumber';
// eslint-disable-next-line import/no-extraneous-dependencies
import { When } from '@cucumber/cucumber';

/**
* Import the csv file
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Then } from '../../node_modules/@cucumber/cucumber';
// eslint-disable-next-line import/no-extraneous-dependencies
import { Then } from '@cucumber/cucumber';

Then('I can navigate to the document selected in the {string} single document suggestion widget', async function(name) {
const docpageEle = await this.ui.browser.documentPage('DocSuggestion');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* eslint-disable no-await-in-loop */
import { Given, When, Then } from '../../node_modules/@cucumber/cucumber';
// eslint-disable-next-line import/no-extraneous-dependencies
import { Given, When, Then } from '@cucumber/cucumber';
import { url } from '../../pages/helpers';

Given('I have a {word} document', async function(docType) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Then } from '../../node_modules/@cucumber/cucumber';
// eslint-disable-next-line import/no-extraneous-dependencies
import { Then } from '@cucumber/cucumber';

Then('I can see the document belongs to the favorites', async function() {
const drawerEle = await this.ui.drawer;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* eslint-disable no-await-in-loop */
import { Then, When } from '../../node_modules/@cucumber/cucumber';
// eslint-disable-next-line import/no-extraneous-dependencies
import { Then, When } from '@cucumber/cucumber';

When(/^I select group from the dropdown menu$/, async function() {
const groupELe = this.ui.group;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Then } from '../../node_modules/@cucumber/cucumber';
// eslint-disable-next-line import/no-extraneous-dependencies
import { Then } from '@cucumber/cucumber';

Then('I can see the history table', async function() {
const historyTable = await this.ui.historyTable;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Then, When } from '../../node_modules/@cucumber/cucumber';
// eslint-disable-next-line import/no-extraneous-dependencies
import { Then, When } from '@cucumber/cucumber';

When('I click the Nuxeo logo', async function() {
const home = await this.ui.goHome();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Then, When } from '../../node_modules/@cucumber/cucumber';
// eslint-disable-next-line import/no-extraneous-dependencies
import { Then, When } from '@cucumber/cucumber';

When('I click on Add Properties button', async function() {
const createDialog = await this.ui.createDialog;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Given, Then, When } from '../../node_modules/@cucumber/cucumber';
// eslint-disable-next-line import/no-extraneous-dependencies
import { Given, Then, When } from '@cucumber/cucumber';
import Login from '../../pages/login';
import UI from '../../pages/ui';
import { url } from '../../pages/helpers';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* eslint-disable no-await-in-loop */
import { Given, Then, When } from '../../node_modules/@cucumber/cucumber';
// eslint-disable-next-line import/no-extraneous-dependencies
import { Given, Then, When } from '@cucumber/cucumber';

When(/^I give (\w+) permission to "([^"]*)" on the document$/, async function(permission, name) {
const viewButtonEle = await this.ui.browser.permissionsViewButton;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Then } from '../../node_modules/@cucumber/cucumber';
// eslint-disable-next-line import/no-extraneous-dependencies
import { Then } from '@cucumber/cucumber';

Then('I can see my personal workspace', async function() {
const personalEle = await this.ui.drawer.personal;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Then } from '../../node_modules/@cucumber/cucumber';
// eslint-disable-next-line import/no-extraneous-dependencies
import { Then } from '@cucumber/cucumber';

Then('I can see the picture formats panel', async function() {
const uiBrowser = await this.ui.browser;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Then, When } from '../../node_modules/@cucumber/cucumber';
// eslint-disable-next-line import/no-extraneous-dependencies
import { Then, When } from '@cucumber/cucumber';

When('I click the preview button', async function() {
const page = await this.ui.browser.documentPage(this.doc.type);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Then, When } from '../../node_modules/@cucumber/cucumber';
// eslint-disable-next-line import/no-extraneous-dependencies
import { Then, When } from '@cucumber/cucumber';

When('I can click on recently viewed documents item {string}', async function(title) {
await this.ui.drawer.recents.waitForVisible();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Given, Then, When } from '../../node_modules/@cucumber/cucumber';
// eslint-disable-next-line import/no-extraneous-dependencies
import { Given, Then, When } from '@cucumber/cucumber';
import { url } from '../../pages/helpers';

Then('I can see the {string} search panel', function(name) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Then, When } from '../../node_modules/@cucumber/cucumber';
// eslint-disable-next-line import/no-extraneous-dependencies
import { Then, When } from '@cucumber/cucumber';
import Spreadsheet from '../../pages/spreadsheet';

When('I open the spreadsheet', async function() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import Nuxeo from 'nuxeo';
import { After } from '../../../../node_modules/@cucumber/cucumber';
// eslint-disable-next-line import/no-extraneous-dependencies
import { After } from '@cucumber/cucumber';

global.addedComments = [];

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { After } from '../../../../node_modules/@cucumber/cucumber';
// eslint-disable-next-line import/no-extraneous-dependencies
import { After } from '@cucumber/cucumber';
import nuxeo from '../services/client';

const endPoint = '/oauth2/client/';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { After, Before } from '../../../../node_modules/@cucumber/cucumber';
// eslint-disable-next-line import/no-extraneous-dependencies
import { After, Before } from '@cucumber/cucumber';
import documentService from '../services/documentService';

fixtures.documents = documentService;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { After } from '../../../../node_modules/@cucumber/cucumber';
// eslint-disable-next-line import/no-extraneous-dependencies
import { After } from '@cucumber/cucumber';
import nuxeo from '../services/client';

global.groups = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { After } from '../../../../node_modules/@cucumber/cucumber';
// eslint-disable-next-line import/no-extraneous-dependencies
import { After } from '@cucumber/cucumber';

/* global document, localStorage */
// cleans up local storage fo the current user
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
/**
* Provisioning of OAuth2 providers, clients and tokens via oauth2/directory rest endpoint
*/
import { After } from '../../../../node_modules/@cucumber/cucumber';
// eslint-disable-next-line import/no-extraneous-dependencies
import { After } from '@cucumber/cucumber';
import nuxeo from '../services/client';
import '../services/date';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { After } from '../../../../node_modules/@cucumber/cucumber';
// eslint-disable-next-line import/no-extraneous-dependencies
import { After } from '@cucumber/cucumber';
import nuxeo from '../services/client';

const endPoint = '/oauth2/provider/';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { After } from '../../../../node_modules/@cucumber/cucumber';
// eslint-disable-next-line import/no-extraneous-dependencies
import { After } from '@cucumber/cucumber';
import nuxeo from '../services/client';

fixtures.savedSearches = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { After } from '../../../../node_modules/@cucumber/cucumber';
// eslint-disable-next-line import/no-extraneous-dependencies
import { After } from '@cucumber/cucumber';
import nuxeo from '../services/client';

global.users = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { After } from '../../../../node_modules/@cucumber/cucumber';
// eslint-disable-next-line import/no-extraneous-dependencies
import { After } from '@cucumber/cucumber';
import nuxeo from '../services/client';

global.addedVocabularyEntries = [];
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import Nuxeo from 'nuxeo';
import { After } from '../../../../node_modules/@cucumber/cucumber';
// eslint-disable-next-line import/no-extraneous-dependencies
import { After } from '@cucumber/cucumber';
import nuxeo from '../services/client';

global.runningWorkflows = [];
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import * as path from 'path';
import * as mkdirp from 'mkdirp';
import { After, Status } from '../../../node_modules/@cucumber/cucumber';
// eslint-disable-next-line import/no-extraneous-dependencies
import { After, Status } from '@cucumber/cucumber';

After(async function(scenario) {
const { status } = scenario.result;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Before } from '../../../node_modules/@cucumber/cucumber';
// eslint-disable-next-line import/no-extraneous-dependencies
import { Before } from '@cucumber/cucumber';

Before((e) => {
const { tags } = e.pickle;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Then, When } from '../../node_modules/@cucumber/cucumber';
// eslint-disable-next-line import/no-extraneous-dependencies
import { Then, When } from '@cucumber/cucumber';

When('I click the View Tasks Dashboard link', async function() {
const dashboardLink = await this.ui.drawer.tasks.dashboardLink;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Given, Then, When } from '../../node_modules/@cucumber/cucumber';
// eslint-disable-next-line import/no-extraneous-dependencies
import { Given, Then, When } from '@cucumber/cucumber';

Given(/^I have the following trashed documents$/, (table) => {
const tasks = table.rows().map((row) => () => {
Expand Down
3 changes: 2 additions & 1 deletion packages/nuxeo-web-ui-ftest/features/step_definitions/ui.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Then, When } from '../../node_modules/@cucumber/cucumber';
// eslint-disable-next-line import/no-extraneous-dependencies
import { Then, When } from '@cucumber/cucumber';

When('I click the {string} button', async function(button) {
await driver.pause(1000);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Then } from '../../node_modules/@cucumber/cucumber';
// eslint-disable-next-line import/no-extraneous-dependencies
import { Then } from '@cucumber/cucumber';

Then(/^I upload file "(.+)" as document content/, async function(file) {
const element = await this.ui.browser.el.element('nuxeo-dropzone');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Then, When } from '../../node_modules/@cucumber/cucumber';
// eslint-disable-next-line import/no-extraneous-dependencies
import { Then, When } from '@cucumber/cucumber';

When(/^I select user from the dropdown menu$/, async function() {
const dropdownEle = await this.ui.user.dropdown;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Given, Then, When } from '../../node_modules/@cucumber/cucumber';
// eslint-disable-next-line import/no-extraneous-dependencies
import { Given, Then, When } from '@cucumber/cucumber';

/* Cloud Services */

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { When } from '../../node_modules/@cucumber/cucumber';
// eslint-disable-next-line import/no-extraneous-dependencies
import { When } from '@cucumber/cucumber';

When(/^I can see the version info bar with text "(.*)"$/, async function(text) {
const page = await this.ui.browser.documentPage(this.doc.type);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Then } from '../../node_modules/@cucumber/cucumber';
// eslint-disable-next-line import/no-extraneous-dependencies
import { Then } from '@cucumber/cucumber';

Then('I can see the video conversions panel', async function() {
const uiBrowser = await this.ui.browser;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Given, Then, When } from '../../node_modules/@cucumber/cucumber';
// eslint-disable-next-line import/no-extraneous-dependencies
import { Given, Then, When } from '@cucumber/cucumber';

Given('I am on vocabulary page', async function() {
const administration = await this.ui.administration;
Expand Down
3 changes: 1 addition & 2 deletions packages/nuxeo-web-ui-ftest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
"@babel/register": "^7.14.5",
"@cucumber/tag-expressions": "^2.0.4",
"@wdio/cli": "^8.16.11",
"@wdio/cucumber-framework": "^8.16.11",
"@wdio/local-runner": "^8.16.11",
"@wdio/spec-reporter": "^8.16.9",
"babel-plugin-transform-rename-import": "^2.3.0",
Expand All @@ -38,7 +37,7 @@
"node-fetch": "^2.6.1",
"nuxeo": "^4.0.3",
"wdio-chromedriver-service": "^8.1.1",
"wdio-cucumberjs-json-reporter": "^5.1.7",
"wdio-cucumberjs-json-reporter": "^5.2.1",
"webdriverio": "8.20.4"
}
}
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: ['../../ftest/features/**'],
specs: [path.join(process.cwd(), './features/*.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 4d7228d

Please sign in to comment.