multiselect_blob.feature 3.04 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86
Feature: Project Multiselect Blob
  Background:
    Given I sign in as a user
    And I own project "Shop"
    And I visit project source page
    And I click on "Gemfile.lock" file in repo

  @javascript
  Scenario: I click line 1 in file
    When I click line 1 in file
    Then I should see "L1" as URI fragment
    And I should see line 1 highlighted

  @javascript
  Scenario: I shift-click line 1 in file
    When I shift-click line 1 in file
    Then I should see "L1" as URI fragment
    And I should see line 1 highlighted

  @javascript
  Scenario: I click line 1 then click line 2 in file
    When I click line 1 in file
    Then I should see "L1" as URI fragment
    And I should see line 1 highlighted
    Then I click line 2 in file
    Then I should see "L2" as URI fragment
    And I should see line 2 highlighted

  @javascript
  Scenario: I click various line numbers to test multiselect
    Then I click line 1 in file
    Then I should see "L1" as URI fragment
    And I should see line 1 highlighted
    Then I shift-click line 2 in file
    Then I should see "L1-2" as URI fragment
    And I should see lines 1-2 highlighted
    Then I shift-click line 3 in file
    Then I should see "L1-3" as URI fragment
    And I should see lines 1-3 highlighted
    Then I click line 3 in file
    Then I should see "L3" as URI fragment
    And I should see line 3 highlighted
    Then I shift-click line 1 in file
    Then I should see "L1-3" as URI fragment
    And I should see lines 1-3 highlighted
    Then I shift-click line 5 in file
    Then I should see "L1-5" as URI fragment
    And I should see lines 1-5 highlighted
    Then I shift-click line 4 in file
    Then I should see "L1-4" as URI fragment
    And I should see lines 1-4 highlighted
    Then I click line 5 in file
    Then I should see "L5" as URI fragment
    And I should see line 5 highlighted
    Then I shift-click line 3 in file
    Then I should see "L3-5" as URI fragment
    And I should see lines 3-5 highlighted
    Then I shift-click line 1 in file
    Then I should see "L1-3" as URI fragment
    And I should see lines 1-3 highlighted
    Then I shift-click line 1 in file
    Then I should see "L1" as URI fragment
    And I should see line 1 highlighted

  @javascript
  Scenario: I multiselect lines 1-5 and then go back and forward in history
    When I click line 1 in file
    And I shift-click line 3 in file
    And I shift-click line 2 in file
    And I shift-click line 5 in file
    Then I should see "L1-5" as URI fragment
    And I should see lines 1-5 highlighted
    Then I go back in history
    Then I should see "L1-2" as URI fragment
    And I should see lines 1-2 highlighted
    Then I go back in history
    Then I should see "L1-3" as URI fragment
    And I should see lines 1-3 highlighted
    Then I go back in history
    Then I should see "L1" as URI fragment
    And I should see line 1 highlighted
    Then I go forward in history
    And I go forward in history
    And I go forward in history
    Then I should see "L1-5" as URI fragment
    And I should see lines 1-5 highlighted