Add Arc MIAA delete action back (#11901)

* Add Arc MIAA delete action back

* fix
This commit is contained in:
Charles Gagnon
2020-08-21 14:10:29 -07:00
committed by GitHub
parent b4d61a067e
commit a6efd56844
14 changed files with 259 additions and 253 deletions

View File

@@ -139,7 +139,7 @@ describe('promptForResourceDeletion Method Tests', function (): void {
});
it('Resolves as true when value entered is correct', function (done): void {
promptForResourceDeletion('mynamespace', 'myname').then((value: boolean) => {
promptForResourceDeletion('myname').then((value: boolean) => {
value ? done() : done(new Error('Expected return value to be true'));
});
mockInputBox.value = 'myname';
@@ -147,14 +147,14 @@ describe('promptForResourceDeletion Method Tests', function (): void {
});
it('Resolves as false when input box is closed early', function (done): void {
promptForResourceDeletion('mynamespace', 'myname').then((value: boolean) => {
promptForResourceDeletion('myname').then((value: boolean) => {
!value ? done() : done(new Error('Expected return value to be false'));
});
mockInputBox.hide();
});
it('Validation message is set when value entered is incorrect', async function (): Promise<void> {
promptForResourceDeletion('mynamespace', 'myname');
promptForResourceDeletion('myname');
mockInputBox.value = 'wrong value';
await mockInputBox.triggerAccept();
should(mockInputBox.validationMessage).not.be.equal('', 'Validation message should not be empty after incorrect value entered');