Skip to content

Commit

Permalink
Merge branch 'master' of github.com:surveyjs/survey-creator into rede…
Browse files Browse the repository at this point in the history
…sign-designer-surface-header-component

# Conflicts:
#	packages/survey-creator-core/src/components/tabs/designer.scss
  • Loading branch information
OlgaLarina committed Jan 22, 2025
2 parents 31bb182 + ad8e267 commit d783dcb
Show file tree
Hide file tree
Showing 1,216 changed files with 2,543 additions and 1,655 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,5 @@ packages/survey-creator-core/src/themes/default.ts
packages/survey-creator-core/src/themes/default-contrast.ts
packages/survey-creator-core/src/themes/default-dark.ts
packages/survey-creator-core/src/themes/default-light.ts
packages/survey-creator-core/src/themes/index.ts
packages/survey-creator-core/src/themes/index.ts
packages/survey-creator-core/src/themes/sc2020.ts
92 changes: 92 additions & 0 deletions build-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,29 @@ jobs:
SourceFolder: $(System.ArtifactsDirectory)/SurveyJSCreatorV2BuildCore-$(Build.BuildId)
TargetFolder: "$(Build.SourcesDirectory)/survey-creator/packages/survey-creator-core/build"

- task: CopyFiles@2
inputs:
SourceFolder: "$(Build.SourcesDirectory)/survey-creator/"
Contents: "package.json"
TargetFolder: "$(Build.SourcesDirectory)/Temp/root/"
OverWrite: true
displayName: "Copy package.json for cache key (root)"

- task: Cache@2
inputs:
key: "npm-cache-creator-root | $(Build.SourcesDirectory)/Temp/root/package.json"
path: $(Build.SourcesDirectory)/survey-creator/node_modules
cacheHitVar: NPM_CACHE_RESTORED_ROOT
displayName: Cache NPM

- task: Npm@1
displayName: "Npm install root"
inputs:
command: install
verbose: false
workingDir: $(Build.SourcesDirectory)/survey-creator
condition: ne(variables.NPM_CACHE_RESTORED_ROOT, 'true')

# - script: |
# cd $(Build.SourcesDirectory)/survey-library/build/survey-react-ui
# sed -i 's/"survey-core": .*"/"survey-core": "latest"/g' package.json
Expand Down Expand Up @@ -503,6 +526,29 @@ jobs:
SourceFolder: $(System.ArtifactsDirectory)/SurveyJSCreatorV2BuildCore-$(Build.BuildId)
TargetFolder: "$(Build.SourcesDirectory)/survey-creator/packages/survey-creator-core/build"

- task: CopyFiles@2
inputs:
SourceFolder: "$(Build.SourcesDirectory)/survey-creator/"
Contents: "package.json"
TargetFolder: "$(Build.SourcesDirectory)/Temp/root/"
OverWrite: true
displayName: "Copy package.json for cache key (root)"

- task: Cache@2
inputs:
key: "npm-cache-creator-root | $(Build.SourcesDirectory)/Temp/root/package.json"
path: $(Build.SourcesDirectory)/survey-creator/node_modules
cacheHitVar: NPM_CACHE_RESTORED_ROOT
displayName: Cache NPM

- task: Npm@1
displayName: "Npm install root"
inputs:
command: install
verbose: false
workingDir: $(Build.SourcesDirectory)/survey-creator
condition: ne(variables.NPM_CACHE_RESTORED_ROOT, 'true')

- script: |
cd $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-angular
npm i
Expand Down Expand Up @@ -645,6 +691,29 @@ jobs:
SourceFolder: $(System.ArtifactsDirectory)/SurveyJSCreatorV2BuildCore-$(Build.BuildId)
TargetFolder: "$(Build.SourcesDirectory)/survey-creator/packages/survey-creator-core/build"

- task: CopyFiles@2
inputs:
SourceFolder: "$(Build.SourcesDirectory)/survey-creator/"
Contents: "package.json"
TargetFolder: "$(Build.SourcesDirectory)/Temp/root/"
OverWrite: true
displayName: "Copy package.json for cache key (root)"

- task: Cache@2
inputs:
key: "npm-cache-creator-root | $(Build.SourcesDirectory)/Temp/root/package.json"
path: $(Build.SourcesDirectory)/survey-creator/node_modules
cacheHitVar: NPM_CACHE_RESTORED_ROOT
displayName: Cache NPM

