export const NETWORK_URL = 'http://*'; export function loginSetup() { cy.visit('/'); cy.get('input[name="accountName"]').type('admin'); cy.get('input[name="accountPassword"]').type('tld123'); cy.getTestId('login_form').submit(); } export function loginIntercept() { cy.intercept(`${NETWORK_URL}/user/login*`, {fixture: 'login'}).as('loginIntercept'); } export function menuIntercept() { cy.intercept(`${NETWORK_URL}/menu/getUserMenu*`, {fixture: 'menu/basic'}) .as('menuIntercept'); } export function optionsIntercept() { cy.intercept(`${NETWORK_URL}/role/roleBefore*`, {fixture: 'role/options'}); cy.intercept(`${NETWORK_URL}/department/getDepartBefor*`, {fixture: 'department/options'}); cy.intercept(`${NETWORK_URL}/storage/getStorageAll*`, {fixture: 'storage/options'}); }