Updated example order, fixed broken tests
This commit is contained in:
Родитель
e29a72e41e
Коммит
f4261a455c
|
@ -7,6 +7,8 @@
|
|||
log/
|
||||
node_modules/
|
||||
bower_components/
|
||||
cypress/screenshots/
|
||||
cypress/videos/
|
||||
|
||||
## Files
|
||||
result.xml
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
{
|
||||
"reporterWidth": 1000
|
||||
"reporterWidth": 1000,
|
||||
"viewportWidth": 1000,
|
||||
"viewportHeight": 1000
|
||||
}
|
||||
|
|
|
@ -21,23 +21,28 @@ describe('react-fullage.js', () => {
|
|||
it('Auto scrolls on window location change', () => {
|
||||
cy.visit(`${host}#secondPage`);
|
||||
cy.wait(WAIT);
|
||||
cy.get('.blue > .fp-tableCell > p').contains('Slide 1');
|
||||
cy.get('.active > .fp-tableCell > h3').contains('Slide 2.1');
|
||||
cy.url().should('eq', `${host}#secondPage`);
|
||||
});
|
||||
|
||||
it('Scrolls Vertically on click', () => {
|
||||
cy.visit(`${host}#firstPage`);
|
||||
cy.wait(WAIT);
|
||||
cy.get('button').click();
|
||||
cy.get('.active > .fp-tableCell > h3').contains('Slide 2.1');
|
||||
cy.url().should('eq', `${host}#secondPage`);
|
||||
});
|
||||
|
||||
it('Scrolls horizontally on click', () => {
|
||||
cy.get('.fp-next').click();
|
||||
cy.wait(WAIT);
|
||||
cy.get('.red > .fp-tableCell > p').contains('Slide 2');
|
||||
cy.get('.active > .fp-tableCell > h3').contains('Slide 2.2');
|
||||
cy.url().should('eq', `${host}#secondPage/1`);
|
||||
});
|
||||
|
||||
it('Scrolls horizontally on click', () => {
|
||||
cy.visit(`${host}#firstPage`);
|
||||
cy.get('.fp-next').click();
|
||||
cy.wait(WAIT);
|
||||
cy.get('button').click();
|
||||
cy.get('.blue > .fp-tableCell > p').contains('Slide 1');
|
||||
cy.url().should('eq', `${host}#secondPage`);
|
||||
cy.get('.active > .fp-tableCell > h3').contains('Slide 2.3');
|
||||
cy.url().should('eq', `${host}#secondPage/2`);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Двоичные данные
cypress/videos/react-fullpage.spec.js.mp4
Двоичные данные
cypress/videos/react-fullpage.spec.js.mp4
Двоичный файл не отображается.
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
|
@ -5,9 +5,9 @@
|
|||
"requires": true,
|
||||
"dependencies": {
|
||||
"@fullpage/react-fullpage": {
|
||||
"version": "0.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@fullpage/react-fullpage/-/react-fullpage-0.0.1.tgz",
|
||||
"integrity": "sha512-GnnMuNIRt62KP+Ik4c11rr1VnT/O0MnSyBG0j6kCxGj7uWpu/YmXr3acR2muJp3lwQKIWafMAP7YiiOqVnxmqQ==",
|
||||
"version": "0.0.6",
|
||||
"resolved": "https://registry.npmjs.org/@fullpage/react-fullpage/-/react-fullpage-0.0.6.tgz",
|
||||
"integrity": "sha512-XivLTHAOza1CH9cQ5zj9KEiKE/uULmTV2FHzkTkIvy0DJkO+D73Zz6VncyozgRuwl2swakh4W0kjgdj85MzvjQ==",
|
||||
"requires": {
|
||||
"fullpage.js": "3.0.2"
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@fullpage/react-fullpage": "0.0.1",
|
||||
"@fullpage/react-fullpage": "0.0.6",
|
||||
"react": "^16.4.1",
|
||||
"react-dom": "^16.4.1"
|
||||
},
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
/* eslint-disable import/no-extraneous-dependencies */
|
||||
import React from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
import 'fullpage.js/vendors/scrolloverflow' // Optional. When using scrollOverflow:true
|
||||
import ReactFullpage from '@fullpage/react-fullpage';
|
||||
import 'fullpage.js/vendors/scrolloverflow'; // Optional. When using scrollOverflow:true
|
||||
|
||||
const fullpageOptions = {
|
||||
anchors: ['firstPage', 'secondPage', 'thirdPage'],
|
||||
sectionsColor: ['#282c34', '#ff5f45', '#0798ec'],
|
||||
callbacks: ['onLeave'],
|
||||
scrollOverflow: true
|
||||
scrollOverflow: true,
|
||||
};
|
||||
|
||||
const FullpageWrapper = fullpageProps => (
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@fullpage/react-fullpage",
|
||||
"version": "0.0.5",
|
||||
"version": "0.0.6",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
{
|
||||
"extends": [
|
||||
"config:base"
|
||||
]
|
||||
}
|
|
@ -4,10 +4,10 @@ const HtmlWebpackPlugin = require('html-webpack-plugin');
|
|||
|
||||
const { name } = require('./package.json');
|
||||
|
||||
const { NODE_ENV = 'dev'} = process.env;
|
||||
const { NODE_ENV = 'dev' } = process.env;
|
||||
const IS_DEV = (NODE_ENV === 'dev');
|
||||
const dirNode = 'node_modules';
|
||||
const dirApp = path.join(__dirname, 'example');
|
||||
const dirApp = path.join(__dirname, 'example', 'src');
|
||||
const dirAssets = path.join(__dirname, 'assets');
|
||||
const appHtmlTitle = name;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче