Fixed test: RightPanelSelectBy disallow cycles

We now want to disallow most cycles, but allow same-table
cursor-linked cycles

Note: I tested that filtered cycles are forbidden,
same-table-cursor cycles are allowed,

but I never checked if different-table cursor cycles are forbidden
might be something to add, but would require more fiddling
This commit is contained in:
Janet Vorobyeva 2023-09-12 01:23:56 -07:00
parent e0fa76530a
commit fa18307c9a

View File

@ -63,9 +63,23 @@ describe('RightPanelSelectBy', function() {
});
it('should disallow creating cycles', async function() {
it('should disallow creating cycles if not cursor-linked', async function() {
//Link "films record" by "performances record"
await gu.openSelectByForSection('FILMS RECORD');
await driver.findContent('.test-select-row', /Performances record.*Film/i).click();
await gu.waitForServer();
// this link should no longer be present, since it would create a cycle with a filter link in it
await gu.openSelectByForSection('PERFORMANCES RECORD');
assert.equal(await driver.findContent('.test-select-row', /Performances detail/).isPresent(), false);
assert.equal(await driver.findContent('.test-select-row', /Performances record.*Film/i).isPresent(), false);
});
it('should allow creating cursor-linked-cycles', async function() {
assert.equal(await driver.findContent('.test-select-row', /Performances detail/).isPresent(), true);
// undo, link is expected to be unset for next test
await gu.undo();
});