Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
update favicon
- Loading branch information
jgiwinski
committed
Jan 29, 2024
1 parent
0adb1c5
commit 7dd4b5d
Showing
8 changed files
with
124 additions
and
3 deletions.
There are no files selected for viewing
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,9 @@ | ||
const { defineConfig } = require("cypress"); | ||
|
||
module.exports = defineConfig({ | ||
e2e: { | ||
setupNodeEvents(on, config) { | ||
// implement node event listeners here | ||
}, | ||
}, | ||
}); |
Binary file not shown.
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,62 @@ | ||
context('SACDS', () => { | ||
beforeEach(() => { | ||
cy.visit('http://localhost:3000/') | ||
}) | ||
|
||
describe('Page display', () => { | ||
|
||
it('Displays Incommon logo', () => { | ||
cy.get('img') | ||
.should('be.visible') | ||
.should('have.class', 'logo') | ||
}) | ||
|
||
it('Displays information text', () => { | ||
|
||
}) | ||
|
||
it('Displays Seamless Action button on page', () => { | ||
cy.get('a.sa-button') | ||
.should('be.visible') | ||
.and('have.attr', 'href') | ||
.then((hrefAttribute) => { | ||
// Extract entityID and returnUrl from the href attribute | ||
const urlParams = new URLSearchParams(hrefAttribute); | ||
const entityID = urlParams.get('entityID'); | ||
const returnUrl = urlParams.get('return'); | ||
|
||
// Assert that entityID and returnUrl are present and not empty | ||
expect(entityID).to.be.a('string').and.not.empty; | ||
expect(returnUrl).to.be.a('string').and.not.empty; | ||
|
||
cy.get('.sa-button-logo').should('be.visible'); | ||
cy.get('.sa-button-text').should('be.visible').and('contain.text', 'Access through your institution'); | ||
}); | ||
}) | ||
|
||
it('Hides SA button and displays error message and wiki link if entityID or returnUrl are missing', () => { | ||
cy.get('.sa-button').should('not.exist'); | ||
cy.get('h1').should('be.visible').and('contain.text', 'Both Entity ID and return URL are required.'); | ||
cy.get('p a') | ||
.should('be.visible') | ||
.and('have.attr', 'href', 'LINK_FROM_I2'); | ||
cy.get('p a').should('contain.text', 'Click Here for more information.'); | ||
}) | ||
|
||
}) | ||
|
||
describe('SA button functionality', () => { | ||
|
||
it('Takes in entityID and returnUrl from URL and feeds to SA button', () => { | ||
|
||
}) | ||
|
||
it('Routes user to their entity after clicking SA button', () => { | ||
|
||
}) | ||
|
||
}) | ||
}) | ||
|
||
|
||
|
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,5 @@ | ||
{ | ||
"name": "Using fixtures to represent data", | ||
"email": "hello@cypress.io", | ||
"body": "Fixtures are a great way to mock data for responses to routes" | ||
} |
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,25 @@ | ||
// *********************************************** | ||
// This example commands.js shows you how to | ||
// create various custom commands and overwrite | ||
// existing commands. | ||
// | ||
// For more comprehensive examples of custom | ||
// commands please read more here: | ||
// https://on.cypress.io/custom-commands | ||
// *********************************************** | ||
// | ||
// | ||
// -- This is a parent command -- | ||
// Cypress.Commands.add('login', (email, password) => { ... }) | ||
// | ||
// | ||
// -- This is a child command -- | ||
// Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, options) => { ... }) | ||
// | ||
// | ||
// -- This is a dual command -- | ||
// Cypress.Commands.add('dismiss', { prevSubject: 'optional'}, (subject, options) => { ... }) | ||
// | ||
// | ||
// -- This will overwrite an existing command -- | ||
// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... }) |
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,20 @@ | ||
// *********************************************************** | ||
// This example support/e2e.js is processed and | ||
// loaded automatically before your test files. | ||
// | ||
// This is a great place to put global configuration and | ||
// behavior that modifies Cypress. | ||
// | ||
// You can change the location of this file or turn off | ||
// automatically serving support files with the | ||
// 'supportFile' configuration option. | ||
// | ||
// You can read more here: | ||
// https://on.cypress.io/configuration | ||
// *********************************************************** | ||
|
||
// Import commands.js using ES2015 syntax: | ||
import './commands' | ||
|
||
// Alternatively you can use CommonJS syntax: | ||
// require('./commands') |
Binary file not shown.
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