• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

CenterForOpenScience / ember-osf-web / 16118219201

07 Jul 2025 01:24PM UTC coverage: 67.207% (-0.2%) from 67.382%
16118219201

Pull #2595

github

web-flow
Merge 0da7bb715 into 186fd8065
Pull Request #2595: [ENG-6835] [ENG-8060] [ENG-8289] VRL Project PR - FE

3275 of 5343 branches covered (61.3%)

Branch coverage included in aggregate %.

40 of 112 new or added lines in 16 files covered. (35.71%)

3 existing lines in 1 file now uncovered.

8536 of 12231 relevant lines covered (69.79%)

184.39 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/app/models/authorized-link-account.ts
1
import { AsyncBelongsTo, belongsTo } from '@ember-data/model';
2
import { waitFor } from '@ember/test-waiters';
3
import { task } from 'ember-concurrency';
4
import { ConnectedLinkOperationNames, OperationKwargs } from 'ember-osf-web/models/addon-operation-invocation';
5

6
import ExternalLinkServiceModel from 'ember-osf-web/models/external-link-service';
7
import AuthorizedAccountModel from './authorized-account';
8
import UserReferenceModel from './user-reference';
9

10
export default class AuthorizedLinkAccountModel extends AuthorizedAccountModel {
11
    @belongsTo('user-reference', { inverse: 'authorizedLinkAccounts' })
12
    readonly accountOwner!: AsyncBelongsTo<UserReferenceModel> & UserReferenceModel;
13

14
    @belongsTo('external-link-service')
15
    externalLinkService!: AsyncBelongsTo<ExternalLinkServiceModel> & ExternalLinkServiceModel;
16

17
    @task
18
    @waitFor
19
    async getFolderItems(this: AuthorizedAccountModel, kwargs?: OperationKwargs) {
NEW
20
        const operationKwargs = kwargs || {};
×
NEW
21
        const operationName = operationKwargs.itemId ? ConnectedLinkOperationNames.ListChildItems :
×
22
            ConnectedLinkOperationNames.ListRootItems;
NEW
23
        const newInvocation = this.store.createRecord('addon-operation-invocation', {
×
24
            operationName,
25
            operationKwargs,
26
            thruAccount: this,
27
        });
NEW
28
        return await newInvocation.save();
×
29
    }
30

31
    @task
32
    @waitFor
33
    async getItemInfo(this: AuthorizedAccountModel, itemId: string) {
NEW
34
        const newInvocation = this.store.createRecord('addon-operation-invocation', {
×
35
            operationName: ConnectedLinkOperationNames.GetItemInfo,
36
            operationKwargs: { itemId },
37
            thruAccount: this,
38
        });
NEW
39
        return await newInvocation.save();
×
40
    }
41
}
42

43
declare module 'ember-data/types/registries/model' {
44
    export default interface ModelRegistry {
45
        'authorized-link-account': AuthorizedLinkAccountModel;
46
    } // eslint-disable-line semi
47
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc