Browse Source

fix(test): Fix trends test timeout (#22337)

* fix(test): Fix trends test timeout

Occasionally during pre-commit the trends test will timeout, going to fix tick/update for these tests to see if it happens, will open up another ticket later if it is still not fixed
k-fish 4 years ago
parent
commit
6f48b60f5c
1 changed files with 10 additions and 0 deletions
  1. 10 0
      tests/js/spec/views/performance/trends.spec.jsx

+ 10 - 0
tests/js/spec/views/performance/trends.spec.jsx

@@ -369,9 +369,14 @@ describe('Performance > Trends', function () {
       data.routerContext
     );
 
+    await tick();
+    wrapper.update();
+
     for (const trendFunction of TRENDS_FUNCTIONS) {
       selectTrendFunction(wrapper, trendFunction.field);
+
       await tick();
+      wrapper.update();
 
       expect(browserHistory.push).toHaveBeenCalledWith({
         query: expect.objectContaining({
@@ -394,9 +399,14 @@ describe('Performance > Trends', function () {
       data.routerContext
     );
 
+    await tick();
+    wrapper.update();
+
     for (const confidenceLevel of CONFIDENCE_LEVELS) {
       selectConfidenceLevel(wrapper, confidenceLevel.label);
+
       await tick();
+      wrapper.update();
 
       expect(browserHistory.push).toHaveBeenCalledWith({
         query: expect.objectContaining({