Skip to content
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

Mocking AI sitegen and homepage APIs in site-logo step #529

Merged
merged 25 commits into from
Apr 4, 2024
Merged
Show file tree
Hide file tree
Changes from 22 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
6a17d76
trial and error
sangeetha-nayak Mar 27, 2024
c36a391
mock based on identifier
sangeetha-nayak Mar 27, 2024
c1ec81c
structured fixtures and mock logic
sangeetha-nayak Mar 27, 2024
7561269
final verified and formatted code
sangeetha-nayak Mar 28, 2024
4fb9049
align list elements
sangeetha-nayak Mar 28, 2024
8ea1e20
reduced timeout
sangeetha-nayak Mar 28, 2024
da5c5b8
deleted example json file
sangeetha-nayak Mar 28, 2024
c5335ef
remove skip from tests to run
avneet-raj Mar 28, 2024
4a30b2f
homepage-regenerate mock and add line breaks
sangeetha-nayak Mar 28, 2024
5fe3057
homepage regenerate issue fix
sangeetha-nayak Mar 28, 2024
be5a2a0
final change
sangeetha-nayak Mar 28, 2024
61e9496
trying with one test only
sangeetha-nayak Mar 28, 2024
e5e0c70
skip homepage regenerate
sangeetha-nayak Mar 28, 2024
abc69a8
without cy.continue
sangeetha-nayak Mar 29, 2024
b7a6c3a
scroll and wait before click
sangeetha-nayak Mar 29, 2024
f940ad2
force click without scroll
sangeetha-nayak Mar 29, 2024
c7cf278
skipping regenerate test as of now
sangeetha-nayak Mar 29, 2024
193cff4
fix last test
sangeetha-nayak Mar 29, 2024
2fdca59
updated content tone right mock
sangeetha-nayak Apr 2, 2024
e8e10c8
just intercept and don't wait
sangeetha-nayak Apr 2, 2024
14ce970
scrollintoview
sangeetha-nayak Apr 2, 2024
e64ac21
skip one test
sangeetha-nayak Apr 3, 2024
16c998a
Addressed review comments
sangeetha-nayak Apr 3, 2024
eac04bb
delete un-used mock and its reference
sangeetha-nayak Apr 3, 2024
e7abce4
fixed linting
sangeetha-nayak Apr 3, 2024
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
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"
}
]
61 changes: 61 additions & 0 deletions tests/cypress/fixtures/homepage-regenerate.json
officiallygod marked this conversation as resolved.
Show resolved Hide resolved

Large diffs are not rendered by default.

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
Loading