Skip to content

Commit

Permalink
Merge pull request #466 from indiana-university/release/2.0.0-alpha.4
Browse files Browse the repository at this point in the history
Release 2.0.0 alpha.4
  • Loading branch information
levimcg authored Apr 14, 2021
2 parents 37433f2 + fe0b5cd commit a896651
Show file tree
Hide file tree
Showing 85 changed files with 7,566 additions and 7,148 deletions.
99 changes: 0 additions & 99 deletions .circleci/config.yml

This file was deleted.

1 change: 0 additions & 1 deletion .github/workflows/alpha.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ jobs:
with:
node-version: 12
- run: npm ci
- run: npm test
- name: Create artifact
run: npm build

Expand Down
52 changes: 26 additions & 26 deletions .github/workflows/test-build.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
name: Test build
# name: Test build

on:
push:
branches:
- 'feature/**'
- '2.0.0-dev'
- '!2.0.0-master'
# on:
# push:
# branches:
# - 'feature/**'
# - '2.0.0-dev'
# - '!2.0.0-master'

jobs:
build:
runs-on: ubuntu-16.04
strategy:
matrix:
node-version: [10.x, 12.x]
steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: npm install, build, and test
run: |
npm ci
npm run build --if-present
npm test
env:
CI: true
# jobs:
# build:
# runs-on: ubuntu-16.04
# strategy:
# matrix:
# node-version: [10.x, 12.x]
# steps:
# - uses: actions/checkout@v1
# - name: Use Node.js ${{ matrix.node-version }}
# uses: actions/setup-node@v1
# with:
# node-version: ${{ matrix.node-version }}
# - name: npm install, build, and test
# run: |
# npm ci
# npm run build --if-present
# npm test
# env:
# CI: true
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# [Rivet](https://rivet.iu.edu/)

