Skip to content

Commit

Permalink
Merge branch 'authoring-react-post-broadcasting' into focus-first-inp…
Browse files Browse the repository at this point in the history
…ut-when-opening-authoring
  • Loading branch information
tomaskikutis committed Oct 26, 2023
2 parents 85113d1 + db520e7 commit ef18743
Show file tree
Hide file tree
Showing 14 changed files with 346 additions and 264 deletions.
2 changes: 1 addition & 1 deletion e2e/client/protractor.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ var config = {
framework: 'jasmine2',
jasmineNodeOpts: {
showColors: true,
defaultTimeoutInterval: 200000,
defaultTimeoutInterval: 300000,
},

capabilities: {
Expand Down
13 changes: 11 additions & 2 deletions e2e/client/specs/authoring_spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,11 @@ describe('authoring', () => {
authoring.close();
});

it('keyboard shortcuts', () => {
/**
* disabled because it fails due to a timeout and doesn't show a stack trace
* it works well locally
*/
xit('keyboard shortcuts', () => {
monitoring.actionOnItem('Edit', 2, 0);
authoring.writeText('z');
element(by.cssContainingText('label', 'Dateline')).click();
Expand Down Expand Up @@ -663,7 +667,12 @@ describe('authoring', () => {
workspace.selectDesk('XEditor3 Desk'); // has media gallery in content profile

el(['content-create']).click();
el(['content-create-dropdown']).element(by.buttonText('editor3 template')).click();

const templateBtn = el(['content-create-dropdown']).element(by.buttonText('editor3 template'));

browser.wait(ECE.elementToBeClickable(templateBtn));

templateBtn.click();

browser.wait(ECE.visibilityOf(el(['authoring-field--media-gallery', 'media-gallery--upload-placeholder'])));
expect(ECE.hasElementCount(els(['authoring-field--media-gallery', 'media-gallery-image']), 0)()).toBe(true);
Expand Down
2 changes: 1 addition & 1 deletion e2e/client/specs/helpers/monitoring.ts
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ class Monitoring {
this.tabAction = function(tab) {
const btn = element(by.css('[ng-click="vm.current_tab = \'' + tab + '\'"]'));

browser.wait(ECE.elementToBeClickable(btn), 2000);
browser.wait(ECE.elementToBeClickable(btn));

btn.click();
};
Expand Down
30 changes: 15 additions & 15 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
"sass-loader": "6.0.6",
"shortid": "2.2.8",
"style-loader": "0.20.2",
"superdesk-ui-framework": "^3.0.59",
"superdesk-ui-framework": "^3.0.60",
"ts-loader": "3.5.0",
"tslint": "5.11.0",
"typescript": "4.9.5",
Expand Down
14 changes: 12 additions & 2 deletions scripts/apps/monitoring/directives/MonitoringFilteringButtons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -139,12 +139,22 @@ class MonitoringFilteringButtonsComponent extends React.PureComponent<IProps, {b
});
}
render() {
if (this.state.buttons == null) {
if ((this.state.buttons ?? []).length < 1) {
return null;
}

return (
<div>
<div
style={{
display: 'flex',
height: '100%',
alignItems: 'center',
paddingLeft: 10,
paddingRight: 10,
borderLeft: '1px solid var(--sd-colour-line--light)',
whiteSpace: 'nowrap',
}}
>
{this.state.buttons.map((button) => (
<FilterButton
key={button.label}
Expand Down
2 changes: 2 additions & 0 deletions scripts/apps/monitoring/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ angular.module('superdesk.apps.monitoring', [
'activeFilters',
'addResourceUpdatedEventListener',
],
[],
'display:contents',
),
)
.directive('sdMonitoringGroup', directive.MonitoringGroup)
Expand Down
20 changes: 8 additions & 12 deletions scripts/apps/monitoring/views/monitoring-view.html
Original file line number Diff line number Diff line change
Expand Up @@ -126,19 +126,15 @@ <h2 class="subnav__page-title sd-flex-no-grow sd-empty" ng-hide="monitoring.sing
<i class="icon-settings"></i>
</button>

<div
<sd-monitoring-filtering-buttons
ng-if="type === 'monitoring' && activeDeskId != null"
style="display: flex; align-items: center; padding-left: 10px; padding-right: 10px;"
>
<sd-monitoring-filtering-buttons
desk-id="activeDeskId"
toggle-filter="aggregate.toggleCustomFilter"
set-filter="aggregate.setCustomFilter"
is-filter-active="aggregate.isCustomFilterActive"
active-filters="aggregate.activeFilters.customFilters"
add-resource-updated-event-listener="addResourceUpdatedEventListener"
></sd-monitoring-filtering-buttons>
</div>
desk-id="activeDeskId"
toggle-filter="aggregate.toggleCustomFilter"
set-filter="aggregate.setCustomFilter"
is-filter-active="aggregate.isCustomFilterActive"
active-filters="aggregate.activeFilters.customFilters"
add-resource-updated-event-listener="addResourceUpdatedEventListener"
></sd-monitoring-filtering-buttons>

<div
ng-if="disableMonitoringCreateItem == null"
Expand Down
Loading

0 comments on commit ef18743

Please sign in to comment.