Jasmine - How to queue interactions and tests

What is the best way to queue interactions and tests?

This works

describe('Dropdown', function() {
    it("shows the fields", function() {
        $('.dropdown-toggle').click();
        expect($("#some-element-in-dropdown-to-be-visibla").length).toBeVisible();
    });
});

But this doesn’t

describe('Dropdown', function() {
    $('.dropdown-toggle').click();
    it("shows the fields", function() {
        expect($("#some-element-in-dropdown-to-be-visibla").length).toBeVisible();
    });
});

I’m finding this to be annoying because if I want to queue interaction - test - new interaction - test etc, all I’ve find is to use nested describes like so:

describe('ActionAB', function() {
    beforeEach(function() {
        actionA();
    });
    it("has done action A", function() {
        testA();

        describe('ActionB', function() {
            beforeEach(function() {
                actionB();
            });
            it("has done action B", function() {
                testB();
            });
        });
    });
});

instead of

describe('ActionAB', function() {
    actionA();
    it("has done action A", function() {
        testA();
    });
    actionB();
    it("has done action B", function() {
        testB();
    });
});

I think it is not necessary to assert each action. It should be enough to assert the end result that you care about.
Each test (it block) should be atomic, because that makes it easier to understand the tests later.
You can extract common code into functions or use beforeEach to reuse code.

ok I see. I’ll go with that. thanks!