From 8034f3dac3a7a71d83f00ddc4dc8af6ae93166b3 Mon Sep 17 00:00:00 2001 From: Aaron Ogata Date: Sun, 9 Aug 2020 18:19:11 -0700 Subject: [PATCH] preload graphql schema for selenium refs DE-184 Change-Id: Ib7e739826c3455dcca08743c3271bae05c419740 Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/244610 Reviewed-by: Ryan Norton Tested-by: Service Cloud Jenkins QA-Review: Aaron Ogata Product-Review: Aaron Ogata --- spec/selenium/common.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/spec/selenium/common.rb b/spec/selenium/common.rb index b3cc6d2da51..70372c3efac 100644 --- a/spec/selenium/common.rb +++ b/spec/selenium/common.rb @@ -114,6 +114,12 @@ shared_context "in-process server selenium tests" do # set up so you can use rails urls helpers in your selenium tests include Rails.application.routes.url_helpers + prepend_before :all do + # building the schema is currently very slow. + # this ensures the schema is built before specs are run to avoid timeouts + CanvasSchema.graphql_definition + end + prepend_before :each do resize_screen_to_standard SeleniumDriverSetup.allow_requests!