-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #575 from wri/sync-dev-staging-oct-28
Sync dev staging oct 28
- Loading branch information
Showing
4 changed files
with
31 additions
and
0 deletions.
There are no files selected for viewing
6 changes: 6 additions & 0 deletions
6
ckan-backend-dev/src/ckanext-wri/ckanext/wri/templates/base.html
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{% ckan_extends %} | ||
|
||
{% block meta %} | ||
{{ super() }} | ||
<meta name="robots" content="noindex,nofollow"> | ||
{% endblock %} |
7 changes: 7 additions & 0 deletions
7
ckan-backend-dev/src/ckanext-wri/ckanext/wri/templates/home/robots.txt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
User-agent: * | ||
{% block all_user_agents -%} | ||
Disallow: / | ||
{%- endblock %} | ||
|
||
{% block additional_user_agents -%} | ||
{%- endblock %} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
describe('robots.txt Test', () => { | ||
it('should only contain custom rule', () => { | ||
cy.request('http://ckan-dev:5000/private-admin/robots.txt').then((response) => { | ||
expect(response.status).to.eq(200); | ||
expect(response.body).to.contain('User-agent: *'); | ||
expect(response.body).to.contain('Disallow: /'); | ||
expect(response.body).not.to.contain('Disallow: /dataset/rate/'); | ||
expect(response.body).not.to.contain('Disallow: /revision/'); | ||
expect(response.body).not.to.contain('Crawl-Delay: 10'); | ||
}); | ||
}); | ||
}); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
describe('Meta Robots Tag Test', () => { | ||
it('should contain a "noindex, nofollow" robots meta tag on the homepage', () => { | ||
cy.visit('http://ckan-dev:5000/private-admin/'); | ||
cy.get('head meta[name="robots"]').should('have.attr', 'content', 'noindex,nofollow'); | ||
}); | ||
}); |