| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- context('Access to search result page', () => {
- const ssPrefix = 'access-to-result-page-directly-';
- beforeEach(() => {
- // login
- cy.fixture("user-admin.json").then(user => {
- cy.login(user.username, user.password);
- });
- // collapse sidebar
- cy.collapseSidebar(true);
- });
- it('/_search with "q" param is successfully loaded', () => {
- cy.visit('/_search', { qs: { q: 'labels alerts cards blocks' } });
- cy.getByTestid('search-result-list').should('be.visible');
- cy.getByTestid('search-result-content').should('be.visible');
- cy.screenshot(`${ssPrefix}-with-q`);
- });
- it('checkboxes behaviors', () => {
- cy.visit('/_search', { qs: { q: 'labels alerts cards blocks' } });
- cy.getByTestid('search-result-base').should('be.visible');
- cy.getByTestid('search-result-list').should('be.visible');
- cy.getByTestid('cb-select').first().click({force: true});
- cy.screenshot(`${ssPrefix}-the-first-checkbox-on`);
- cy.getByTestid('cb-select').first().click({force: true});
- cy.screenshot(`${ssPrefix}-the-first-checkbox-off`);
- // click select all checkbox
- cy.getByTestid('cb-select-all').click({force: true});
- cy.screenshot(`${ssPrefix}-the-select-all-checkbox-1`);
- cy.getByTestid('cb-select').first().click({force: true});
- cy.screenshot(`${ssPrefix}-the-select-all-checkbox-2`);
- cy.getByTestid('cb-select').first().click({force: true});
- cy.screenshot(`${ssPrefix}-the-select-all-checkbox-3`);
- cy.getByTestid('cb-select-all').click({force: true});
- cy.screenshot(`${ssPrefix}-the-select-all-checkbox-4`);
- });
- });
- context('Access to legacy private pages', () => {
- const ssPrefix = 'access-to-legacy-private-pages-directly-';
- beforeEach(() => {
- // login
- cy.fixture("user-admin.json").then(user => {
- cy.login(user.username, user.password);
- });
- // collapse sidebar
- cy.collapseSidebar(true);
- });
- it('/_private-legacy-pages is successfully loaded', () => {
- cy.visit('/_private-legacy-pages');
- cy.getByTestid('search-result-base').should('be.visible');
- cy.screenshot(`${ssPrefix}-shown`);
- });
- });
|