From c5a04867dd1516ed16ca9aeba866425be5fc3757 Mon Sep 17 00:00:00 2001 From: Jonas Cosandey Date: Thu, 20 Aug 2020 08:38:34 +0200 Subject: [PATCH] test(scope): fix scope acceptance test issue --- addon/components/relationship-select.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/addon/components/relationship-select.js b/addon/components/relationship-select.js index 2454f352..f880f44f 100644 --- a/addon/components/relationship-select.js +++ b/addon/components/relationship-select.js @@ -26,6 +26,9 @@ export default class RelationshipSelectComponent extends Component { }); } - return this.store.findAll(this.args.modelName); + // For some reason the this.model.lenght is 1 and this.model.content.length is 2 + // It looks like an issue with the way findAll retrieves all cached first before making a request. + // The {reload: true} fixes this since the cached are ignored. + return yield this.store.findAll(this.args.modelName, { reload: true }); } }