mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-25 12:35:15 +00:00
Initialize plotconfig, cypress-assert for existance
This commit is contained in:
parent
20446056be
commit
2c6de162c9
|
@ -41,5 +41,7 @@ describe('Chart', () => {
|
|||
cy.wait('@PairCandles');
|
||||
// Disable Heikin Ashi
|
||||
cy.get('.form-check').contains('Heikin Ashi').click();
|
||||
// Default plotconfig exists
|
||||
cy.get('.form-select').get('option').contains('default').should('exist');
|
||||
});
|
||||
});
|
||||
|
|
|
@ -81,5 +81,11 @@ export const usePlotConfigStore = defineStore('plotConfig', {
|
|||
persist: {
|
||||
key: FT_PLOT_CONFIG_KEY,
|
||||
paths: ['plotConfigName', 'customPlotConfigs'],
|
||||
afterRestore: (context) => {
|
||||
if (Object.keys(context.store.customPlotConfigs).length === 0) {
|
||||
console.log('Initialized plotconfig');
|
||||
context.store.customPlotConfigs = { default: deepClone(EMPTY_PLOTCONFIG) };
|
||||
}
|
||||
},
|
||||
},
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue
Block a user