Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
acciojob-2[bot] authored Feb 1, 2025
0 parents commit 5c4b2e3
Show file tree
Hide file tree
Showing 16 changed files with 167 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: Acciojob Tests

on:
push:
branches: [ "main","master" ]

jobs:
calling-acciojob-main-action:
uses: acciojob/acciojob-tests-action/.github/workflows/main-action.yml@main
secrets: inherit
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules/
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Basic HTML Tables
Make a table in HTML utilizing proper HTML semantics like thead etc.

The table should have two columns, one for roll number and another for name.

It also should have atleast two rows of data.
4 changes: 4 additions & 0 deletions acciotest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"testRepo": "basic-html-tables-solution",
"pathToFile": "cypress/integration/tests/test.spec.js"
}
1 change: 1 addition & 0 deletions cypress.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
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"
}
22 changes: 22 additions & 0 deletions cypress/plugins/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/// <reference types="cypress" />
// ***********************************************************
// This example plugins/index.js can be used to load plugins
//
// You can change the location of this file or turn off loading
// the plugins file with the 'pluginsFile' configuration option.
//
// You can read more here:
// https://on.cypress.io/plugins-guide
// ***********************************************************

// This function is called when a project is opened or re-opened (e.g. due to
// the project's config changing)

/**
* @type {Cypress.PluginConfig}
*/
// eslint-disable-next-line no-unused-vars
module.exports = (on, config) => {
// `on` is used to hook into various events Cypress emits
// `config` is the resolved Cypress config
}
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/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// ***********************************************************
// This example support/index.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')
21 changes: 21 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// This file is not to be modified. Please ignore this.
// We will understand all of this later in the course.
// DO NOT MODIFY THIS FILE

const express = require('express');
const path = require('path');

const app = express();

app.use(express.static(__dirname))

app.get('/', (req, res) => {
res.sendFile(path.join(__dirname + '/main.html'));
});
//your code here
app.post('/add', (req, res) => {
const {a,b} = req.body;
res.status(200).send(a+b);
// res.sendFile(path.join(__dirname + '/main.html'));
});
module.exports = app;
16 changes: 16 additions & 0 deletions main.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!DOCTYPE html>

<html>

<head>
<link rel="stylesheet" href="styles.css">
</head>

<body>
<!-- the entire body must be written by student -->
<script type="text/javascript" src="./script.js">
</script>

</body>

</html>
5 changes: 5 additions & 0 deletions package-lock.json

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

24 changes: 24 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"name": "Accio assignment solution",
"version": "1.0.0",
"description": "Solution Template repo for Acciojob assignments",
"main": "index.js",
"scripts": {
"test": "jest --env=jsdom",
"start": "node server.js"
},
"jest": {
"verbose": true,
"testEnvironment": "jsdom"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"cypress": "^9.5.0",
"express": "^4.17.1",
"index.js": "0.0.3",
"jsdom": "^16.5.3",
"supertest": "^6.1.3"
}
}
1 change: 1 addition & 0 deletions script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
//your code here
4 changes: 4 additions & 0 deletions server.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
const app = require("./index.js");
app.listen(3000, () => {
console.log('server started');
});
2 changes: 2 additions & 0 deletions styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

/* Your CSS Code here. */

0 comments on commit 5c4b2e3

Please sign in to comment.