Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add timeout and test environment app.import call #1619

Merged
merged 5 commits into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions client/app/components/info-modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import Component from '@ember/component';
import { action } from '@ember/object';

export default class InfoModalComponent extends Component {
// We have manually overridden this to hide the modal by default when running tests in tests/index.html
open = !window.localStorage.hideMessage;

dontShowModalAgain = false;
Expand Down
8 changes: 5 additions & 3 deletions client/ember-cli-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,13 @@ module.exports = function(defaults) {
},
},
});

// Use `app.import` to add additional libraries to the generated
// output files.
//
app.import('node_modules/foundation-sites/dist/js/foundation.min.js', { type: 'vendor' });
if (app.env === 'test') {
app.import('node_modules/foundation-sites/dist/js/foundation.js', {type: "test"});
} else {
app.import('node_modules/foundation-sites/dist/js/foundation.min.js', {type: "vendor"});
}
// If you need to use different assets in different
// environments, specify an object as the first parameter. That
// object's keys should be the environment name and the values
Expand Down
1 change: 1 addition & 0 deletions client/testem.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ module.exports = {
launch_in_dev: [
'Chrome',
],
browser_start_timeout: 120,
browser_args: {
Chrome: {
mode: 'ci',
Expand Down
3 changes: 3 additions & 0 deletions client/tests/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script>
// The below hides the default modal from showing when running tests
window.localStorage.hideMessage = true;

window['_fs_host'] = 'fullstory.com';
window['_fs_script'] = 'edge.fullstory.com/s/fs.js';
window['_fs_org'] = 'o-19S9J2-na1';
Expand Down
Loading