File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed
packages/manager/cypress/support Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -64,6 +64,7 @@ chai.use(function (chai, utils) {
6464import { blockAnalytics } from './setup/block-analytics' ;
6565import { deleteInternalHeader } from './setup/delete-internal-header' ;
6666import { mockFeatureFlagClientstream } from './setup/feature-flag-clientstream' ;
67+ import { mockLoginClientVerification } from './setup/login-client-verification' ;
6768import { mockAccountRequest } from './setup/mock-account-request' ;
6869import { mockFeatureFlagRequests } from './setup/mock-feature-flags-request' ;
6970import { trackApiRequests } from './setup/request-tracking' ;
@@ -72,5 +73,6 @@ trackApiRequests();
7273mockAccountRequest ( ) ;
7374mockFeatureFlagRequests ( ) ;
7475mockFeatureFlagClientstream ( ) ;
76+ mockLoginClientVerification ( ) ;
7577deleteInternalHeader ( ) ;
7678blockAnalytics ( ) ;
Original file line number Diff line number Diff line change 1+ import { makeResponse } from 'support/util/response' ;
2+
3+ /**
4+ * Mock responses to the login `/oauth/verify` route to prevent redirect to login.
5+ */
6+ export const mockLoginClientVerification = ( ) => {
7+ const LOGIN_ROOT = Cypress . env ( 'REACT_APP_LOGIN_ROOT' ) ;
8+ beforeEach ( ( ) => {
9+ cy . intercept (
10+ `${ LOGIN_ROOT } /oauth/verify?client_id=*` ,
11+ makeResponse ( {
12+ match : true ,
13+ } )
14+ ) ;
15+ } ) ;
16+ } ;
You can’t perform that action at this time.
0 commit comments