Project

General

Profile

Bug #40693

mgr/dashboard: Switch to async/await for E2E tests

Added by Patrick Seidensal over 3 years ago. Updated over 1 year ago.

Status:
Resolved
Priority:
Normal
Category:
Testing & QA
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

Since Node.js 7.6, async and await keywords are supported as syntactic sugar for Promises. Using async/await for Promises has a number of benefits:

- The extensive indentation through the extensive use of callbacks/Promises would be removed. That makes the code more concise and easier to read.
- Error handling is unified again. `try/catch` blocks can be used to catch errors for both, asynchronous and synchronous code.
- The Code will be easier to write. For instance, a `for loop` could be used instead of having to use recursive calls.
- The workflow looks more like non-asyncronous code, hence easier to read and write.
- The code will be future-proof already as async/await is in the ECMA script specification.
- The code will be easier to debug.

Selenium also already works on deprecating the WebDriverJS promise manager in favor of async/await.


Related issues

Related to Dashboard - Bug #41349: mgr/dashboard: Improve stability of navigating pages with tables in E2E tests Resolved

History

#1 Updated by Patrick Seidensal over 3 years ago

  • Description updated (diff)

#2 Updated by Patrick Seidensal over 3 years ago

  • Status changed from New to In Progress

#3 Updated by Patrick Seidensal over 3 years ago

  • Related to Bug #41349: mgr/dashboard: Improve stability of navigating pages with tables in E2E tests added

#4 Updated by Patrick Seidensal over 3 years ago

  • Pull request ID set to 29758

#5 Updated by Patrick Seidensal over 3 years ago

  • Status changed from In Progress to Fix Under Review

#6 Updated by Patrick Seidensal over 3 years ago

  • Status changed from Fix Under Review to Resolved

#7 Updated by Ernesto Puerta over 1 year ago

  • Project changed from mgr to Dashboard
  • Category changed from 151 to Testing & QA

Also available in: Atom PDF