Skip to content

Commit

Permalink
fix(tests): js heap out of memory, datepicker fixes (#5048)
Browse files Browse the repository at this point in the history
  • Loading branch information
ludmilanesvitiy authored and valorkin committed Feb 6, 2019
1 parent 0e77f25 commit 235050e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
4 changes: 2 additions & 2 deletions cypress/full/datepicker/min_max_spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ describe('Datepicker demo test suite: Min-max', () => {
maxDate.setDate(maxDate.getDate() + 8);
const dateOutOfIntervalLeft = new Date(minDate.getTime());
const dateOutOfIntervalRight = new Date(maxDate.getTime());
dateOutOfIntervalLeft.setDate((dateOutOfIntervalLeft.getDate() - 5));
dateOutOfIntervalRight.setDate((dateOutOfIntervalRight.getDate() + 5));
dateOutOfIntervalLeft.setDate((dateOutOfIntervalLeft.getDate() - 3));
dateOutOfIntervalRight.setDate((dateOutOfIntervalRight.getDate() + 3));
datepicker.clickOnDatepickerInput(minMax);
datepicker.isDatepickerOpened(true);
if (minDate.getMonth() === dateOutOfIntervalLeft.getMonth()) {
Expand Down
5 changes: 4 additions & 1 deletion cypress/plugins/cy-ts-preprocessor.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ const webpackOptions = {
exclude: [/node_modules/],
use: [
{
loader: 'ts-loader'
loader: 'ts-loader',
options: {
transpileOnly: true
}
}
]
}
Expand Down
5 changes: 4 additions & 1 deletion cypress/support/datepicker.po.ts
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,10 @@ export class DatepickerPo extends BaseComponent {
if (itemText === undefined) {
cy.get(`${baseSelector}>${this.datepickerContainer} ${bodyView} td`).eq(itemIndex).click();
} else {
cy.get(`${baseSelector}>${this.datepickerContainer} ${bodyView} td span`)
cy.get(`${baseSelector}>${this.datepickerContainer} ${bodyView}`)
.find(`td`)
.not('.week')
.find('span')
.not('[class*="is-other-month"]')
.contains(itemText).click();
}
Expand Down

0 comments on commit 235050e

Please sign in to comment.