Fix pageAdmin setPrevioiusPageUsingActivePage writing to wrong property
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -47,7 +47,7 @@ export default defineStore('pageAdminStore', {
|
|||||||
* Set the previous(usually current) pages to the ones we just decide.
|
* Set the previous(usually current) pages to the ones we just decide.
|
||||||
*/
|
*/
|
||||||
setPrevioiusPageUsingActivePage() {
|
setPrevioiusPageUsingActivePage() {
|
||||||
this.previoiusPage = this.activePage;
|
this.previousPage = this.activePage;
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Set the boolean value of status of pending state of the pate
|
* Set the boolean value of status of pending state of the pate
|
||||||
|
|||||||
@@ -29,12 +29,10 @@ describe('pageAdminStore', () => {
|
|||||||
expect(store.previousPage).toBe('PERFORMANCE');
|
expect(store.previousPage).toBe('PERFORMANCE');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('setPrevioiusPageUsingActivePage copies activePage', () => {
|
it('setPrevioiusPageUsingActivePage copies activePage to previousPage', () => {
|
||||||
store.setActivePage('CONFORMANCE');
|
store.setActivePage('CONFORMANCE');
|
||||||
store.setPrevioiusPageUsingActivePage();
|
store.setPrevioiusPageUsingActivePage();
|
||||||
// Note: bug in source - writes to this.previoiusPage (typo)
|
expect(store.previousPage).toBe('CONFORMANCE');
|
||||||
// instead of this.previousPage, so previousPage stays 'MAP'
|
|
||||||
expect(store.previousPage).toBe('MAP');
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('setIsPagePendingBoolean sets boolean', () => {
|
it('setIsPagePendingBoolean sets boolean', () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user