Lucas_Werkmeister_WMDE added a comment.
I notice there’s a slight difference between the first two tests in the file:
name=can be edited
browser.call( () => LexemeApi.get( id )
.then( ( lexeme ) => {
assert.equal( 1, Object.keys( lexeme.lemmas ).length, 'No lemma
added' );
// eslint-disable-next-line dot-notation
assert.equal( 'test lemma', lexeme.lemmas[ 'en' ].value, 'Lemma
changed' );
} ).catch( assert.fail )
);
name=can be edited multiple times
browser.call( () => LexemeApi.get( id ).then( ( lexeme ) => {
assert.equal( 1, Object.keys( lexeme.lemmas ).length, 'No lemma added'
);
assert.equal( 'another lemma', lexeme.lemmas[ 'en-gb' ].value, 'Lemma
changed' );
} ) );
The second test doesn’t have the `.catch( assert.fail )` inside the
`browser.call()`, and I don’t know if `browser.call()` does anything with
failed promises by default. //Maybe// this means that the “can be edited
multiple times” test is actually failing, but we don’t notice it due to the
missing `.catch( assert.fail )`, and that’s what makes the setup of the next
test (“redundant languages”) break unexpectedly?
One way to test this theory would be to write something like
counterexample
browser.call( () => LexemeApi.get( id ).then( ( lexeme ) => {
assert.equal(1, 2 );
} ) );
and see how the browser tests behave then. Unfortunately, I’m currently
unable to run the browser tests locally… maybe someone else can try this out?
TASK DETAIL
https://phabricator.wikimedia.org/T265976
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Lucas_Werkmeister_WMDE
Cc: Lucas_Werkmeister_WMDE, Addshore, Tarrow, noarave, Michael, Pablo-WMDE,
Akuckartz, Iflorez, alaa_wmde, Nandana, Lahi, Gq86, GoranSMilovanovic,
Mahir256, QZanden, LawExplorer, _jensen, rosalieper, Scott_WUaS, Jonas,
Wikidata-bugs, aude, Lydia_Pintscher, Mbch331
_______________________________________________
Wikidata-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs