Marcoil has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/197882

Change subject: [parserTests] Ensure manual selser changes have a clean DOM
......................................................................

[parserTests] Ensure manual selser changes have a clean DOM

The test item for manual selser changes needs to be cloned from
the original item when --selser=noauto is activated from the
command line so that its DOM is not clobbered by a previous test.

Change-Id: Ib8de2c8bb3b427fb31d3c1c95ddd67af3042bf83
---
M tests/parserTests.js
1 file changed, 6 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid 
refs/changes/82/197882/1

diff --git a/tests/parserTests.js b/tests/parserTests.js
index ec05097..7a6159c 100755
--- a/tests/parserTests.js
+++ b/tests/parserTests.js
@@ -1827,8 +1827,13 @@
                        if (modes[i] === 'selser' && options.selser === 
'noauto' &&
                            !(item.options.parsoid && 
item.options.parsoid.changes)) {
                                continue;
+                       } else if (modes[i] === 'selser' && options.selser === 
'noauto') {
+                               // If it does have manual changes, we need to 
create a new item
+                               // for its selser test.
+                               tasks.push(this.processTest.bind(this, 
Util.clone(item), options, modes[i]));
+                       } else {
+                               tasks.push( this.processTest.bind( this, item, 
options, modes[i] ) );
                        }
-                       tasks.push( this.processTest.bind( this, item, options, 
modes[i] ) );
                }
        }
        return tasks;

-- 
To view, visit https://gerrit.wikimedia.org/r/197882
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib8de2c8bb3b427fb31d3c1c95ddd67af3042bf83
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Marcoil <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to