zonemaster-gui/e2e/FR23.e2e-spec.ts
2021-12-06 00:33:02 +01:00

33 lines
1.2 KiB
TypeScript

/**
* Created by pamasse on 05/11/2017.
*/
import {$, protractor, by, browser, element } from 'protractor';
import { Utils } from './utils/app.utils';
describe('Zonemaster test FR23 - [Provide a list of previous runs for the domain and should be paginated]', () => {
const utils = new Utils();
const EC = protractor.ExpectedConditions;
beforeAll(async () => {
await utils.goTo('result/2005cf23e9fb24b6');
await utils.setLang('en');
});
it('should display previous tests', async() => {
await browser.sleep(1000);
await browser.wait(() => element(by.css('a.btn.history')).isPresent(), 120 * 1000);
await expect(element(by.css('a.btn.history')).getText()).toEqual('History');
await element(by.css('a.btn.history')).click();
await browser.sleep(1000);
expect(await $('ngb-modal-window').isPresent()).toBe(true);
await expect(element.all(by.css('.list-group-item.list-group-item-action.list-group-item-success')).count())
.toEqual(9);
await expect(element.all(by.css('.list-group-item.list-group-item-action.list-group-item-danger')).count())
.toEqual(1);
await expect(element.all(by.css('ul.pagination > li')).count()).toEqual(7);
});
});