Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
6 changes: 6 additions & 0 deletions .idea/vcs.xml

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

7 changes: 3 additions & 4 deletions final/client/src/components/__tests__/button.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React from 'react';
import { shallow, mount, render } from '../../enzyme';
import { render } from '../../enzyme';

import { cleanup } from '../../test-utils';
import Button from '../button';
Expand All @@ -8,7 +7,7 @@ describe('Button', () => {
// automatically unmount and cleanup DOM after the test is finished.
afterEach(cleanup);

it('renders without error', () => {
const wrapper = render(<Button>Hello World</Button>);
it('should render without error', () => {
render(<Button>Hello World</Button>);
});
});
8 changes: 4 additions & 4 deletions final/client/src/containers/__tests__/action-button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@ describe('action button', () => {
// automatically unmount and cleanup DOM after the test is finished.
afterEach(cleanup);

it('renders without error', () => {
it('should render without error', () => {
render(<ActionButton/>);
});

it('empty cart correct label', () => {
it('an empty cart should have a button with display message to add to cart', () => {
const wrapper = render(<ActionButton/>);
const button = wrapper.find('div button');

expect(button.text()).toBe('Add to Cart');
});

it('populated cart correct label', () => {
it('a non-empty cart should have a button displaying remove from cart', () => {

cartItemsVar(['1']);
const wrapper = render(<ActionButton id="1"/>);
Expand All @@ -30,7 +30,7 @@ describe('action button', () => {
expect(button.text()).toBe('Remove from Cart');
});

it('booked trip correct label', () => {
it('a booked trip should have a button displaying cancel the trip', () => {

var wrapper = mount(
<MockedProvider
Expand Down
4 changes: 2 additions & 2 deletions final/client/src/containers/__tests__/logout-button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ describe('logout button', () => {
// automatically unmount and cleanup DOM after the test is finished.
afterEach(cleanup);

it('renders logout button', async () => {
it('should renders logout button', async () => {
await mount(
<MockedProvider
cache={cache}>
<LogoutButton />
</MockedProvider>);
});

it('complete logout', async () => {
it('on click of logout button, the user should be completely logout', async () => {
isLoggedInVar(true);
localStorage.setItem('token', 'testTokenValue');
localStorage.setItem('userId', 'abc123');
Expand Down
1 change: 0 additions & 1 deletion final/node_testing/auth_tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ const assert = require('assert');
const testEmail = 'SeleniumTest@Gmail.Test'
let driver = new Builder().forBrowser('chrome').build();


runTests();

async function runTests(){
Expand Down