Skip to content

Instantly share code, notes, and snippets.

View login-spec.ts
import * as loginPo from '../support/po/login.po';
describe('Login', () => {
beforeEach(() => {
loginPo.navigatoTo();
loginPo.valid();
});
it('display login', () => {
View login.po.ts
import * as common from './common.po';
export const navigatoTo = () => cy.visit(common.baseUrl);
export const getContent = () => cy.get('.js-content-login');
export const valid = () => {
getContent().should('be.visible');
};
View login.po.ts
import * as common from './common.po';
export const navigatoTo = () => cy.visit(common.baseUrl);
export const getContent = () => cy.get('.js-content-login');
export const valid = () => {
getContent().should('be.visible');
};
View install
npm install --save-dev cypress-image-snapshot
View login
http://localhost:8080/web/login
View portfolio
http://localhost:8080/web/index
View uri
https://github.com/ksakae1216/web-sample.git
View insert data
INSERT INTO test_mysql.login ( loginId, password ) VALUES ('testlogin','testpass');
INSERT INTO test_mysql.lessonlist ( userId, userFirstName, userLastName, lesson1st, lesson2nd ) VALUES ('001','taro','yamada','Java','Angular');
INSERT INTO test_mysql.lessonlist ( userId, userFirstName, userLastName, lesson1st, lesson2nd ) VALUES ('002','jiro','sato','Go','PHP');
INSERT INTO test_mysql.language ( language, information ) VALUES ('Angular','Angularの情報です*********');
INSERT INTO test_mysql.language ( language, information ) VALUES ('Go','Goの情報です*********');
INSERT INTO test_mysql.language ( language, information ) VALUES ('Java','Javaの情報です*********');
INSERT INTO test_mysql.language ( language, information ) VALUES ('PHP','PHPの情報です*********');
INSERT INTO test_mysql.language ( language, information ) VALUES ('Python','Pythonの情報です*********');
View create table
-- login
CREATE TABLE test_mysql.login
(
loginId VARCHAR(10) NOT NULL,
password VARCHAR(20) NOT NULL,
CONSTRAINT PRIMARY KEY (loginId)
);
-- lessonlist
CREATE TABLE test_mysql.lessonlist
You can’t perform that action at this time.