-
-
Save almet/b4b1259d1ed9999e21bc8ca1e63a39c0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*eslint no-unused-vars: [2, { "varsIgnorePattern": "^d$" }]*/ | |
import { expect } from "chai"; | |
import sinon from "sinon"; | |
import config from "../../formbuilder/config"; | |
import { createComponent, d } from "../test-utils"; | |
import FieldList from "../../formbuilder/components/builder/FieldList"; | |
describe.only("FieldList", () => { | |
const noop = () => {}; | |
var sandbox, schema, compProps; | |
schema = { | |
title: "My new form", | |
properties: [] | |
}; | |
beforeEach(() => { | |
sandbox = sinon.sandbox.create(); | |
}); | |
afterEach(() => { | |
sandbox.restore(); | |
}); | |
describe("Default state", () => { | |
it("should not show action links when no data has been entered", () => { | |
compProps = { | |
schema, | |
addField: noop, | |
fieldList: config.fieldList | |
}; | |
const comp = createComponent(FieldList, compProps); | |
d(comp.query()); | |
expect(comp.query()).eql("loading"); | |
}); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment