Merge pull request #89 from 67P/feature/84-update_ember_3_8

Update Ember to version 3.8.0
This commit was merged in pull request #89.
This commit is contained in:
2019-03-29 13:03:55 +01:00
committed by GitHub
30 changed files with 7593 additions and 2198 deletions
+20
View File
@@ -0,0 +1,20 @@
# unconventional js
/blueprints/*/files/
/vendor/
# compiled output
/dist/
/tmp/
# dependencies
/bower_components/
/node_modules/
# misc
/coverage/
!.*
# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/package.json.ember-try
+5 -1
View File
@@ -25,10 +25,14 @@ module.exports = {
// node files // node files
{ {
files: [ files: [
'.eslintrc.js',
'.template-lintrc.js',
'ember-cli-build.js', 'ember-cli-build.js',
'testem.js', 'testem.js',
'blueprints/*/index.js',
'config/**/*.js', 'config/**/*.js',
'lib/*/index.js' 'lib/*/index.js',
'server/**/*.js'
], ],
parserOptions: { parserOptions: {
sourceType: 'script', sourceType: 'script',
+13 -11
View File
@@ -1,24 +1,26 @@
# See https://help.github.com/ignore-files/ for more about ignoring files. # See https://help.github.com/ignore-files/ for more about ignoring files.
# compiled output # compiled output
/dist /dist/
/tmp /tmp/
# dependencies # dependencies
/node_modules /bower_components/
/bower_components /node_modules/
# misc # misc
/.env*
/.pnp*
/.sass-cache /.sass-cache
/connect.lock /connect.lock
/coverage/* /coverage/
/libpeerconnection.log /libpeerconnection.log
npm-debug.log* /npm-debug.log*
yarn-error.log /testem.log
testem.log /yarn-error.log
.tm_properties .tm_properties
# ember-try # ember-try
.node_modules.ember-try/ /.node_modules.ember-try/
bower.json.ember-try /bower.json.ember-try
package.json.ember-try /package.json.ember-try
+5
View File
@@ -0,0 +1,5 @@
'use strict';
module.exports = {
extends: 'recommended'
};
+1
View File
@@ -22,5 +22,6 @@ before_install:
- npm config set spin false - npm config set spin false
script: script:
- npm run lint:hbs
- npm run lint:js - npm run lint:js
- npm test - npm test
+1
View File
@@ -40,6 +40,7 @@ Make use of the many generators for code, try `ember help generate` for more det
### Linting ### Linting
* `npm run lint:hbs`
* `npm run lint:js` * `npm run lint:js`
* `npm run lint:js -- --fix` * `npm run lint:js -- --fix`
+25 -18
View File
@@ -1,27 +1,12 @@
import Component from '@ember/component'; import Component from '@ember/component';
import { and, notEmpty } from '@ember/object/computed'; import { and, notEmpty } from '@ember/object/computed';
import { inject as injectService } from '@ember/service'; import { inject as service } from '@ember/service';
export default Component.extend({ export default Component.extend({
kredits: injectService(), kredits: service(),
// Default attributes used by reset attributes: null,
attributes: {
account: null,
name: null,
kind: 'person',
url: null,
github_username: null,
github_uid: null,
wiki_username: null,
isCore: false,
},
didInsertElement() {
this._super(...arguments);
this.reset();
},
// TODO: add proper address validation // TODO: add proper address validation
isValidAccount: notEmpty('account'), isValidAccount: notEmpty('account'),
@@ -36,6 +21,27 @@ export default Component.extend({
'isValidGithubUID' 'isValidGithubUID'
), ),
init () {
this._super(...arguments);
// Default attributes used by reset
this.set('attributes', {
account: null,
name: null,
kind: 'person',
url: null,
github_username: null,
github_uid: null,
wiki_username: null,
isCore: false
});
},
didInsertElement() {
this._super(...arguments);
this.reset();
},
reset: function() { reset: function() {
this.setProperties(this.attributes); this.setProperties(this.attributes);
}, },
@@ -61,4 +67,5 @@ export default Component.extend({
}); });
} }
} }
}); });
+7 -7
View File
@@ -13,7 +13,7 @@
type="text" type="text"
placeholder="0xF18E631Ea191aE4ebE70046Fcb01a436554421BA4" placeholder="0xF18E631Ea191aE4ebE70046Fcb01a436554421BA4"
value=account value=account
class=(if isValidAccount 'valid' '')}} class=(if isValidAccount "valid" "")}}
</p> </p>
<p> <p>
<select required onchange={{action (mut kind) value="target.value"}}> <select required onchange={{action (mut kind) value="target.value"}}>
@@ -26,39 +26,39 @@
type="text" type="text"
placeholder="Name" placeholder="Name"
value=name value=name
class=(if isValidName 'valid' '')}} class=(if isValidName "valid" "")}}
</p> </p>
<p> <p>
{{input name="url" {{input name="url"
type="text" type="text"
placeholder="URL" placeholder="URL"
value=url value=url
class=(if isValidURL 'valid' '')}} class=(if isValidURL "valid" "")}}
</p> </p>
<p> <p>
{{input name="github_uid" {{input name="github_uid"
type="text" type="text"
placeholder="GitHub UID (123)" placeholder="GitHub UID (123)"
value=github_uid value=github_uid
class=(if isValidGithubUID 'valid' '')}} class=(if isValidGithubUID "valid" "")}}
</p> </p>
<p> <p>
{{input name="github_username" {{input name="github_username"
type="text" type="text"
placeholder="GitHub username" placeholder="GitHub username"
value=github_username value=github_username
class=(if isValidGithubUsername 'valid' '')}} class=(if isValidGithubUsername "valid" "")}}
</p> </p>
<p> <p>
{{input name="wiki_username" {{input name="wiki_username"
type="text" type="text"
placeholder="Wiki Username" placeholder="Wiki Username"
value=wiki_username value=wiki_username
class=(if isValidWikiUsername 'valid' '')}} class=(if isValidWikiUsername "valid" "")}}
</p> </p>
<p class="actions"> <p class="actions">
{{input type="submit" {{input type="submit"
disabled=(is-pending inProgress) disabled=(is-pending inProgress)
value=(if (is-pending inProgress) 'Processing' 'Save')}} value=(if (is-pending inProgress) "Processing" "Save")}}
</p> </p>
</form> </form>
+23 -14
View File
@@ -3,21 +3,9 @@ import { computed } from '@ember/object';
import { and, notEmpty } from '@ember/object/computed'; import { and, notEmpty } from '@ember/object/computed';
export default Component.extend({ export default Component.extend({
// Default attributes used by reset
attributes: {
contributorId: null,
kind: 'community',
amount: null,
description: null,
url: null,
},
didInsertElement() { attributes: null,
this._super(...arguments); contributors: null,
this.reset();
},
contributors: [],
isValidContributor: notEmpty('contributorId'), isValidContributor: notEmpty('contributorId'),
isValidAmount: computed('amount', function() { isValidAmount: computed('amount', function() {
@@ -29,6 +17,26 @@ export default Component.extend({
'isValidAmount', 'isValidAmount',
'isValidDescription'), 'isValidDescription'),
init () {
this._super(...arguments);
// Default attributes used by reset
this.set('attributes', {
contributorId: null,
kind: 'community',
amount: null,
description: null,
url: null,
});
this.set('contributors', []);
},
didInsertElement() {
this._super(...arguments);
this.reset();
},
reset: function() { reset: function() {
this.setProperties(this.attributes); this.setProperties(this.attributes);
}, },
@@ -54,4 +62,5 @@ export default Component.extend({
}); });
} }
} }
}); });
+5 -5
View File
@@ -20,25 +20,25 @@
{{input type="text" {{input type="text"
placeholder="100" placeholder="100"
value=amount value=amount
class=(if isValidAmount 'valid' '')}} class=(if isValidAmount "valid" "")}}
</p> </p>
<p> <p>
{{input type="text" {{input type="text"
placeholder="Description" placeholder="Description"
value=description value=description
class=(if isValidDescription 'valid' '')}} class=(if isValidDescription "valid" "")}}
</p> </p>
<p> <p>
{{input type="text" {{input type="text"
placeholder="URL (optional)" placeholder="URL (optional)"
value=url value=url
class=(if isValidUrl 'valid' '')}} class=(if isValidUrl "valid" "")}}
</p> </p>
<p class="actions"> <p class="actions">
{{input type="submit" {{input type="submit"
disabled=(is-pending inProgress) disabled=(is-pending inProgress)
value=(if (is-pending inProgress) 'Processing' 'Save')}} value=(if (is-pending inProgress) "Processing" "Save")}}
{{#link-to 'index'}}Back{{/link-to}} {{#link-to "index"}}Back{{/link-to}}
</p> </p>
</form> </form>
@@ -12,9 +12,14 @@ let categoryColors = {
export default Component.extend({ export default Component.extend({
contributions: null, contributions: null,
chartOptions: Object.freeze({
legend: {
display: false
}
}),
chartData: computed('contributions', function() { chartData: computed('contributions', function() {
let kredits = this.get('contributions') let kredits = this.contributions
.map(c => { .map(c => {
return { kind: c.kind, amount: c.amount } return { kind: c.kind, amount: c.amount }
}).reduce(function (kinds, c) { }).reduce(function (kinds, c) {
@@ -52,12 +57,6 @@ export default Component.extend({
'Documentation' 'Documentation'
], ],
} }
}), })
chartOptions: {
legend: {
display: false
}
}
}); });
@@ -1,5 +1,5 @@
<div class="chart"> <div class="chart">
{{ember-chart type='doughnut' {{ember-chart type="doughnut"
data=chartData data=chartData
options=chartOptions options=chartOptions
width=200 width=200
+3 -3
View File
@@ -1,8 +1,8 @@
<tbody> <tbody>
{{#each contributors as |contributor|}} {{#each contributors as |contributor|}}
<tr class="{{if contributor.isCurrentUser 'current-user'}}" {{action "toggleContributorInfo" contributor}}> <tr role="button" class={{if contributor.isCurrentUser "current-user"}} {{action "toggleContributorInfo" contributor}}>
<td class="person"> <td class="person">
<img class="avatar" src={{contributor.avatarURL}}> <img class="avatar" src={{contributor.avatarURL}} alt="">
{{contributor.name}} {{contributor.name}}
</td> </td>
<td class="kredits"> <td class="kredits">
@@ -10,7 +10,7 @@
<span class="symbol">₭S</span> <span class="symbol">₭S</span>
</td> </td>
</tr> </tr>
<tr class="metadata {{if contributor.isCurrentUser 'current-user'}} {{if contributor.showMetadata 'visible'}}"> <tr class="metadata {{if contributor.isCurrentUser "current-user"}} {{if contributor.showMetadata "visible"}}">
<td colspan="2"> <td colspan="2">
<ul> <ul>
<li><a href="https://testnet.etherscan.io/address/{{contributor.account}}">Inspect Ethereum transactions</a></li> <li><a href="https://testnet.etherscan.io/address/{{contributor.account}}">Inspect Ethereum transactions</a></li>
+2 -2
View File
@@ -1,6 +1,6 @@
import Controller from '@ember/controller'; import Controller from '@ember/controller';
import { inject as injectService } from '@ember/service'; import { inject as service } from '@ember/service';
export default Controller.extend({ export default Controller.extend({
kredits: injectService(), kredits: service(),
}); });
+4 -4
View File
@@ -1,21 +1,21 @@
import Controller from '@ember/controller'; import Controller from '@ember/controller';
import { alias, filter, filterBy, sort } from '@ember/object/computed'; import { alias, filter, filterBy, sort } from '@ember/object/computed';
import { inject as injectService } from '@ember/service'; import { inject as service } from '@ember/service';
export default Controller.extend({ export default Controller.extend({
kredits: injectService(), kredits: service(),
contributors: alias('kredits.contributors'), contributors: alias('kredits.contributors'),
contributorsWithKredits: filter('contributors', function(contributor) { contributorsWithKredits: filter('contributors', function(contributor) {
return contributor.get('balance') !== 0; return contributor.get('balance') !== 0;
}), }),
contributorsSorting: ['balance:desc'], contributorsSorting: Object.freeze(['balance:desc']),
contributorsSorted: sort('contributorsWithKredits', 'contributorsSorting'), contributorsSorted: sort('contributorsWithKredits', 'contributorsSorting'),
proposals: alias('kredits.proposals'), proposals: alias('kredits.proposals'),
proposalsOpen: filterBy('proposals', 'isExecuted', false), proposalsOpen: filterBy('proposals', 'isExecuted', false),
proposalsClosed: filterBy('proposals', 'isExecuted', true), proposalsClosed: filterBy('proposals', 'isExecuted', true),
proposalsSorting: ['id:desc'], proposalsSorting: Object.freeze(['id:desc']),
proposalsClosedSorted: sort('proposalsClosed', 'proposalsSorting'), proposalsClosedSorted: sort('proposalsClosed', 'proposalsSorting'),
proposalsOpenSorted: sort('proposalsOpen', 'proposalsSorting'), proposalsOpenSorted: sort('proposalsOpen', 'proposalsSorting'),
+2 -2
View File
@@ -1,9 +1,9 @@
import Controller from '@ember/controller'; import Controller from '@ember/controller';
import { alias, filterBy } from '@ember/object/computed'; import { alias, filterBy } from '@ember/object/computed';
import { inject as injectService } from '@ember/service'; import { inject as service } from '@ember/service';
export default Controller.extend({ export default Controller.extend({
kredits: injectService(), kredits: service(),
contributors: alias('kredits.contributors'), contributors: alias('kredits.contributors'),
minedContributors: filterBy('contributors', 'id'), minedContributors: filterBy('contributors', 'id'),
+8 -1
View File
@@ -3,6 +3,7 @@ import { alias } from '@ember/object/computed';
import bignumber from 'kredits-web/utils/cps/bignumber'; import bignumber from 'kredits-web/utils/cps/bignumber';
export default EmberObject.extend({ export default EmberObject.extend({
// Contract // Contract
id: bignumber('idRaw', 'toString'), id: bignumber('idRaw', 'toString'),
creatorAccount: null, creatorAccount: null,
@@ -19,7 +20,13 @@ export default EmberObject.extend({
// IPFS // IPFS
kind: null, kind: null,
description: null, description: null,
details: {}, details: null,
url: null, url: null,
ipfsData: '', ipfsData: '',
init () {
this._super(...arguments);
this.set('details', {});
}
}); });
+2 -2
View File
@@ -1,8 +1,8 @@
import { inject as injectService } from '@ember/service'; import { inject as service } from '@ember/service';
import Route from '@ember/routing/route'; import Route from '@ember/routing/route';
export default Route.extend({ export default Route.extend({
kredits: injectService(), kredits: service(),
beforeModel(transition) { beforeModel(transition) {
const kredits = this.kredits; const kredits = this.kredits;
+8 -3
View File
@@ -16,6 +16,8 @@ export default Service.extend({
currentUserAccounts: null, // default to not having an account. this is the wen web3 is loaded. currentUserAccounts: null, // default to not having an account. this is the wen web3 is loaded.
currentUser: null, currentUser: null,
contributors: null,
proposals: null,
currentUserIsContributor: notEmpty('currentUser'), currentUserIsContributor: notEmpty('currentUser'),
currentUserIsCore: alias('currentUser.isCore'), currentUserIsCore: alias('currentUser.isCore'),
hasAccounts: notEmpty('currentUserAccounts'), hasAccounts: notEmpty('currentUserAccounts'),
@@ -23,6 +25,12 @@ export default Service.extend({
return this.currentUserAccounts && isEmpty(this.currentUserAccounts); return this.currentUserAccounts && isEmpty(this.currentUserAccounts);
}), }),
init () {
this._super(...arguments);
this.set('contributors', []);
this.set('proposals', []);
},
// this is called in the routes beforeModel(). So it is initialized before everything else // this is called in the routes beforeModel(). So it is initialized before everything else
// and we can rely on the ethProvider and the potential currentUserAccounts to be available // and we can rely on the ethProvider and the potential currentUserAccounts to be available
getEthProvider: function() { getEthProvider: function() {
@@ -84,9 +92,6 @@ export default Service.extend({
return this.kredits.Token.functions.totalSupply(); return this.kredits.Token.functions.totalSupply();
}), }),
contributors: [],
proposals: [],
loadContributorsAndProposals() { loadContributorsAndProposals() {
return this.getContributors() return this.getContributors()
.then(contributors => this.contributors.pushObjects(contributors)) .then(contributors => this.contributors.pushObjects(contributors))
+2 -2
View File
@@ -52,7 +52,7 @@
{{!-- TODO: We need a better naming --}} {{!-- TODO: We need a better naming --}}
{{#if kredits.hasAccounts}} {{#if kredits.hasAccounts}}
<p class="actions"> <p class="actions">
{{#link-to 'proposals.new'}}Create new proposal{{/link-to}} {{#link-to "proposals.new"}}Create new proposal{{/link-to}}
</p> </p>
{{/if}} {{/if}}
</section> </section>
@@ -66,7 +66,7 @@
<div class="content"> <div class="content">
{{#if kredits.currentUser.isCore}} {{#if kredits.currentUser.isCore}}
{{add-contributor contributors=contributors save=(action 'save')}} {{add-contributor contributors=contributors save=(action "save")}}
{{else}} {{else}}
Only core team members can add new contributors. Please ask someone to set you up. Only core team members can add new contributors. Please ask someone to set you up.
{{/if}} {{/if}}
+1 -1
View File
@@ -4,7 +4,7 @@
</header> </header>
<div class="content"> <div class="content">
{{add-proposal contributors=minedContributors save=(action 'save')}} {{add-proposal contributors=minedContributors save=(action "save")}}
</div> </div>
</section> </section>
+3
View File
@@ -0,0 +1,3 @@
{
"jquery-integration": true
}
+7390 -2064
View File
File diff suppressed because it is too large Load Diff
+27 -22
View File
@@ -3,61 +3,66 @@
"version": "1.0.0", "version": "1.0.0",
"private": true, "private": true,
"description": "Contribution dashboard of the Kosmos project", "description": "Contribution dashboard of the Kosmos project",
"repository": "https://github.com/67P/kredits-web",
"license": "MIT", "license": "MIT",
"author": "Kosmos Contributors <mail@kosmos.org>", "author": "Kosmos Contributors <mail@kosmos.org>",
"directories": { "directories": {
"doc": "doc", "doc": "doc",
"test": "tests" "test": "tests"
}, },
"repository": "https://github.com/67P/kredits-web",
"scripts": { "scripts": {
"lint:js": "eslint ./*.js app config lib server tests", "lint:hbs": "ember-template-lint .",
"lint:js": "eslint .",
"start": "ember serve", "start": "ember serve",
"start:local": "NETWORK_ID=100 WEB3_PROVIDER_URL=http://localhost:7545 ember s",
"test": "ember test", "test": "ember test",
"start:local": "NETWORK_ID=100 WEB3_PROVIDER_URL=http://localhost:7545 ember s",
"build": "ember build", "build": "ember build",
"build-prod": "ember build --environment production", "build-prod": "ember build --environment production",
"update-version-file": "bash scripts/update-version-file.sh", "update-version-file": "bash scripts/update-version-file.sh",
"deploy": "npm run build-prod && npm run update-version-file && bash scripts/deploy.sh" "deploy": "npm run build-prod && npm run update-version-file && bash scripts/deploy.sh"
}, },
"devDependencies": { "devDependencies": {
"@ember/jquery": "^0.5.2",
"@ember/optional-features": "^0.6.3",
"babel-preset-es2015": "^6.22.0", "babel-preset-es2015": "^6.22.0",
"babelify": "^7.3.0", "babelify": "^7.3.0",
"broccoli-asset-rev": "^2.4.5", "broccoli-asset-rev": "^2.7.0",
"ember-ajax": "^3.0.0", "ember-ajax": "^4.0.1",
"ember-awesome-macros": "0.41.0", "ember-awesome-macros": "0.41.0",
"ember-browserify": "^1.1.13", "ember-browserify": "^1.1.13",
"ember-cli": "~3.1.2", "ember-cli": "~3.8.1",
"ember-cli-app-version": "^3.0.0", "ember-cli-app-version": "^3.2.0",
"ember-cli-babel": "^6.6.0", "ember-cli-babel": "^7.1.2",
"ember-cli-chart": "^3.4.0", "ember-cli-chart": "^3.4.0",
"ember-cli-dependency-checker": "^2.0.0", "ember-cli-dependency-checker": "^3.1.0",
"ember-cli-eslint": "^4.2.1", "ember-cli-eslint": "^4.2.3",
"ember-cli-htmlbars": "^2.0.1", "ember-cli-htmlbars": "^3.0.0",
"ember-cli-htmlbars-inline-precompile": "^1.0.0", "ember-cli-htmlbars-inline-precompile": "^1.0.3",
"ember-cli-inject-live-reload": "^1.4.1", "ember-cli-inject-live-reload": "^1.8.2",
"ember-cli-qunit": "^4.1.1",
"ember-cli-sass": "^7.2.0", "ember-cli-sass": "^7.2.0",
"ember-cli-sri": "^2.1.0", "ember-cli-sri": "^2.1.1",
"ember-cli-uglify": "^2.0.0", "ember-cli-template-lint": "^1.0.0-beta.1",
"ember-cli-uglify": "^2.1.0",
"ember-cli-update": "^0.21.2", "ember-cli-update": "^0.21.2",
"ember-export-application-global": "^2.0.0", "ember-export-application-global": "^2.0.0",
"ember-load-initializers": "^1.0.0", "ember-load-initializers": "^1.1.0",
"ember-macro-helpers": "0.17.0", "ember-macro-helpers": "0.17.0",
"ember-maybe-import-regenerator": "^0.1.6", "ember-maybe-import-regenerator": "^0.1.6",
"ember-promise-helpers": "1.0.6", "ember-promise-helpers": "1.0.6",
"ember-resolver": "^4.0.0", "ember-qunit": "^3.4.1",
"ember-source": "~3.1.0", "ember-resolver": "^5.0.1",
"ember-source": "~3.8.0",
"ember-truth-helpers": "github:jmurphyau/ember-truth-helpers#31a14373a31f1f82c77537720549b47a95c28e5f", "ember-truth-helpers": "github:jmurphyau/ember-truth-helpers#31a14373a31f1f82c77537720549b47a95c28e5f",
"eslint-plugin-ember": "^5.0.0", "eslint-plugin-ember": "^5.2.0",
"ethers": "3.0.15", "ethers": "3.0.15",
"kosmos-schemas": "^1.1.2", "kosmos-schemas": "^1.1.2",
"kredits-contracts": "^3.x", "kredits-contracts": "^3.x",
"loader.js": "^4.2.3", "loader.js": "^4.7.0",
"qunit-dom": "^0.8.0",
"tv4": "^1.3.0" "tv4": "^1.3.0"
}, },
"engines": { "engines": {
"node": "^4.5 || 6.* || >= 7.*" "node": "6.* || 8.* || >= 10.*"
}, },
"contributors": [ "contributors": [
"Garret Alfert <alfert@wevelop.de>", "Garret Alfert <alfert@wevelop.de>",
+6 -5
View File
@@ -9,13 +9,14 @@ module.exports = {
], ],
browser_args: { browser_args: {
Chrome: { Chrome: {
mode: 'ci', ci: [
args: [
// --no-sandbox is needed when running Chrome inside a container // --no-sandbox is needed when running Chrome inside a container
process.env.TRAVIS ? '--no-sandbox' : null, process.env.CI ? '--no-sandbox' : null,
'--disable-gpu',
'--headless', '--headless',
'--disable-gpu',
'--disable-dev-shm-usage',
'--disable-software-rasterizer',
'--mute-audio',
'--remote-debugging-port=0', '--remote-debugging-port=0',
'--window-size=1440,900' '--window-size=1440,900'
].filter(Boolean) ].filter(Boolean)
@@ -1,6 +1,6 @@
import { module, test } from 'qunit'; import { module, test } from 'qunit';
import { setupRenderingTest } from 'ember-qunit'; import { setupRenderingTest } from 'ember-qunit';
import { render, find } from '@ember/test-helpers'; import { render } from '@ember/test-helpers';
import hbs from 'htmlbars-inline-precompile'; import hbs from 'htmlbars-inline-precompile';
module('Integration | Component | add proposal', function(hooks) { module('Integration | Component | add proposal', function(hooks) {
@@ -13,6 +13,6 @@ module('Integration | Component | add proposal', function(hooks) {
await render(hbs`{{add-proposal}}`); await render(hbs`{{add-proposal}}`);
assert.equal(find('.actions a').textContent.trim(), 'Back'); assert.dom('.actions a').hasText('Back');
}); });
}); });
@@ -24,6 +24,6 @@ module('Integration | Component | chart-contributions-by-type', function(hooks)
await render(hbs`{{chart-contributions-by-type contributions=proposals}}`); await render(hbs`{{chart-contributions-by-type contributions=proposals}}`);
assert.equal(this.element.textContent.trim(), ''); assert.dom(this.element).hasText('');
}); });
}); });
@@ -1,6 +1,6 @@
import { module, test } from 'qunit'; import { module, test } from 'qunit';
import { setupRenderingTest } from 'ember-qunit'; import { setupRenderingTest } from 'ember-qunit';
import { render, find } from '@ember/test-helpers'; import { render } from '@ember/test-helpers';
import hbs from 'htmlbars-inline-precompile'; import hbs from 'htmlbars-inline-precompile';
module('Integration | Component | contributor list', function(hooks) { module('Integration | Component | contributor list', function(hooks) {
@@ -13,6 +13,6 @@ module('Integration | Component | contributor list', function(hooks) {
await render(hbs`{{contributor-list}}`); await render(hbs`{{contributor-list}}`);
assert.equal(find('*').textContent.trim(), ''); assert.dom('*').hasText('');
}); });
}); });
@@ -1,6 +1,6 @@
import { module, test } from 'qunit'; import { module, test } from 'qunit';
import { setupRenderingTest } from 'ember-qunit'; import { setupRenderingTest } from 'ember-qunit';
import { render, find } from '@ember/test-helpers'; import { render } from '@ember/test-helpers';
import hbs from 'htmlbars-inline-precompile'; import hbs from 'htmlbars-inline-precompile';
module('Integration | Component | loading spinner', function(hooks) { module('Integration | Component | loading spinner', function(hooks) {
@@ -13,6 +13,6 @@ module('Integration | Component | loading spinner', function(hooks) {
await render(hbs`{{loading-spinner}}`); await render(hbs`{{loading-spinner}}`);
assert.equal(find('*').textContent.trim(), 'Loading data from Ethereum...'); assert.dom('*').hasText('Loading data from Ethereum...');
}); });
}); });
@@ -1,6 +1,6 @@
import { module, test } from 'qunit'; import { module, test } from 'qunit';
import { setupRenderingTest } from 'ember-qunit'; import { setupRenderingTest } from 'ember-qunit';
import { render, find } from '@ember/test-helpers'; import { render } from '@ember/test-helpers';
import hbs from 'htmlbars-inline-precompile'; import hbs from 'htmlbars-inline-precompile';
module('Integration | Component | proposal list', function(hooks) { module('Integration | Component | proposal list', function(hooks) {
@@ -13,6 +13,6 @@ module('Integration | Component | proposal list', function(hooks) {
await render(hbs`{{proposal-list}}`); await render(hbs`{{proposal-list}}`);
assert.equal(find('*').textContent.trim(), ''); assert.dom('*').hasText('');
}); });
}); });