In LWC Superbadge Challenge 13, what import am I allegedly missing? - Answers - Salesforce Trailblazer Community
Trailblazer Community
Ask Search:
Brian KesslerBrian Kessler 

In LWC Superbadge Challenge 13, what import am I allegedly missing?

I have completed all the tehcanical requirements for the Lightning Web Components Specialist superbadge, but because the authors of the challenge don't understand rule #1 of professional testing (DO NOT TEST IMPLEMENTATION DETAILS), I am having trouble to collect my badge.

At present, I am stuck on challenge 13 with the error:
Challenge Not yet complete... here's what's wrong:
We can't find the required imports in the component boatDetailTabs JavaScript file. Make sure the component was created according to the requirements, including the imports from the module that includes wire adapters to record data.

As my solution is fully functional, it seems either their solution has an unnecessary dependency or that their algorithm for checking (which shouldn't exist anyway) is defective.

Alternatively, they are breaking another rule of testing (each test should test one and only one thing) and they've compounded this problem by providing a useless and even misleading error message.

Either way, these are my imports:
 
import {APPLICATION_SCOPE, MessageContext, subscribe} from 'lightning/messageService';
import {NavigationMixin} from 'lightning/navigation';
import {getFieldValue, getRecord} from 'lightning/uiRecordApi';
import {LightningElement, track, wire} from 'lwc';
import labelAddReview from '@salesforce/label/c.Add_Review';
import labelDetails from '@salesforce/label/c.Details';
import labelFullDetails from '@salesforce/label/c.Full_Details';
import labelReviews from '@salesforce/label/c.Reviews';
import labelPleaseSelectABoat from '@salesforce/label/c.Please_select_a_boat';
import {refreshApex} from '@salesforce/apex';
import BOATMC from '@salesforce/messageChannel/BoatMessageChannel__c';
import BOAT_TYPE_FIELD from '@salesforce/schema/Boat__c.BoatType__c';
import BOAT_ID_FIELD from '@salesforce/schema/Boat__c.Id';
import BOAT_DESCRIPTION_FIELD from '@salesforce/schema/Boat__c.Description__c';
import BOAT_NAME_FIELD from '@salesforce/schema/Boat__c.Name';
import BOAT_LENGTH_FIELD from '@salesforce/schema/Boat__c.Length__c';
import BOAT_PRICE_FIELD from '@salesforce/schema/Boat__c.Price__c';

Can someone please tell me what I is "missing"?

Thanks,
-Brian.

 
Best Answer chosen by Brian Kessler
Todd HalfpennyTodd Halfpenny

Oh my life!

I've been trying to get past this issue for almost an hour and a half now, and I thought what if I just change the order of "getFieldValue" and "getRecord" round (I had them like you - in alphabetical order), but this was not in the order they were mentioned in the challenge.

AND NOW IT WORKS (or at least I'm onto the next error).

Would you mind trying this out too please @Brian?

All Answers

Todd HalfpennyTodd Halfpenny

Oh my life!

I've been trying to get past this issue for almost an hour and a half now, and I thought what if I just change the order of "getFieldValue" and "getRecord" round (I had them like you - in alphabetical order), but this was not in the order they were mentioned in the challenge.

AND NOW IT WORKS (or at least I'm onto the next error).

Would you mind trying this out too please @Brian?

This was selected as the best answer
Brian KesslerBrian Kessler
That worked!

Thanks!
Mike LockettMike Lockett
Same here. These issues are painful. :-(