Skip to content

Commit

Permalink
Merge pull request #529 from newfold-labs/test/mock-api
Browse files Browse the repository at this point in the history
Mocking AI sitegen and homepage APIs in site-logo step
  • Loading branch information
sangeetha-nayak authored Apr 4, 2024
2 parents c0f0ac6 + e7abce4 commit bf86dbe
Show file tree
Hide file tree
Showing 15 changed files with 814 additions and 189 deletions.
57 changes: 57 additions & 0 deletions tests/cypress/fixtures/color-palette.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
[
{
"base": "#2E7D32",
"contrast": "#FFFFFF",
"primary": "#4CAF50",
"tertiary": "#C8E6C9",
"header_background": "#2E7D32",
"header_foreground": "#FFFFFF",
"header_tiles": "#C8E6C9",
"secondary_background": "#FFFFFF",
"secondary_foreground": "#2E7D32"
},
{
"base": "#1565C0",
"contrast": "#FFFFFF",
"primary": "#2196F3",
"tertiary": "#BBDEFB",
"header_background": "#1565C0",
"header_foreground": "#FFFFFF",
"header_tiles": "#BBDEFB",
"secondary_background": "#FFFFFF",
"secondary_foreground": "#1565C0"
},
{
"base": "#6A1B9A",
"contrast": "#FFFFFF",
"primary": "#9C27B0",
"tertiary": "#E1BEE7",
"header_background": "#6A1B9A",
"header_foreground": "#FFFFFF",
"header_tiles": "#E1BEE7",
"secondary_background": "#FFFFFF",
"secondary_foreground": "#6A1B9A"
},
{
"base": "#E65100",
"contrast": "#FFFFFF",
"primary": "#FF5722",
"tertiary": "#FFCCBC",
"header_background": "#E65100",
"header_foreground": "#FFFFFF",
"header_tiles": "#FFCCBC",
"secondary_background": "#FFFFFF",
"secondary_foreground": "#E65100"
},
{
"base": "#FF6F00",
"contrast": "#FFFFFF",
"primary": "#FF9800",
"tertiary": "#FFE0B2",
"header_background": "#FF6F00",
"header_foreground": "#FFFFFF",
"header_tiles": "#FFE0B2",
"secondary_background": "#FFFFFF",
"secondary_foreground": "#FF6F00"
}
]
40 changes: 40 additions & 0 deletions tests/cypress/fixtures/content-structure.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"content_structures": [
{
"structure": [
"header",
"hero",
"headings",
"team",
"features",
"gallery",
"call-to-action",
"footer"
]
},
{
"structure": [
"header",
"hero",
"headings",
"team",
"faq",
"testimonials",
"blog",
"footer"
]
},
{
"structure": [
"header",
"hero",
"headings",
"team",
"gallery",
"call-to-action",
"contact",
"footer"
]
}
]
}
1 change: 1 addition & 0 deletions tests/cypress/fixtures/content-tones.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"tone":"Professional","undertone":"Positive","verbosity":2,"reading_level":60}
47 changes: 47 additions & 0 deletions tests/cypress/fixtures/font-pair.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
[
{
"aesthetics": "modern",
"font_heading": "jost",
"font_content": "mulish",
"spacing": 2,
"radius": 4,
"font_heading_name": "Jost",
"font_content_name": "Mulish"
},
{
"aesthetics": "minimalist",
"font_heading": "poppins",
"font_content": "source-sans-pro",
"spacing": 1,
"radius": 2,
"font_heading_name": "Poppins",
"font_content_name": "Source Sans Pro"
},
{
"aesthetics": "vintage",
"font_heading": "playfair",
"font_content": "forum",
"spacing": 3,
"radius": 6,
"font_heading_name": "Playfair Display",
"font_content_name": "Forum"
},
{
"aesthetics": "typographic",
"font_heading": "oswald",
"font_content": "merriweather",
"spacing": 2,
"radius": 4,
"font_heading_name": "Oswald",
"font_content_name": "Merriweather"
},
{
"aesthetics": "retro",
"font_heading": "changa-one",
"font_content": "roboto-slab",
"spacing": 2,
"radius": 4,
"font_heading_name": "Changa One",
"font_content_name": "Roboto Slab"
}
]
179 changes: 179 additions & 0 deletions tests/cypress/fixtures/homepages.json

