Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitHub actions #61

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
client feature
GowriSundeep authored and GowriSundeep committed Jun 10, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit c1f2a74df7494fb464b9b7c559db5d0d95c8dd3f
14 changes: 14 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Cypress Tests

on: push

jobs:
cypress-run:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v2
- name: yarn run clientTest
uses: cypress-io/github-action@v4
with:
browser: chrome
9 changes: 9 additions & 0 deletions cypress.config.js
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
},
},
});
5 changes: 5 additions & 0 deletions cypress/fixtures/example.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"name": "Using fixtures to represent data",
"email": "[email protected]",
"body": "Fixtures are a great way to mock data for responses to routes"
}
25 changes: 25 additions & 0 deletions cypress/support/commands.js
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) => { ... })
20 changes: 20 additions & 0 deletions cypress/support/e2e.js
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')
6 changes: 6 additions & 0 deletions node_modules/.package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion site-admin/cypress.env.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"applicationURL": "http://localhost:3000"
"applicationURL": "http://localhost:3000",
"clientURL": "https://ktm.js.org/"
}
8 changes: 8 additions & 0 deletions site-admin/cypress/e2e/Client.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Feature: Client page
Scenario: visiting the Client page
Given I am on the "clientURL"
Then session number "session #1" should be visible
Then meetup date "September 27th" should be present
And session title "Streamline UI Components in JS Frameworks" should be present and visible
And session time "03:00pm - 04:30pm" should exsist
Then session sponser should be present
26 changes: 26 additions & 0 deletions site-admin/cypress/e2e/Client/Client.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { When, Then } from "cypress-cucumber-preprocessor/steps";

Given(`I am on the {string}`, (url) => {
cy.visit(`${Cypress.env("clientURL")}`);
cy.get('.logo').should('exist').should('be.visible')
});

Then(`session number {string} should be visible`, (Session__Number) => {
cy.get('.Session__Number').should('exist').should('be.visible')
});

Then(`meetup date {string} should be present`, (Meetup__Date) => {
cy.get('.Meetup__Date').should('exist').should('be.visible')
});

Then(`session title {string} should be present and visible`, (Session__Title) => {
cy.get('.Session__Title').should('be.visible')
});

Then(`session time {string} should exsist`, (Meetup__Date) => {
cy.get('.Session__Time').should('exist');
});

Then(`session sponser should be present`, (Meetup__Date) => {
cy.get('.Panel__SponsorsAndSupporters').children().contains('Sponsors')
});
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added site-admin/cypress/videos/Client.feature.mp4
Binary file not shown.
Binary file added site-admin/cypress/videos/Episode.feature.mp4
Binary file not shown.
Binary file not shown.
Binary file added site-admin/cypress/videos/People.feature.mp4
Binary file not shown.
943 changes: 15 additions & 928 deletions site-admin/npm-shrinkwrap.json

Large diffs are not rendered by default.

443 changes: 274 additions & 169 deletions site-admin/yarn.lock

Large diffs are not rendered by default.