Skip to content

Commit

Permalink
Add better test fixes and lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
tmcconechy committed Oct 15, 2019
1 parent 3a4acae commit e8efaac
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion test/components/datagrid/datagrid.e2e-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const openPersonalizationDialog = async () => {
await element(by.css('li a[data-option="personalize-columns"')).click();
await browser.driver.sleep(config.sleep);
await browser.driver
.wait(protractor.ExpectedConditions.visibilityOf(await element(by.css('.modal-content'))), config.waitsFor);
.wait(protractor.ExpectedConditions.presenceOf(await element.all(by.css('input[data-column-id="hidden"]')).last()), config.waitsFor);
};

describe('Datagrid Alternate Row Tests', () => {
Expand Down
8 changes: 4 additions & 4 deletions test/components/datepicker/datepicker.e2e-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -1234,7 +1234,7 @@ describe('Datepicker specific locale/langauge tests', () => {
await utils.setPage('/components/datepicker/test-two-locales-same-page');
});

it('Should be Able to use current locale', async () => {
it('Should be able to use current locale', async () => {
const datepickerEl = await element(by.id('date-field-normal'));
await element(by.css('#date-field-normal + .icon')).click();

Expand All @@ -1249,7 +1249,7 @@ describe('Datepicker specific locale/langauge tests', () => {
expect(await datepickerEl.getAttribute('value')).toEqual(testDate.toLocaleDateString('en-US'));
});

it('Should be Able to use non current locale', async () => {
it('Should be able to use non current locale', async () => {
const datepickerEl = await element(by.id('date-field-danish'));
await element(by.css('#date-field-danish + .icon')).click();

Expand All @@ -1261,7 +1261,7 @@ describe('Datepicker specific locale/langauge tests', () => {
testDate.setMinutes(0);
testDate.setSeconds(0);

expect(await datepickerEl.getAttribute('value')).toEqual(testDate.toLocaleDateString('da-DK').replace(/\//g, '-'));
expect(await datepickerEl.getAttribute('value')).toEqual(`${testDate.getDate()}-${testDate.getMonth() + 1}-${testDate.getFullYear()}`);
});

it('Should be Able to use non current locale and a different langauge', async () => {
Expand All @@ -1276,6 +1276,6 @@ describe('Datepicker specific locale/langauge tests', () => {
testDate.setMinutes(0);
testDate.setSeconds(0);

expect(await datepickerEl.getAttribute('value')).toEqual(testDate.toLocaleDateString('de-DE').replace(/\//g, '-'));
expect(await datepickerEl.getAttribute('value')).toEqual(`${testDate.getDate()}.${testDate.getMonth() + 1}.${testDate.getFullYear()}`);
});
});
2 changes: 1 addition & 1 deletion test/components/locale/locale.func-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -1456,7 +1456,7 @@ describe('Locale API', () => {
});
});

fit('Should be able get translations in a non current locale', (done) => {
it('Should be able get translations in a non current locale', (done) => {
Locale.set('fi-FI');
Locale.setLanguage('sv');
Locale.getLocale('de-DE');
Expand Down

0 comments on commit e8efaac

Please sign in to comment.