mirror of
https://github.com/usebruno/bruno.git
synced 2026-07-07 14:08:38 +00:00
Import WSDL to collection (#5015)
* Import WSDL to bruno collection * feat(wsdl-import): remove unused code and minor refactor --------- Co-authored-by: Bijin Bruno <bijin@usebruno.com>
This commit is contained in:
@@ -29,7 +29,7 @@ const COPY_SUCCESS_COLOR = '#22c55e';
|
||||
|
||||
export const COPY_SUCCESS_TIMEOUT = 1000;
|
||||
|
||||
const getCopyButton = variableValue => {
|
||||
const getCopyButton = (variableValue) => {
|
||||
const copyButton = document.createElement('button');
|
||||
|
||||
copyButton.className = 'copy-button';
|
||||
@@ -64,7 +64,7 @@ const getCopyButton = variableValue => {
|
||||
copyButton.style.opacity = '0.7';
|
||||
});
|
||||
|
||||
copyButton.addEventListener('click', e => {
|
||||
copyButton.addEventListener('click', (e) => {
|
||||
e.stopPropagation();
|
||||
|
||||
// Prevent clicking if showing success checkmark
|
||||
@@ -91,7 +91,7 @@ const getCopyButton = variableValue => {
|
||||
copyButton.classList.remove('copy-success');
|
||||
}, COPY_SUCCESS_TIMEOUT);
|
||||
})
|
||||
.catch(err => {
|
||||
.catch((err) => {
|
||||
console.error('Failed to copy to clipboard:', err.message);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -237,7 +237,7 @@ describe('renderVarInfo', () => {
|
||||
clipboardText = '';
|
||||
Object.defineProperty(navigator, 'clipboard', {
|
||||
value: {
|
||||
writeText: jest.fn(text => {
|
||||
writeText: jest.fn((text) => {
|
||||
if (text === 'cause-clipboard-error') {
|
||||
return Promise.reject(new Error('Clipboard error'));
|
||||
}
|
||||
@@ -245,9 +245,9 @@ describe('renderVarInfo', () => {
|
||||
clipboardText = text;
|
||||
|
||||
return Promise.resolve();
|
||||
}),
|
||||
})
|
||||
},
|
||||
configurable: true,
|
||||
configurable: true
|
||||
});
|
||||
|
||||
// mock console.error
|
||||
@@ -283,7 +283,7 @@ describe('renderVarInfo', () => {
|
||||
it('should correctly mask the variable value in the popup', () => {
|
||||
const { descriptionDiv } = setupRender({
|
||||
apiKey: 'test-value',
|
||||
maskedEnvVariables: ['apiKey'],
|
||||
maskedEnvVariables: ['apiKey']
|
||||
});
|
||||
|
||||
expect(descriptionDiv.textContent).toBe('*****');
|
||||
|
||||
Reference in New Issue
Block a user