Esempio n. 1
0
        .then(() => {
            expect(textInside('.front-age--value')).toBe('1 day ago');

            expect($('.collapse-expand-all').hasClass('expanded')).toBe(true);
            $('.list-header__collapser:nth(0)').click();

            // Wait for the presser action
            return wait.ms(50);
        })
Esempio n. 2
0
        .then(() => {
            expect(capi.fetchLatest.calls.count()).toBe(2);
            expect(capi.fetchLatest.calls.argsFor(1)[0].isDraft).toBe(true);
            expect($('a.live-mode').hasClass('active')).toBe(false);
            expect($('a.draft-mode').hasClass('active')).toBe(true);

            // Polling
            return wait.ms(CONST.latestArticlesPollMs + CONST.searchDebounceMs);
        })
Esempio n. 3
0
        .then(() => {
            expect($('.modes > .draft-mode').hasClass('active')).toBe(true);
            expect($('collection-widget').length).toBe(2);
            expect($('collection-widget:nth(0) trail-widget').length).toBe(2);
            expect($('collection-widget:nth(0) .draft-publish').is(':visible')).toBe(true);
            expect($('collection-widget:nth(1) trail-widget').length).toBe(1);
            expect($('collection-widget:nth(1) .draft-publish').is(':visible')).toBe(false);

            return wait.ms(50);
        })