Skip to content

Instantly share code, notes, and snippets.

View domenicozinzidea's full-sized avatar

Domenico Zinzi domenicozinzidea

View GitHub Profile
@domenicozinzidea
domenicozinzidea / cypress_example_conduit_login.js
Created April 21, 2021 16:36
Cypress.io example of login in conduit project
describe('Logs in ', () => {
beforeEach(() => {
cy.visit('https://demo.productionready.io/#/register')
// we are not logged in
})
it('logs in', () => {
cy.contains('a.nav-link', 'Sign in').click()
public function search(Request $request)
{
if($request->has('text') && $request->input('text')) {
// Search for given text and return data
$data = $this->searchMovies($request->input('text'));
$moviesArray = [];
// If there are any movies that match given search text "hits" fill their id's in array
if($data['hits']['total'] > 0) {