Skip to content

Commit

Permalink
Merge branch 'master' into TIMOB-27994
Browse files Browse the repository at this point in the history
  • Loading branch information
ssekhri authored Jul 8, 2020
2 parents 4c7dc8e + 7aa5290 commit 9b2c4c9
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 41 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ public String getColor()
public void setColor(String color)
{
setPropertyAndFire(TiC.PROPERTY_COLOR, color);
if (rowListener != null) {
rowListener.rowChanged(this);
}
}

@Kroll.method
Expand Down
6 changes: 3 additions & 3 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 @@ -135,7 +135,7 @@
"npm-run-all": "^4.1.5",
"nyc": "^15.1.0",
"request-promise-native": "^1.0.8",
"rollup": "^2.20.0",
"rollup": "^2.21.0",
"rollup-plugin-babel": "^4.4.0",
"rollup-plugin-commonjs": "^10.1.0",
"rollup-plugin-node-resolve": "^5.2.0",
Expand Down
28 changes: 15 additions & 13 deletions tests/Resources/ti.ui.shortcut.addontest.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,19 @@ if (OS_ANDROID) {
}
}

// Create basic shortcut item.
const shortcutItem = Ti.UI.createShortcutItem({
id: 'test_shortcut',
title: 'Test Shortcut',
description: 'Test shortcut description',
data: { test_data: 'data' }
});

describe('Titanium.UI.Shortcut', () => {
describe.android('Titanium.UI.Shortcut', () => {
// Create basic shortcut item.
let shortcutItem;
before(() => {
shortcutItem = Ti.UI.createShortcutItem({
id: 'test_shortcut',
title: 'Test Shortcut',
description: 'Test shortcut description',
data: { test_data: 'data' }
});
});

it.android('createShortcut', () => {
it('createShortcut', () => {
should(Ti.UI.createShortcutItem).not.be.undefined();
should(Ti.UI.createShortcut).be.a.Function();

Expand All @@ -43,7 +45,7 @@ describe('Titanium.UI.Shortcut', () => {
should(shortcut.apiName).be.eql('Ti.UI.Shortcut');
});

it.android('removeAll', () => {
it('removeAll', () => {

if (!androidCompatible) {
return;
Expand All @@ -61,7 +63,7 @@ describe('Titanium.UI.Shortcut', () => {
shortcut.removeAll();
});

it.android('remove', () => {
it('remove', () => {

if (!androidCompatible) {
return;
Expand All @@ -85,7 +87,7 @@ describe('Titanium.UI.Shortcut', () => {
should(shortcut.items).be.lessThan(existingShortcuts);
});

it.android('add', () => {
it('add', () => {

if (!androidCompatible) {
return;
Expand Down
47 changes: 23 additions & 24 deletions tests/Resources/ti.ui.shortcutitem.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,38 +11,37 @@

const should = require('./utilities/assertions');

describe('Titanium.UI.ShortcutItem', () => {
describe.android('Titanium.UI.ShortcutItem', () => {

describe.android('createShortcutItem', () => {
it('createShortcutItem', () => {
should(Ti.UI.createShortcutItem).not.be.undefined();
should(Ti.UI.createShortcutItem).be.a.Function();
});

it.android('basic shortcut item', () => {

// Create shortcut item.
const item = Ti.UI.createShortcutItem({
id: 'test_shortcut',
title: 'Test Shortcut',
description: 'Test shortcut description',
data: { test_data: 'data' }
});
should(item).be.a.Object();
it('basic shortcut item', () => {
// Create shortcut item.
const item = Ti.UI.createShortcutItem({
id: 'test_shortcut',
title: 'Test Shortcut',
description: 'Test shortcut description',
data: { test_data: 'data' }
});
should(item).be.a.Object();

// Verify `apiName`.
should(item).have.readOnlyProperty('apiName').which.is.a.String();
should(item.apiName).be.eql('Ti.UI.ShortcutItem');
// Verify `apiName`.
should(item).have.readOnlyProperty('apiName').which.is.a.String();
should(item.apiName).be.eql('Ti.UI.ShortcutItem');

// Verify `id`.
should(item.id).be.eql('test_shortcut');
// Verify `id`.
should(item.id).be.eql('test_shortcut');

// Verify `title`.
should(item.title).be.eql('Test Shortcut');
// Verify `title`.
should(item.title).be.eql('Test Shortcut');

// Verify `description`.
should(item.description).be.eql('Test shortcut description');
// Verify `description`.
should(item.description).be.eql('Test shortcut description');

// Verify `data`.
should(item.data).be.a.Object();
});
// Verify `data`.
should(item.data).be.a.Object();
});
});

0 comments on commit 9b2c4c9

Please sign in to comment.