Removed test

This commit is contained in:
Darangi 2019-11-05 14:41:15 +01:00
parent 1122230239
commit 97e9f8858d

View File

@ -1,35 +0,0 @@
function selectElement(el) {
const range = atom.document.createRange();
range.selectNodeContents(el);
const sel = window.getSelection();
sel.removeAllRanges();
sel.addRange(range);
}
describe('Spec suite window', () => {
it('Ctrl + C should copy selected text', async () => {
atom.clipboard.write('lorem ipsum');
const element = atom.document.querySelectorAll('.symbol-header')[2];
selectElement(element);
expect(atom.clipboard.read()).toBe('lorem ipsum');
// simulate ctrl+c
atom.document.dispatchEvent(
new KeyboardEvent('keydown', { keyCode: 67, ctrlKey: true })
);
let copiedText = atom.clipboard
.read()
.toLowerCase()
.split(' ');
// eliminate the 'Spec' attached to the name
copiedText.pop();
copiedText = copiedText.join(' ');
const projectPath = atom.project.getPaths()[0];
expect(projectPath).toContain(copiedText);
});
});