Project

General

Profile

Actions

Bug #41349

closed

mgr/dashboard: Improve stability of navigating pages with tables in E2E tests

Added by Patrick Seidensal over 4 years ago. Updated about 3 years ago.

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

0%

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

Description

While migrating the E2E tests to async/await, I came across a bug that's not always reproducible. It depends on how fast an asynchronous request is returned from the backend.

In detail, it's about the RGW Daemons page. An E2E test is navigating to the page and reading a value, comparing it with some other value previously fetched. That value (amount of deamons at the bottom of the table) is 0 when the table didn't load fast enough. The problem can be fixed by adapting the test to wait for the table to have finished loading.

Expected 'Object Gateways
1 total' to contain '0 total'.
Expected :"0 total" 
Actual   :"Object Gateways\n1 total" 
<Click to see difference>

Error: Failed expectation
    at Object.<anonymous> (/home/user/src/ceph-1/src/pybind/mgr/dashboard/frontend/e2e/dashboard.e2e-spec.ts:125:25)
    at step (/home/user/src/ceph-1/src/pybind/mgr/dashboard/frontend/node_modules/tslib/tslib.js:133:27)
    at Object.next (/home/user/src/ceph-1/src/pybind/mgr/dashboard/frontend/node_modules/tslib/tslib.js:114:57)
    at fulfilled (/home/user/src/ceph-1/src/pybind/mgr/dashboard/frontend/node_modules/tslib/tslib.js:104:62)
    at process._tickCallback (internal/process/next_tick.js:68:7)

But to improve the overall stability of the tests, it makes sense to check if the page to be navigated to contains a table and if so, waits for that table to finish loading (as a user would do, too). This prevents failing tests of that kind in the whole E2E project, including currently undetected ones, tests that are prone to that kind of error and would appear as soon as a response takes longer than expected and also all tests that will be written. The developers would simply don't have to take care about that anymore and could safely assume, that `navigateTo()` will wait for the page to be completely loaded.


Related issues 1 (0 open1 closed)

Related to Dashboard - Bug #40693: mgr/dashboard: Switch to async/await for E2E testsResolvedPatrick Seidensal

Actions
Actions #1

Updated by Patrick Seidensal over 4 years ago

  • Related to Bug #40693: mgr/dashboard: Switch to async/await for E2E tests added
Actions #2

Updated by Patrick Seidensal over 4 years ago

  • Pull request ID set to 29758
Actions #3

Updated by Patrick Seidensal over 4 years ago

  • Status changed from In Progress to Fix Under Review
Actions #4

Updated by Patrick Seidensal over 4 years ago

  • Status changed from Fix Under Review to Resolved
Actions #5

Updated by Ernesto Puerta about 3 years ago

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

Also available in: Atom PDF