<commit_before>@managing_shipping_methods
Feature: Sorting listed shipping methods by name or code
    In order to change the order by which shipping methods are displayed
    As an Administrator
    I want to sort shipping methods

    Background:
        Given the store operates on a single channel in "United States"
        And that channel allows to shop using "English (United States)" and "Polish (Poland)" locales
        And the store allows shipping with "Aardvark Stagecoach" identified by "ground"
        And this shipping method is named "Zwykły Dyliżans Mrówkojadów" in the "Polish (Poland)" locale
        And the store also allows shipping with "Narwhal Submarine" identified by "marine"
        And this shipping method is named "Łódź Podwodna Morskich Jednorożców" in the "Polish (Poland)" locale
        And the store also allows shipping with "Pug Blimp" identified by "aerial"
        And this shipping method is named "Sterowiec Mopsów" in the "Polish (Poland)" locale
        And I am logged in as an administrator

    @ui @api
    Scenario: Shipping methods can be sorted by code in ascending order
        Given I am browsing shipping methods
        When I sort the shipping methods ascending by code
        Then I should see 3 shipping methods in the list
        And the first shipping method on the list should have code "aerial"

    @ui @api
    Scenario: Changing the order of sorting by code
        Given I am browsing shipping methods
        When I sort the shipping methods ascending by code
        And I switch the way shipping methods are sorted descending by code
        Then I should see 3 shipping methods in the list
        And the first shipping method on the list should have code "marine"

    @ui @api
    Scenario: Shipping methods can be sorted by their names
        Given I am browsing shipping methods
        When I sort the shipping methods ascending by name
        Then I should see 3 shipping methods in the list
        And the first shipping method on the list should have name "Aardvark Stagecoach"

    @ui @api
    Scenario: Changing the order of sorting shipping methods by their names
        Given I am browsing shipping methods
        When the shipping methods are already sorted ascending by name
        And I switch the way shipping methods are sorted descending by name
        Then I should see 3 shipping methods in the list
        And the first shipping method on the list should have name "Pug Blimp"

    @ui @api
    Scenario: Sort shipping methods ascending by name from chosen locale translations
        When I change my locale to "Polish (Poland)"
        And I browse shipping methods
        And I sort the shipping methods ascending by name
        Then I should see 3 shipping methods in the list
        And the first shipping method on the list should have name "Łódź Podwodna Morskich Jednorożców"

    @ui @api
    Scenario: Sort shipping methods descending by name from chosen locale translations
        When I change my locale to "Polish (Poland)"
        And I browse shipping methods
        And the shipping methods are already sorted ascending by name
        And I sort the shipping methods descending by name
        Then I should see 3 shipping methods in the list
        And the first shipping method on the list should have name "<NAME>"<commit_msg>Apply suggestions from code review<commit_after>@managing_shipping_methods
Feature: Sorting listed shipping methods by name or code
    In order to change the order by which shipping methods are displayed
    As an Administrator
    I want to sort shipping methods

    Background:
        Given the store operates on a single channel in "United States"
        And that channel allows to shop using "English (United States)" and "Polish (Poland)" locales
        And the store allows shipping with "Aardvark Stagecoach" identified by "ground"
        And this shipping method is named "<NAME>" in the "Polish (Poland)" locale
        And the store also allows shipping with "Narwhal Submarine" identified by "marine"
        And this shipping method is named "Łódź Podwodna Morskich Jednorożców" in the "Polish (Poland)" locale
        And the store also allows shipping with "Pug Blimp" identified by "aerial"
        And this shipping method is named "Sterowiec Mopsów" in the "Polish (Poland)" locale
        And I am logged in as an administrator

    @ui @api
    Scenario: Shipping methods can be sorted by code in ascending order
        Given I am browsing shipping methods
        When I sort the shipping methods ascending by code
        Then I should see 3 shipping methods in the list
        And the first shipping method on the list should have code "aerial"

    @ui @api
    Scenario: Changing the order of sorting by code
        Given I am browsing shipping methods
        When I sort the shipping methods ascending by code
        And I switch the way shipping methods are sorted descending by code
        Then I should see 3 shipping methods in the list
        And the first shipping method on the list should have code "marine"

    @ui @api
    Scenario: Shipping methods can be sorted by their names
        Given I am browsing shipping methods
        When I sort the shipping methods ascending by name
        Then I should see 3 shipping methods in the list
        And the first shipping method on the list should have name "<NAME>"

    @ui @api
    Scenario: Changing the order of sorting shipping methods by their names
        Given I am browsing shipping methods
        When the shipping methods are already sorted ascending by name
        And I switch the way shipping methods are sorted descending by name
        Then I should see 3 shipping methods in the list
        And the first shipping method on the list should have name "Pug Blimp"

    @ui @api
    Scenario: Sorting shipping methods ascending by name from chosen locale translation
        When I change my locale to "Polish (Poland)"
        And I browse shipping methods
        And I sort the shipping methods ascending by name
        Then I should see 3 shipping methods in the list
        And the first shipping method on the list should have name "<NAME>"

    @ui @api
    Scenario: Sorting shipping methods descending by name from chosen locale translation
        When I change my locale to "Polish (Poland)"
        And I browse shipping methods
        And the shipping methods are already sorted ascending by name
        And I sort the shipping methods descending by name
        Then I should see 3 shipping methods in the list
        And the first shipping method on the list should have name "<NAME>"
{'fraction_non_alphanumeric': 0.026642718155964674, 'fraction_numerical': 0.001796138302649304, 'mean_word_length': 2.8646616541353382, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4945115', 'n_tokens_mistral': 1597, 'n_tokens_neox': 1528, 'n_words': 979}