B8f7a improve templates pages for seo (#5)

* Templates

* access templates without login also

* Set required on UI

* Improve templates pages for SEO

* test case for Templates

* Refactor SitemapController

* Cosmetic changes to templates

Co-authored-by: Julien Nahum <jhumanj@MacBook-Pro-de-Julien.local>
This commit is contained in:
Chirag
2022-10-03 00:08:41 +05:30
committed by GitHub
parent 9f9da5aed8
commit 36bc081f8f
21 changed files with 669 additions and 9 deletions

View File

@@ -0,0 +1,25 @@
<?php
it('can create template', function () {
$user = $this->actingAsUser();
// Create Form
$workspace = $this->createUserWorkspace($user);
$form = $this->makeForm($user, $workspace);
// Create Template
$templateData = [
'name' => 'Demo Template',
'slug' => 'demo_template',
'description' => 'Some description here...',
'image_url' => 'https://d3ietpyl4f2d18.cloudfront.net/6c35a864-ee3a-4039-80a4-040b6c20ac60/img/pages/welcome/product_cover.jpg',
'form' => $form->getAttributes(),
'questions' => [['question'=>'Question 1','answer'=>'Answer 1 will be here...']]
];
$this->postJson(route('templates.create', $templateData))
->assertSuccessful()
->assertJson([
'type' => 'success',
'message' => 'Template created.'
]);
});