Skip to content

Instantly share code, notes, and snippets.

@lala-lee-jobs
lala-lee-jobs / playwright03.md
Last active November 4, 2022 08:12
playwright03

Intro

透過設定組態(Configuration)的方式,可用以提供測試運行對應適合的環境,也可以為測試錄製 Video 或擷取 Spanshot。

你可以使用 configuration file (組態設定檔 )全域的設定,也可以在test file (測試程式碼)中做區域的設定。

Global configuration

  • 建立一個檔名固定為 playwright.config.js 的檔案,即可在檔案中設定 config。
@lala-lee-jobs
lala-lee-jobs / index.route
Created October 8, 2022 00:20
預設路由的對應頁面元件
export default function Index() {
return (
<p id="zero-state">
This is a demo for React Router.
<br />
Check out{" "}
<a href="https://reactrouter.com/">
the docs at reactrouter.com
</a>
.
@lala-lee-jobs
lala-lee-jobs / edit.jsx
Created October 7, 2022 06:06
編輯聯絡人資料的頁面元件
import { Form, useLoaderData } from "react-router-dom";
export default function Edit() {
const contact = useLoaderData();
return (
<Form method="post" id="contact-form">
<p>
<span>Name</span>
<input
@lala-lee-jobs
lala-lee-jobs / contact.jsx
Last active October 4, 2022 15:32
React Router Tutorial - Add contact.jsx
import { Form } from "react-router-dom";
export default function Contact() {
const contact = {
first: "Your",
last: "Name",
avatar: "https://placekitten.com/g/200/200",
twitter: "your_handle",
notes: "Some notes",
favorite: true,
@lala-lee-jobs
lala-lee-jobs / main.yml
Created April 12, 2020 11:52
Use GitHub actions to test, build and deploy project
name: Build and Deploy
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps: