-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature/619 show people modal (#624)
* implement first version of skill show view * change font color of labels * add translations and only include people in people show modal which filled out skill * begin with test implementation * finish test implementation * add styles to display disabled input fields with normal bootstrap color * add wait to test expectation * add visible false parameter to spec file * include turbo frame and model view in show component of skills * use latest syntax to compare values * add visible false flag to check only if text gets rendered * delete unnecessary visible attribute from test * use find to check modal title instead of checking entire page for a specific text * use wait in text * use have_content instead of find * use visible false attribut in test * add comma to test * add comment inside testfile * resolve requested changes * make rubocop happy again * use filter_by_rated in index view too * format line with rubocop
- Loading branch information
Showing
10 changed files
with
113 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
require 'rails_helper' | ||
|
||
describe 'People skills Show', type: :feature, js: true do | ||
before(:each) do | ||
sign_in auth_users(:user), scope: :auth_user | ||
visit root_path | ||
end | ||
|
||
it 'Should only display valid amount of members' do | ||
visit skills_path | ||
click_link('Rails') | ||
|
||
# We used visible false in this test because the modal is not accessible in any different way | ||
# follow-up ticket for this: #628 | ||
expect(page).to have_selector('.modal-title', visible: false, text: 'Skill: Rails (4 Members)') | ||
expect(page).to have_selector('.skill-row', visible: false, count: 4) | ||
end | ||
|
||
it 'Should render elements correctly' do | ||
visit skills_path | ||
click_link('Bash') | ||
expect(page).to have_text('Skill: Bash (1 Members)') | ||
expect(page).to have_xpath("//input[@value=5]") | ||
expect(page).to have_xpath("//input[@value=2]") | ||
expect(page.first(".certificate")).to be_checked | ||
expect(page.first(".core-competence")).not_to be_checked | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters