@rich-automation/lotto 0.1.5 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -5,10 +5,10 @@ exports.SELECTORS = {
|
|
|
5
5
|
ID_INPUT: '#userId',
|
|
6
6
|
PWD_INPUT: '#article > div:nth-child(2) > div > form > div > div.inner > fieldset > div.form > input[type=password]:nth-child(2)',
|
|
7
7
|
LOGIN_BUTTON: '#article > div:nth-child(2) > div > form > div > div.inner > fieldset > div.form > a',
|
|
8
|
-
PURCHASE_TYPE_RANDOM_BTN: '
|
|
8
|
+
PURCHASE_TYPE_RANDOM_BTN: 'a[href="#divWay2Buy1"]#num2',
|
|
9
9
|
PURCHASE_AMOUNT_SELECT: 'select#amoundApply',
|
|
10
|
-
PURCHASE_AMOUNT_CONFIRM_BTN: '#btnSelectNum',
|
|
11
|
-
PURCHASE_BTN: '#btnBuy',
|
|
12
|
-
PURCHASE_CONFIRM_BTN: '
|
|
10
|
+
PURCHASE_AMOUNT_CONFIRM_BTN: 'input[value="확인"]#btnSelectNum',
|
|
11
|
+
PURCHASE_BTN: 'input[value="구매하기"]#btnBuy',
|
|
12
|
+
PURCHASE_CONFIRM_BTN: 'input[value="확인"][onclick="javascript:closepopupLayerConfirm(true);"]',
|
|
13
13
|
PURCHASE_NUMBER_LIST: '#reportRow .nums'
|
|
14
14
|
};
|
|
@@ -2,10 +2,10 @@ export const SELECTORS = {
|
|
|
2
2
|
ID_INPUT: '#userId',
|
|
3
3
|
PWD_INPUT: '#article > div:nth-child(2) > div > form > div > div.inner > fieldset > div.form > input[type=password]:nth-child(2)',
|
|
4
4
|
LOGIN_BUTTON: '#article > div:nth-child(2) > div > form > div > div.inner > fieldset > div.form > a',
|
|
5
|
-
PURCHASE_TYPE_RANDOM_BTN: '
|
|
5
|
+
PURCHASE_TYPE_RANDOM_BTN: 'a[href="#divWay2Buy1"]#num2',
|
|
6
6
|
PURCHASE_AMOUNT_SELECT: 'select#amoundApply',
|
|
7
|
-
PURCHASE_AMOUNT_CONFIRM_BTN: '#btnSelectNum',
|
|
8
|
-
PURCHASE_BTN: '#btnBuy',
|
|
9
|
-
PURCHASE_CONFIRM_BTN: '
|
|
7
|
+
PURCHASE_AMOUNT_CONFIRM_BTN: 'input[value="확인"]#btnSelectNum',
|
|
8
|
+
PURCHASE_BTN: 'input[value="구매하기"]#btnBuy',
|
|
9
|
+
PURCHASE_CONFIRM_BTN: 'input[value="확인"][onclick="javascript:closepopupLayerConfirm(true);"]',
|
|
10
10
|
PURCHASE_NUMBER_LIST: '#reportRow .nums'
|
|
11
11
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rich-automation/lotto",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"description": "Lotto module",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public",
|
|
@@ -22,7 +22,6 @@
|
|
|
22
22
|
"files": [
|
|
23
23
|
"lib",
|
|
24
24
|
"package.json",
|
|
25
|
-
"playwright.config.ts",
|
|
26
25
|
"README.md"
|
|
27
26
|
],
|
|
28
27
|
"packageManager": "yarn@1.22.19",
|
|
@@ -37,7 +36,7 @@
|
|
|
37
36
|
"build:dts": "tsc --project tsconfig.json --emitDeclarationOnly --declaration --declarationDir lib/typescript",
|
|
38
37
|
"test": "jest --forceExit --detectOpenHandles",
|
|
39
38
|
"install:puppeteer": "node ./node_modules/puppeteer/install.js",
|
|
40
|
-
"install:playwright": "npx playwright install --with-deps",
|
|
39
|
+
"install:playwright": "npx playwright install chromium --with-deps",
|
|
41
40
|
"fix": "yarn fix:eslint && yarn fix:prettier",
|
|
42
41
|
"fix:eslint": "eslint --fix src --ext js,jsx,ts,tsx ",
|
|
43
42
|
"fix:prettier": "prettier --write \"src/**/*.{ts,tsx,js}\"",
|
|
@@ -56,7 +55,6 @@
|
|
|
56
55
|
"@babel/core": "^7.21.4",
|
|
57
56
|
"@babel/preset-env": "^7.21.4",
|
|
58
57
|
"@babel/preset-typescript": "^7.21.4",
|
|
59
|
-
"@playwright/test": "^1.35.0",
|
|
60
58
|
"@types/jest": "^29.5.0",
|
|
61
59
|
"@typescript-eslint/eslint-plugin": "^5.58.0",
|
|
62
60
|
"@typescript-eslint/parser": "^5.58.0",
|
package/playwright.config.ts
DELETED
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { defineConfig, devices } from '@playwright/test';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Read environment variables from file.
|
|
5
|
-
* https://github.com/motdotla/dotenv
|
|
6
|
-
*/
|
|
7
|
-
// require('dotenv').config();
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* See https://playwright.dev/docs/test-configuration.
|
|
11
|
-
*/
|
|
12
|
-
export default defineConfig({
|
|
13
|
-
testDir: './src/__tests__',
|
|
14
|
-
/* Run tests in files in parallel */
|
|
15
|
-
fullyParallel: true,
|
|
16
|
-
/* Fail the build on CI if you accidentally left test.only in the source code. */
|
|
17
|
-
forbidOnly: !!process.env.CI,
|
|
18
|
-
/* Retry on CI only */
|
|
19
|
-
retries: process.env.CI ? 2 : 0,
|
|
20
|
-
/* Opt out of parallel tests on CI. */
|
|
21
|
-
workers: process.env.CI ? 1 : undefined,
|
|
22
|
-
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
|
|
23
|
-
reporter: 'html',
|
|
24
|
-
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
|
|
25
|
-
use: {
|
|
26
|
-
/* Base URL to use in actions like `await page.goto('/')`. */
|
|
27
|
-
// baseURL: 'http://127.0.0.1:3000',
|
|
28
|
-
|
|
29
|
-
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
|
|
30
|
-
trace: 'on-first-retry',
|
|
31
|
-
},
|
|
32
|
-
|
|
33
|
-
/* Configure projects for major browsers */
|
|
34
|
-
projects: [
|
|
35
|
-
{
|
|
36
|
-
name: 'Google Chrome',
|
|
37
|
-
use: { ...devices['Desktop Chrome'], channel: 'chrome' },
|
|
38
|
-
},
|
|
39
|
-
// {
|
|
40
|
-
// name: 'chromium',
|
|
41
|
-
// use: { ...devices['Desktop Chrome'] },
|
|
42
|
-
// },
|
|
43
|
-
/* Test against mobile viewports. */
|
|
44
|
-
// {
|
|
45
|
-
// name: 'Mobile Chrome',
|
|
46
|
-
// use: { ...devices['Pixel 5'] },
|
|
47
|
-
// },
|
|
48
|
-
// {
|
|
49
|
-
// name: 'Mobile Safari',
|
|
50
|
-
// use: { ...devices['iPhone 12'] },
|
|
51
|
-
// },
|
|
52
|
-
|
|
53
|
-
/* Test against branded browsers. */
|
|
54
|
-
// {
|
|
55
|
-
// name: 'Microsoft Edge',
|
|
56
|
-
// use: { ...devices['Desktop Edge'], channel: 'msedge' },
|
|
57
|
-
// },
|
|
58
|
-
],
|
|
59
|
-
|
|
60
|
-
/* Run your local dev server before starting the tests */
|
|
61
|
-
// webServer: {
|
|
62
|
-
// command: 'npm run start',
|
|
63
|
-
// url: 'http://127.0.0.1:3000',
|
|
64
|
-
// reuseExistingServer: !process.env.CI,
|
|
65
|
-
// },
|
|
66
|
-
});
|