Compare commits
No commits in common. "4f8dce9c5e3d331176288eed616c65ecd54748ab" and "0faeb86ca7837f442dc8b20edf1a7442e4e06a5c" have entirely different histories.
4f8dce9c5e
...
0faeb86ca7
4 changed files with 0 additions and 52 deletions
|
|
@ -1,43 +0,0 @@
|
||||||
describe('The admin home link', () => {
|
|
||||||
beforeEach(() => {
|
|
||||||
cy.exec('npm run db:seed')
|
|
||||||
cy.loginAsAdmin()
|
|
||||||
})
|
|
||||||
afterEach(() => {
|
|
||||||
cy.exec('npm run db:wipe')
|
|
||||||
})
|
|
||||||
|
|
||||||
it('shows the home link on the admin page', () => {
|
|
||||||
cy.visit('/admin')
|
|
||||||
cy.get('#home-link')
|
|
||||||
.should('be.visible')
|
|
||||||
.and('have.attr', 'href', '/home')
|
|
||||||
.and('contain', 'Home')
|
|
||||||
})
|
|
||||||
|
|
||||||
it('shows the home link on the admin texts page', () => {
|
|
||||||
cy.visit('/admin/texts')
|
|
||||||
cy.get('#home-link')
|
|
||||||
.should('be.visible')
|
|
||||||
.and('have.attr', 'href', '/home')
|
|
||||||
.and('contain', 'Home')
|
|
||||||
})
|
|
||||||
|
|
||||||
it('shows the home link on an admin text page', () => {
|
|
||||||
cy.visit('/admin/texts')
|
|
||||||
cy.get('#newTextName').type('Home Link Text')
|
|
||||||
cy.get('#submit').click()
|
|
||||||
cy.get('a').contains('Home Link Text').click()
|
|
||||||
cy.get('#home-link')
|
|
||||||
.should('be.visible')
|
|
||||||
.and('have.attr', 'href', '/home')
|
|
||||||
.and('contain', 'Home')
|
|
||||||
})
|
|
||||||
|
|
||||||
it('navigates to the home page when clicked', () => {
|
|
||||||
cy.visit('/admin')
|
|
||||||
cy.get('#home-link').click()
|
|
||||||
cy.url().should('include', '/home')
|
|
||||||
cy.get('h1').should('contain', 'Home')
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
@ -11,9 +11,6 @@
|
||||||
<div class="site-header-inner">
|
<div class="site-header-inner">
|
||||||
<h1>Admin</h1>
|
<h1>Admin</h1>
|
||||||
<div class="cluster">
|
<div class="cluster">
|
||||||
<a class="btn btn-secondary" href="/home" id="home-link">
|
|
||||||
Home
|
|
||||||
</a>
|
|
||||||
<button id="logout" class="btn btn-danger">Logout</button>
|
<button id="logout" class="btn btn-danger">Logout</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -10,9 +10,6 @@
|
||||||
<header class="site-header">
|
<header class="site-header">
|
||||||
<div class="site-header-inner">
|
<div class="site-header-inner">
|
||||||
<div class="cluster">
|
<div class="cluster">
|
||||||
<a class="btn btn-secondary" href="/home" id="home-link">
|
|
||||||
Home
|
|
||||||
</a>
|
|
||||||
<a class="btn btn-secondary" href="/admin/texts" id="back">
|
<a class="btn btn-secondary" href="/admin/texts" id="back">
|
||||||
Back to Texts
|
Back to Texts
|
||||||
</a>
|
</a>
|
||||||
|
|
|
||||||
|
|
@ -11,9 +11,6 @@
|
||||||
<div class="site-header-inner">
|
<div class="site-header-inner">
|
||||||
<h1>Texts</h1>
|
<h1>Texts</h1>
|
||||||
<div class="cluster">
|
<div class="cluster">
|
||||||
<a class="btn btn-secondary" href="/home" id="home-link">
|
|
||||||
Home
|
|
||||||
</a>
|
|
||||||
<a class="btn btn-secondary" href="/admin" id="back">
|
<a class="btn btn-secondary" href="/admin" id="back">
|
||||||
Back to Admin
|
Back to Admin
|
||||||
</a>
|
</a>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue