Skip to content

Commit ec32747

Browse files
committed
revert is-empty flag change, leave todo
1 parent c754fd6 commit ec32747

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

addon/-legacy-private/system/model/states.js

-1
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,6 @@ const RootState = {
521521
loading: {
522522
// FLAGS
523523
isLoading: true,
524-
isEmpty: true,
525524

526525
exit(internalModel) {
527526
internalModel._promiseProxy = null;

addon/-record-data-private/system/model/states.js

-1
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,6 @@ const RootState = {
518518
// XHR to retrieve the data.
519519
loading: {
520520
// FLAGS
521-
isEmpty: true,
522521
isLoading: true,
523522

524523
exit(internalModel) {

tests/integration/records/load-test.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import JSONAPIAdapter from 'ember-data/adapters/json-api';
77
import JSONAPISerializer from 'ember-data/serializers/json-api';
88
import { attr, belongsTo } from '@ember-decorators/data';
99
import { run } from '@ember/runloop';
10+
import todo from '../../helpers/todo';
1011

1112
class Person extends Model {
1213
@attr name;
@@ -40,7 +41,7 @@ module('integration/load - Loading Records', function(hooks) {
4041
});
4142
});
4243

43-
test('Empty records remain in the empty state while data is being fetched', async function(assert) {
44+
todo('Empty records remain in the empty state while data is being fetched', async function(assert) {
4445
let payloads = [
4546
{
4647
data: {
@@ -125,7 +126,7 @@ module('integration/load - Loading Records', function(hooks) {
125126
let recordPromise = store.findRecord('person', '1');
126127

127128
// test that during the initial load our state is correct
128-
assert.equal(
129+
assert.todo.equal(
129130
internalModel.isEmpty(),
130131
true,
131132
'awaiting first fetch: We remain in the empty state'
@@ -180,7 +181,7 @@ module('integration/load - Loading Records', function(hooks) {
180181

181182
// test that during a reload-due-to-unload our state is correct
182183
// This requires a retainer (the async bestFriend relationship)
183-
assert.equal(internalModel.isEmpty(), true, 'awaiting second find: We remain empty');
184+
assert.todo.equal(internalModel.isEmpty(), true, 'awaiting second find: We remain empty');
184185
assert.equal(internalModel.isLoading(), true, 'awaiting second find: We are loading again');
185186
assert.equal(internalModel.isReloading, false, 'awaiting second find: We are not reloading');
186187

0 commit comments

Comments
 (0)