import {loginIntercept, loginSetup, menuIntercept} from './utils'; describe('登录页面', function() { beforeEach(function() { loginIntercept(); menuIntercept(); loginSetup(); }); it('登录', function() { cy.getTestId('user_name').should('contain.text', '超级管理员'); }); it('退出', function() { cy.get('.ant-dropdown-trigger').trigger('mouseover'); cy.get('.ant-dropdown').should('be.visible'); cy.get('.ant-dropdown-menu').children().first().click(); cy.get('.ant-modal-confirm-btns').children().last().click(); cy.url().should('contain', '/login'); }); });