mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Showing a raw data section on a popup
Summary: Show raw data will now open a popup with raw section instead of redirecting to raw data page. Adding new anchor link type "a2" that is able to open any section in a popup on a current view. Not related: Fixing highlightMatches function, after merging core PR. Test Plan: Updated tests Reviewers: alexmojaki, georgegevoian Reviewed By: alexmojaki, georgegevoian Subscribers: georgegevoian, alexmojaki Differential Revision: https://phab.getgrist.com/D3592
This commit is contained in:
@@ -536,16 +536,18 @@ export async function getFormulaText() {
|
||||
/**
|
||||
* Check that formula editor is shown and its value matches the given regexp.
|
||||
*/
|
||||
export async function checkFormulaEditor(valueRe: RegExp) {
|
||||
export async function checkFormulaEditor(value: RegExp|string) {
|
||||
assert.equal(await driver.findWait('.test-formula-editor', 500).isDisplayed(), true);
|
||||
const valueRe = typeof value === 'string' ? exactMatch(value) : value;
|
||||
assert.match(await driver.find('.code_editor_container').getText(), valueRe);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check that plain text editor is shown and its value matches the given regexp.
|
||||
*/
|
||||
export async function checkTextEditor(valueRe: RegExp) {
|
||||
export async function checkTextEditor(value: RegExp|string) {
|
||||
assert.equal(await driver.findWait('.test-widget-text-editor', 500).isDisplayed(), true);
|
||||
const valueRe = typeof value === 'string' ? exactMatch(value) : value;
|
||||
assert.match(await driver.find('.celleditor_text_editor').value(), valueRe);
|
||||
}
|
||||
|
||||
@@ -2384,6 +2386,11 @@ export async function waitForAnchor() {
|
||||
await driver.wait(async () => (await getTestState()).anchorApplied, 2000);
|
||||
}
|
||||
|
||||
export async function getAnchor() {
|
||||
await driver.find('body').sendKeys(Key.chord(Key.SHIFT, await modKey(), 'a'));
|
||||
return (await getTestState()).clipboard || '';
|
||||
}
|
||||
|
||||
export async function getActiveSectionTitle(timeout?: number) {
|
||||
return await driver.findWait('.active_section .test-viewsection-title', timeout ?? 0).getText();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user