- task: Npm@1
displayName: "Npm install root"
inputs:
command: install
verbose: false
workingDir: $(Build.SourcesDirectory)/survey-creator
condition: ne(variables.NPM_CACHE_RESTORED_ROOT, 'true')

- script: |
cd $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-vue
npm i
Expand Down Expand Up @@ -806,6 +875,29 @@ jobs:
SourceFolder: $(System.ArtifactsDirectory)/SurveyJSCreatorV2BuildCore-$(Build.BuildId)
TargetFolder: "$(Build.SourcesDirectory)/survey-creator/packages/survey-creator-core/build"

- task: CopyFiles@2
inputs:
SourceFolder: "$(Build.SourcesDirectory)/survey-creator/"
Contents: "package.json"
TargetFolder: "$(Build.SourcesDirectory)/Temp/root/"
OverWrite: true
displayName: "Copy package.json for cache key (root)"

- task: Cache@2
inputs:
key: "npm-cache-creator-root | $(Build.SourcesDirectory)/Temp/root/package.json"
path: $(Build.SourcesDirectory)/survey-creator/node_modules
cacheHitVar: NPM_CACHE_RESTORED_ROOT
displayName: Cache NPM

- task: Npm@1
displayName: "Npm install root"
inputs:
command: install
verbose: false
workingDir: $(Build.SourcesDirectory)/survey-creator
condition: ne(variables.NPM_CACHE_RESTORED_ROOT, 'true')

# - script: |
# cd $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-core
# npm install
Expand Down
92 changes: 92 additions & 0 deletions devops-pull-requests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,29 @@ jobs:
SourceFolder: $(System.ArtifactsDirectory)/SurveyJSCreatorV2BuildCore-$(Build.BuildId)
TargetFolder: "$(Build.SourcesDirectory)/survey-creator/packages/survey-creator-core/build"

- task: CopyFiles@2
inputs:
SourceFolder: "$(Build.SourcesDirectory)/survey-creator/"
Contents: "package.json"
TargetFolder: "$(Build.SourcesDirectory)/Temp/root/"
OverWrite: true
displayName: "Copy package.json for cache key (root)"

- task: Cache@2
inputs:
key: "npm-cache-creator-root | $(Build.SourcesDirectory)/Temp/root/package.json"
path: $(Build.SourcesDirectory)/survey-creator/node_modules
cacheHitVar: NPM_CACHE_RESTORED_ROOT
displayName: Cache NPM

- task: Npm@1
displayName: "Npm install root"
inputs:
command: install
verbose: false
workingDir: $(Build.SourcesDirectory)/survey-creator
condition: ne(variables.NPM_CACHE_RESTORED_ROOT, 'true')

# - script: |
# cd $(Build.SourcesDirectory)/survey-library/build/survey-react-ui
# sed -i 's/"survey-core": .*"/"survey-core": "latest"/g' package.json
Expand Down Expand Up @@ -344,6 +367,29 @@ jobs:
Contents: "**"
TargetFolder: "$(Build.SourcesDirectory)/survey-creator/packages/survey-creator-core/build"

- task: CopyFiles@2
inputs:
SourceFolder: "$(Build.SourcesDirectory)/survey-creator/"
Contents: "package.json"
TargetFolder: "$(Build.SourcesDirectory)/Temp/root/"
OverWrite: true
displayName: "Copy package.json for cache key (root)"

- task: Cache@2
inputs:
key: "npm-cache-creator-root | $(Build.SourcesDirectory)/Temp/root/package.json"
path: $(Build.SourcesDirectory)/survey-creator/node_modules
cacheHitVar: NPM_CACHE_RESTORED_ROOT
displayName: Cache NPM

- task: Npm@1
displayName: "Npm install root"
inputs:
command: install
verbose: false
workingDir: $(Build.SourcesDirectory)/survey-creator
condition: ne(variables.NPM_CACHE_RESTORED_ROOT, 'true')

- script: |
cd $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-angular
npm i
Expand Down Expand Up @@ -450,6 +496,29 @@ jobs:
Contents: "**"
TargetFolder: "$(Build.SourcesDirectory)/survey-creator/packages/survey-creator-core/build"

