Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/frontend/issuable_form_spec.js')
-rw-r--r--spec/frontend/issuable_form_spec.js62
1 files changed, 0 insertions, 62 deletions
diff --git a/spec/frontend/issuable_form_spec.js b/spec/frontend/issuable_form_spec.js
deleted file mode 100644
index c77fde4261e..00000000000
--- a/spec/frontend/issuable_form_spec.js
+++ /dev/null
@@ -1,62 +0,0 @@
-import $ from 'jquery';
-
-import IssuableForm from '~/issuable_form';
-
-function createIssuable() {
- const instance = new IssuableForm($(document.createElement('form')));
-
- instance.titleField = $(document.createElement('input'));
-
- return instance;
-}
-
-describe('IssuableForm', () => {
- let instance;
-
- beforeEach(() => {
- instance = createIssuable();
- });
-
- describe('removeWip', () => {
- it.each`
- prefix
- ${'draFT: '}
- ${' [DRaft] '}
- ${'drAft:'}
- ${'[draFT]'}
- ${'(draft) '}
- ${' (DrafT)'}
- ${'draft: [draft] (draft)'}
- `('removes "$prefix" from the beginning of the title', ({ prefix }) => {
- instance.titleField.val(`${prefix}The Issuable's Title Value`);
-
- instance.removeWip();
-
- expect(instance.titleField.val()).toBe("The Issuable's Title Value");
- });
- });
-
- describe('addWip', () => {
- it("properly adds the work in progress prefix to the Issuable's title", () => {
- instance.titleField.val("The Issuable's Title Value");
-
- instance.addWip();
-
- expect(instance.titleField.val()).toBe("Draft: The Issuable's Title Value");
- });
- });
-
- describe('workInProgress', () => {
- it.each`
- title | expected
- ${'draFT: something is happening'} | ${true}
- ${'draft something is happening'} | ${false}
- ${'something is happening to drafts'} | ${false}
- ${'something is happening'} | ${false}
- `('returns $expected with "$title"', ({ title, expected }) => {
- instance.titleField.val(title);
-
- expect(instance.workInProgress()).toBe(expected);
- });
- });
-});