summaryrefslogtreecommitdiff
path: root/spec/features/profiles
diff options
context:
space:
mode:
Diffstat (limited to 'spec/features/profiles')
-rw-r--r--spec/features/profiles/personal_access_tokens_spec.rb4
-rw-r--r--spec/features/profiles/user_edit_profile_spec.rb25
-rw-r--r--spec/features/profiles/user_visits_profile_preferences_page_spec.rb8
3 files changed, 12 insertions, 25 deletions
diff --git a/spec/features/profiles/personal_access_tokens_spec.rb b/spec/features/profiles/personal_access_tokens_spec.rb
index f1e5658cd7b..8cbc0491441 100644
--- a/spec/features/profiles/personal_access_tokens_spec.rb
+++ b/spec/features/profiles/personal_access_tokens_spec.rb
@@ -47,14 +47,14 @@ RSpec.describe 'Profile > Personal Access Tokens', :js do
click_on "1"
# Scopes
- check "api"
+ check "read_api"
check "read_user"
click_on "Create personal access token"
expect(active_personal_access_tokens).to have_text(name)
expect(active_personal_access_tokens).to have_text('in')
- expect(active_personal_access_tokens).to have_text('api')
+ expect(active_personal_access_tokens).to have_text('read_api')
expect(active_personal_access_tokens).to have_text('read_user')
expect(created_personal_access_token).not_to be_empty
end
diff --git a/spec/features/profiles/user_edit_profile_spec.rb b/spec/features/profiles/user_edit_profile_spec.rb
index 026da5814e3..4b6ed458c68 100644
--- a/spec/features/profiles/user_edit_profile_spec.rb
+++ b/spec/features/profiles/user_edit_profile_spec.rb
@@ -8,8 +8,6 @@ RSpec.describe 'User edit profile' do
let(:user) { create(:user) }
before do
- stub_feature_flags(improved_emoji_picker: false)
-
sign_in(user)
visit(profile_path)
end
@@ -169,10 +167,9 @@ RSpec.describe 'User edit profile' do
context 'user status', :js do
def select_emoji(emoji_name, is_modal = false)
- emoji_menu_class = is_modal ? '.js-modal-status-emoji-menu' : '.js-status-emoji-menu'
- toggle_button = find('.js-toggle-emoji-menu')
+ toggle_button = find('.emoji-menu-toggle-button')
toggle_button.click
- emoji_button = find(%Q{#{emoji_menu_class} .js-emoji-btn gl-emoji[data-name="#{emoji_name}"]})
+ emoji_button = find("gl-emoji[data-name=\"#{emoji_name}\"]")
emoji_button.click
end
@@ -207,7 +204,7 @@ RSpec.describe 'User edit profile' do
end
it 'adds message and emoji to user status' do
- emoji = 'tanabata_tree'
+ emoji = '8ball'
message = 'Playing outside'
select_emoji(emoji)
fill_in 'js-status-message-field', with: message
@@ -356,7 +353,7 @@ RSpec.describe 'User edit profile' do
end
it 'adds emoji to user status' do
- emoji = 'biohazard'
+ emoji = '8ball'
open_user_status_modal
select_emoji(emoji, true)
set_user_status_in_modal
@@ -387,18 +384,18 @@ RSpec.describe 'User edit profile' do
it 'opens the emoji modal again after closing it' do
open_user_status_modal
- select_emoji('biohazard', true)
+ select_emoji('8ball', true)
- find('.js-toggle-emoji-menu').click
+ find('.emoji-menu-toggle-button').click
- expect(page).to have_selector('.emoji-menu')
+ expect(page).to have_selector('.emoji-picker-emoji')
end
it 'does not update the awards panel emoji' do
project.add_maintainer(user)
visit(project_issue_path(project, issue))
- emoji = 'biohazard'
+ emoji = '8ball'
open_user_status_modal
select_emoji(emoji, true)
@@ -420,7 +417,7 @@ RSpec.describe 'User edit profile' do
end
it 'adds message and emoji to user status' do
- emoji = 'tanabata_tree'
+ emoji = '8ball'
message = 'Playing outside'
open_user_status_modal
select_emoji(emoji, true)
@@ -495,9 +492,7 @@ RSpec.describe 'User edit profile' do
open_user_status_modal
find('.js-status-message-field').native.send_keys(message)
- within('.js-toggle-emoji-menu') do
- expect(page).to have_emoji('speech_balloon')
- end
+ expect(page).to have_emoji('speech_balloon')
end
context 'note header' do
diff --git a/spec/features/profiles/user_visits_profile_preferences_page_spec.rb b/spec/features/profiles/user_visits_profile_preferences_page_spec.rb
index e19e29bf63a..4c61e8d45e4 100644
--- a/spec/features/profiles/user_visits_profile_preferences_page_spec.rb
+++ b/spec/features/profiles/user_visits_profile_preferences_page_spec.rb
@@ -18,14 +18,6 @@ RSpec.describe 'User visits the profile preferences page', :js do
end
describe 'User changes their syntax highlighting theme', :js do
- it 'creates a flash message' do
- choose 'user_color_scheme_id_5'
-
- wait_for_requests
-
- expect_preferences_saved_message
- end
-
it 'updates their preference' do
choose 'user_color_scheme_id_5'