Large diffs are not rendered by default.

105 changes: 105 additions & 0 deletions tests/cypress/fixtures/plugin-recommendation.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
{
"requiredPlugins": [
{
"title": "Yoast SEO",
"description": "Yoast SEO is a comprehensive search engine optimization plugin for WordPress, which offers various features to optimize your site for maximum visibility in search engines.",
"slug": "wordpress-seo",
"path": "wordpress-seo\/wordpress-seo.php",
"download_url": "https:\/\/downloads.wordpress.org\/plugin\/wordpress-seo.zip",
"premium": false,
"requires": []
},
{
"title": "Jetpack",
"description": "Jetpack offers a suite of design, security, and marketing tools for WordPress sites, including real-time backups and easy-to-use performance enhancements.",
"slug": "jetpack",
"path": "jetpack\/jetpack.php",
"download_url": "https:\/\/downloads.wordpress.org\/plugin\/jetpack.zip",
"premium": false,
"requires": []
},
{
"title": "WooCommerce",
"description": "WooCommerce is a customizable, open-source eCommerce platform built on WordPress, allowing users to set up online stores with ease.",
"slug": "woocommerce",
"path": "woocommerce\/woocommerce.php",
"download_url": "https:\/\/downloads.wordpress.org\/plugin\/woocommerce.zip",
"premium": false,
"requires": []
}
],
"recommendedPlugins": [
{
"title": "Creative Mail",
"description": "Creative Mail is an email marketing plugin designed to seamlessly integrate with WordPress, offering intuitive tools for crafting and sending newsletters.",
"slug": "creative-mail-by-constant-contact",
"path": "creative-mail-by-constant-contact\/creative-mail-plugin.php",
"download_url": "https:\/\/downloads.wordpress.org\/plugin\/creative-mail-by-constant-contact.zip",
"premium": false,
"requires": []
},
{
"title": "MonsterInsights",
"description": "MonsterInsights provides a powerful Google Analytics plugin for WordPress, making it easy to connect and view website analytics directly from the dashboard.",
"slug": "google-analytics-for-wordpress",
"path": "google-analytics-for-wordpress\/googleanalytics.php",
"download_url": "https:\/\/downloads.wordpress.org\/plugin\/google-analytics-for-wordpress.zip",
"premium": false,
"requires": []
},
{
"title": "OptinMonster",
"description": "OptinMonster is a lead generation tool for WordPress, offering features like pop-ups, floating bars, and slide-ins to capture user information.",
"slug": "optinmonster",
"path": "optinmonster\/optin-monster-wp-api.php",
"download_url": "https:\/\/downloads.wordpress.org\/plugin\/optinmonster.zip",
"premium": false,
"requires": []
},
{
"title": "WPForms Lite",
"description": "WPForms Lite is a drag-and-drop form builder for WordPress, allowing users to create contact forms, surveys, and more without any coding.",
"slug": "wpforms-lite",
"path": "wpforms-lite\/wpforms.php",
"download_url": "https:\/\/downloads.wordpress.org\/plugin\/wpforms-lite.zip",
"premium": false,
"requires": []
},
{
"title": "YITH Product Search Extended Version",
"description": "An extended version of YITH's product search plugin for WooCommerce, enhancing search capabilities.",
"slug": "yith-product-search-extended",
"path": "yith-product-search-extended\/yith-product-search-extended.php",
"download_url": "https:\/\/downloads.wordpress.org\/plugin\/yith-product-search-extended.zip",
"premium": false,
"requires": []
},
{
"title": "YITH Product Filter Extended Version",
"description": "An extended version of YITH's product filter plugin for WooCommerce, enhancing product filtering capabilities.",
"slug": "nfd_slug_yith_woocommerce_ajax_product_filter",
"path": "yith-woocommerce-ajax-product-filter-extended\/init.php",
"download_url": "https:\/\/hiive.cloud\/workers\/plugin-downloads\/yith-woocommerce-ajax-product-filter",
"premium": false,
"requires": []
},
{
"title": "YITH Bookings Extended Version",
"description": "An extended version of YITH's booking plugin for WooCommerce, allowing users to book products or services.",
"slug": "nfd_slug_yith_woocommerce_booking",
"path": "yith-woocommerce-booking-extended\/init.php",
"download_url": "https:\/\/hiive.cloud\/workers\/plugin-downloads\/yith-woocommerce-booking",
"premium": false,
"requires": []
},
{
"title": "YITH Wishlist Extended Version",
"description": "An extended version of YITH's wishlist plugin for WooCommerce, allowing users to create and manage wishlists.",
"slug": "nfd_slug_yith_woocommerce_wishlist",
"path": "yith-woocommerce-wishlist-extended\/init.php",
"download_url": "https:\/\/hiive.cloud\/workers\/plugin-downloads\/yith-woocommerce-wishlist",
"premium": false,
"requires": []
}
]
}
23 changes: 23 additions & 0 deletions tests/cypress/fixtures/site-classification.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"primaryType": "business",
"slug": "shopping-retail",
"emoji": "\ud83c\udfec",
"wooType": "other",
"schema": "Store",
"keywords": [
"commerce",
"brick-and-mortar",
"discounts",
"coupons",
"customer",
"product",
"loyalty",
"inventory",
"shipping",
"returns",
"cross-sell",
"upsell",
"gift cards"
],
"label": "Shopping & Retail"
}
4 changes: 4 additions & 0 deletions tests/cypress/fixtures/site-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"site_title": "Asana Yoga Studio",
"tagline": "Elevate your practice with sustainable yoga essentials"
}
68 changes: 68 additions & 0 deletions tests/cypress/fixtures/sitemap.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
[
{
"slug": "home",
"path": "\/",
"title": "Asana Yoga Studio",
"keywords": [
"yoga studio",
"Cocoa Beach",
"Florida",
"sustainability",
"yoga mats",
"eco-conscious suppliers"
]
},
{
"slug": "classes",
"path": "\/classes",
"title": "Yoga Classes",
"keywords": [
"yoga classes",
"Cocoa Beach",
"Florida"
]
},
{
"slug": "attire",
"path": "\/attire",
"title": "Yoga Attire",
"keywords": [
"yoga attire",
"Cocoa Beach",
"Florida"
]
},
{
"slug": "accessories",
"path": "\/accessories",
"title": "Yoga Accessories",
"keywords": [
"yoga accessories",
"Cocoa Beach",
"Florida"
]
},
{
"slug": "about",
"path": "\/about",
"title": "About Us",
"keywords": [
"about us",
"yoga studio",
"Cocoa Beach",
"Florida",
"sustainability"
]
},
{
"slug": "contact",
"path": "\/contact",
"title": "Contact Us",
"keywords": [
"contact us",
"yoga studio",
"Cocoa Beach",
"Florida"
]
}
]
19 changes: 19 additions & 0 deletions tests/cypress/fixtures/target-audience.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"location": "Cocoa Beach, Florida",
"interests": [
"yoga",
"sustainability",
"eco-conscious living"
],
"age": {
"min": 18,
"max": 65
},
"gender": "All",
"income": {
"min": 0,
"max": 100000,
"currency": "USD"
},
"education": "All"
}
Loading

0 comments on commit bf86dbe

Please sign in to comment.