Add persistence and connect dialog to Arc view (#11014)

* Add controller persistence and info prompting

* more stuff

* clean up

* Add arc tests to scripts
This commit is contained in:
Charles Gagnon
2020-06-19 14:35:11 -07:00
committed by GitHub
parent c879d77b62
commit f278e2a7a2
17 changed files with 576 additions and 176 deletions

View File

@@ -5,7 +5,7 @@
import * as should from 'should';
import 'mocha';
import { resourceTypeToDisplayName, parseEndpoint } from '../../common/utils';
import { resourceTypeToDisplayName, parseEndpoint, parseInstanceName } from '../../common/utils';
import * as loc from '../../localizedConstants';
import { ResourceType } from '../../constants';
@@ -44,3 +44,20 @@ describe('parseEndpoint Method Tests', () => {
});
});
describe('parseInstanceName Method Tests', () => {
it('Should parse valid instanceName with namespace correctly', function (): void {
should(parseInstanceName('mynamespace_myinstance')).equal('myinstance');
});
it('Should parse valid instanceName without namespace correctly', function (): void {
should(parseInstanceName('myinstance')).equal('myinstance');
});
it('Should return empty string when undefined value passed in', function (): void {
should(parseInstanceName(undefined)).equal('');
});
it('Should return empty string when empty string value passed in', function (): void {
should(parseInstanceName('')).equal('');
});
});