Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F9696211
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
4 KB
Subscribers
None
View Options
diff --git a/cypress/integration/back-to-top.spec.js b/cypress/integration/back-to-top.spec.js
index cd8304df..e7e36c97 100644
--- a/cypress/integration/back-to-top.spec.js
+++ b/cypress/integration/back-to-top.spec.js
@@ -1,34 +1,34 @@
/**
* Copyright (C) 2019 The Software Heritage developers
* See the AUTHORS file at the top-level directory of this distribution
* License: GNU Affero General Public License version 3, or any later version
* See top-level LICENSE file for more information
*/
-const url = 'api/'
+const url = 'api/';
describe('Back-to-top button tests', function() {
- beforeEach(function () {
+ beforeEach(function() {
cy.visit(url);
- })
+ });
it('should be hidden when on top', function() {
cy.get('#back-to-top').should('not.be.visible');
- })
+ });
it('should be visible when scrolled down', function() {
cy.scrollTo('bottom')
.get('#back-to-top')
.should('be.visible');
- })
+ });
it('should scroll to top when clicked', function() {
cy.scrollTo('bottom')
.get('#back-to-top')
.click()
.window()
.then((window) => {
assert.equal(window.scrollY, 0);
- })
- })
-})
+ });
+ });
+});
diff --git a/cypress/integration/home.spec.js b/cypress/integration/home.spec.js
index b30b47a9..c46271b4 100644
--- a/cypress/integration/home.spec.js
+++ b/cypress/integration/home.spec.js
@@ -1,24 +1,24 @@
/**
* Copyright (C) 2019 The Software Heritage developers
* See the AUTHORS file at the top-level directory of this distribution
* License: GNU Affero General Public License version 3, or any later version
* See top-level LICENSE file for more information
*/
const url = '/';
const $ = Cypress.$;
describe('Home Page Tests', function() {
it('should display positive stats for each category', function() {
cy.visit(url);
cy.get('.swh-counter')
.then((counters) => {
- for(let counter of counters) {
+ for (let counter of counters) {
let innerText = $(counter).text();
const value = parseInt(innerText.replace(/,/g, ''));
assert.isAbove(value, 0);
}
});
- })
-})
+ });
+});
diff --git a/cypress/integration/sidebar.spec.js b/cypress/integration/sidebar.spec.js
index 42b5aa63..d4c0741f 100644
--- a/cypress/integration/sidebar.spec.js
+++ b/cypress/integration/sidebar.spec.js
@@ -1,81 +1,81 @@
/**
* Copyright (C) 2019 The Software Heritage developers
* See the AUTHORS file at the top-level directory of this distribution
* License: GNU Affero General Public License version 3, or any later version
* See top-level LICENSE file for more information
*/
-const url = '/'
+const url = '/';
describe('Sidebar tests On Large Screen', function() {
- beforeEach(function () {
+ beforeEach(function() {
cy.visit(url);
- })
+ });
it('should toggle sidebar when swh-push-menu is clicked', function() {
cy.get('.swh-push-menu')
.click()
.then(() => {
cy.get('body')
.should('have.class', 'sidebar-collapse')
.get('.nav-link > p')
.should('have.css', 'opacity', '0');
})
.get('.swh-push-menu')
.click()
.then(() => {
cy.get('body')
.should('have.class', 'sidebar-open')
.get('.nav-link > p')
.should('not.have.css', 'opacity', '0');
- })
- })
+ });
+ });
it('should have less width when collapsed compared to open', function() {
let collapsedWidth, expandedWidth;
cy.get('.swh-push-menu')
.click()
.wait(250)
.get('.swh-sidebar')
.should('have.css', 'width')
.then((width) => {
collapsedWidth = parseInt(width);
})
.get('.swh-push-menu')
.click()
.wait(250)
.get('.swh-sidebar')
.should('have.css', 'width')
.then((width) => {
expandedWidth = parseInt(width);
})
.then(() => {
assert.isBelow(collapsedWidth, expandedWidth);
- })
- })
-})
+ });
+ });
+});
describe('Sidebar Tests on small screens', function() {
- beforeEach(function () {
+ beforeEach(function() {
cy.viewport('iphone-6');
cy.visit(url);
- })
+ });
it('should be collapsed by default', function() {
cy.get('.swh-sidebar')
.should('not.be.visible');
- })
+ });
it('should toggle sidebar when swh-push-menu is clicked', function() {
cy.get('.swh-push-menu')
.click()
.wait(250)
.get('.swh-sidebar')
.should('be.visible')
.get('#sidebar-overlay')
.click({force: true})
.wait(250)
.get('.swh-sidebar')
.should('not.be.visible');
- })
-})
+ });
+});
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Mon, Aug 18, 7:24 PM (1 w, 6 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3284002
Attached To
rDWAPPS Web applications
Event Timeline
Log In to Comment