mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-10-24 12:13:33 +08:00
More unit tests for upload stuff.
This commit is contained in:
@@ -7,6 +7,9 @@ describe("Collection.vue", () => {
|
||||
expect(wrapper.vm.counterAnnounce).to.equals(0);
|
||||
expect(wrapper.vm.showHelper).to.equals(true);
|
||||
expect(wrapper.vm.extensions[0].id).to.equals("ab1");
|
||||
expect(wrapper.find("#btn-reset").classes()).to.contain("disabled");
|
||||
expect(wrapper.find("#btn-start").classes()).to.contain("disabled");
|
||||
expect(wrapper.find("#btn-stop").classes()).to.contain("disabled");
|
||||
});
|
||||
|
||||
it("does render FTP is site set", async () => {
|
||||
@@ -30,6 +33,10 @@ describe("Collection.vue", () => {
|
||||
await localVue.nextTick();
|
||||
expect(wrapper.vm.showHelper).to.equals(false);
|
||||
expect(wrapper.vm.counterAnnounce).to.equals(1);
|
||||
|
||||
expect(wrapper.find("#btn-reset").classes()).to.not.contain("disabled");
|
||||
expect(wrapper.find("#btn-start").classes()).to.not.contain("disabled");
|
||||
|
||||
wrapper.find("#btn-reset").trigger("click");
|
||||
await localVue.nextTick();
|
||||
expect(wrapper.vm.showHelper).to.equals(true);
|
||||
|
||||
@@ -4,6 +4,7 @@ import { mountWithApp } from "./test_helpers";
|
||||
describe("Composite.vue", () => {
|
||||
it("loads with correct initial state", async () => {
|
||||
const { wrapper } = mountWithApp(Composite);
|
||||
expect(wrapper.find("#btn-start").classes()).to.contain("disabled");
|
||||
expect(wrapper.vm.showHelper).to.equals(true);
|
||||
expect(wrapper.vm.readyStart).to.equals(false);
|
||||
// filters listExtensions to just the composite definition + _select_ value
|
||||
|
||||
@@ -43,6 +43,7 @@
|
||||
ref="btnStart"
|
||||
class="ui-button-default"
|
||||
@click="_eventStart"
|
||||
id="btn-start"
|
||||
:disabled="!readyStart"
|
||||
:variant="readyStart ? 'primary' : ''"
|
||||
>
|
||||
|
||||
@@ -14,6 +14,26 @@ describe("Default.vue", () => {
|
||||
expect(wrapper.vm.counterAnnounce).to.equals(0);
|
||||
expect(wrapper.vm.showHelper).to.equals(true);
|
||||
expect(wrapper.vm.extensions[0].id).to.equals("ab1");
|
||||
expect(wrapper.find("#btn-reset").classes()).to.contain("disabled");
|
||||
expect(wrapper.find("#btn-start").classes()).to.contain("disabled");
|
||||
expect(wrapper.find("#btn-stop").classes()).to.contain("disabled");
|
||||
});
|
||||
|
||||
it("does render FTP is site set", async () => {
|
||||
const { wrapper, localVue } = mountWithApp(Default);
|
||||
expect(wrapper.find("#btn-ftp").isVisible()).to.equals(true);
|
||||
wrapper.find("#btn-ftp").trigger("click");
|
||||
await localVue.nextTick();
|
||||
// TODO: test popover appears... not sure best way to do this...
|
||||
});
|
||||
|
||||
it("doesn't render FTP is no site set", async () => {
|
||||
const { wrapper } = mountWithApp(Default, {
|
||||
currentFtp: () => {
|
||||
return null;
|
||||
}
|
||||
});
|
||||
expect(wrapper.findAll("#btn-ftp").length).to.equals(0);
|
||||
});
|
||||
|
||||
it("resets properly", async () => {
|
||||
|
||||
@@ -4,5 +4,6 @@ import { mountWithApp } from "./test_helpers";
|
||||
describe("RulesInput.vue", () => {
|
||||
it("loads with correct initial state", async () => {
|
||||
const { wrapper } = mountWithApp(RulesInput);
|
||||
expect(wrapper.find("#btn-reset").classes()).to.contain("disabled");
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user