- task: CopyFiles@2
inputs:
SourceFolder: "$(Build.SourcesDirectory)/survey-creator/"
Contents: "package.json"
TargetFolder: "$(Build.SourcesDirectory)/Temp/root/"
OverWrite: true
displayName: "Copy package.json for cache key (root)"

- task: Cache@2
inputs:
key: "npm-cache-creator-root | $(Build.SourcesDirectory)/Temp/root/package.json"
path: $(Build.SourcesDirectory)/survey-creator/node_modules
cacheHitVar: NPM_CACHE_RESTORED_ROOT
displayName: Cache NPM

- task: Npm@1
displayName: "Npm install root"
inputs:
command: install
verbose: false
workingDir: $(Build.SourcesDirectory)/survey-creator
condition: ne(variables.NPM_CACHE_RESTORED_ROOT, 'true')

- script: |
cd $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-vue
npm i
Expand Down Expand Up @@ -565,6 +634,29 @@ jobs:
Contents: "**"
TargetFolder: "$(Build.SourcesDirectory)/survey-creator/packages/survey-creator-core/build"

- task: CopyFiles@2
inputs:
SourceFolder: "$(Build.SourcesDirectory)/survey-creator/"
Contents: "package.json"
TargetFolder: "$(Build.SourcesDirectory)/Temp/root/"
OverWrite: true
displayName: "Copy package.json for cache key (root)"

- task: Cache@2
inputs:
key: "npm-cache-creator-root | $(Build.SourcesDirectory)/Temp/root/package.json"
path: $(Build.SourcesDirectory)/survey-creator/node_modules
cacheHitVar: NPM_CACHE_RESTORED_ROOT
displayName: Cache NPM

- task: Npm@1
displayName: "Npm install root"
inputs:
command: install
verbose: false
workingDir: $(Build.SourcesDirectory)/survey-creator
condition: ne(variables.NPM_CACHE_RESTORED_ROOT, 'true')

# - script: |
# cd $(Build.SourcesDirectory)/survey-library/build/survey-js-ui
# sed -i 's/"survey-core": .*"/"survey-core": "latest"/g' package.json
Expand Down
52 changes: 44 additions & 8 deletions devops-visual-regression-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -374,10 +374,28 @@ jobs:
SourceFolder: $(System.ArtifactsDirectory)/SurveyJSCreatorV2Build-VRT-Core-$(Build.BuildId)
TargetFolder: "$(Build.SourcesDirectory)/survey-creator/packages/survey-creator-core/build"

- script: |
cd $(Build.SourcesDirectory)/survey-creator
npm install devextreme-screenshot-comparer -D
displayName: "install devextreme-screenshot-comparer to root"
- task: CopyFiles@2
inputs:
SourceFolder: "$(Build.SourcesDirectory)/survey-creator/"
Contents: "package.json"
TargetFolder: "$(Build.SourcesDirectory)/Temp/root/"
OverWrite: true
displayName: "Copy package.json for cache key (root)"

- task: Cache@2
inputs:
key: "npm-cache-creator-root | $(Build.SourcesDirectory)/Temp/root/package.json"
path: $(Build.SourcesDirectory)/survey-creator/node_modules
cacheHitVar: NPM_CACHE_RESTORED_ROOT
displayName: Cache NPM

- task: Npm@1
displayName: "Npm install root"
inputs:
command: install
verbose: false
workingDir: $(Build.SourcesDirectory)/survey-creator
condition: ne(variables.NPM_CACHE_RESTORED_ROOT, 'true')

- script: |
cd $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-angular
Expand Down Expand Up @@ -507,10 +525,28 @@ jobs:
SourceFolder: $(System.ArtifactsDirectory)/SurveyJSCreatorV2Build-VRT-Core-$(Build.BuildId)
TargetFolder: "$(Build.SourcesDirectory)/survey-creator/packages/survey-creator-core/build"

- script: |
cd $(Build.SourcesDirectory)/survey-creator
npm install devextreme-screenshot-comparer -D
displayName: "install devextreme-screenshot-comparer to root"
- task: CopyFiles@2
inputs:
SourceFolder: "$(Build.SourcesDirectory)/survey-creator/"
Contents: "package.json"
TargetFolder: "$(Build.SourcesDirectory)/Temp/root/"
OverWrite: true
displayName: "Copy package.json for cache key (root)"

- task: Cache@2
inputs:
key: "npm-cache-creator-root | $(Build.SourcesDirectory)/Temp/root/package.json"
path: $(Build.SourcesDirectory)/survey-creator/node_modules
cacheHitVar: NPM_CACHE_RESTORED_ROOT
displayName: Cache NPM

- task: Npm@1
displayName: "Npm install root"
inputs:
command: install
verbose: false
workingDir: $(Build.SourcesDirectory)/survey-creator
condition: ne(variables.NPM_CACHE_RESTORED_ROOT, 'true')

- script: |
cd $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-vue
Expand Down
17 changes: 9 additions & 8 deletions functionalTests/designer/responsiveness.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,28 +105,29 @@ test("Responsive creator: property grid", async (t) => {
});
const westResizer = Selector(".svc-resizer-west");
const eastResizer = Selector(".svc-resizer-east");
let pgWidth = 481;
await t
.resizeWindow(1920, 900)
.expect(westResizer.visible).ok()
.expect(eastResizer.visible).notOk()

.click(questions.find(".sv-string-editor").withText("question1"))
.expect(propertyGridSelector.visible).ok()
.expect(propertyGridSelector.offsetWidth).eql(451)
.expect(propertyGridSelector.offsetWidth).eql(pgWidth)
.expect(flyoutPropertyGrid.exists).notOk()
.expect(questionToolbarActions.count).eql(4)

.drag(westResizer, 100, 0)
.expect(propertyGridSelector.offsetWidth).eql(371)
.drag(westResizer, 150, 0)
.expect(propertyGridSelector.offsetWidth).eql(pgWidth - 150)

.resizeWindow(750, 700)
.click(expandButtonSelector)
.expect(propertyGridSelector.visible).ok()
.expect(propertyGridSelector.offsetWidth).eql(371)
.expect(propertyGridSelector.offsetWidth).eql(pgWidth - 150)
.expect(flyoutPropertyGrid.exists).ok()

.drag(westResizer, -150, 0)
.expect(propertyGridSelector.offsetWidth).eql(521)
.expect(propertyGridSelector.offsetWidth).eql(pgWidth)

.click(collapseButtonSelector)
.expect(propertyGridSelector.visible).notOk()
Expand All @@ -149,13 +150,13 @@ test("Responsive creator: property grid", async (t) => {
await t
.expect(westResizer.visible).notOk()
.expect(eastResizer.visible).ok()
.expect(propertyGridSelector.offsetWidth).eql(521)
.expect(propertyGridSelector.offsetWidth).eql(pgWidth)

.drag(eastResizer, -120, 0)
.expect(propertyGridSelector.offsetWidth).eql(401)
.expect(propertyGridSelector.offsetWidth).eql(pgWidth - 120)

.drag(eastResizer, 100, 0)
.expect(propertyGridSelector.offsetWidth).eql(501);
.expect(propertyGridSelector.offsetWidth).eql(pgWidth - 20);
});

test("Responsive creator: designer tab for mobile devices", async (t) => {
Expand Down
4 changes: 2 additions & 2 deletions functionalTests/designer/survey-width.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ test("Change survey width 1", async (t) => {
.pressKey("tab");

await t
.expect(Selector(".sd-container-modern").clientWidth).gte(1200)
.expect(Selector(".sd-container-modern").clientWidth).lte(1220);
.expect(Selector(".sd-container-modern").clientWidth).gte(1175)
.expect(Selector(".sd-container-modern").clientWidth).lte(1200);
});

test("Change survey width 2", async (t) => {
Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
"prepare": "husky install"
},
"devDependencies": {
"axe-core": "^3.5.6",
"axe-testcafe": "3.0.0",
"@types/lodash": "4.14.186",
"@typescript-eslint/eslint-plugin": "^5.41.0",
"@typescript-eslint/parser": "^5.41.0",
"concurrently": "^7",
Expand All @@ -26,6 +29,6 @@
"husky": "^7.0.4",
"testcafe": "3.3.0",
"get-func-name": "2.0.0",
"@types/lodash": "4.14.186"
"puppeteer": "22.13.1"
}
}
Loading

0 comments on commit d783dcb

Please sign in to comment.