feat: Add items id in items frontend url #25
@ -55,10 +55,10 @@ describe('Search area', ()=>{
|
|||||||
|
|
||||||
describe('Searching', () => {
|
describe('Searching', () => {
|
||||||
it('Search using ID displays the json with locale', () => {
|
it('Search using ID displays the json with locale', () => {
|
||||||
cy.get('#search-autocomplete').type(condensedMilk.item._id);
|
cy.get('#search-autocomplete')
|
||||||
setTimeout(() => {
|
.type(condensedMilk.item._id)
|
||||||
cy.get('#search-autocomplete').should('have.value', condensedMilk.locale.Name)
|
.type('{ENTER}')
|
||||||
}, 5000)
|
.should('have.value', condensedMilk.locale.Name)
|
||||||
cy.get(`.react-json-view .object-key-val > .pushed-content > .object-content > .variable-row > .variable-value > div > .string-value:contains("${condensedMilk.item._id}")`)
|
cy.get(`.react-json-view .object-key-val > .pushed-content > .object-content > .variable-row > .variable-value > div > .string-value:contains("${condensedMilk.item._id}")`)
|
||||||
.should('have.length', 1)
|
.should('have.length', 1)
|
||||||
.invoke('text')
|
.invoke('text')
|
||||||
|
@ -2,7 +2,7 @@ export {};
|
|||||||
|
|
||||||
import condensedMilk from '../../../cypress/fixtures/condensed_milk.json'
|
import condensedMilk from '../../../cypress/fixtures/condensed_milk.json'
|
||||||
|
|
||||||
describe('Dark Mode Toggle', () => {
|
describe('Url check', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.window()
|
cy.window()
|
||||||
.its("sessionStorage")
|
.its("sessionStorage")
|
||||||
@ -59,10 +59,10 @@ describe('Dark Mode Toggle', () => {
|
|||||||
|
|
||||||
it('Search reflects in url', () => {
|
it('Search reflects in url', () => {
|
||||||
cy.visit(`/`);
|
cy.visit(`/`);
|
||||||
cy.get('#search-autocomplete').type(condensedMilk.item._id);
|
cy.get('#search-autocomplete')
|
||||||
setTimeout(() => {
|
.type(condensedMilk.item._id)
|
||||||
cy.get('#search-autocomplete').should('have.value', condensedMilk.locale.Name)
|
.type('{ENTER}')
|
||||||
}, 5000)
|
.should('have.value', condensedMilk.locale.Name);
|
||||||
cy.url().should("include", `/search/${condensedMilk.item._id}`);
|
cy.url().should("include", `/search/${condensedMilk.item._id}`);
|
||||||
cy.get(`.react-json-view .object-key-val > .pushed-content > .object-content > .variable-row > .variable-value > div > .string-value:contains("${condensedMilk.item._id}")`)
|
cy.get(`.react-json-view .object-key-val > .pushed-content > .object-content > .variable-row > .variable-value > div > .string-value:contains("${condensedMilk.item._id}")`)
|
||||||
.should('have.length', 1)
|
.should('have.length', 1)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user