The text boxes aren't being cleared before Behat puts the new text in.

Bug #1407847 reported by Jinelle Foley-Barnes
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
Medium
Son Nguyen
15.04
Fix Released
Medium
Unassigned
15.10
Fix Released
Medium
Son Nguyen

Bug Description

Hi Sonn,

When you run a Behat test, some fields have default text in them and it's not being cleared so Behat can write the new text entry into that field.

For example when you add a text block the default text in the Block title is Text. If the Behat test says
And I fill in "Block title" with "Jabber" it will fill in the block with "TextJabber".

Therefore any steps after that are looking for the block title will fail, because it says "TextJabber" not "Jabber".

I have attached the first part of a test below that you can run. In this instance specifically, it is saving the first name as "test first namedmin" instead of "test first name".

Thanks,
Jinelle

Tags: behat
Revision history for this message
Jinelle Foley-Barnes (jinelleb) wrote :
Changed in mahara:
assignee: nobody → Son Nguyen (ngson2000)
importance: Undecided → Medium
status: New → Confirmed
Robert Lyon (robertl-9)
Changed in mahara:
milestone: 15.04.0 → 15.04.1
Aaron Wells (u-aaronw)
Changed in mahara:
milestone: 15.04.1 → 15.10.0
Revision history for this message
Son Nguyen (ngson2000) wrote :

This is an issue of selenium driver reported here https://github.com/minkphp/MinkSelenium2Driver/issues/188 and https://github.com/minkphp/MinkSelenium2Driver/issues/198.
This issue will happen to all 'autofocus' input elements, like

 <input type="text" class="form-control required text autofocus" id="profileform_firstname" name="firstname" size="30" tabindex="0" maxlength="50" value="Admin">

I will try to implement a work-around

Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "master" branch: https://reviews.mahara.org/5230

Revision history for this message
Jinelle Foley-Barnes (jinelleb) wrote :
Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/5230
Committed: https://git.nzoss.org.nz/mahara/mahara/commit/8c9b805f4f372b95add8765b497429d294af3c92
Submitter: Aaron Wells (<email address hidden>)
Branch: master

commit 8c9b805f4f372b95add8765b497429d294af3c92
Author: Son Nguyen <email address hidden>
Date: Tue Sep 8 09:19:53 2015 +1200

Fix the Selenium2Driver issue when setValue. Bug 1407847

We must use the steps:
And I set the field "field name" to "value"
And I set the following fields to these values:
in place of
And I fill in "field name" with "value"
And I fill in the following:

Change-Id: I21a86756b6f994597aaf521f0a7cd4168ad1bf64

Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "15.04_STABLE" branch: https://reviews.mahara.org/5362

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/5362
Committed: https://git.nzoss.org.nz/mahara/mahara/commit/bb250660e17ef8bddf1c24ecbf1e9ad91fff7ceb
Submitter: Son Nguyen (<email address hidden>)
Branch: 15.04_STABLE

commit bb250660e17ef8bddf1c24ecbf1e9ad91fff7ceb
Author: Son Nguyen <email address hidden>
Date: Tue Sep 8 09:19:53 2015 +1200

Fix the Selenium2Driver issue when setValue. Bug 1407847

We must use the steps:
And I set the field "field name" to "value"
And I set the following fields to these values:
in place of
And I fill in "field name" with "value"
And I fill in the following:

Change-Id: I21a86756b6f994597aaf521f0a7cd4168ad1bf64
(cherry picked from commit 8c9b805f4f372b95add8765b497429d294af3c92)

Robert Lyon (robertl-9)
Changed in mahara:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.