Skip to content

Commit

Permalink
add functional test
Browse files Browse the repository at this point in the history
  • Loading branch information
mattkime committed Apr 9, 2024
1 parent edbdfc1 commit 8a546bb
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/functional/apps/discover/group4/_esql_view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,19 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
'machine.ram_range',
]);
});

it('should work without a FROM statement', async function () {
await PageObjects.discover.selectTextBaseLang();
const testQuery = `ROW a = 1, b = "two", c = null`;

await monacoEditor.setCodeEditorValue(testQuery);
await testSubjects.click('querySubmitButton');
await PageObjects.header.waitUntilLoadingHasFinished();

await PageObjects.discover.dragFieldToTable('a');
const cell = await dataGrid.getCellElement(0, 2);
expect(await cell.getVisibleText()).to.be('1');
});
});

describe('errors', () => {
Expand Down

0 comments on commit 8a546bb

Please sign in to comment.