Skip to content

Commit 2f1637e

Browse files
Fix Row click when disable selected fields
Fix Test Run creation test
1 parent 3b94f7a commit 2f1637e

File tree

4 files changed

+7
-28
lines changed

4 files changed

+7
-28
lines changed

e2e/pages/testrun/view.po/constants.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,6 @@ export const elements = {
3838
debug: new Checkbox(by.id('debug'))
3939
};
4040

41-
export const regexps = {
42-
// tslint:disable-next-line: max-line-length
43-
startDateRegexp: '(?<day>(\\d{2}))\\/(?<month>(\\d{2}))\\/(?<year>(\\d{2}))\\s(?<hours>(\\d{2})):(?<minutes>(\\d{2})):(?<seconds>(\\d{2}))\\s(?<period>(\\w{2}))'
44-
};
45-
4641
export const columns = {
4742
testName: 'Test Name',
4843
failReason: 'Fail Reason',

e2e/pages/testrun/view.po/helpers.ts

Lines changed: 0 additions & 12 deletions
This file was deleted.

e2e/pages/testrun/view.po/index.ts

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { browser, promise } from 'protractor';
2-
import { baseUrl, elements, names, regexps, columns } from './constants';
2+
import { baseUrl, elements, names, columns } from './constants';
33
import { BasePage } from '../../base.po';
4-
import { convertHoursTo24HourFormat, padYear } from './helpers';
54

65
class TestRunView extends BasePage {
76
constructor() {
@@ -144,14 +143,7 @@ class TestRunView extends BasePage {
144143

145144
async getStartTime(): Promise<Date> {
146145
const startTimeValue = await elements.startTimeLabel.getText();
147-
const startDateRegex = new RegExp(regexps.startDateRegexp);
148-
const year = padYear(startDateRegex.exec(startTimeValue)['groups'].year);
149-
const month = startDateRegex.exec(startTimeValue)['groups'].month - 1;
150-
const day = startDateRegex.exec(startTimeValue)['groups'].day;
151-
const hours = convertHoursTo24HourFormat(startDateRegex.exec(startTimeValue)
152-
['groups'].hours, startDateRegex.exec(startTimeValue)['groups'].period);
153-
const minutes = startDateRegex.exec(startTimeValue)['groups'].minutes;
154-
return new Date(year, month, day, hours, minutes);
146+
return new Date(startTimeValue);
155147
}
156148

157149
setResultFilter(value: string): Promise<void> {

src/app/elements/table/table.filter.component.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -645,7 +645,11 @@ export class TableFilterComponent implements OnInit, AfterViewInit, OnDestroy, O
645645

646646
rowClicked(entity: any, col: any, $event: any) {
647647
const el: HTMLElement = $event.target;
648-
if ((!col.editable || el.classList.contains('ft-cell')) && col.type !== 'link' && col.type !== 'long-text' && !col.link) {
648+
const canClick = (!col.editable || this.notEditableByProperty(entity, col) || el.classList.contains('ft-cell'))
649+
&& col.type !== 'link'
650+
&& col.type !== 'long-text'
651+
&& !col.link;
652+
if (canClick) {
649653
this.rowClick.emit(entity);
650654
}
651655
}

0 commit comments

Comments
 (0)