Skip to content

Commit 14494a7

Browse files
committed
Deprecate block and executing sub action in favor of action blocking
1 parent 3825bbe commit 14494a7

22 files changed

Lines changed: 1462 additions & 1403 deletions

cypress/e2e/actions/show_video.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ context ('Show Video', function () {
279279
cy.start ();
280280
cy.get ('[data-video="kirino"][data-mode="modal"]').should ('be.visible');
281281
// Game should be blocked - trying to proceed shouldn't work immediately
282-
cy.wrap (this.monogatari).invoke ('global', 'block').should ('eq', true);
282+
cy.wrap (this.monogatari).invoke ('action', 'Video').its('blocking').should ('eq', true);
283283
});
284284

285285
it ('Blocks game progression in immersive mode', function () {
@@ -293,7 +293,7 @@ context ('Show Video', function () {
293293

294294
cy.start ();
295295
cy.get ('[data-video="kirino"][data-mode="immersive"]').should ('be.visible');
296-
cy.wrap (this.monogatari).invoke ('global', 'block').should ('eq', true);
296+
cy.wrap (this.monogatari).invoke ('action', 'Video').its('blocking').should ('eq', true);
297297
});
298298

299299
it ('Does not block game progression in displayable mode', function () {

cypress/e2e/actions/wait.spec.js

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -77,18 +77,4 @@ context ('Wait', function () {
7777
cy.rollback ();
7878
cy.get ('text-box').contains ('Before');
7979
});
80-
81-
it ('Shows an error if the time provided is not numeric', function () {
82-
this.monogatari.setting ('TypeAnimation', false);
83-
this.monogatari.script ({
84-
'Start': [
85-
'wait s',
86-
'After'
87-
]
88-
});
89-
90-
cy.start ();
91-
cy.get ('.fancy-error').should ('be.visible');
92-
});
93-
9480
});

cypress/e2e/components/load-screen.spec.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ context ('Load Screen', function () {
22

33
beforeEach (() => {
44
cy.open ();
5+
cy.clearStorage();
56
cy.loadTestAssets ();
67
});
78

cypress/e2e/components/save-screen.spec.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ context ('Save Screen', function () {
22

33
beforeEach (() => {
44
cy.open ();
5+
cy.clearStorage();
56
});
67

78
it ('Gets open when clicking the save button on the quick menu', function () {

cypress/support/commands.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,18 @@ Cypress.Commands.add ('proceed',function () {
4545
});
4646

4747
Cypress.Commands.add ('rollback', function () {
48-
this.monogatari.global ('block', false);
4948
this.monogatari.rollback ();
5049

5150
// Prevent False Positives by waiting a bit
5251
cy.wait (150);
5352
});
5453

54+
Cypress.Commands.add('clearStorage', function () {
55+
this.monogatari.Storage.clear();
56+
57+
cy.wait (150);
58+
});
59+
5560
Cypress.Commands.add ('loadTestAssets', function (args) {
5661
const { nvl } = Object.assign ({
5762
nvl: false

dist/engine/core/monogatari.js

Lines changed: 72 additions & 72 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/engine/core/monogatari.js.map

Lines changed: 15 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/monogatari.module.js

Lines changed: 79 additions & 79 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/monogatari.module.js.map

Lines changed: 15 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)