[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause) [![npm version](https://img.shields.io/npm/v/rivet-uits.svg?style=flat)](https://www.npmjs.com/package/rivet-uits) [![CircleCI](https://circleci.com/gh/indiana-university/rivet-source.svg?style=shield&circle-token=:circle-token)](https://circleci.com/gh/indiana-university/rivet-source)
[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause) [![npm version](https://img.shields.io/npm/v/rivet-uits.svg?style=flat)](https://www.npmjs.com/package/rivet-uits)

![Browserstack logo](./src/components/_extras/Browserstack-logo@2x.png)

Expand Down
104 changes: 49 additions & 55 deletions cypress/integration/accordion_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ beforeEach(function () {
* Use cypress aliases to share the context of the accordion trigger and panel
* elements across different assertions.
*/
cy.get('[data-accordion-panel="my-new-accordion-1"]').as('panel1');
cy.get('[data-accordion-trigger="my-new-accordion-1"]').as('trigger1');
cy.get('[data-accordion-panel="my-new-accordion-2"]').as('panel2');
cy.get('[data-accordion-trigger="my-new-accordion-2"]').as('trigger2');
cy.get('[data-accordion-panel="my-new-accordion-3"]').as('panel3');
cy.get('[data-accordion-trigger="my-new-accordion-3"]').as('trigger3');
cy.get('[data-accordion-panel="my-new-accordion-4"]').as('panel4');
cy.get('[data-accordion-trigger="my-new-accordion-4"]').as('trigger4');
cy.get('[data-rvt-accordion-panel="my-new-accordion-1"]').as('panel1');
cy.get('[data-rvt-accordion-trigger="my-new-accordion-1"]').as('trigger1');
cy.get('[data-rvt-accordion-panel="my-new-accordion-2"]').as('panel2');
cy.get('[data-rvt-accordion-trigger="my-new-accordion-2"]').as('trigger2');
cy.get('[data-rvt-accordion-panel="my-new-accordion-3"]').as('panel3');
cy.get('[data-rvt-accordion-trigger="my-new-accordion-3"]').as('trigger3');
cy.get('[data-rvt-accordion-panel="my-new-accordion-4"]').as('panel4');
cy.get('[data-rvt-accordion-trigger="my-new-accordion-4"]').as('trigger4');
});

describe('Rivet accordion interactions', function () {
Expand All @@ -39,52 +39,46 @@ describe('Rivet accordion interactions', function () {
cy.get('@trigger1').click();
cy.get('@panel1').should('not.be.visible');
});
});

describe('Keyboard interactions', function () {
it('Should be able to cycle through toggles using the Down key', function () {
// Test cycling through each panel toggle using the Down key
cy.get('@trigger1').trigger('keyup', { keyCode: 40 });
cy.focused().should('be', '@trigger2');

cy.get('@trigger2').trigger('keyup', { keyCode: 40 });
cy.focused().should('be', '@trigger3');

cy.get('@trigger3').trigger('keyup', { keyCode: 40 });
cy.focused().should('be', '@trigger4');

cy.get('@trigger4').trigger('keyup', { keyCode: 40 });
cy.focused().should('be', '@trigger1');
});

it('Should be able to cycle through toggles using the Up key', function () {
// Test cycling through each panel toggle using the Up key
cy.get('@trigger4').trigger('keyup', { keyCode: 38 });
cy.focused().should('be', '@trigger3');

cy.get('@trigger3').trigger('keyup', { keyCode: 38 });
cy.focused().should('be', '@trigger2');

cy.get('@trigger2').trigger('keyup', { keyCode: 38 });
cy.focused().should('be', '@trigger1');

cy.get('@trigger1').trigger('keyup', { keyCode: 38 });
cy.focused().should('be', '@trigger4');
});

it('Should be able to cycle from the first toggle to last using the Up key', function() {
// Test that using the up key on the first panel cycles focus back to the last panel toggle
cy.get('@trigger1').trigger('keyup', { keyCode: 38 });
cy.focused().should('be', '@trigger4');
});

it('Should be able to jump to the last toggle using the End key', function() {
cy.get('@trigger1').trigger('keyup', { keyCode: 35 });
cy.focused().should('be', '@trigger4');
});

it('Should be able to jump to the first toggle using the Home key', function() {
cy.get('@trigger4').trigger('keyup', { keyCode: 36 });
cy.focused().should('be', '@trigger1');
});
describe('Keyboard interactions', function () {
it('Should be able to cycle through toggles using the Down key', function () {
// Test cycling through each panel toggle using the Down key
cy.get('@trigger1').type('{downarrow}');
cy.get('@trigger2').should('to.have.focus');

cy.get('@trigger2').type('{downarrow}');
cy.get('@trigger3').should('to.have.focus');

cy.get('@trigger3').type('{downarrow}');
cy.get('@trigger4').should('to.have.focus');

cy.get('@trigger4').type('{downarrow}');
cy.get('@trigger1').should('to.have.focus');
});
});

it('Should be able to cycle through toggles using the Up key', function () {
// Test cycling through each panel toggle using the Up key
cy.get('@trigger4').type('{uparrow}');
cy.get('@trigger3').should('to.have.focus');

cy.get('@trigger3').type('{uparrow}');
cy.get('@trigger2').should('to.have.focus');

cy.get('@trigger2').type('{uparrow}');
cy.get('@trigger1').should('to.have.focus');

cy.get('@trigger1').type('{uparrow}');
cy.get('@trigger4').should('to.have.focus');
});

it('Should be able to jump to the last toggle using the End key', function() {
cy.get('@trigger1').type('{end}');
cy.get('@trigger4').should('to.have.focus');
});

it('Should be able to jump to the first toggle using the Home key', function() {
cy.get('@trigger4').type('{home}');
cy.get('@trigger1').should('to.have.focus');
});
});
8 changes: 4 additions & 4 deletions cypress/integration/alert_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ beforeEach(function () {
* Use cypress aliases to share the context of the list and toggle
* elements across different assertions.
*/
cy.get('[data-alert="info"]').as('infoAlert');
cy.get('[data-alert="info"] >.rvt-alert__dismiss').as('infoAlertClose');
cy.get('[data-alert="warning"]').as('warningAlert');
cy.get('[data-rvt-alert="info"]').as('infoAlert');
cy.get('[data-rvt-alert="info"] >.rvt-alert__dismiss').as('infoAlertClose');
cy.get('[data-rvt-alert="warning"]').as('warningAlert');
});

describe('Rivet alert interactions', function () {
it('Should see the info alert page', function () {
cy.get('@infoAlert')
.should('have.attr', 'data-alert', 'info')
.should('have.attr', 'data-rvt-alert', 'info')
.and('be.visible');

cy.get('@infoAlertClose').should('be.visible');
Expand Down
4 changes: 2 additions & 2 deletions cypress/integration/dropdown_spec.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const DROPDOWN_TOGGLE = '[data-dropdown-toggle="dropdownNavigation"]';
const DROPDOWN_MENU = '[data-dropdown-menu]';
const DROPDOWN_TOGGLE = '[data-rvt-dropdown-toggle="dropdownNavigation"]';
const DROPDOWN_MENU = '[data-rvt-dropdown-menu]';
const DEV_SERVER = "http://localhost:3000";
const DOWN = 40;
const UP = 38;
Expand Down
14 changes: 7 additions & 7 deletions cypress/integration/modal_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@ beforeEach(function () {
* Use cypress aliases to share the context of the modal, trigger, and close
* elements across different assertions.
*/
cy.get('[data-modal="modalExample"]').as('modal');
cy.get('[data-modal-close="modalExample"].rvt-modal__close').as('modalClose');
cy.get('[data-modal-trigger="modalExample"]').as('modalTrigger');
cy.get('[data-modal="modalDialogExample"]').as('modalDialog');
cy.get('[data-modal-close="modalDialogExample"]').as('modalDialogClose');
cy.get('[data-modal-trigger="modalDialogExample"]').as('modalDialogTrigger');
cy.get('[data-rvt-modal="modalExample"]').as('modal');
cy.get('[data-rvt-modal-close="modalExample"].rvt-modal__close').as('modalClose');
cy.get('[data-rvt-modal-trigger="modalExample"]').as('modalTrigger');
cy.get('[data-rvt-modal="modalDialogExample"]').as('modalDialog');
cy.get('[data-rvt-modal-close="modalDialogExample"]').as('modalDialogClose');
cy.get('[data-rvt-modal-trigger="modalDialogExample"]').as('modalDialogTrigger');

});

describe('Rivet basic modal interactions', function () {
it('Should see the modal page', function () {
cy.get('@modalTrigger')
.should('have.attr', 'data-modal-trigger', 'modalExample')
.should('have.attr', 'data-rvt-modal-trigger', 'modalExample')
.and('be.visible');

cy.get('@modal').should('not.be.visible');
Expand Down
4 changes: 2 additions & 2 deletions cypress/integration/sidenav_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ beforeEach(function() {
* Use cypress aliases to share the context of the list and toggle
* elements across different assertions.
*/
cy.get('[data-sidenav-list="toggle-1"]').as('list');
cy.get('[data-sidenav-toggle="toggle-1"]').as('toggle');
cy.get('[data-rvt-sidenav-list="toggle-1"]').as('list');
cy.get('[data-rvt-sidenav-toggle="toggle-1"]').as('toggle');
});

describe('Sidenav Interaction', function() {
Expand Down
24 changes: 12 additions & 12 deletions cypress/integration/tabs_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ beforeEach(function () {
* Use cypress aliases to share the context of the tab and panel
* elements across different assertions.
*/
cy.get('[data-tab="tab-1"]').as('tab1');
cy.get('[data-tab-panel="tab-1"]').as('panel1');
cy.get('[data-tab="tab-2"]').as('tab2');
cy.get('[data-tab-panel="tab-2"]').as('panel2');
cy.get('[data-tab="tab-3"]').as('tab3');
cy.get('[data-tab-panel="tab-3"]').as('panel3');
cy.get('[data-tab="tab-4"]').as('tab4');
cy.get('[data-tab-panel="tab-4"]').as('panel4');
cy.get('[data-rvt-tab="tab-1"]').as('tab1');
cy.get('[data-rvt-tab-panel="tab-1"]').as('panel1');
cy.get('[data-rvt-tab="tab-2"]').as('tab2');
cy.get('[data-rvt-tab-panel="tab-2"]').as('panel2');
cy.get('[data-rvt-tab="tab-3"]').as('tab3');
cy.get('[data-rvt-tab-panel="tab-3"]').as('panel3');
cy.get('[data-rvt-tab="tab-4"]').as('tab4');
cy.get('[data-rvt-tab-panel="tab-4"]').as('panel4');
});

describe('Rivet tab interactions', function () {
Expand All @@ -29,16 +29,16 @@ describe('Rivet tab interactions', function () {

it('Should be able to navigate with the keyboard', function () {
cy.get('@tab3').trigger('keydown', { keyCode: 39 });
cy.focused().should('have.attr', 'data-tab', 'tab-4');
cy.focused().should('have.attr', 'data-rvt-tab', 'tab-4');

cy.get('@tab4').trigger('keydown', { keyCode: 37 });
cy.focused().should('have.attr', 'data-tab', 'tab-3');
cy.focused().should('have.attr', 'data-rvt-tab', 'tab-3');

cy.get('@tab3').trigger('keydown', { keyCode: 36 });
cy.focused().should('have.attr', 'data-tab', 'tab-1');
cy.focused().should('have.attr', 'data-rvt-tab', 'tab-1');

cy.get('@tab1').trigger('keydown', { keyCode: 35 });
cy.focused().should('have.attr', 'data-tab', 'tab-4');
cy.focused().should('have.attr', 'data-rvt-tab', 'tab-4');
});

it('Should be able to display a different tab', function () {
Expand Down
Loading

0 comments on commit a896651

Please sign in to comment.