logster 2.1.1 → 2.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitignore +19 -19
- data/.rubocop.yml +1 -1
- data/.travis.yml +16 -16
- data/CHANGELOG.md +172 -169
- data/Gemfile +4 -4
- data/Guardfile +8 -8
- data/LICENSE.txt +22 -22
- data/README.md +99 -99
- data/Rakefile +21 -21
- data/assets/fonts/FontAwesome.otf +0 -0
- data/assets/fonts/fontawesome-webfont.eot +0 -0
- data/assets/fonts/fontawesome-webfont.svg +639 -639
- data/assets/fonts/fontawesome-webfont.ttf +0 -0
- data/assets/fonts/fontawesome-webfont.woff +0 -0
- data/assets/fonts/fontawesome-webfont.woff2 +0 -0
- data/assets/images/Icon-144_rounded.png +0 -0
- data/assets/images/Icon-144_square.png +0 -0
- data/assets/images/icon_144x144.png +0 -0
- data/assets/images/icon_64x64.png +0 -0
- data/assets/javascript/client-app.js +106 -100
- data/assets/stylesheets/client-app.css +1 -1
- data/build_client_app.sh +0 -0
- data/client-app/.editorconfig +20 -20
- data/client-app/.ember-cli +9 -9
- data/client-app/.eslintignore +19 -19
- data/client-app/.eslintrc.js +46 -46
- data/client-app/.gitignore +23 -23
- data/client-app/.travis.yml +27 -27
- data/client-app/.watchmanconfig +3 -3
- data/client-app/README.md +57 -57
- data/client-app/app/app.js +0 -0
- data/client-app/app/components/actions-menu.js +43 -37
- data/client-app/app/components/env-tab.js +80 -44
- data/client-app/app/components/message-info.js +0 -0
- data/client-app/app/components/message-row.js +0 -0
- data/client-app/app/components/panel-resizer.js +0 -0
- data/client-app/app/components/tab-contents.js +27 -27
- data/client-app/app/components/tabbed-section.js +0 -0
- data/client-app/app/components/time-formatter.js +0 -0
- data/client-app/app/components/update-time.js +0 -0
- data/client-app/app/controllers/index.js +0 -0
- data/client-app/app/controllers/show.js +0 -0
- data/client-app/app/index.html +29 -29
- data/client-app/app/initializers/app-init.js +67 -72
- data/client-app/app/lib/preload.js +20 -14
- data/client-app/app/lib/utilities.js +149 -140
- data/client-app/app/models/message-collection.js +0 -0
- data/client-app/app/models/message.js +100 -100
- data/client-app/app/resolver.js +0 -0
- data/client-app/app/router.js +0 -0
- data/client-app/app/routes/index.js +0 -0
- data/client-app/app/routes/show.js +0 -0
- data/client-app/app/styles/app.css +527 -521
- data/client-app/app/templates/application.hbs +2 -2
- data/client-app/app/templates/components/actions-menu.hbs +12 -12
- data/client-app/app/templates/components/env-tab.hbs +10 -10
- data/client-app/app/templates/components/message-info.hbs +41 -41
- data/client-app/app/templates/components/message-row.hbs +15 -15
- data/client-app/app/templates/components/panel-resizer.hbs +3 -3
- data/client-app/app/templates/components/tabbed-section.hbs +10 -10
- data/client-app/app/templates/components/time-formatter.hbs +1 -1
- data/client-app/app/templates/index.hbs +58 -58
- data/client-app/app/templates/show.hbs +7 -7
- data/client-app/config/environment.js +51 -51
- data/client-app/config/optional-features.json +3 -3
- data/client-app/config/targets.js +18 -18
- data/client-app/ember-cli-build.js +29 -29
- data/client-app/package-lock.json +11365 -11365
- data/client-app/package.json +56 -56
- data/client-app/testem.js +25 -25
- data/client-app/tests/index.html +34 -34
- data/client-app/tests/integration/components/env-tab-test.js +123 -73
- data/client-app/tests/integration/components/message-info-test.js +111 -26
- data/client-app/tests/test-helper.js +8 -8
- data/client-app/tests/unit/controllers/index-test.js +12 -12
- data/client-app/tests/unit/controllers/show-test.js +12 -12
- data/client-app/tests/unit/initializers/app-init-test.js +31 -31
- data/client-app/tests/unit/routes/index-test.js +11 -11
- data/client-app/tests/unit/routes/show-test.js +11 -11
- data/lib/examples/sidekiq_logster_reporter.rb +21 -21
- data/lib/logster.rb +54 -54
- data/lib/logster/base_store.rb +141 -141
- data/lib/logster/configuration.rb +26 -25
- data/lib/logster/defer_logger.rb +14 -14
- data/lib/logster/ignore_pattern.rb +65 -65
- data/lib/logster/logger.rb +113 -113
- data/lib/logster/message.rb +212 -212
- data/lib/logster/middleware/debug_exceptions.rb +26 -26
- data/lib/logster/middleware/reporter.rb +55 -55
- data/lib/logster/middleware/viewer.rb +222 -221
- data/lib/logster/rails/railtie.rb +63 -63
- data/lib/logster/redis_store.rb +566 -566
- data/lib/logster/scheduler.rb +54 -54
- data/lib/logster/version.rb +3 -3
- data/lib/logster/web.rb +14 -14
- data/logster.gemspec +35 -35
- data/test/examples/test_sidekiq_reporter_example.rb +46 -46
- data/test/fake_data/Gemfile +4 -4
- data/test/fake_data/generate.rb +10 -10
- data/test/logster/middleware/test_reporter.rb +19 -19
- data/test/logster/middleware/test_viewer.rb +96 -96
- data/test/logster/test_base_store.rb +147 -147
- data/test/logster/test_defer_logger.rb +34 -34
- data/test/logster/test_ignore_pattern.rb +41 -41
- data/test/logster/test_logger.rb +86 -86
- data/test/logster/test_message.rb +119 -119
- data/test/logster/test_redis_rate_limiter.rb +230 -230
- data/test/logster/test_redis_store.rb +720 -720
- data/test/test_helper.rb +38 -38
- data/vendor/assets/javascripts/logster.js.erb +39 -39
- metadata +1 -10
- data/client-app/app/components/tab-link.js +0 -5
- data/client-app/tests/integration/components/actions-menu-test.js +0 -26
- data/client-app/tests/integration/components/message-row-test.js +0 -26
- data/client-app/tests/integration/components/panel-resizer-test.js +0 -26
- data/client-app/tests/integration/components/tab-contents-test.js +0 -26
- data/client-app/tests/integration/components/tab-link-test.js +0 -26
- data/client-app/tests/integration/components/tabbed-section-test.js +0 -26
- data/client-app/tests/integration/components/time-formatter-test.js +0 -26
- data/client-app/tests/integration/components/update-time-test.js +0 -26
data/test/test_helper.rb
CHANGED
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
require 'minitest'
|
|
2
|
-
require 'minitest/unit'
|
|
3
|
-
require 'minitest/autorun'
|
|
4
|
-
require 'minitest/pride'
|
|
5
|
-
require 'redis'
|
|
6
|
-
require 'logster'
|
|
7
|
-
require 'logster/base_store'
|
|
8
|
-
require 'timecop'
|
|
9
|
-
require 'byebug'
|
|
10
|
-
|
|
11
|
-
class Logster::TestStore < Logster::BaseStore
|
|
12
|
-
attr_accessor :reported
|
|
13
|
-
def initialize
|
|
14
|
-
@reported = []
|
|
15
|
-
end
|
|
16
|
-
|
|
17
|
-
def save(message)
|
|
18
|
-
@reported << message
|
|
19
|
-
end
|
|
20
|
-
|
|
21
|
-
def count
|
|
22
|
-
@reported.count
|
|
23
|
-
end
|
|
24
|
-
|
|
25
|
-
def clear
|
|
26
|
-
@reported = []
|
|
27
|
-
end
|
|
28
|
-
|
|
29
|
-
def clear_all
|
|
30
|
-
@reported = []
|
|
31
|
-
end
|
|
32
|
-
|
|
33
|
-
def check_rate_limits(severity)
|
|
34
|
-
# Do nothing
|
|
35
|
-
end
|
|
36
|
-
|
|
37
|
-
# get, protect, unprotect: unimplemented
|
|
38
|
-
end
|
|
1
|
+
require 'minitest'
|
|
2
|
+
require 'minitest/unit'
|
|
3
|
+
require 'minitest/autorun'
|
|
4
|
+
require 'minitest/pride'
|
|
5
|
+
require 'redis'
|
|
6
|
+
require 'logster'
|
|
7
|
+
require 'logster/base_store'
|
|
8
|
+
require 'timecop'
|
|
9
|
+
require 'byebug'
|
|
10
|
+
|
|
11
|
+
class Logster::TestStore < Logster::BaseStore
|
|
12
|
+
attr_accessor :reported
|
|
13
|
+
def initialize
|
|
14
|
+
@reported = []
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def save(message)
|
|
18
|
+
@reported << message
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def count
|
|
22
|
+
@reported.count
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
def clear
|
|
26
|
+
@reported = []
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def clear_all
|
|
30
|
+
@reported = []
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
def check_rate_limits(severity)
|
|
34
|
+
# Do nothing
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# get, protect, unprotect: unimplemented
|
|
38
|
+
end
|
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
(function() {
|
|
2
|
-
var lastReport = null;
|
|
3
|
-
|
|
4
|
-
if (!window.Logster) {
|
|
5
|
-
window.Logster = {
|
|
6
|
-
enabled: true
|
|
7
|
-
};
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
window.onerror = function(message, url, line, column, errorObj) {
|
|
11
|
-
// never bother reporting more than once a minute
|
|
12
|
-
if (lastReport && new Date() - lastReport < 1000 * 60) {
|
|
13
|
-
return;
|
|
14
|
-
}
|
|
15
|
-
if (!Logster.enabled) {
|
|
16
|
-
return;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
lastReport = new Date();
|
|
20
|
-
|
|
21
|
-
var err = {
|
|
22
|
-
message: message,
|
|
23
|
-
url: url,
|
|
24
|
-
line: line,
|
|
25
|
-
column: column,
|
|
26
|
-
window_location: window.location && (window.location + "")
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
if (errorObj && errorObj.stack) {
|
|
30
|
-
err.stacktrace = errorObj.stack;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
$.ajax("<%= Logster.config.subdirectory %>" + "/report_js_error", {
|
|
34
|
-
data: err,
|
|
35
|
-
type: "POST",
|
|
36
|
-
cache: false
|
|
37
|
-
});
|
|
38
|
-
};
|
|
39
|
-
})();
|
|
1
|
+
(function() {
|
|
2
|
+
var lastReport = null;
|
|
3
|
+
|
|
4
|
+
if (!window.Logster) {
|
|
5
|
+
window.Logster = {
|
|
6
|
+
enabled: true
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
window.onerror = function(message, url, line, column, errorObj) {
|
|
11
|
+
// never bother reporting more than once a minute
|
|
12
|
+
if (lastReport && new Date() - lastReport < 1000 * 60) {
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
if (!Logster.enabled) {
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
lastReport = new Date();
|
|
20
|
+
|
|
21
|
+
var err = {
|
|
22
|
+
message: message,
|
|
23
|
+
url: url,
|
|
24
|
+
line: line,
|
|
25
|
+
column: column,
|
|
26
|
+
window_location: window.location && (window.location + "")
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
if (errorObj && errorObj.stack) {
|
|
30
|
+
err.stacktrace = errorObj.stack;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
$.ajax("<%= Logster.config.subdirectory %>" + "/report_js_error", {
|
|
34
|
+
data: err,
|
|
35
|
+
type: "POST",
|
|
36
|
+
cache: false
|
|
37
|
+
});
|
|
38
|
+
};
|
|
39
|
+
})();
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: logster
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.1.
|
|
4
|
+
version: 2.1.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- UI for viewing logs in Rack
|
|
@@ -182,7 +182,6 @@ files:
|
|
|
182
182
|
- client-app/app/components/message-row.js
|
|
183
183
|
- client-app/app/components/panel-resizer.js
|
|
184
184
|
- client-app/app/components/tab-contents.js
|
|
185
|
-
- client-app/app/components/tab-link.js
|
|
186
185
|
- client-app/app/components/tabbed-section.js
|
|
187
186
|
- client-app/app/components/time-formatter.js
|
|
188
187
|
- client-app/app/components/update-time.js
|
|
@@ -217,16 +216,8 @@ files:
|
|
|
217
216
|
- client-app/package.json
|
|
218
217
|
- client-app/testem.js
|
|
219
218
|
- client-app/tests/index.html
|
|
220
|
-
- client-app/tests/integration/components/actions-menu-test.js
|
|
221
219
|
- client-app/tests/integration/components/env-tab-test.js
|
|
222
220
|
- client-app/tests/integration/components/message-info-test.js
|
|
223
|
-
- client-app/tests/integration/components/message-row-test.js
|
|
224
|
-
- client-app/tests/integration/components/panel-resizer-test.js
|
|
225
|
-
- client-app/tests/integration/components/tab-contents-test.js
|
|
226
|
-
- client-app/tests/integration/components/tab-link-test.js
|
|
227
|
-
- client-app/tests/integration/components/tabbed-section-test.js
|
|
228
|
-
- client-app/tests/integration/components/time-formatter-test.js
|
|
229
|
-
- client-app/tests/integration/components/update-time-test.js
|
|
230
221
|
- client-app/tests/test-helper.js
|
|
231
222
|
- client-app/tests/unit/controllers/index-test.js
|
|
232
223
|
- client-app/tests/unit/controllers/show-test.js
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { module, test } from 'qunit';
|
|
2
|
-
import { setupRenderingTest } from 'ember-qunit';
|
|
3
|
-
import { render } from '@ember/test-helpers';
|
|
4
|
-
import hbs from 'htmlbars-inline-precompile';
|
|
5
|
-
|
|
6
|
-
module('Integration | Component | actions-menu', function(hooks) {
|
|
7
|
-
setupRenderingTest(hooks);
|
|
8
|
-
|
|
9
|
-
test('it renders', async function(assert) {
|
|
10
|
-
// Set any properties with this.set('myProperty', 'value');
|
|
11
|
-
// Handle any actions with this.set('myAction', function(val) { ... });
|
|
12
|
-
|
|
13
|
-
await render(hbs`{{actions-menu}}`);
|
|
14
|
-
|
|
15
|
-
assert.equal(this.element.textContent.trim(), '');
|
|
16
|
-
|
|
17
|
-
// Template block usage:
|
|
18
|
-
await render(hbs`
|
|
19
|
-
{{#actions-menu}}
|
|
20
|
-
template block text
|
|
21
|
-
{{/actions-menu}}
|
|
22
|
-
`);
|
|
23
|
-
|
|
24
|
-
assert.equal(this.element.textContent.trim(), 'template block text');
|
|
25
|
-
});
|
|
26
|
-
});
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { module, test } from 'qunit';
|
|
2
|
-
import { setupRenderingTest } from 'ember-qunit';
|
|
3
|
-
import { render } from '@ember/test-helpers';
|
|
4
|
-
import hbs from 'htmlbars-inline-precompile';
|
|
5
|
-
|
|
6
|
-
module('Integration | Component | message-row', function(hooks) {
|
|
7
|
-
setupRenderingTest(hooks);
|
|
8
|
-
|
|
9
|
-
test('it renders', async function(assert) {
|
|
10
|
-
// Set any properties with this.set('myProperty', 'value');
|
|
11
|
-
// Handle any actions with this.set('myAction', function(val) { ... });
|
|
12
|
-
|
|
13
|
-
await render(hbs`{{message-row}}`);
|
|
14
|
-
|
|
15
|
-
assert.equal(this.element.textContent.trim(), '');
|
|
16
|
-
|
|
17
|
-
// Template block usage:
|
|
18
|
-
await render(hbs`
|
|
19
|
-
{{#message-row}}
|
|
20
|
-
template block text
|
|
21
|
-
{{/message-row}}
|
|
22
|
-
`);
|
|
23
|
-
|
|
24
|
-
assert.equal(this.element.textContent.trim(), 'template block text');
|
|
25
|
-
});
|
|
26
|
-
});
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { module, test } from 'qunit';
|
|
2
|
-
import { setupRenderingTest } from 'ember-qunit';
|
|
3
|
-
import { render } from '@ember/test-helpers';
|
|
4
|
-
import hbs from 'htmlbars-inline-precompile';
|
|
5
|
-
|
|
6
|
-
module('Integration | Component | panel-resizer', function(hooks) {
|
|
7
|
-
setupRenderingTest(hooks);
|
|
8
|
-
|
|
9
|
-
test('it renders', async function(assert) {
|
|
10
|
-
// Set any properties with this.set('myProperty', 'value');
|
|
11
|
-
// Handle any actions with this.set('myAction', function(val) { ... });
|
|
12
|
-
|
|
13
|
-
await render(hbs`{{panel-resizer}}`);
|
|
14
|
-
|
|
15
|
-
assert.equal(this.element.textContent.trim(), '');
|
|
16
|
-
|
|
17
|
-
// Template block usage:
|
|
18
|
-
await render(hbs`
|
|
19
|
-
{{#panel-resizer}}
|
|
20
|
-
template block text
|
|
21
|
-
{{/panel-resizer}}
|
|
22
|
-
`);
|
|
23
|
-
|
|
24
|
-
assert.equal(this.element.textContent.trim(), 'template block text');
|
|
25
|
-
});
|
|
26
|
-
});
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { module, test } from 'qunit';
|
|
2
|
-
import { setupRenderingTest } from 'ember-qunit';
|
|
3
|
-
import { render } from '@ember/test-helpers';
|
|
4
|
-
import hbs from 'htmlbars-inline-precompile';
|
|
5
|
-
|
|
6
|
-
module('Integration | Component | tab-contents', function(hooks) {
|
|
7
|
-
setupRenderingTest(hooks);
|
|
8
|
-
|
|
9
|
-
test('it renders', async function(assert) {
|
|
10
|
-
// Set any properties with this.set('myProperty', 'value');
|
|
11
|
-
// Handle any actions with this.set('myAction', function(val) { ... });
|
|
12
|
-
|
|
13
|
-
await render(hbs`{{tab-contents}}`);
|
|
14
|
-
|
|
15
|
-
assert.equal(this.element.textContent.trim(), '');
|
|
16
|
-
|
|
17
|
-
// Template block usage:
|
|
18
|
-
await render(hbs`
|
|
19
|
-
{{#tab-contents}}
|
|
20
|
-
template block text
|
|
21
|
-
{{/tab-contents}}
|
|
22
|
-
`);
|
|
23
|
-
|
|
24
|
-
assert.equal(this.element.textContent.trim(), 'template block text');
|
|
25
|
-
});
|
|
26
|
-
});
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { module, test } from 'qunit';
|
|
2
|
-
import { setupRenderingTest } from 'ember-qunit';
|
|
3
|
-
import { render } from '@ember/test-helpers';
|
|
4
|
-
import hbs from 'htmlbars-inline-precompile';
|
|
5
|
-
|
|
6
|
-
module('Integration | Component | tab-link', function(hooks) {
|
|
7
|
-
setupRenderingTest(hooks);
|
|
8
|
-
|
|
9
|
-
test('it renders', async function(assert) {
|
|
10
|
-
// Set any properties with this.set('myProperty', 'value');
|
|
11
|
-
// Handle any actions with this.set('myAction', function(val) { ... });
|
|
12
|
-
|
|
13
|
-
await render(hbs`{{tab-link}}`);
|
|
14
|
-
|
|
15
|
-
assert.equal(this.element.textContent.trim(), '');
|
|
16
|
-
|
|
17
|
-
// Template block usage:
|
|
18
|
-
await render(hbs`
|
|
19
|
-
{{#tab-link}}
|
|
20
|
-
template block text
|
|
21
|
-
{{/tab-link}}
|
|
22
|
-
`);
|
|
23
|
-
|
|
24
|
-
assert.equal(this.element.textContent.trim(), 'template block text');
|
|
25
|
-
});
|
|
26
|
-
});
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { module, test } from 'qunit';
|
|
2
|
-
import { setupRenderingTest } from 'ember-qunit';
|
|
3
|
-
import { render } from '@ember/test-helpers';
|
|
4
|
-
import hbs from 'htmlbars-inline-precompile';
|
|
5
|
-
|
|
6
|
-
module('Integration | Component | tabbed-section', function(hooks) {
|
|
7
|
-
setupRenderingTest(hooks);
|
|
8
|
-
|
|
9
|
-
test('it renders', async function(assert) {
|
|
10
|
-
// Set any properties with this.set('myProperty', 'value');
|
|
11
|
-
// Handle any actions with this.set('myAction', function(val) { ... });
|
|
12
|
-
|
|
13
|
-
await render(hbs`{{tabbed-section}}`);
|
|
14
|
-
|
|
15
|
-
assert.equal(this.element.textContent.trim(), '');
|
|
16
|
-
|
|
17
|
-
// Template block usage:
|
|
18
|
-
await render(hbs`
|
|
19
|
-
{{#tabbed-section}}
|
|
20
|
-
template block text
|
|
21
|
-
{{/tabbed-section}}
|
|
22
|
-
`);
|
|
23
|
-
|
|
24
|
-
assert.equal(this.element.textContent.trim(), 'template block text');
|
|
25
|
-
});
|
|
26
|
-
});
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { module, test } from 'qunit';
|
|
2
|
-
import { setupRenderingTest } from 'ember-qunit';
|
|
3
|
-
import { render } from '@ember/test-helpers';
|
|
4
|
-
import hbs from 'htmlbars-inline-precompile';
|
|
5
|
-
|
|
6
|
-
module('Integration | Component | time-formatter', function(hooks) {
|
|
7
|
-
setupRenderingTest(hooks);
|
|
8
|
-
|
|
9
|
-
test('it renders', async function(assert) {
|
|
10
|
-
// Set any properties with this.set('myProperty', 'value');
|
|
11
|
-
// Handle any actions with this.set('myAction', function(val) { ... });
|
|
12
|
-
|
|
13
|
-
await render(hbs`{{time-formatter}}`);
|
|
14
|
-
|
|
15
|
-
assert.equal(this.element.textContent.trim(), '');
|
|
16
|
-
|
|
17
|
-
// Template block usage:
|
|
18
|
-
await render(hbs`
|
|
19
|
-
{{#time-formatter}}
|
|
20
|
-
template block text
|
|
21
|
-
{{/time-formatter}}
|
|
22
|
-
`);
|
|
23
|
-
|
|
24
|
-
assert.equal(this.element.textContent.trim(), 'template block text');
|
|
25
|
-
});
|
|
26
|
-
});
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { module, test } from 'qunit';
|
|
2
|
-
import { setupRenderingTest } from 'ember-qunit';
|
|
3
|
-
import { render } from '@ember/test-helpers';
|
|
4
|
-
import hbs from 'htmlbars-inline-precompile';
|
|
5
|
-
|
|
6
|
-
module('Integration | Component | update-time', function(hooks) {
|
|
7
|
-
setupRenderingTest(hooks);
|
|
8
|
-
|
|
9
|
-
test('it renders', async function(assert) {
|
|
10
|
-
// Set any properties with this.set('myProperty', 'value');
|
|
11
|
-
// Handle any actions with this.set('myAction', function(val) { ... });
|
|
12
|
-
|
|
13
|
-
await render(hbs`{{update-time}}`);
|
|
14
|
-
|
|
15
|
-
assert.equal(this.element.textContent.trim(), '');
|
|
16
|
-
|
|
17
|
-
// Template block usage:
|
|
18
|
-
await render(hbs`
|
|
19
|
-
{{#update-time}}
|
|
20
|
-
template block text
|
|
21
|
-
{{/update-time}}
|
|
22
|
-
`);
|
|
23
|
-
|
|
24
|
-
assert.equal(this.element.textContent.trim(), 'template block text');
|
|
25
|
-
});
|
|
26
|
-
});
|