Skip to content
This repository was archived by the owner on Aug 15, 2023. It is now read-only.

Commit 343925c

Browse files
authored
Increasing the timeout for UI tests actions, which involves the FDA WorkItems creation (#305)
* Increasing the timeout for UI tests actions, which involves the FDA WorkItems creation
1 parent 86ea628 commit 343925c

File tree

9 files changed

+16
-14
lines changed

9 files changed

+16
-14
lines changed

WebApplication/ClientApp/src/ui-tests/BOM_content_test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ Scenario('should check BOM data after change', async (I) => {
9595

9696
// wait for update stripe shows and disappears
9797
I.waitForVisible(locators.xpStripeElement, 10);
98-
I.waitForInvisible(locators.xpStripeElement, 120);
98+
I.waitForInvisible(locators.xpStripeElement, locators.FDAActionTimeout);
9999

100100
// click to BOM tab
101101
I.click(locators.bomTab);

WebApplication/ClientApp/src/ui-tests/RFA_Link_test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ Scenario('should check downloads tab with RFA link for Wrench', async (I) => {
6363
const linkClickHere = '//article[@role="document"] //a[contains(.,"click here")]';
6464
const preparingDialog = '//article[@role="document"] //p[text()="Preparing RFA"]';
6565
I.waitForElement(preparingDialog, 10);
66-
I.waitForElement(linkClickHere, 120);
66+
I.waitForElement(linkClickHere, locators.FDAActionTimeout);
6767

6868
// validate the Link
6969
const link = await I.grabAttributeFrom(linkClickHere, 'href');

WebApplication/ClientApp/src/ui-tests/download_drawing_test.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
/* eslint-disable no-undef */
2020
const assert = require('assert');
21+
const locators = require('./elements_definition.js');
2122

2223
Before((I) => {
2324
I.amOnPage('/');
@@ -43,7 +44,7 @@ Data(downloadsData).Scenario('should check file download on downloads link click
4344
const linkClickHere = '//article[@role="document"] //a[contains(.,"click here")]';
4445
const preparingDrawingsDialog = `//article[@role="document"] //p[text()="${current.dlgTitle}"]`;
4546
I.waitForElement(preparingDrawingsDialog, 10);
46-
I.waitForElement(linkClickHere, 120);
47+
I.waitForElement(linkClickHere, locators.FDAActionTimeout);
4748

4849
// validate the Link
4950
const link = await I.grabAttributeFrom(linkClickHere, 'href');

WebApplication/ClientApp/src/ui-tests/drawing_test.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
/* eslint-disable no-undef */
2020
const noDrawingElement = '.drawingEmptyText';
21+
const locators = require('./elements_definition.js');
2122

2223
Before((I) => {
2324
I.amOnPage('/');
@@ -39,7 +40,7 @@ Scenario('should check that Drawing tab shows drawing for an Assembly', async (I
3940

4041
// wait for drawing to be displayed
4142
const viewCubeElement = '//div[@id="ForgePdfViewer"] //div[@class="viewcubeWrapper"]';
42-
I.waitForVisible(viewCubeElement, 30);
43+
I.waitForVisible(viewCubeElement, locators.FDAActionTimeout);
4344

4445
});
4546

@@ -53,7 +54,7 @@ Scenario('should check if an Assembly do not have any drawings then No data page
5354
I.goToDrawingTab();
5455

5556
// wait for no drawing page to be displayed
56-
I.waitForVisible(noDrawingElement, 20);
57+
I.waitForVisible(noDrawingElement, locators.FDAActionTimeout);
5758
I.see("You don't have any drawings in package.", noDrawingElement);
5859

5960
});
@@ -72,7 +73,7 @@ Scenario('should check that IPT do not display any data', async (I) => {
7273
I.goToDrawingTab();
7374

7475
// wait for no drawing page to be displayed
75-
I.waitForVisible(noDrawingElement, 20);
76+
I.waitForVisible(noDrawingElement, locators.FDAActionTimeout);
7677
I.see("You don't have any drawings in package.", noDrawingElement);
7778

7879
});

WebApplication/ClientApp/src/ui-tests/elements_definition.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,5 +46,6 @@ module.exports = {
4646
drawingTab : locate('li').find('p').withText('Drawing'),
4747
downloadsTab : locate('li').find('p').withText('Downloads'),
4848
xpFirstInput : '//div[2]/div[1] //input',
49-
xpFirstInputOnModelTab : '//*[@id="model"]/div/div[1]/div[2]/div[1] //input'
49+
xpFirstInputOnModelTab : '//*[@id="model"]/div/div[1]/div[2]/div[1] //input',
50+
FDAActionTimeout: 600
5051
};

WebApplication/ClientApp/src/ui-tests/parameter_notification_test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ Scenario('should check parameter notification', async (I) => {
5252

5353
// wait for progress bar shows and disappears
5454
I.waitForVisible(updatingProjectProgress, 10);
55-
I.waitForInvisible(updatingProjectProgress, 120);
55+
I.waitForInvisible(updatingProjectProgress, locators.FDAActionTimeout);
5656

5757
// check if there is correct number of changeOnUpdate inputs
5858
I.seeNumberOfElements(updatedElements, 1);

WebApplication/ClientApp/src/ui-tests/update_failed_dialog_test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Scenario('should check incorrect input to show failed dialog', async (I) => {
4848

4949
// waiting for Updating dialog
5050
I.waitForVisible(updatingDialogTitle, 10);
51-
I.waitForInvisible(updatingDialogTitle, 120);
51+
I.waitForInvisible(updatingDialogTitle, locators.FDAActionTimeout);
5252

5353
// check if Failed dialog is displayed
5454
I.waitForVisible(failedDialogTitle, 30);

WebApplication/ClientApp/src/ui-tests/update_params_test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Scenario('Updating parameters for model', async (I) => {
4646

4747
// wait for progress bar shows and disappeared
4848
I.waitForVisible(updatingProjectProgress, 10);
49-
I.waitForInvisible(updatingProjectProgress, 120);
49+
I.waitForInvisible(updatingProjectProgress, locators.FDAActionTimeout);
5050

5151
// check that stripe disappeared
5252
I.waitForInvisible(locators.xpStripeElement, 5);

WebApplication/ClientApp/steps_file.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,6 @@ module.exports = function() {
128128
// to agree to authorize our application
129129
this.waitForNavigation();
130130
const currentUrl = await this.grabCurrentUrl();
131-
console.log(currentUrl);
132131
if (currentUrl.includes('auth.autodesk.com')) {
133132
// click on Allow Button
134133
this.waitForVisible(allowButton, 15);
@@ -160,7 +159,7 @@ module.exports = function() {
160159
this.click(uploadButton);
161160

162161
// Wait for file to be uploaded
163-
this.waitForVisible(uploadConfirmationDialog, 120);
162+
this.waitForVisible(uploadConfirmationDialog, locators.FDAActionTimeout);
164163
this.click(closeButton);
165164
},
166165
uploadIPTFile(IPT_File) {
@@ -175,7 +174,7 @@ module.exports = function() {
175174
this.click(uploadButton);
176175

177176
// Wait for file to be uploaded
178-
this.waitForVisible(uploadConfirmationDialog, 120);
177+
this.waitForVisible(uploadConfirmationDialog, locators.FDAActionTimeout);
179178
this.click(closeButton);
180179
},
181180
uploadInvalidIPTFile(IPT_File) {
@@ -190,7 +189,7 @@ module.exports = function() {
190189
this.click(uploadButton);
191190

192191
// Wait for Upload Failed dialog
193-
this.waitForVisible(uploadFailedDialog, 120);
192+
this.waitForVisible(uploadFailedDialog, locators.FDAActionTimeout);
194193
// check log url link
195194
this.seeElement(uploadFailLogLink);
196195

0 commit comments

Comments
 (0)