chore(deps): upgrade eslint, prettier & related packages
This commit is contained in:
committed by
Mrugesh Mohapatra
parent
0a53a1d7f0
commit
6c91f81b0e
@ -12,7 +12,7 @@ const selectors = {
|
||||
let appHasStarted;
|
||||
function spyOnListener(win) {
|
||||
const addListener = win.EventTarget.prototype.addEventListener;
|
||||
win.EventTarget.prototype.addEventListener = function(name) {
|
||||
win.EventTarget.prototype.addEventListener = function (name) {
|
||||
if (name === 'click') {
|
||||
appHasStarted = true;
|
||||
win.EventTarget.prototype.addEventListener = addListener;
|
||||
@ -68,9 +68,7 @@ describe('Navbar', () => {
|
||||
() => {
|
||||
cy.get(selectors.menuButton).click();
|
||||
cy.get(selectors.navigationLinks).contains('Forum');
|
||||
cy.get(selectors.navigationLinks)
|
||||
.contains('Curriculum')
|
||||
.click();
|
||||
cy.get(selectors.navigationLinks).contains('Curriculum').click();
|
||||
cy.url().should('include', '/learn');
|
||||
cy.get(selectors.navigationLinks).contains('Curriculum');
|
||||
cy.get(selectors.navigationLinks).contains('Forum');
|
||||
@ -84,9 +82,7 @@ describe('Navbar', () => {
|
||||
() => {
|
||||
cy.contains(selectors.smallCallToAction, 'Sign in');
|
||||
cy.get(selectors.menuButton).click();
|
||||
cy.get(selectors.navigationLinks)
|
||||
.contains('Curriculum')
|
||||
.click();
|
||||
cy.get(selectors.navigationLinks).contains('Curriculum').click();
|
||||
cy.contains(selectors.smallCallToAction, 'Sign in');
|
||||
}
|
||||
);
|
||||
@ -95,9 +91,7 @@ describe('Navbar', () => {
|
||||
cy.login();
|
||||
cy.get('a[href*="/settings"]').should('be.visible');
|
||||
cy.get(selectors.menuButton).click();
|
||||
cy.get(selectors.navigationLinks)
|
||||
.contains('Profile')
|
||||
.click();
|
||||
cy.get(selectors.navigationLinks).contains('Profile').click();
|
||||
cy.url().should('include', '/developmentuser');
|
||||
});
|
||||
|
||||
|
@ -30,17 +30,13 @@ describe('Search bar', () => {
|
||||
it('Should accept input and display hits', () => {
|
||||
search('freeCodeCamp');
|
||||
|
||||
cy.get('.ais-Hits-list')
|
||||
.children()
|
||||
.should('to.have.length.of.at.least', 1);
|
||||
cy.get('.ais-Hits-list').children().should('to.have.length.of.at.least', 1);
|
||||
});
|
||||
|
||||
it('Should clear hits when input is cleared', () => {
|
||||
search('freeCodeCamp');
|
||||
|
||||
cy.get('.ais-Hits-list')
|
||||
.children()
|
||||
.should('to.have.length.of.at.least', 1);
|
||||
cy.get('.ais-Hits-list').children().should('to.have.length.of.at.least', 1);
|
||||
|
||||
clear();
|
||||
|
||||
@ -52,9 +48,7 @@ describe('Search bar', () => {
|
||||
|
||||
search('freeCodeCamp');
|
||||
|
||||
cy.get('.ais-Hits-list')
|
||||
.children()
|
||||
.should('to.have.length.of', 8);
|
||||
cy.get('.ais-Hits-list').children().should('to.have.length.of', 8);
|
||||
});
|
||||
|
||||
it('Should show up to 5 hits when height < 768px', () => {
|
||||
@ -62,17 +56,13 @@ describe('Search bar', () => {
|
||||
|
||||
search('freeCodeCamp');
|
||||
|
||||
cy.get('.ais-Hits-list')
|
||||
.children()
|
||||
.should('to.have.length.of', 5);
|
||||
cy.get('.ais-Hits-list').children().should('to.have.length.of', 5);
|
||||
});
|
||||
|
||||
it('Should show no hits for queries that do not exist in the Algolia index', () => {
|
||||
search('testtttt');
|
||||
|
||||
cy.get('.ais-Hits-list')
|
||||
.children()
|
||||
.should('to.have.length.of', 0);
|
||||
cy.get('.ais-Hits-list').children().should('to.have.length.of', 0);
|
||||
|
||||
cy.contains('No tutorials found');
|
||||
});
|
||||
|
Reference in New Issue
Block a user