__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
@tool @tool_behat
Feature: Transform steps arguments
In order to write tests with complex nasty arguments
As a tests writer
I need to apply some transformations to the steps arguments
Background:
Given I am on site homepage
And the following "courses" exist:
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And I log in as "admin"
And I open my profile in edit mode
Scenario: Use nasty strings on steps arguments
When I set the field "Last name" to "$NASTYSTRING1"
And I set the field "Description" to "$NASTYSTRING2"
And I set the field "City/town" to "$NASTYSTRING3"
And I press "Update profile"
And I click on "Edit profile" "link" in the "region-main" "region"
Then I should not see "NASTYSTRING"
And the field "Last name" matches value "$NASTYSTRING1"
And the field "City/town" matches value "$NASTYSTRING3"
Scenario: Use nasty strings on table nodes
When I set the following fields to these values:
| Last name | $NASTYSTRING1 |
| Description | $NASTYSTRING2 |
| City/town | $NASTYSTRING3 |
And I press "Update profile"
And I click on "Edit profile" "link" in the "region-main" "region"
Then I should not see "NASTYSTRING"
And the field "Last name" matches value "$NASTYSTRING1"
And the field "City/town" matches value "$NASTYSTRING3"
Scenario: Use double quotes
When I set the following fields to these values:
| First name | va"lue1 |
| Description | va\"lue2 |
And I set the field "City/town" to "va\"lue3"
And I press "Update profile"
And I click on "Edit profile" "link" in the "region-main" "region"
Then I should not see "NASTYSTRING"
And the field "First name" matches value "va\"lue1"
And the field "Description" matches value "va\\"lue2"
And the field "City/town" matches value "va\"lue3"
Scenario: Nasty strings with other contents
When I set the field "First name" to "My Firstname $NASTYSTRING1"
And I set the following fields to these values:
| Last name | My Last name $NASTYSTRING2 |
And I press "Update profile"
And I click on "Edit profile" "link" in the "region-main" "region"
Then I should not see "NASTYSTRING"
And I should see "My Firstname"
And I should see "My Last name"
And the field "First name" matches value "My Firstname $NASTYSTRING1"
And the field "Last name" matches value "My Last name $NASTYSTRING2"
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| fixtures | Folder | 0777 |
|
|
| data_generators.feature | File | 18.61 KB | 0777 |
|
| datetime_strings.feature | File | 1.08 KB | 0777 |
|
| edit_permissions.feature | File | 4.66 KB | 0777 |
|
| frozen_clock.feature | File | 3.16 KB | 0777 |
|
| get_and_set_fields.feature | File | 10.72 KB | 0777 |
|
| get_and_set_fields_in_containers.feature | File | 1.5 KB | 0777 |
|
| i_am_on_page.feature | File | 5.21 KB | 0777 |
|
| inplaceeditable.feature | File | 1.29 KB | 0777 |
|
| keyboard.feature | File | 1.93 KB | 0777 |
|
| list_steps.feature | File | 1.88 KB | 0777 |
|
| loginout.feature | File | 4.4 KB | 0777 |
|
| manipulate_forms.feature | File | 1.2 KB | 0777 |
|
| nasty_strings.feature | File | 2.4 KB | 0777 |
|
| tabs.feature | File | 1.25 KB | 0777 |
|
| test_environment.feature | File | 304 B | 0777 |
|