FIX: smoke test :fired:
This commit is contained in:
parent
5a14dcc991
commit
6d4c07385f
|
@ -31,6 +31,6 @@ export default Ember.Component.extend({
|
|||
return categoryBadgeHTML(category, {allowUncategorized: true});
|
||||
}
|
||||
});
|
||||
}.on('didInsertElement'),
|
||||
}.on('didInsertElement')
|
||||
|
||||
});
|
||||
|
|
|
@ -1,25 +1,14 @@
|
|||
import ModalFunctionality from 'discourse/mixins/modal-functionality';
|
||||
import { setting } from 'discourse/lib/computed';
|
||||
|
||||
export default Ember.Controller.extend(ModalFunctionality, {
|
||||
remote: Em.computed.not("local"),
|
||||
local: false,
|
||||
showMore: false,
|
||||
|
||||
_initialize: function() {
|
||||
this.setProperties({
|
||||
local: this.get("allowLocal"),
|
||||
showMore: false
|
||||
});
|
||||
}.on('init'),
|
||||
|
||||
maxSize: setting('max_attachment_size_kb'),
|
||||
allowLocal: Em.computed.gt('maxSize', 0),
|
||||
local: true,
|
||||
remote: Ember.computed.not("local"),
|
||||
|
||||
actions: {
|
||||
useLocal: function() { this.setProperties({ local: true, showMore: false}); },
|
||||
useRemote: function() { this.set("local", false); },
|
||||
toggleShowMore: function() { this.toggleProperty("showMore"); }
|
||||
useLocal() { this.setProperties({ local: true, showMore: false}); },
|
||||
useRemote() { this.set("local", false); },
|
||||
toggleShowMore() { this.toggleProperty("showMore"); }
|
||||
}
|
||||
|
||||
});
|
||||
|
|
|
@ -1,16 +1,14 @@
|
|||
<div class="modal-body">
|
||||
{{#if allowLocal}}
|
||||
<div class="radios">
|
||||
<input type="radio" id="local" value="local" name="upload" {{action "useLocal"}}>
|
||||
<label class="radio" for="local">{{i18n 'upload_selector.from_my_computer'}}</label>
|
||||
{{#if local}}
|
||||
<div class="inputs">
|
||||
<input type="file" id="filename-input" multiple><br>
|
||||
<span class="description">{{unbound view.tip}}</span>
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
{{/if}}
|
||||
<div class="radios">
|
||||
<input type="radio" id="local" value="local" name="upload" {{action "useLocal"}}>
|
||||
<label class="radio" for="local">{{i18n 'upload_selector.from_my_computer'}}</label>
|
||||
{{#if local}}
|
||||
<div class="inputs">
|
||||
<input type="file" id="filename-input" multiple><br>
|
||||
<span class="description">{{unbound view.tip}}</span>
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
<div class="radios">
|
||||
<input type="radio" id="remote" value="remote" name="upload" {{action "useRemote"}}>
|
||||
<label class="radio" for="remote">{{i18n 'upload_selector.from_the_web'}}</label>
|
||||
|
|
|
@ -66,9 +66,9 @@ var upload = function(input, path) {
|
|||
actions.push({ upload: path, input: input });
|
||||
}
|
||||
|
||||
var screenshot = function(filename) {
|
||||
actions.push({ screenshot: filename });
|
||||
}
|
||||
// var screenshot = function(filename) {
|
||||
// actions.push({ screenshot: filename });
|
||||
// }
|
||||
|
||||
var run = function() {
|
||||
var allPassed = true;
|
||||
|
@ -86,7 +86,7 @@ var run = function() {
|
|||
actions = actions.splice(1);
|
||||
if (action.test) {
|
||||
page.waitFor(action.desc, action.test, function(success) {
|
||||
allPassed &= success;
|
||||
allPassed = allPassed && success;
|
||||
performNextAction();
|
||||
});
|
||||
} else if (action.exec) {
|
||||
|
@ -230,7 +230,7 @@ var runTests = function() {
|
|||
run();
|
||||
};
|
||||
|
||||
page.open(system.args[1], function(status) {
|
||||
page.open(system.args[1], function() {
|
||||
console.log("OPENED: " + system.args[1]);
|
||||
runTests();
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue