chore(client) remove contextual navigation (#41919)

This commit is contained in:
Sem Bauke
2021-04-28 15:10:43 +02:00
committed by GitHub
parent a0463d2c99
commit 20cbfce484
9 changed files with 13 additions and 93 deletions

View File

@ -3,9 +3,8 @@
describe('A certification,', function () {
describe('while viewing your own,', function () {
before(() => {
cy.visit('/');
cy.contains("Get started (it's free)").click({ force: true });
cy.contains('Update my account settings').click({ force: true });
cy.login();
cy.visit('/settings');
// set user settings to public to claim a cert
cy.get('label:contains(Public)>input').each(el => {
@ -81,7 +80,8 @@ describe('A certification,', function () {
describe("while viewing someone else's,", function () {
before(() => {
cy.go('back');
cy.contains('Sign me out of freeCodeCamp').click({ force: true });
cy.get('.toggle-button-nav').click();
cy.get('.nav-list').contains('Sign out').click();
cy.visit('/certification/developmentuser/legacy-front-end');
});

View File

@ -89,7 +89,6 @@ describe('Navbar', () => {
it('Should have `Profile` link when user is signed in', () => {
cy.login();
cy.get('a[href*="/settings"]').should('be.visible');
cy.get(selectors.menuButton).click();
cy.get(selectors.navigationLinks).contains('Profile').click();
cy.url().should('include', '/developmentuser');

View File

@ -1,12 +0,0 @@
/* global cy */
describe('The `Update my account settings` button works properly', function () {
beforeEach(() => {
cy.login();
});
it('Should take user to their account settings when clicked', function () {
cy.contains('Update my account settings').click();
cy.url().should('include', '/settings');
});
});

View File

@ -5,9 +5,8 @@ import '@testing-library/cypress/add-commands';
describe('Settings certifications area', () => {
before(() => {
cy.exec('npm run seed');
cy.visit('/');
cy.contains("Get started (it's free)").click({ force: true });
cy.contains('Update my account settings').click({ force: true });
cy.login();
cy.visit('/settings');
});
describe('initially', () => {
@ -37,8 +36,8 @@ describe('Settings certifications area', () => {
describe('after isHonest', () => {
beforeEach(() => {
cy.visit('/');
cy.contains("Get started (it's free)").click({ force: true });
cy.contains('Update my account settings').click({ force: true });
cy.login();
cy.visit('/settings');
});
it('Should render "You have accepted our Academic Honesty Policy." button after clicking "Agree"', () => {

View File

@ -1,26 +1,8 @@
/* global cy expect */
/* global cy */
describe('Settings', () => {
beforeEach(() => {
it('should be possible to visit the settings page', () => {
cy.visit('/');
cy.contains("Get started (it's free)").click({ force: true });
cy.visit('/settings');
});
describe('The `Sign me out of freeCodeCamp` button works properly', () => {
it('Should get rendered properly', () => {
cy.contains('Sign me out of freeCodeCamp')
.should('be.visible')
// We are checking for classes here to check for proper styling
// This will be replaces with Percy in the future
.should('have.class', 'btn-invert btn btn-lg btn-primary btn-block');
});
it('Should take to the landing page when clicked', () => {
cy.contains('Sign me out of freeCodeCamp').click({ force: true });
cy.location().should(loc => {
expect(loc.pathname).to.eq('/');
});
});
});
});