All files / realm/blong-party/test organization.play.ts

100% Statements 39/39
100% Branches 1/1
100% Functions 0/0
100% Lines 39/39

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 401x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 1x  
/**
 * Organization CRUD — Browse, Create, Edit full-stack tests.
 *
 * `party.organization` is guarded by a record-level ACL whose scope *is* the
 * organization (units point at it, `selfScope`).  The Admin role carries the
 * wildcard allow-all rule the access realm seeds, so an organization it creates
 * stays readable — that is what makes the create flow work.
 */
import {expect, test} from '@feasibleone/blong-browser/playwright';
import {browseModel, createAndEditModel} from '@feasibleone/blong-browser/playwright/model';
 
test.use({blongPermissions: true});
 
test.describe('Party Organization', () => {
    browseModel(test, expect, {
        subject: 'party',
        object: 'organization',
        searchText: 'Global Bank',
    });
 
    createAndEditModel(test, expect, {
        subject: 'party',
        object: 'organization',
        fields: {
            'organization.legalName': 'Test Playwright Organization',
            'organization.tradingName': 'TestOrg PW',
            'organization.registrationNumber': 'REG-PW-00001',
            'organization.taxId': 'TX-PW-0000000',
            'organization.establishedDate': '01/01/2020',
            'organization.industry': 'Technology',
            'organization.website': 'https://testplaywright.example.com',
            'organization.notes': 'A test organization created by Playwright',
        },
        editFields: {
            'organization.legalName': 'Test Playwright Organization Edited',
        },
        search: 'Test Playwright',
    });
});