Write initial passing test

This commit is contained in:
RMidhunSuresh 2022-08-29 14:26:13 +05:30
parent b6f718d4a2
commit badfc84eb8
4 changed files with 40 additions and 1 deletions

8
cypress.config.ts Normal file
View File

@ -0,0 +1,8 @@
import { defineConfig } from "cypress";
export default defineConfig({
e2e: {
baseUrl: "http://localhost:3000",
supportFile: false,
},
});

22
cypress/e2e/startup.cy.ts Normal file
View File

@ -0,0 +1,22 @@
/*
Copyright 2022 The Matrix.org Foundation C.I.C.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
describe("App has no startup errors that prevent UI render", () => {
it("passes", () => {
cy.visit("/");
cy.contains("Log In");
})
})

8
cypress/tsconfig.json Normal file
View File

@ -0,0 +1,8 @@
{
"compilerOptions": {
"target": "es5",
"lib": ["es5", "dom"],
"types": ["cypress", "node"]
},
"include": ["**/*.ts"]
}

View File

@ -18,7 +18,8 @@
"start": "vite --port 3000",
"build": "vite build && ./scripts/cleanup.sh",
"build:sdk": "./scripts/sdk/build.sh",
"watch:sdk": "./scripts/sdk/build.sh && yarn run vite build -c vite.sdk-lib-config.js --watch"
"watch:sdk": "./scripts/sdk/build.sh && yarn run vite build -c vite.sdk-lib-config.js --watch",
"test:app": "vite --port 3000 & yarn run cypress open"
},
"repository": {
"type": "git",