Skip to content

Commit

Permalink
Change component.browser tests to use test harness app
Browse files Browse the repository at this point in the history
  • Loading branch information
craigbeck committed Jul 3, 2024
1 parent b293fc7 commit dddcef2
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions test/dom/components.browser.mocha.js
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ describe('components', function() {

describe('attribute to model binding', function() {
it('updates model when path attribute changes', function() {
this.app = derby.createApp();
this.app = runner.createHarness().app;
this.page = this.app.createPage();
this.page.model.set('_page.color', 'blue');
this.app.views.register('Body',
Expand All @@ -398,7 +398,7 @@ describe('components', function() {
});

it('updates model when expression attribute changes', function() {
this.app = derby.createApp();
this.app = runner.createHarness().app;
this.page = this.app.createPage();
this.page.model.set('_page.color', 'blue');
this.app.proto.concat = function() {
Expand All @@ -423,7 +423,7 @@ describe('components', function() {
});

it('updates model when template attribute changes', function() {
this.app = derby.createApp();
this.app = runner.createHarness().app;
this.page = this.app.createPage();
this.page.model.set('_page.color', 'blue');
this.app.proto.concat = function() {
Expand All @@ -448,7 +448,7 @@ describe('components', function() {
});

it('updates view expression', function() {
this.app = derby.createApp();
this.app = runner.createHarness().app;
this.page = this.app.createPage();
this.page.model.set('_page.color', 'blue');
this.page.model.set('_page.view', 'back');
Expand Down Expand Up @@ -479,7 +479,7 @@ describe('components', function() {
});

it('updates when template attribute is updated to new value inside component model', function() {
this.app = derby.createApp();
this.app = runner.createHarness().app;
this.page = this.app.createPage();
this.page.model.set('_page.color', 'blue');
this.app.proto.concat = function() {
Expand All @@ -505,7 +505,7 @@ describe('components', function() {
});

it('renders template attribute passed through component and partial with correct context', function() {
this.app = derby.createApp();
this.app = runner.createHarness().app;
this.page = this.app.createPage();
this.page.model.set('_page.color', 'blue');
// `Body` uses the `picture-exhibit` component, passing in the `swatch` template as a
Expand Down Expand Up @@ -541,7 +541,7 @@ describe('components', function() {
});

it('updates within template content', function() {
this.app = derby.createApp();
this.app = runner.createHarness().app;
this.page = this.app.createPage();
this.page.model.set('_page.width', 10);
this.page.model.set('_page.color', 'blue');
Expand All @@ -567,7 +567,7 @@ describe('components', function() {
});

it('updates within template attribute', function() {
this.app = derby.createApp();
this.app = runner.createHarness().app;
this.page = this.app.createPage();
this.app.views.register('Body',
'<view is="swatch">' +
Expand All @@ -592,7 +592,7 @@ describe('components', function() {
});

it('updates within template attribute in model', function() {
this.app = derby.createApp();
this.app = runner.createHarness().app;
this.page = this.app.createPage();
this.app.views.register('Body',
'<view is="swatch">' +
Expand All @@ -617,7 +617,7 @@ describe('components', function() {
});

it('updates within expression attribute by making it a template', function() {
this.app = derby.createApp();
this.app = runner.createHarness().app;
this.page = this.app.createPage();
this.app.views.register('Body',
'<view is="swatch">' +
Expand Down Expand Up @@ -645,7 +645,7 @@ describe('components', function() {
});

it('updates within attribute bound to component model path', function() {
this.app = derby.createApp();
this.app = runner.createHarness().app;
this.page = this.app.createPage();
this.app.views.register('Body',
'<view is="swatch">' +
Expand All @@ -667,7 +667,7 @@ describe('components', function() {
});

it('updates array within template attribute', function() {
this.app = derby.createApp();
this.app = runner.createHarness().app;
this.page = this.app.createPage();
this.app.views.register('Body',
'<view is="swatch">' +
Expand Down Expand Up @@ -702,7 +702,7 @@ describe('components', function() {
});

it('updates array within template attribute with content alias', function() {
this.app = derby.createApp();
this.app = runner.createHarness().app;
this.page = this.app.createPage();
this.app.views.register('Body',
'<view is="swatch">' +
Expand Down Expand Up @@ -739,7 +739,7 @@ describe('components', function() {
});

it('updates array within template attribute in model', function() {
this.app = derby.createApp();
this.app = runner.createHarness().app;
this.page = this.app.createPage();
this.app.views.register('Body',
'<view is="swatch">' +
Expand Down Expand Up @@ -769,7 +769,7 @@ describe('components', function() {
});

it('updates array within template attribute in model from partial', function() {
this.app = derby.createApp();
this.app = runner.createHarness().app;
this.page = this.app.createPage();
this.app.views.register('Body',
'<view is="swatch">' +
Expand Down Expand Up @@ -802,7 +802,7 @@ describe('components', function() {
});

it('updates array within attribute bound to component model path', function() {
this.app = derby.createApp();
this.app = runner.createHarness().app;
this.page = this.app.createPage();
this.app.views.register('Body',
'<view is="swatch">' +
Expand Down Expand Up @@ -835,7 +835,7 @@ describe('components', function() {
});

it('updates array within expression attribute by making it a template', function() {
this.app = derby.createApp();
this.app = runner.createHarness().app;
this.page = this.app.createPage();
this.app.views.register('Body',
'<view is="swatch">' +
Expand Down Expand Up @@ -868,7 +868,7 @@ describe('components', function() {

describe('rendering', function() {
beforeEach(function() {
this.app = derby.createApp();
this.app = runner.createHarness().app;
this.page = this.app.createPage();
this.page.model.set('_page.title', 'Good day');
this.app.views.register('Body',
Expand Down

0 comments on commit dddcef2

Please sign in to comment.