Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
IT2810 H21
Team 28
project-3
Commits
2a5186bc
Commit
2a5186bc
authored
Oct 31, 2021
by
Duvara Nishaharan
Browse files
#6
rettet opp i test
parent
c7013b1e
Changes
4
Hide whitespace changes
Inline
Side-by-side
project-3/package.json
View file @
2a5186bc
...
@@ -49,7 +49,6 @@
...
@@ -49,7 +49,6 @@
]
]
},
},
"devDependencies"
:
{
"devDependencies"
:
{
"cypress"
:
"^8.7.0"
,
"cypress"
:
"^8.7.0"
"jest"
:
"^27.3.1"
}
}
}
}
project-3/src/components/searchbar/__snapshots__/searchbar.test.tsx.snap
View file @
2a5186bc
...
@@ -14,10 +14,10 @@ exports[`FocusInput matches snapshot 1`] = `
...
@@ -14,10 +14,10 @@ exports[`FocusInput matches snapshot 1`] = `
>
>
<button
<button
class="btn btn-outline-secondary"
class="btn btn-outline-secondary"
id="
search_
button"
id="button
click
"
type="button"
type="button"
>
>
Search
Search
</button>
</button>
</div>
</div>
</div>
</div>
...
...
project-3/src/components/searchbar/searchbar.test.tsx
View file @
2a5186bc
...
@@ -14,7 +14,7 @@ import { searchbarStore } from "./SearchbarStore";
...
@@ -14,7 +14,7 @@ import { searchbarStore } from "./SearchbarStore";
expect
(
container
.
firstChild
).
toMatchSnapshot
();
expect
(
container
.
firstChild
).
toMatchSnapshot
();
});
});
describe
(
'
Component: Search
v
ar
'
,
()
=>
{
describe
(
'
Component: Search
b
ar
'
,
()
=>
{
const
items
=
[
"
Norway
"
,
"
India
"
,
"
Germany
"
];
const
items
=
[
"
Norway
"
,
"
India
"
,
"
Germany
"
];
describe
(
"
<searchbar />
"
,
()
=>
{
describe
(
"
<searchbar />
"
,
()
=>
{
...
...
project-3/src/components/searchbar/searchbar.tsx
View file @
2a5186bc
...
@@ -66,7 +66,7 @@ export class Searchbar extends React.Component<IProps, IState> {
...
@@ -66,7 +66,7 @@ export class Searchbar extends React.Component<IProps, IState> {
<
input
type
=
"text"
className
=
"form-control"
placeholder
=
"Enter Country"
onInput
=
{
(
e
)
=>
{
this
.
setState
({
search_text
:
e
.
currentTarget
.
value
})}
}
/>
<
input
type
=
"text"
className
=
"form-control"
placeholder
=
"Enter Country"
onInput
=
{
(
e
)
=>
{
this
.
setState
({
search_text
:
e
.
currentTarget
.
value
})}
}
/>
<
div
className
=
"input-group-append"
>
<
div
className
=
"input-group-append"
>
<
button
onClick
=
{
()
=>
this
.
onSearch
()
}
<
button
onClick
=
{
()
=>
this
.
onSearch
()
}
className
=
"btn btn-outline-secondary"
type
=
"button"
id
=
"buttonclick"
>
<
Search
/>
Search
</
button
>
className
=
"btn btn-outline-secondary"
type
=
"button"
id
=
"buttonclick"
>
Search
</
button
>
</
div
>
</
div
>
{
this
.
state
.
active
}
{
this
.
state
.
active
}
</
div
>
</
div
>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment