How to use @cypress/schema-tools - 10 common examples

To help you get started, we’ve selected a few @cypress/schema-tools examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github garmeeh / next-seo / cypress / schemas / corporate-contact-schema.js View on Github external
see: contactPoint100,
      },
    },
    required: ['@context', '@type', 'url', 'contactPoint'],
    additionalProperties: false,
  },
  example: {
    '@context': 'https://schema.org',
    '@type': 'Organization',
    url: 'http://www.your-company-site.com',
    logo: 'http://www.example.com/logo.png',
    contactPoint: [contactPoint100.example],
  },
};

const corporateContact = versionSchemas(corporateContact100);
export default corporateContact;
github garmeeh / next-seo / cypress / schemas / blog-schema.js View on Github external
image: [
      'https://example.com/photos/1x1/photo.jpg',
      'https://example.com/photos/4x3/photo.jpg',
      'https://example.com/photos/16x9/photo.jpg',
    ],
    datePublished: '2015-02-05T08:00:00+08:00',
    dateModified: '2015-02-05T09:00:00+08:00',
    author: {
      '@type': 'Person',
      name: 'Jane Blogs',
    },
    description: 'This is a mighty good description of this blog.',
  },
};

const blogVersions = versionSchemas(blog100);
export default blogVersions;
github garmeeh / next-seo / cypress / schemas / local-business-schema.js View on Github external
addressLocality: 'San Jose',
      addressRegion: 'CA',
      postalCode: '95129',
      addressCountry: 'US',
    },
    geo: {
      '@type': 'GeoCoordinates',
      latitude: '37.293058',
      longitude: '-121.988331',
    },
    url: 'http://www.example.com/store-locator/sl/San-Jose-Westgate-Store/1427',
    telephone: '+14088717984',
  },
};

const socialProfile = versionSchemas(socialProfile100);
export default socialProfile;
github garmeeh / next-seo / cypress / schemas / product-schema.js View on Github external
offers: {
      '@type': 'Offer',
      priceCurrency: 'USD',
      price: '119.99',
      priceValidUntil: '2020-11-05',
      itemCondition: 'http://schema.org/UsedCondition',
      availability: 'http://schema.org/InStock',
      seller: {
        '@type': 'Organization',
        name: 'Executive Objects',
      },
    },
  },
};

const productVersions = versionSchemas(product100);
export default productVersions;
github garmeeh / next-seo / cypress / schemas / social-profile-schema.js View on Github external
},
  example: {
    '@context': 'http://schema.org',
    '@type': 'Person',
    name: 'your name',
    url: 'http://www.your-site.com',
    sameAs: [
      'http://www.facebook.com/your-profile',
      'http://instagram.com/yourProfile',
      'http://www.linkedin.com/in/yourprofile',
      'http://plus.google.com/your_profile',
    ],
  },
};

const socialProfile = versionSchemas(socialProfile100);
export default socialProfile;
github garmeeh / next-seo / cypress / schemas / article-schema.js View on Github external
'@type': 'Person',
      name: 'Jane Blogs',
    },
    publisher: {
      '@type': 'Organization',
      name: 'Jane Blogs',
      logo: {
        '@type': 'ImageObject',
        url: 'https://www.example.com/photos/logo.jpg',
      },
    },
    description: 'This is a mighty good description of this article.',
  },
};

const articleVersions = versionSchemas(article100);
export default articleVersions;
github garmeeh / next-seo / cypress / schemas / course-schema.js View on Github external
additionalProperties: false,
  },
  example: {
    '@context': 'http://schema.org',
    '@type': 'Course',
    name: 'Course Name',
    description: 'Introductory CS course laying out the basics.',
    provider: {
      '@type': 'Organization',
      name: 'Course',
      sameAs: 'https//www.example.com/provider',
    },
  },
};

const courseVersions = versionSchemas(course100);
export default courseVersions;
github garmeeh / next-seo / cypress / schemas / logo-schema.js View on Github external
type: 'string',
        description: 'The URL of the website associated with the logo.',
      },
    },
    required: true,
    additionalProperties: false,
  },
  example: {
    '@context': 'http://schema.org',
    '@type': 'Organization',
    url: 'http://www.example.com',
    logo: 'http://www.example.com/images/logo.png',
  },
};

const logo = versionSchemas(logo100);
export default logo;
github garmeeh / next-seo / cypress / schemas / breadcrumb-schema.js View on Github external
name: 'Ann Leckie',
        },
      },
      {
        '@type': 'ListItem',
        position: 4,
        item: {
          '@id': 'https://example.com/books/authors/annleckie/ancillaryjustice',
          name: 'Ancillary Justice',
        },
      },
    ],
  },
};

const breadcrumbVersions = versionSchemas(breadcrumb100);
export default breadcrumbVersions;
github garmeeh / next-seo / cypress / e2e / jsonld.spec.js View on Github external
.then(tags => {
        const jsonLD = JSON.parse(tags[courseLdJsonIndex].innerHTML);
        assertSchema(schemas)('Course', '1.0.0')(jsonLD);
      });
  });

@cypress/schema-tools

Validate, sanitize and document JSON schemas

MIT
Latest version published 2 years ago

Package Health Score

50 / 100
Full package analysis