This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* eslint-disable no-undef */ | |
/// <reference types="cypress" /> | |
describe('Bar Chart Tests', function() { | |
it('Should match image snapshot', function() { | |
cy.visit('http://localhost:3000'); | |
cy.get('.bar-chart').matchImageSnapshot('barChart'); | |
}); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <reference types="cypress" /> | |
import { addMatchImageSnapshotCommand } from 'cypress-image-snapshot/command'; | |
addMatchImageSnapshotCommand(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { addMatchImageSnapshotPlugin } = require('cypress-image-snapshot/plugin'); | |
module.exports = (on, config) => { | |
addMatchImageSnapshotPlugin(on, config); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe('UI Tests', function() { | |
it('should navigate to Success Page after submitting.',function(){ | |
// first visit the site | |
cy.visit('http://localhost:3000'); | |
// get elements we will be | |
// interacting with and alias them | |
cy.get('input[name="firstName"]').as('firstNameText'); | |
cy.get('input[name="lastName"]').as('lastNameText'); | |
cy.get('select[name="gender"]').as('genderSelect'); | |
cy.get('input[name="areYouAwesome"]') |