Feature: Support closing dialog windows (#233)
Supports closing dialogs in development. Upgrades gas-client to 1.2.0 and uses new API here: Add scriptHostFunctions for google.script.host gas-client#36 Example button to close dialog in Bootstrap sample Updates integration tests
This commit is contained in:
BIN
Binary file not shown.
|
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 63 KiB |
BIN
Binary file not shown.
|
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 62 KiB |
BIN
Binary file not shown.
|
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 63 KiB |
@@ -26,7 +26,7 @@ const srcTestFile = path.join(
|
||||
'../src/client/dialog-demo-bootstrap/components/SheetEditor.jsx'
|
||||
);
|
||||
|
||||
const webpackDevServerReady = async (process) => {
|
||||
const viteDevServerReady = async (process) => {
|
||||
console.log('Waiting for vite to serve...');
|
||||
return new Promise((resolve) => {
|
||||
process.stdout.on('data', (data) => {
|
||||
@@ -40,7 +40,7 @@ const webpackDevServerReady = async (process) => {
|
||||
describe(`Local setup ${isExtended ? '*extended*' : ''}`, () => {
|
||||
let page;
|
||||
let process;
|
||||
const containerSelector = isExtended ? '.script-app-dialog' : 'body';
|
||||
const containerSelector = isExtended ? 'div[role="dialog"]' : 'body';
|
||||
|
||||
beforeAll(async () => {
|
||||
process = exec('yarn dev');
|
||||
@@ -52,7 +52,7 @@ describe(`Local setup ${isExtended ? '*extended*' : ''}`, () => {
|
||||
deviceScaleFactor: 1,
|
||||
});
|
||||
|
||||
await webpackDevServerReady(process);
|
||||
await viteDevServerReady(process);
|
||||
|
||||
if (isExtended) {
|
||||
await openAddon(page);
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
export const openAddon = async (page) => {
|
||||
await page.goto(process.env.SHEET_URL);
|
||||
|
||||
await page.waitForTimeout(5000); // pause for 3 seconds
|
||||
await page.click('a:nth-child(2)'); // click on signin button
|
||||
|
||||
await page.waitForSelector('input[name="identifier"]', { visible: true });
|
||||
@@ -97,10 +98,10 @@ export const openAddon = async (page) => {
|
||||
new MouseEvent('mouseup', { bubbles: true })
|
||||
);
|
||||
});
|
||||
await page.waitForSelector('.script-app-dialog', {
|
||||
await page.waitForSelector('div[role="dialog"]', {
|
||||
visible: true,
|
||||
timeout: 10000,
|
||||
});
|
||||
|
||||
await page.waitForTimeout(3000);
|
||||
await page.waitForTimeout(15000);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user