Skip to content

Add expo-flow app #24

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions scripts/pit/its/expo-flow.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
const { expect } = require('@playwright/test');
const { log, args, createPage, closePage, takeScreenshot, waitForServerReady } = require('./test-utils');

(async () => {
const arg = args();

const page = await createPage(arg.headless, arg.ignoreHTTPSErrors);

await waitForServerReady(page, arg.url);

await page.locator('html').first().innerHTML();
await takeScreenshot(page, __filename, 'page-loaded');

await page.getByRole('link', { name: 'Chat' }).click();
await takeScreenshot(page, __filename, 'chat-loaded');
await page.getByLabel('Message').fill('hello');
await page.getByRole('button', { name: 'Send' }).click();
await takeScreenshot(page, __filename, 'chat-clicked');
await expect(page.getByText('Assistant').first()).toBeVisible();
await takeScreenshot(page, __filename, 'chat-result');

await page.getByRole('link', { name: 'Java Playground' }).click();
await takeScreenshot(page, __filename, 'java-loaded');
await page.locator('vaadin-text-field input').fill('foo');
await page.getByRole('button', { name: 'Say hello' }).click();
await takeScreenshot(page, __filename, 'java-clicked');
await expect(page.getByRole('paragraph')).toContainText('Hello foo');

await page.getByRole('link', { name: 'React Playground' }).click();
await takeScreenshot(page, __filename, 'react-loaded');
await page.locator('vaadin-text-field input').fill('bar');
await page.getByRole('button', { name: 'Say hello' }).click();
await takeScreenshot(page, __filename, 'react-clicked');
await expect(page.locator('vaadin-notification-container')).toContainText('Hello bar');
await takeScreenshot(page, __filename, 'react-result');

await page.getByRole('link', { name: 'Order T-shirt' }).click();
await takeScreenshot(page, __filename, 'order-loaded');
await page.getByLabel('Name').fill('Manolo');
await page.getByLabel('Email').fill('mm@aa.es');
await page.getByLabel('T-shirt size').click();
await takeScreenshot(page, __filename, 'size-clicked');
await page.getByRole('option', { name: 'Small' }).locator('div').click();
await page.getByRole('button', { name: 'Place order' }).click();
await takeScreenshot(page, __filename, 'order-clicked');
await expect(page.locator('vaadin-notification-container')).toContainText('Thank you');

await closePage(page);
})();




4 changes: 2 additions & 2 deletions scripts/pit/lib/lib-args.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@ EOF

## check arguments passed to `run.sh` script and set global variables
checkArgs() {
VERSION=current; GITBASE="https://github.com/"; PORT=$DEFAULT_PORT; TIMEOUT=$DEFAULT_TIMEOUT; VENDOR=kind
VERSION=current; GITBASE="https://github.com/"; export PORT=$DEFAULT_PORT; TIMEOUT=$DEFAULT_TIMEOUT; VENDOR=kind
while [ -n "$1" ]
do
arg=`echo "$1" | grep = | cut -d= -f2`
case "$1" in
--port=*) PORT="$arg";;
--port=*) export PORT="$arg";;
--generated) STARTERS=`echo "$PRESETS" | tr "\n" "," | sed -e 's/^,//' | sed -e 's/,$//'`;;
--demos) STARTERS=`echo "$DEMOS" | tr "\n" "," | sed -e 's/^,//' | sed -e 's/,$//'`;;
--start*=*)
Expand Down
1 change: 1 addition & 0 deletions scripts/pit/lib/lib-demos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@ getTest() {
vaadin-oauth-example) echo "oauth.js";;
bookstore-example) echo "bookstore.js";;
form-filler-demo) echo "ai.js";;
expo-flow) echo "expo-flow.js";;
*) echo "hello.js";;
esac
}
Expand Down
Loading