mirror of
https://github.com/gristlabs/grist-core.git
synced 2024-10-27 20:44:07 +00:00
Merge pull request #412 from incubateur-territoires/bug-card-empty-reference
Bug card empty reference
This commit is contained in:
commit
65c8bec2b4
@ -141,7 +141,7 @@ function BaseView(gristDoc, viewSectionModel, options) {
|
|||||||
}).extend({deferred: true}));
|
}).extend({deferred: true}));
|
||||||
|
|
||||||
// Update the cursor whenever linkedRowId() changes.
|
// Update the cursor whenever linkedRowId() changes.
|
||||||
this.autoDispose(this.linkedRowId.subscribe(rowId => this.setCursorPos({rowId})));
|
this.autoDispose(this.linkedRowId.subscribe(rowId => this.setCursorPos({rowId: rowId || 'new'})));
|
||||||
|
|
||||||
// Indicated whether editing the section should be disabled given the current linking state.
|
// Indicated whether editing the section should be disabled given the current linking state.
|
||||||
this.disableEditing = this.autoDispose(ko.computed(() => {
|
this.disableEditing = this.autoDispose(ko.computed(() => {
|
||||||
|
BIN
test/fixtures/docs/Favorite_Films_With_Linked_Ref.grist
vendored
Normal file
BIN
test/fixtures/docs/Favorite_Films_With_Linked_Ref.grist
vendored
Normal file
Binary file not shown.
@ -11,7 +11,7 @@ describe('ReferenceColumns', function() {
|
|||||||
describe('rendering', function() {
|
describe('rendering', function() {
|
||||||
before(async function() {
|
before(async function() {
|
||||||
session = await gu.session().teamSite.login();
|
session = await gu.session().teamSite.login();
|
||||||
await session.tempDoc(cleanup, 'Favorite_Films.grist');
|
await session.tempDoc(cleanup, 'Favorite_Films_With_Linked_Ref.grist');
|
||||||
|
|
||||||
await gu.toggleSidePanel('right');
|
await gu.toggleSidePanel('right');
|
||||||
await driver.find('.test-config-data').click();
|
await driver.find('.test-config-data').click();
|
||||||
@ -147,6 +147,23 @@ describe('ReferenceColumns', function() {
|
|||||||
]
|
]
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('should have linked card for friends', async () => {
|
||||||
|
// Open the All page.
|
||||||
|
await driver.findContentWait('.test-treeview-itemHeader', /Linked Friends/, 2000).click();
|
||||||
|
await gu.waitForDocToLoad();
|
||||||
|
|
||||||
|
await driver.findContentWait('.field_clip', /Mary/, 2000).click();
|
||||||
|
await gu.waitForServer();
|
||||||
|
await driver.findContentWait('.g_record_detail_label', /Title/, 2000).click();
|
||||||
|
assert.equal(await gu.getActiveCell().getText(), 'Alien');
|
||||||
|
|
||||||
|
await driver.findContentWait('.field_clip', /Jarek/, 2000).click();
|
||||||
|
await gu.waitForServer();
|
||||||
|
await driver.findContentWait('.g_record_detail_label', /Title/, 2000).click();
|
||||||
|
assert.equal(await gu.getActiveCell().getText(), '');
|
||||||
|
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('autocomplete', function() {
|
describe('autocomplete', function() {
|
||||||
|
Loading…
Reference in New Issue
Block a user