Welcome to mirror list, hosted at ThFree Co, Russian Federation.

user_edit_preferences_spec.rb « profiles « features « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 2d2da222998541da440746448ae0b7114a75428a (plain)
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
# frozen_string_literal: true
require 'spec_helper'

describe 'User edit preferences profile' do
  let(:user) { create(:user) }

  before do
    stub_feature_flags(user_time_settings: true)
    sign_in(user)
    visit(profile_preferences_path)
  end

  it 'allows the user to toggle their time format preference' do
    field = page.find_field("user[time_format_in_24h]")

    expect(field).not_to be_checked

    field.click

    expect(field).to be_checked
  end

  it 'allows the user to toggle their time display preference' do
    field = page.find_field("user[time_display_relative]")

    expect(field).to be_checked

    field.click

    expect(field).not_to be_checked
  end
end