#!/usr/bin/expect spawn ../amplify-cli/codebuild_specs/sh-files/api.sh expect "Select from one of the below mentioned services:\r" send -- "\033\[B\r" expect "Provide a friendly name for your resource to be used as a label for this category in the project:" send -- "cypressTestRestApi\r" expect "Provide a path (e.g., /items)" send -- "\r" expect "Choose a Lambda source" send -- "\r" expect "Provide an AWS Lambda function name:" send -- "\r" expect "Choose the function runtime that you want to use:" send -- "\r" expect "Choose the function template that you want to use:" send -- "2\r" expect "Choose a DynamoDB data source option" send -- "j\r" expect "Provide a friendly name" send -- "\r" expect "Provide table name" send -- "\r" expect "What would you like to name this column" send -- "itemNo\r" expect "Choose the data type" send -- "number\r" expect "Would you like to add another column?" send -- "n" expect "Do you want to add a sort key to your table?" send -- "n" expect "Do you want to add global secondary indexes to your table?" send -- "n" expect "Do you want to add a Lambda Trigger for your Table?" send -- "n" expect "Do you want to configure advanced settings?" send -- "n\r" expect "Do you want to edit the local lambda function now?" send -- "n\r" expect "Restrict API access" send -- "n" expect "Do you want to add another path?" send -- "n" expect "\"amplify publish\" will build all your local backend and frontend resources (if you have hosting category added) and provision it in the cloud" set timeout -1 interact