Skip to content

Commit 7733f23

Browse files
committed
Incorporate @maxfierke's tests from #226
1 parent e5cea56 commit 7733f23

File tree

8 files changed

+1204
-468
lines changed

8 files changed

+1204
-468
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
@value gray-100 from 'embroider-app/styles/variables';
2+
13
.test-component {
4+
color: gray-100;
25
font-family: TestComponent;
36
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
@value gray-100 from 'embroider-app/styles/variables';
2+
3+
.nested-test-component {
4+
color: gray-100;
5+
font-family: NestedTestComponent;
6+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<div local-class="nested-test-component">{{yield}}</div>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@value gray-100: #E0E0E0;

test-packages/embroider-app/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@
2020
},
2121
"devDependencies": {
2222
"@ember/optional-features": "^1.3.0",
23-
"@embroider/compat": "^0.13.0",
24-
"@embroider/core": "^0.13.0",
25-
"@embroider/webpack": "^0.13.0",
23+
"@embroider/compat": "^0.39.1",
24+
"@embroider/core": "^0.39.1",
25+
"@embroider/webpack": "^0.39.1",
2626
"@glimmer/component": "^1.0.0",
2727
"@glimmer/tracking": "^1.0.0",
2828
"babel-eslint": "^10.1.0",
29-
"ember-auto-import": "^1.5.3",
29+
"ember-auto-import": "^1.11.2",
3030
"ember-cli": "~3.17.0",
3131
"ember-cli-babel": "^7.18.0",
3232
"ember-cli-dependency-checker": "^3.2.0",

test-packages/embroider-app/tests/integration/components/test-component-test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,6 @@ module('Integration | Component | TestComponent', function(hooks) {
1717
let styles = getComputedStyle(element);
1818

1919
assert.equal(styles.fontFamily, 'TestComponent');
20+
assert.equal(styles.color, 'rgb(224, 224, 224)');
2021
});
2122
});
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import { module, test } from 'qunit';
2+
import { setupRenderingTest } from 'ember-qunit';
3+
import { render } from '@ember/test-helpers';
4+
import { hbs } from 'ember-cli-htmlbars';
5+
6+
module('Integration | Component | TestNamespace::NestedEmbroiderAppComponent', function(hooks) {
7+
setupRenderingTest(hooks);
8+
9+
test('it renders with the correct styles', async function(assert) {
10+
await render(hbs`
11+
<TestNamespace::NestedEmbroiderAppComponent>
12+
<span data-test>hello</span>
13+
</TestNamespace::NestedEmbroiderAppComponent>
14+
`);
15+
16+
let element = this.element.querySelector('[data-test]');
17+
let styles = getComputedStyle(element);
18+
19+
assert.equal(styles.fontFamily, 'NestedTestComponent');
20+
assert.equal(styles.color, 'rgb(224, 224, 224)');
21+
});
22+
});

yarn.lock

Lines changed: 1166 additions & 464 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)