/*
 * Copyright (C) 2014 - present Instructure, Inc.
 *
 * This file is part of Canvas.
 *
 * Canvas is free software: you can redistribute it and/or modify it under
 * the terms of the GNU Affero General Public License as published by the Free
 * Software Foundation, version 3 of the License.
 *
 * Canvas is distributed in the hope that it will be useful, but WITHOUT ANY
 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
 * A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
 * details.
 *
 * You should have received a copy of the GNU Affero General Public License along
 * with this program. If not, see <http://www.gnu.org/licenses/>.
 */

import router from './router'
import {monitorLtiMessages} from '@canvas/lti/jquery/messages'

router.start()
monitorLtiMessages()

/*
 * Copyright (C) 2014 - present Instructure, Inc.
 *
 * This file is part of Canvas.
 *
 * Canvas is free software: you can redistribute it and/or modify it under
 * the terms of the GNU Affero General Public License as published by the Free
 * Software Foundation, version 3 of the License.
 *
 * Canvas is distributed in the hope that it will be useful, but WITHOUT ANY
 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
 * A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
 * details.
 *
 * You should have received a copy of the GNU Affero General Public License along
 * with this program. If not, see <http://www.gnu.org/licenses/>.
 */

import router from './router'
import {monitorLtiMessages} from '@canvas/lti/jquery/messages'
import ready from '@instructure/ready'

ready(() => {
  router.start()
  monitorLtiMessages()
})

Fix flakey selenium specs for files
Fix flakey selenium specs for files

This change causes the files UI to wait
for all DOM content to be loaded before
initializing the router and listening
for LTI messages

flag=none

Test Plan:
Navigate to /courses/:id/files and verify
the Files UI loads and functions as before

Change-Id: Iee3b5579db889f455353184fd6c39a2716d42003
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/280800
Reviewed-by: Ahmad Amireh <a53a33601b8dd9d06ae9e50f1f30fbe957aba866@instructure.com>
QA-Review: Ahmad Amireh <a53a33601b8dd9d06ae9e50f1f30fbe957aba866@instructure.com>
Tested-by: Service Cloud Jenkins <9144042a601061f88f1e1d7a1753ea3e2972119d@instructure.com>
Product-Review: Weston Dransfield <e9203059795dc94e28a8831c65eb7869e818825e@instructure.com>
