Fix: Debugger showing previous application logs (#4455)
This commit is contained in:
parent
6bf7903570
commit
cbace9d5d7
|
|
@ -1,4 +1,6 @@
|
|||
const dsl = require("../../../../fixtures/buttondsl.json");
|
||||
const commonlocators = require("../../../../locators/commonlocators.json");
|
||||
const debuggerLocators = require("../../../../locators/Debugger.json");
|
||||
|
||||
describe("Debugger logs", function() {
|
||||
before(() => {
|
||||
|
|
@ -11,4 +13,18 @@ describe("Debugger logs", function() {
|
|||
cy.get(".t--debugger").click();
|
||||
cy.get(".t--debugger-log-state").contains("Test");
|
||||
});
|
||||
|
||||
it("Reset debugger state", function() {
|
||||
cy.get(".t--property-control-visible")
|
||||
.find(".t--js-toggle")
|
||||
.click();
|
||||
cy.testJsontext("visible", "Test");
|
||||
|
||||
cy.get(commonlocators.homeIcon).click({ force: true });
|
||||
cy.generateUUID().then((id) => {
|
||||
cy.CreateAppInFirstListedOrg(id);
|
||||
|
||||
cy.contains(debuggerLocators.debuggerIcon, 0);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
|||
3
app/client/cypress/locators/Debugger.json
Normal file
3
app/client/cypress/locators/Debugger.json
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"debuggerIcon": ".t--debugger"
|
||||
}
|
||||
|
|
@ -29,3 +29,7 @@ export const updateErrorLog = (payload: Message) => ({
|
|||
type: ReduxActionTypes.DEBUGGER_UPDATE_ERROR_LOG,
|
||||
payload,
|
||||
});
|
||||
|
||||
export const resetDebuggerState = () => ({
|
||||
type: ReduxActionTypes.RESET_DEBUGGER_STATE,
|
||||
});
|
||||
|
|
|
|||
|
|
@ -76,6 +76,7 @@ export const ReduxActionTypes: { [key: string]: string } = {
|
|||
DEBUGGER_UPDATE_ERROR_LOG: "DEBUGGER_UPDATE_ERROR_LOG",
|
||||
DEBUGGER_UPDATE_ERROR_LOGS: "DEBUGGER_UPDATE_ERROR_LOGS",
|
||||
CLEAR_DEBUGGER_LOGS: "CLEAR_DEBUGGER_LOGS",
|
||||
RESET_DEBUGGER_STATE: "RESET_DEBUGGER_STATE",
|
||||
SHOW_DEBUGGER: "SHOW_DEBUGGER",
|
||||
SET_THEME: "SET_THEME",
|
||||
FETCH_WIDGET_CARDS: "FETCH_WIDGET_CARDS",
|
||||
|
|
|
|||
|
|
@ -105,6 +105,11 @@ const debuggerReducer = createReducer(initialState, {
|
|||
errors: { ...action.payload },
|
||||
};
|
||||
},
|
||||
[ReduxActionTypes.RESET_DEBUGGER_STATE]: () => {
|
||||
return {
|
||||
...initialState,
|
||||
};
|
||||
},
|
||||
});
|
||||
|
||||
export interface DebuggerReduxState {
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@ import PerformanceTracker, {
|
|||
PerformanceTransactionName,
|
||||
} from "utils/PerformanceTracker";
|
||||
import { executePageLoadActions } from "actions/widgetActions";
|
||||
import { resetDebuggerState } from "actions/debuggerActions";
|
||||
|
||||
function* failFastApiCalls(
|
||||
triggerActions: Array<ReduxAction<unknown> | ReduxActionWithoutPayload>,
|
||||
|
|
@ -267,6 +268,7 @@ export function* initializeAppViewerSaga(
|
|||
function* resetEditorSaga() {
|
||||
yield put(resetEditorSuccess());
|
||||
yield put(resetRecentEntities());
|
||||
yield put(resetDebuggerState());
|
||||
}
|
||||
|
||||
export default function* watchInitSagas() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user