Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tests and styling for betterbuttons port #744

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified client/dist/fonts/silverstripe.eot
Binary file not shown.
1 change: 1 addition & 0 deletions client/dist/fonts/silverstripe.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified client/dist/fonts/silverstripe.ttf
Binary file not shown.
Binary file modified client/dist/fonts/silverstripe.woff
Binary file not shown.
2 changes: 1 addition & 1 deletion client/dist/js/bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion client/dist/styles/bundle.css

Large diffs are not rendered by default.

21 changes: 21 additions & 0 deletions client/src/components/Toolbar/Toolbar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,27 @@

.btn {
margin-bottom: 0;

&.circular {
border-radius: 100px;
width: 32px;
padding-left: 7px;
bergice marked this conversation as resolved.
Show resolved Hide resolved
}
}

.circular-group>.btn {
width: 32px;
padding-left: 7px;

&:first-child {
border-top-left-radius: 100px;
border-bottom-left-radius: 100px;
}

&:last-child {
border-top-right-radius: 100px;
border-bottom-right-radius: 100px;
}
}
}

Expand Down
Binary file modified client/src/font/fonts/silverstripe.eot
Binary file not shown.
1 change: 1 addition & 0 deletions client/src/font/fonts/silverstripe.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified client/src/font/fonts/silverstripe.ttf
Binary file not shown.
Binary file modified client/src/font/fonts/silverstripe.woff
Binary file not shown.
8 changes: 8 additions & 0 deletions client/src/font/icons-reference.html
Original file line number Diff line number Diff line change
Expand Up @@ -711,6 +711,10 @@ <h2>CSS mapping</h2>
<div class="icon font-icon-accessibility"></div>
<input type="text" readonly="readonly" value="accessibility">
</li>
<li>
<div class="icon font-icon-plus-thin"></div>
<input type="text" readonly="readonly" value="plus-thin">
</li>
</ul>
<h2>Character mapping</h2>
<ul class="glyphs character-mapping">
Expand Down Expand Up @@ -1410,6 +1414,10 @@ <h2>Character mapping</h2>
<div data-icon="&#xe04f;" class="icon"></div>
<input type="text" readonly="readonly" value="&amp;#xe04f;">
</li>
<li>
<div data-icon="&#xe050;" class="icon"></div>
<input type="text" readonly="readonly" value="&amp;#xe050;">
</li>
</ul>
</div>
<script>(function() {
Expand Down
3 changes: 3 additions & 0 deletions client/src/font/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -560,3 +560,6 @@
.font-icon-accessibility:before {
content: "\e04f";
}
.font-icon-plus-thin:before {
content: "\e050";
}
8 changes: 8 additions & 0 deletions client/src/legacy/LeftAndMain.js
Original file line number Diff line number Diff line change
Expand Up @@ -1086,6 +1086,14 @@ $.entwine('ss', function($) {
}
});

$('.cms button.action.discard-confirmation').entwine({
onclick: function(e) {
if (!$('.cms-container').checkCanNavigate()) {
e.preventDefault();
}
}
});

bergice marked this conversation as resolved.
Show resolved Hide resolved
/**
* Does an ajax loads of the link's 'href' attribute via ajax and displays any FormResponse messages from the CMS.
* Little helper to avoid repetition, and make it easy to trigger actions via a link,
Expand Down
4 changes: 4 additions & 0 deletions client/src/styles/_fonts.scss
Original file line number Diff line number Diff line change
Expand Up @@ -721,3 +721,7 @@
.font-icon-accessibility:before {
content: "\e04f";
}

.font-icon-plus-thin:before {
content: "\e050";
}
27 changes: 26 additions & 1 deletion tests/behat/features/manage-users.feature
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Feature: Manage users
Given a "member" "ADMIN" belonging to "ADMIN group" with "Email"="admin@example.org"
And the "member" "ADMIN" belonging to "ADMIN group2"
And a "member" "Staff" belonging to "Staff group" with "Email"="staffmember@example.org"
And a "member" "Other Staff" belonging to "Staff group" with "Email"="othermember@example.org"
And the "group" "ADMIN group" has permissions "Full administrative rights"
And the "group" "ADMIN group2" has permissions "Full administrative rights"
And I am logged in with "ADMIN" permissions
Expand Down Expand Up @@ -88,8 +89,32 @@ Feature: Manage users
When I go to "admin/security/"
Then I should see "john.doe@example.org" in the "#Root_Users" element

Scenario: I can edit an existing user and add him to an existing group
@modal
Scenario: I can navigate users from the edit form and retain my search query
When I click the "Users" CMS tab
And I press the "First Name" button

Then I should see "admin@example.org" in the "#Root_Users" element
And I should see "othermember@example.org" in the "#Root_Users" element
And I should see "staffmember@example.org" in the "#Root_Users" element

When I click "othermember@example.org" in the "#Root_Users" element
And I press the "Form_ItemEditForm_action_doNext" button
Then the "Email" field should contain "staffmember@example.org"
When I press the "Form_ItemEditForm_action_doPrevious" button
Then the "Email" field should contain "othermember@example.org"

When I fill in "FirstName" with "Staff Renamed"
And I press the "Form_ItemEditForm_action_doNew" button
Then I see the text "Are you sure you want to navigate away from this page?" in the alert
And I dismiss the dialog

When I go to "admin/security/"
Then I confirm the dialog

Scenario: I can edit an existing user and add him to an existing group
When I go to "admin/security/"
And I click the "Users" CMS tab
And I click "staffmember@example.org" in the "#Root_Users" element
And I select "ADMIN group" from "Groups"
And I press the "Apply changes" button
Expand Down