Tobias Gritschacher has uploaded a new change for review. https://gerrit.wikimedia.org/r/60931
Change subject: Cleanup of edit-conflict Selenium test ...................................................................... Cleanup of edit-conflict Selenium test Change-Id: I7205939f02799b8da2a2dfb49e512f1cfe96c2b9 --- M repo/tests/selenium/item/edit_conflict_spec.rb 1 file changed, 3 insertions(+), 33 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/31/60931/1 diff --git a/repo/tests/selenium/item/edit_conflict_spec.rb b/repo/tests/selenium/item/edit_conflict_spec.rb index f00fc0a..2a7c24f 100644 --- a/repo/tests/selenium/item/edit_conflict_spec.rb +++ b/repo/tests/selenium/item/edit_conflict_spec.rb @@ -149,6 +149,9 @@ first_claim_guid = 0 old_revid = 0 it "should login as user 1, change claim and save revid" do + visit_page(RepoLoginPage) do |page| + page.logout_user + end visit_page(NewPropertyPage) do |page| page.create_new_property(prop_label, prop_description, prop_datatype) end @@ -176,9 +179,6 @@ end it "should login as user 2, change claim value" do visit_page(RepoLoginPage) do |page| - page.logout_user - end - visit_page(RepoLoginPage) do |page| page.login_with(WIKI_ADMIN_USERNAME, WIKI_ADMIN_PASSWORD) end on_page(ItemPage) do |page| @@ -194,7 +194,6 @@ revid.should > old_revid end end - # TODO: this test will fail because of bug 44101 (issue 1) it "should login as user 1 again, inject old revid & complain about edit conflict when changing claim value" do visit_page(RepoLoginPage) do |page| page.login_with(WIKI_ORDINARY_USERNAME, WIKI_ORDINARY_PASSWORD) @@ -202,7 +201,6 @@ on_page(ItemPage) do |page| page.navigate_to_item page.wait_for_entity_to_load - revid = @browser.execute_script("return wb.getRevisionStore().getClaimRevision('" + first_claim_guid + "');") inject_old_revid = "wb.getRevisionStore().setClaimRevision(parseInt(" + old_revid.to_s() + "), '" + first_claim_guid.to_s() + "');" @browser.execute_script(inject_old_revid) injected_revid = @browser.execute_script("return wb.getRevisionStore().getClaimRevision('" + first_claim_guid + "');") @@ -212,34 +210,6 @@ page.statementValueInput = statement_value_user1_changed page.saveStatement ajax_wait - page.wbErrorDiv?.should be_true - page.wbErrorDetailsLink?.should be_true - page.wbErrorDetailsLink - page.wbErrorDetailsDiv?.should be_true - # TODO: this will fail because of bug 44101 (issue 1) - page.wbErrorDetailsDiv_element.text.should == edit_conflict_msg - page.cancelStatement - end - end - # TODO: this test will fail because of bug 44101 (issue 2) - it "should login as user 1 again, inject old revid & complain about edit conflict when changing claim value" do - visit_page(RepoLoginPage) do |page| - page.login_with(WIKI_ORDINARY_USERNAME, WIKI_ORDINARY_PASSWORD) - end - on_page(ItemPage) do |page| - page.navigate_to_item - page.wait_for_entity_to_load - revid = @browser.execute_script("return wb.getRevisionStore().getClaimRevision('" + first_claim_guid + "');") - inject_old_revid = "wb.getRevisionStore().setClaimRevision(parseInt(" + old_revid.to_s() + "), '" + first_claim_guid.to_s() + "');" - @browser.execute_script(inject_old_revid) - injected_revid = @browser.execute_script("return wb.getRevisionStore().getClaimRevision('" + first_claim_guid + "');") - injected_revid.should == old_revid - page.editFirstStatement - page.statementValueInput_element.clear - page.statementValueInput = statement_value_user1 - page.saveStatement - ajax_wait - # TODO: this will fail because of bug 44101 (issue 2) page.wbErrorDiv?.should be_true page.wbErrorDetailsLink?.should be_true page.wbErrorDetailsLink -- To view, visit https://gerrit.wikimedia.org/r/60931 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7205939f02799b8da2a2dfb49e512f1cfe96c2b9 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Tobias Gritschacher <tobias.gritschac...@wikimedia.de> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits