| 12345678910111213141516171819202122232425262728 |
- 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');
- });
- it.only('菜单', function() {
- cy.getTestId('menu').children().should('have.length', 4);
- cy.getTestId('menu').children().first().should('include.text', '首页');
- });
- });
|