From e18a6d18bf6baae1da10bd70c86a85a7f7aba6c2 Mon Sep 17 00:00:00 2001 From: NemethNorbert Date: Thu, 18 Jan 2024 11:47:40 +0100 Subject: [PATCH 1/2] fix: Exchange flipping and style evaluation order --- maintenance/projects/senna/src/app/App.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/maintenance/projects/senna/src/app/App.js b/maintenance/projects/senna/src/app/App.js index a7bcee29f7..5872162c47 100644 --- a/maintenance/projects/senna/src/app/App.js +++ b/maintenance/projects/senna/src/app/App.js @@ -483,8 +483,8 @@ class App extends EventEmitter { this.extractParams(route, path) ); }) - .then(() => nextScreen.evaluateStyles(this.surfaces)) .then(() => nextScreen.flip(this.surfaces)) + .then(() => nextScreen.evaluateStyles(this.surfaces)) .then(() => nextScreen.evaluateScripts(this.surfaces)) .then(() => this.maybeUpdateScrollPositionState_()) .then(() => this.syncScrollPositionSyncThenAsync_()) From 468d2072ba51158548adaf60cabdb0ab6fd7cb0a Mon Sep 17 00:00:00 2001 From: NemethNorbert Date: Thu, 18 Jan 2024 11:48:31 +0100 Subject: [PATCH 2/2] test: Fix test to adapt to new lifecycle --- maintenance/projects/senna/test/app/App.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/maintenance/projects/senna/test/app/App.js b/maintenance/projects/senna/test/app/App.js index cb36ff2c15..2fa61d7c03 100644 --- a/maintenance/projects/senna/test/app/App.js +++ b/maintenance/projects/senna/test/app/App.js @@ -1656,15 +1656,15 @@ describe('App', function () { this.app.navigate('/path2').then(() => { var lifecycleOrder = [ StubScreen.prototype.load, - StubScreen.prototype.evaluateStyles, StubScreen.prototype.flip, + StubScreen.prototype.evaluateStyles, StubScreen.prototype.evaluateScripts, StubScreen.prototype.activate, StubScreen.prototype.beforeDeactivate, StubScreen2.prototype.load, StubScreen.prototype.deactivate, - StubScreen2.prototype.evaluateStyles, StubScreen2.prototype.flip, + StubScreen2.prototype.evaluateStyles, StubScreen2.prototype.evaluateScripts, StubScreen2.prototype.activate, StubScreen.prototype.disposeInternal,